You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .changeset/five-chairs-poke.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,30 @@
1
1
---
2
2
"@clack/prompts": minor
3
+
"@clack/core": minor
3
4
---
4
5
5
6
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.
6
7
8
+
This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
9
+
7
10
```ts
8
11
// Per-instance customization
9
12
const spinner =prompts.spinner({
10
13
cancelMessage: 'Operación cancelada', // "Operation cancelled" in Spanish
11
14
errorMessage: 'Se produjo un error'// "An error occurred" in Spanish
12
15
});
13
16
14
-
// Global customization via settings
17
+
// Global customization via updateSettings
15
18
prompts.updateSettings({
16
19
messages: {
17
20
cancel: 'Operación cancelada', // "Operation cancelled" in Spanish
18
21
error: 'Se produjo un error'// "An error occurred" in Spanish
0 commit comments