···11+---
22+"@clack/prompts": minor
33+---
44+55+Updates the API for stopping spinners and progress bars to be clearer
66+77+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()`:
88+99+```diff
1010+const spinner = prompts.spinner();
1111+spinner.start();
1212+1313+// Cancelling a spinner
1414+- spinner.stop(undefined, 1);
1515++ spinner.cancel();
1616+1717+// Stopping with an error
1818+- spinner.stop(undefined, 2);
1919++ spinner.error();
2020+```
2121+2222+As before, you can pass a message to each method to customize the output displayed:
2323+2424+```js
2525+spinner.cancel("Operation cancelled by user");
2626+progressBar.error("An error occurred during processing");
2727+```