Skip to content

Commit f45e432

Browse files
[ci] release (alpha) (#251)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent cfd9daa commit f45e432

File tree

5 files changed

+137
-5
lines changed

5 files changed

+137
-5
lines changed

.changeset/pre.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,23 @@
77
"@clack/core": "0.4.1",
88
"@clack/prompts": "0.10.0"
99
},
10-
"changesets": []
10+
"changesets": [
11+
"afraid-socks-deny",
12+
"dirty-papayas-happen",
13+
"empty-buses-wonder",
14+
"famous-turkeys-burn",
15+
"five-chairs-poke",
16+
"free-wasps-decide",
17+
"happy-parents-explain",
18+
"healthy-candles-admire",
19+
"honest-singers-cough",
20+
"hot-turkeys-knock",
21+
"legal-bags-tie",
22+
"lemon-monkeys-help",
23+
"nasty-parrots-laugh",
24+
"orange-deers-battle",
25+
"slimy-roses-own",
26+
"tall-cows-fold",
27+
"thin-socks-travel"
28+
]
1129
}

packages/core/CHANGELOG.md

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

3+
## 1.0.0-alpha.0
4+
5+
### Major Changes
6+
7+
- c713fd5: The package is now distributed as ESM-only. In `v0` releases, the package was dual-published as CJS and ESM.
8+
9+
For existing CJS projects using Node v20+, please see Node's guide on [Loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require).
10+
11+
### Minor Changes
12+
13+
- 729bbb6: Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the `updateSettings` function to support multilingual CLIs.
14+
15+
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
16+
17+
```ts
18+
// Per-instance customization
19+
const spinner = prompts.spinner({
20+
cancelMessage: "Operación cancelada", // "Operation cancelled" in Spanish
21+
errorMessage: "Se produjo un error", // "An error occurred" in Spanish
22+
});
23+
24+
// Global customization via updateSettings
25+
prompts.updateSettings({
26+
messages: {
27+
cancel: "Operación cancelada", // "Operation cancelled" in Spanish
28+
error: "Se produjo un error", // "An error occurred" in Spanish
29+
},
30+
});
31+
32+
// Settings can now be accessed directly
33+
console.log(prompts.settings.messages.cancel); // "Operación cancelada"
34+
35+
// Direct options take priority over global settings
36+
const spinner = prompts.spinner({
37+
cancelMessage: "Cancelled", // This will be used instead of the global setting
38+
});
39+
```
40+
41+
- f2c2b89: Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package.
42+
43+
### Patch Changes
44+
45+
- 6868c1c: Adds a new `selectableGroups` boolean to the group multi-select prompt. Using `selectableGroups: false` will disable the ability to select a top-level group, but still allow every child to be selected individually.
46+
- a4f5034: Fixes an edge case for placeholder values. Previously, when pressing `enter` on an empty prompt, placeholder values would be ignored. Now, placeholder values are treated as the prompt value.
47+
- a36292b: Fix "TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)" error happening on Windows for non-tty terminals.
48+
349
## 0.4.1
450

551
### 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.4.1",
3+
"version": "1.0.0-alpha.0",
44
"type": "module",
55
"main": "./dist/index.mjs",
66
"module": "./dist/index.mjs",
@@ -21,7 +21,10 @@
2121
"url": "https://github.com/bombshell-dev/clack/issues"
2222
},
2323
"homepage": "https://github.com/bombshell-dev/clack/tree/main/packages/core#readme",
24-
"files": ["dist", "CHANGELOG.md"],
24+
"files": [
25+
"dist",
26+
"CHANGELOG.md"
27+
],
2528
"keywords": [
2629
"ask",
2730
"clack",

packages/prompts/CHANGELOG.md

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

3+
## 1.0.0-alpha.0
4+
5+
### Major Changes
6+
7+
- c713fd5: The package is now distributed as ESM-only. In `v0` releases, the package was dual-published as CJS and ESM.
8+
9+
For existing CJS projects using Node v20+, please see Node's guide on [Loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require).
10+
11+
### Minor Changes
12+
13+
- 99c3530: Adds `format` option to the note prompt to allow formatting of individual lines
14+
- 0aaee4c: Added new `taskLog` prompt for log output which is cleared on success
15+
- 729bbb6: Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the `updateSettings` function to support multilingual CLIs.
16+
17+
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
18+
19+
```ts
20+
// Per-instance customization
21+
const spinner = prompts.spinner({
22+
cancelMessage: "Operación cancelada", // "Operation cancelled" in Spanish
23+
errorMessage: "Se produjo un error", // "An error occurred" in Spanish
24+
});
25+
26+
// Global customization via updateSettings
27+
prompts.updateSettings({
28+
messages: {
29+
cancel: "Operación cancelada", // "Operation cancelled" in Spanish
30+
error: "Se produjo un error", // "An error occurred" in Spanish
31+
},
32+
});
33+
34+
// Settings can now be accessed directly
35+
console.log(prompts.settings.messages.cancel); // "Operación cancelada"
36+
37+
// Direct options take priority over global settings
38+
const spinner = prompts.spinner({
39+
cancelMessage: "Cancelled", // This will be used instead of the global setting
40+
});
41+
```
42+
43+
- 44df9af: Adds a new `groupSpacing` option to grouped multi-select prompts. If set to an integer greater than 0, it will add that number of new lines between each group.
44+
- f2c2b89: Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package.
45+
- c45b9fb: Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations.
46+
- 9a09318: Adds new `progress` prompt to display a progess-bar
47+
- 19558b9: Added support for custom frames in spinner prompt
48+
49+
### Patch Changes
50+
51+
- 46dc0a4: Fixes multiselect only shows hints on the first item in the options list. Now correctly shows hints for all selected options with hint property.
52+
- 17342d2: Exposes a new `SpinnerResult` type to describe the return type of `spinner`
53+
- 6868c1c: Adds a new `selectableGroups` boolean to the group multi-select prompt. Using `selectableGroups: false` will disable the ability to select a top-level group, but still allow every child to be selected individually.
54+
- 7a556ad: Updates all prompts to accept a custom `output` and `input` stream
55+
- 7cc8a55: Messages passed to the `stop` method of a spinner no longer have dots stripped.
56+
- 2048eb1: Fix spinner's dots behavior with custom frames
57+
- Updated dependencies [729bbb6]
58+
- Updated dependencies [6868c1c]
59+
- Updated dependencies [a4f5034]
60+
- Updated dependencies [c713fd5]
61+
- Updated dependencies [a36292b]
62+
- Updated dependencies [f2c2b89]
63+
- @clack/core@1.0.0-alpha.0
64+
365
## 0.10.0
466

567
### Minor 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.10.0",
3+
"version": "1.0.0-alpha.0",
44
"type": "module",
55
"main": "./dist/index.mjs",
66
"module": "./dist/index.mjs",
@@ -21,7 +21,10 @@
2121
"url": "https://github.com/bombshell-dev/clack/issues"
2222
},
2323
"homepage": "https://github.com/bombshell-dev/clack/tree/main/packages/prompts#readme",
24-
"files": ["dist", "CHANGELOG.md"],
24+
"files": [
25+
"dist",
26+
"CHANGELOG.md"
27+
],
2528
"author": {
2629
"name": "Nate Moore",
2730
"email": "[email protected]",

0 commit comments

Comments
 (0)