Skip to content

Commit 807cac3

Browse files
[ci] release (alpha)
1 parent 7530af0 commit 807cac3

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

.changeset/pre.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
"mean-years-remain",
4242
"moody-baboons-greet",
4343
"nasty-parrots-laugh",
44+
"odd-bikes-nail",
4445
"orange-deers-battle",
46+
"plenty-snakes-ring",
4547
"rich-plants-call",
4648
"sharp-lemons-build",
4749
"short-squids-battle",

packages/prompts/CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
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+
31+
### Patch Changes
32+
33+
- 7530af0: Fixes wrapping of cancelled and success messages of select prompt
34+
335
## 1.0.0-alpha.6
436

537
### 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)