Skip to content

Commit 20cfc55

Browse files
committed
feat!: v1.0.0 release 🎉 (#17)
* Declarative key mapping via config files (`yaml`, `json`, `toml`, etc.) * Support for key sequences like `ctrl-b n`, `g g`, etc. * Support key groups (`@upper`, `@any`, etc.) * Derive-based config parsing via `keymap_derive` * Backend-agnostic design with support for `crossterm`, `termion`, `web_sys`, etc. * `Config<T>`: loads keys exclusively from config files * `DerivedConfig<T>`: merges config and `#[key("..")]` annotations
1 parent 00a6b18 commit 20cfc55

37 files changed

+2944
-700
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

.github/release-please-config.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"prerelease-type": "rc",
4+
"prerelease": true,
5+
"include-v-in-tag": true,
6+
"packages": {
7+
".": {
8+
"release-type": "rust",
9+
"component": "keymap"
10+
},
11+
"keymap_derive": {
12+
"release-type": "rust",
13+
"component": "keymap_derive"
14+
},
15+
"keymap_parser": {
16+
"release-type": "rust",
17+
"component": "keymap_parser"
18+
}
19+
},
20+
"plugins": [
21+
{
22+
"type": "cargo-workspace",
23+
"merge": false
24+
},
25+
{
26+
"type": "linked-versions",
27+
"groupName": "crates",
28+
"components": [
29+
"keymap",
30+
"keymap_derive",
31+
"keymap_parser"
32+
]
33+
}
34+
]
35+
}

.github/workflows/cd.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v3
1818

19-
- uses: google-github-actions/release-please-action@v3
19+
- uses: googleapis/release-please-action@v4
2020
id: release
2121
with:
22-
release-type: rust
22+
config-file: .github/release-please-config.json
23+
manifest-file: .github/.release-please-manifest.json
2324

2425
outputs:
2526
release_created: ${{ steps.release.outputs.release_created }}
@@ -35,9 +36,13 @@ jobs:
3536
- name: Install Rust toolchain
3637
uses: dtolnay/rust-toolchain@stable
3738

39+
- name: Install cargo-workspaces
40+
run: cargo install cargo-workspaces
41+
3842
- name: Publish
3943
run: >
40-
cargo publish
41-
--verbose
44+
cargo workspaces publish
45+
--yes
4246
--locked
47+
--from-git
4348
--token ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
- name: Build
1919
run: cargo build --verbose
2020
- name: Run tests
21-
run: cargo test --verbose
21+
run: cargo test --workspace --verbose

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/target
22
Cargo.lock
33
.DS_Store
4+
.vscode
45

56
# Devenv
67
.devenv*
78
devenv.local.nix
9+
.env

CHANGELOG.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
# Changelog
22

3-
## [0.4.1](https://github.com/rezigned/keymap-rs/compare/v0.4.0...v0.4.1) (2024-11-24)
3+
## [1.0.0](https://github.com/rezigned/keymap-rs/compare/v0.4.1...v1.0.0) (2025-06-08)
4+
5+
### ⚠ BREAKING CHANGES
6+
7+
* v1.0.0 release 🎉 ([#17](https://github.com/rezigned/keymap-rs/issues/17))
8+
9+
### Features
410

11+
* v1.0.0 release 🎉 ([#17](https://github.com/rezigned/keymap-rs/issues/17)) ([8da2b52](https://github.com/rezigned/keymap-rs/commit/8da2b525ac0a628583bc8945a3eb74cd8a6c90dd))
12+
* **Declarative key mapping** via config files (`yaml`, `json`, `toml`, etc.)
13+
* **Support for key sequences** like `ctrl-b n`, `g g`, etc.
14+
* **Pattern-matching key groups** (`@upper`, `@any`, etc.)
15+
* **Derive-based config parsing** via `keymap_derive`
16+
* **Backend-agnostic** design with support for `crossterm`, `termion`, `web_sys`, etc.
17+
* `Config<T>`: loads keys exclusively from config files
18+
* `DerivedConfig<T>`: merges config and `#[key("..")]` annotations
19+
20+
## [0.4.1](https://github.com/rezigned/keymap-rs/compare/v0.4.0...v0.4.1) (2024-11-24)
521

622
### Bug Fixes
723

824
* update dependencies ([#12](https://github.com/rezigned/keymap-rs/issues/12)) ([2d0bfda](https://github.com/rezigned/keymap-rs/commit/2d0bfda90e3eff9c2b89079f1096f08de666b600))
925

1026
## [0.4.0](https://github.com/rezigned/keymap-rs/compare/v0.3.0...v0.4.0) (2023-10-11)
1127

12-
1328
### Features
1429

1530
* Convert from Backend::Key to Node ([#10](https://github.com/rezigned/keymap-rs/issues/10)) ([2b46c7f](https://github.com/rezigned/keymap-rs/commit/2b46c7fe0fa4ec0f23555642c3f1464544cf59d4))
1631

1732
## [0.3.0](https://github.com/rezigned/keymap-rs/compare/v0.2.0...v0.3.0) (2023-09-24)
1833

19-
2034
### Features
2135

2236
* Expose 'parse' function ([#7](https://github.com/rezigned/keymap-rs/issues/7)) ([3180c28](https://github.com/rezigned/keymap-rs/commit/3180c28992f30de63a48b1d2647f99637e4d020d))
2337

2438
## [0.2.0](https://github.com/rezigned/keymap-rs/compare/v0.1.0...v0.2.0) (2023-08-01)
2539

26-
2740
### Features
2841

2942
* use char instead of u8 for parser's input to improve error message ([e1c1eb1](https://github.com/rezigned/keymap-rs/commit/e1c1eb1227443e86dbb3a806aee868ea14e9fe45))

Cargo.toml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "keymap"
3-
description = "A library for parsing terminal input events from configuration"
3+
description = "A library for parsing input events from configuration"
44
authors = ["Marut Khumtong <[email protected]>"]
5-
version = "0.4.1"
5+
version = "1.0.0"
66
homepage = "https://github.com/rezigned/keymap-rs"
77
repository = "https://github.com/rezigned/keymap-rs"
88
edition = "2021"
@@ -12,16 +12,22 @@ license = "MIT"
1212
[lib]
1313
doctest = false
1414

15+
[workspace]
16+
members = [
17+
"keymap_derive",
18+
"keymap_parser",
19+
]
20+
1521
[dependencies]
22+
keymap_parser = { path = "./keymap_parser", version = "1.0.0" }
23+
keymap_derive = { path = "./keymap_derive", version = "1.0.0", optional = true }
1624
crossterm = { version = "0.29", optional = true }
1725
termion = { version = "4.0", optional = true }
18-
pom = "3.4.0"
1926
serde = { version = "1.0", features = ["derive"] }
20-
strum = "0.27"
21-
strum_macros = "0.27"
2227

2328
[features]
24-
default = ["crossterm"]
29+
default = ["crossterm", "derive"]
30+
derive = ["dep:keymap_derive"]
2531

2632
[dev-dependencies]
2733
toml = "0.8"
@@ -30,6 +36,26 @@ toml = "0.8"
3036
name = "crossterm"
3137
required-features = ["crossterm"]
3238

39+
[[example]]
40+
name = "crossterm_derive"
41+
path = "examples/crossterm/derive.rs"
42+
required-features = ["crossterm", "derive"]
43+
44+
[[example]]
45+
name = "crossterm_derived_config"
46+
path = "examples/crossterm/derived_config.rs"
47+
required-features = ["crossterm", "derive"]
48+
3349
[[example]]
3450
name = "termion"
3551
required-features = ["termion"]
52+
53+
[[example]]
54+
name = "termion_derive"
55+
path = "examples/termion/derive.rs"
56+
required-features = ["termion", "derive"]
57+
58+
[[example]]
59+
name = "termion_derived_config"
60+
path = "examples/termion/derived_config.rs"
61+
required-features = ["termion", "derive"]

0 commit comments

Comments
 (0)