Skip to content

Commit 258dd69

Browse files
[ci] release (#214)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nate Moore <[email protected]>
1 parent 132002c commit 258dd69

File tree

9 files changed

+130
-91
lines changed

9 files changed

+130
-91
lines changed

.changeset/kind-llamas-beam.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

.changeset/lucky-maps-beam.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

.changeset/quiet-actors-wink.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/swift-jars-destroy.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/thin-moose-tease.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/core/CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# @clack/core
22

3+
## 0.4.0
4+
5+
### Minor Changes
6+
7+
- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.
8+
9+
`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).
10+
11+
```ts
12+
import { updateSettings } from "@clack/core";
13+
14+
// Support custom keybindings
15+
updateSettings({
16+
aliases: {
17+
w: "up",
18+
a: "left",
19+
s: "down",
20+
d: "right",
21+
},
22+
});
23+
```
24+
25+
> [!WARNING]
26+
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
27+
28+
- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).
29+
30+
31+
- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`).
32+
33+
| alias | action |
34+
| ----- | ------ |
35+
| `k` | up |
36+
| `l` | right |
37+
| `j` | down |
38+
| `h` | left |
39+
| `esc` | cancel |
40+
41+
### Patch Changes
42+
43+
- 51e12bc: Improves types for events and interaction states.
44+
345
## 0.3.5
446

547
### Patch Changes

packages/core/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clack/core",
3-
"version": "0.3.5",
3+
"version": "0.4.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",
@@ -22,7 +22,10 @@
2222
"url": "https://github.com/natemoo-re/clack/issues"
2323
},
2424
"homepage": "https://github.com/natemoo-re/clack/tree/main/packages/core#readme",
25-
"files": ["dist", "CHANGELOG.md"],
25+
"files": [
26+
"dist",
27+
"CHANGELOG.md"
28+
],
2629
"keywords": [
2730
"ask",
2831
"clack",

packages/prompts/CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
11
# @clack/prompts
22

3+
## 0.9.0
4+
5+
### Minor Changes
6+
7+
- a83d2f8: Adds a new `updateSettings()` function to support new global keybindings.
8+
9+
`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).
10+
11+
```ts
12+
import { updateSettings } from "@clack/prompts";
13+
14+
// Support custom keybindings
15+
updateSettings({
16+
aliases: {
17+
w: "up",
18+
a: "left",
19+
s: "down",
20+
d: "right",
21+
},
22+
});
23+
```
24+
25+
> [!WARNING]
26+
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.
27+
28+
- 801246b: Adds a new `signal` option to support programmatic prompt cancellation with an [abort controller](https://kettanaito.com/blog/dont-sleep-on-abort-controller).
29+
30+
One example use case is automatically cancelling a prompt after a timeout.
31+
32+
```ts
33+
const shouldContinue = await confirm({
34+
message: "This message will self destruct in 5 seconds",
35+
signal: AbortSignal.timeout(5000),
36+
});
37+
```
38+
39+
Another use case is racing a long running task with a manual prompt.
40+
41+
```ts
42+
const abortController = new AbortController();
43+
44+
const projectType = await Promise.race([
45+
detectProjectType({
46+
signal: abortController.signal,
47+
}),
48+
select({
49+
message: "Pick a project type.",
50+
options: [
51+
{ value: "ts", label: "TypeScript" },
52+
{ value: "js", label: "JavaScript" },
53+
{ value: "coffee", label: "CoffeeScript", hint: "oh no" },
54+
],
55+
signal: abortController.signal,
56+
}),
57+
]);
58+
59+
abortController.abort();
60+
```
61+
62+
- a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the `escape` key to cancel (`ctrl+c`).
63+
64+
| alias | action |
65+
| ----- | ------ |
66+
| `k` | up |
67+
| `l` | right |
68+
| `j` | down |
69+
| `h` | left |
70+
| `esc` | cancel |
71+
72+
### Patch Changes
73+
74+
- f9f139d: Adapts `spinner` output for static CI environments
75+
- Updated dependencies [a83d2f8]
76+
- Updated dependencies [801246b]
77+
- Updated dependencies [a83d2f8]
78+
- Updated dependencies [51e12bc]
79+
- @clack/core@0.4.0
80+
381
## 0.8.2
482

583
### Patch Changes

packages/prompts/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clack/prompts",
3-
"version": "0.8.2",
3+
"version": "0.9.0",
44
"type": "module",
55
"main": "./dist/index.cjs",
66
"module": "./dist/index.mjs",
@@ -22,7 +22,10 @@
2222
"url": "https://github.com/natemoo-re/clack/issues"
2323
},
2424
"homepage": "https://github.com/natemoo-re/clack/tree/main/packages/prompts#readme",
25-
"files": ["dist", "CHANGELOG.md"],
25+
"files": [
26+
"dist",
27+
"CHANGELOG.md"
28+
],
2629
"author": {
2730
"name": "Nate Moore",
2831
"email": "[email protected]",

0 commit comments

Comments
 (0)