Skip to content

Commit 8b982cf

Browse files
authored
chore: release 0.2.0 (#39)
1 parent 8cc77bd commit 8b982cf

File tree

7 files changed

+105
-6
lines changed

7 files changed

+105
-6
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "cross-stream"
33
edition = "2021"
4-
version = "0.2.0-dev"
4+
version = "0.2.0"
55
description = "An event stream store for personal, local-first use, specializing in event sourcing."
66
license = "MIT"
77
repository = "https://github.com/cablehead/xs"

changes/0.2.0-docs.png

792 KB
Loading

changes/0.2.0-logging.png

519 KB
Loading

changes/0.2.0.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## Highlights
2+
3+
- `.get` is now available as an internal `nu` command (for handlers)
4+
- We have a new docs site, powered by [astro starlight](https://starlight.astro.build)
5+
6+
![new docs site](./0.2.0-docs.png)
7+
8+
### Handlers
9+
10+
- `env` is now preserved from your handler configuration script and between handler calls. This makes it convenient to set variables, e.g. access tokens, from your configuration script and to preserve state between handler calls.
11+
- Your configuration script can now specify [modules](https://cablehead.github.io/xs/reference/handlers/#configuration-record-fields) to load for your handler.
12+
13+
### Miscellaneous
14+
15+
- Nushell to v0.101.0 🚀
16+
- Fjall to 2.4.4 🚀
17+
- Improved tracing / logging
18+
19+
![logging](./0.2.0-logging.png)
20+
21+
## Breaking Changes
22+
23+
- There is no longer the concept of "stateful" handers, which take a second argument for state. Since `env` is preserved between handler calls, you can use that to store state.
24+
- All configuration for handlers has been moved from the frame metadata to a configuration script.
25+
- The handler configuration script now returns a table of configuration options instead of the closure.
26+
27+
## Raw commit messages:
28+
29+
- feat: add .get as in internal nu command
30+
- docs: add reference/generators
31+
- docs: nu-fmt
32+
- docs: port reference/handlers over from the wiki
33+
- docs: typo
34+
- docs: getting-started/first-stream
35+
- docs: tweaks to installation and architecture
36+
- docs: add an architecture overview
37+
- chore: update next release to 0.2.0: we're skipping the path 0.1.1 took
38+
- chore: update to Nushell v0.101.0
39+
- chore: bump fjall dependency to 2.4.4
40+
- docs: getting started / installation
41+
- feat: move handler config out of frame meta to a configuration script (#37)
42+
- fix: restore the .rm to .remove alias
43+
- feat(nu): replace async/await with sync operations in command implementations
44+
- refactor: move AppendCommand buffer to nu/commands
45+
- feat: add sync versions of the Store.cas_* methods
46+
- feat: add a sync version of Store.read: that only retrieves historic frames
47+
- feat: move cleaning up expired frames to a background thread
48+
- feat: drop async from store.append -- it's not needed
49+
- refactor: store into its own module, including ttl
50+
- refactor: move topic_index_key from Store impl to standalone function
51+
- refactor: Store::new doesn't require async
52+
- refactor: move compaction from ReadOptions to inline tasks.rs, match handler pattern
53+
- refactor: consolidate thread pool and span handling
54+
- example(discord): update to make use of modules and with_env
55+
- feat: add with_env variables option to handler registration
56+
- feat: rename use_modules to modules
57+
- feat: add the ability to load modules to handlers
58+
- feat(deps): switch from async-std to tokio runtime for cacache
59+
- chore: .gitignore
60+
- fix: backoff for logging long outstanding spans
61+
- feat: fleshing out tracing (#35)
62+
- fix: updated handlers now start, on restart (#34)
63+
- example(discord): reduce heartbeat ttl to 5mins

docs/src/content/docs/reference/handlers.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To register a handler, append a registration script with the topic
3737
handler's behavior:
3838

3939
```nushell
40-
{
40+
r###'{
4141
# Required: Handler closure
4242
process: {|frame|
4343
if $frame.topic == "ping" {
@@ -62,7 +62,7 @@ handler's behavior:
6262
suffix: ".response" # Output topic suffix
6363
ttl: "head:1" # Keep only most recent frame
6464
}
65-
} | .append echo.register
65+
}'### | .append echo.register
6666
```
6767

6868
The registration script is stored in CAS and evaluated to obtain the handler's
@@ -94,14 +94,14 @@ The `return_options` field controls how return values are handled:
9494
The `modules` option allows handlers to use custom Nushell modules:
9595

9696
```nushell
97-
{
97+
r###'{
9898
process: {|frame|
9999
my-math double 8 # Use module command
100100
}
101101
modules: {
102102
"my-math": "export def double [x] { $x * 2 }"
103103
}
104-
} | .append processor.register
104+
}'### | .append processor.register
105105
```
106106

107107
## State and Environment

notes/how-to-release.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
```nushell
2+
# update version in Cargo.toml
3+
let PREVIOUS_RELEASE = "0.1.0"
4+
$env.RELEASE = open Cargo.toml | get package.version
5+
6+
# grab the raw commit messages between the previous release and now
7+
git log --format=%s $"v($PREVIOUS_RELEASE)..HEAD" | vipe | save $"changes/($env.RELEASE).md"
8+
9+
git commit -a -m "chore: release $env.RELEASE"
10+
git push
11+
12+
cargo publish
13+
cargo install cross-stream --locked
14+
15+
rm ~/bin/xs
16+
which xs # should be /Users/andy/.cargo/bin/xs
17+
# test the new version
18+
19+
let pkgdir = $"cross-stream-($env.RELEASE)"
20+
let tarball = $"cross-stream-($env.RELEASE)-macos.tar.gz"
21+
22+
mkdir $pkgdir
23+
cp /Users/andy/.cargo/bin/xs $pkgdir
24+
tar -czvf $tarball -C $pkgdir xs
25+
26+
gh release create $"v($env.RELEASE)" -F $"changes/($env.RELEASE).md" $tarball
27+
28+
shasum -a 256 $tarball
29+
30+
# update: [email protected]:cablehead/homebrew-tap.git
31+
32+
brew uninstall cross-stream
33+
brew install cablehead/tap/cross-stream
34+
which xs # should be /opt/homebrew/bin/xs
35+
# test the new version
36+
```

0 commit comments

Comments
 (0)