Skip to content

Commit 58cb696

Browse files
[ci] release (alpha)
1 parent 38019c7 commit 58cb696

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

.changeset/pre.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"mean-years-remain",
4242
"moody-baboons-greet",
4343
"nasty-parrots-laugh",
44+
"odd-bikes-nail",
4445
"orange-deers-battle",
4546
"rich-plants-call",
4647
"sharp-lemons-build",

packages/prompts/CHANGELOG.md

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

3+
## 1.0.0-alpha.7
4+
5+
### Minor Changes
6+
7+
- 38019c7: Updates the API for stopping spinners and progress bars to be clearer
8+
9+
Previously, both the spinner and progress bar components used a single `stop` method that accepted a code to indicate success, cancellation, or error. This update separates these into distinct methods: `stop()`, `cancel()`, and `error()`:
10+
11+
```diff
12+
const spinner = prompts.spinner();
13+
spinner.start();
14+
15+
// Cancelling a spinner
16+
- spinner.stop(undefined, 1);
17+
+ spinner.cancel();
18+
19+
// Stopping with an error
20+
- spinner.stop(undefined, 2);
21+
+ spinner.error();
22+
```
23+
24+
As before, you can pass a message to each method to customize the output displayed:
25+
26+
```js
27+
spinner.cancel("Operation cancelled by user");
28+
progressBar.error("An error occurred during processing");
29+
```
30+
331
## 1.0.0-alpha.6
432

533
### Minor Changes

packages/prompts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@clack/prompts",
3-
"version": "1.0.0-alpha.6",
3+
"version": "1.0.0-alpha.7",
44
"type": "module",
55
"main": "./dist/index.mjs",
66
"module": "./dist/index.mjs",

0 commit comments

Comments
 (0)