[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

v1 (#446)

authored by

Nate Moore and committed by
GitHub
(Jan 28, 2026, 10:00 AM EST) bc31ee8f a520163b

+98 -750
-5
.changeset/afraid-rabbits-grin.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic.
-5
.changeset/afraid-socks-deny.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fixes multiselect only shows hints on the first item in the options list. Now correctly shows hints for all selected options with hint property.
-5
.changeset/afraid-worms-help.md
··· 1 - --- 2 - '@clack/core': patch 3 - --- 4 - 5 - fix: export `*Options` types for prompts.
-5
.changeset/better-hotels-fall.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Clamp scrolling windows to 5 rows.
-6
.changeset/bright-hornets-destroy.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Prevents placeholder from being used as input value in text prompts
-5
.changeset/brown-banks-play.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fix placeholder rendering when using autocomplete.
-5
.changeset/busy-baths-work.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fixes rendering of multi-line messages and options in select prompt.
-6
.changeset/calm-trains-camp.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Prompts now have a `userInput` stored separately from their `value`.
-5
.changeset/chatty-islands-move.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Add withGuide support to note prompt
-5
.changeset/crazy-ducks-shine.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - feat: add styleFrame option for spinner
-5
.changeset/cruel-hairs-swim.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fix spinner clearing too many lines upwards when non-wrapping.
-6
.changeset/curvy-seals-sit.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Adds suggestion and path prompts
-5
.changeset/dirty-areas-sin.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Change styling of disabled multi-select options to have strikethrough.
-5
.changeset/dirty-papayas-happen.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Exposes a new `SpinnerResult` type to describe the return type of `spinner`
-5
.changeset/dull-singers-mate.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Wrap spinner output to allow for multi-line/wrapped messages.
-5
.changeset/early-maps-carry.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fix duplicated logs when scrolling through options with multiline messages by calculating `rowPadding` dynamically based on actual rendered lines instead of using a hardcoded value.
-5
.changeset/empty-buses-wonder.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Adds `format` option to the note prompt to allow formatting of individual lines
-5
.changeset/evil-rats-turn.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Strip destructive ANSI codes from task log messages.
-5
.changeset/famous-turkeys-burn.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Added new `taskLog` prompt for log output which is cleared on success
-5
.changeset/fine-swans-retire.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Add support for wrapped messages in multi line prompts
-32
.changeset/five-chairs-poke.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 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. 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 - 10 - ```ts 11 - // Per-instance customization 12 - const spinner = prompts.spinner({ 13 - cancelMessage: 'Operación cancelada', // "Operation cancelled" in Spanish 14 - errorMessage: 'Se produjo un error' // "An error occurred" in Spanish 15 - }); 16 - 17 - // Global customization via updateSettings 18 - prompts.updateSettings({ 19 - messages: { 20 - cancel: 'Operación cancelada', // "Operation cancelled" in Spanish 21 - error: 'Se produjo un error' // "An error occurred" in Spanish 22 - } 23 - }); 24 - 25 - // Settings can now be accessed directly 26 - console.log(prompts.settings.messages.cancel); // "Operación cancelada" 27 - 28 - // Direct options take priority over global settings 29 - const spinner = prompts.spinner({ 30 - cancelMessage: 'Cancelled', // This will be used instead of the global setting 31 - }); 32 - ```
-5
.changeset/floppy-laws-tan.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - fix note component overflow bug
-6
.changeset/free-wasps-decide.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - 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.
-6
.changeset/giant-dryers-serve.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Removed all trailing space in prompt output and fixed various padding rendering bugs.
-5
.changeset/great-lies-dance.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - fix(note): hard wrap text to column limit
-5
.changeset/happy-parents-explain.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - 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.
-5
.changeset/healthy-candles-admire.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Updates all prompts to accept a custom `output` and `input` stream
-5
.changeset/healthy-kings-play.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Use a default import for picocolors to avoid run time errors in some environments.
-5
.changeset/honest-singers-cough.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Messages passed to the `stop` method of a spinner no longer have dots stripped.
-5
.changeset/hot-turkeys-knock.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - 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.
-6
.changeset/itchy-coins-cry.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Allow disabled options in multi-select and select prompts.
-6
.changeset/kind-yaks-clean.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Add missing nullish checks around values.
-6
.changeset/late-squids-obey.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Support wrapping autocomplete and select prompts.
-8
.changeset/legal-bags-tie.md
··· 1 - --- 2 - "@clack/prompts": major 3 - "@clack/core": major 4 - --- 5 - 6 - The package is now distributed as ESM-only. In `v0` releases, the package was dual-published as CJS and ESM. 7 - 8 - 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).
-5
.changeset/lemon-monkeys-help.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - Fix "TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)" error happening on Windows for non-tty terminals.
-6
.changeset/light-waves-jog.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Switched from wrap-ansi to fast-wrap-ansi
-5
.changeset/little-ghosts-retire.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - Support short terminal windows when re-rendering by accounting for off-screen lines
-5
.changeset/long-friends-smile.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fixes missing guide when rendering empty log lines.
-5
.changeset/loose-days-hug.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Add `clear` method to spinner for stopping and clearing.
-5
.changeset/lucky-dragons-think.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - fix(note, box): handle CJK correctly
-5
.changeset/mean-mice-train.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - Validates initial values immediately when using text prompts with initialValue and validate props.
-6
.changeset/mean-turkeys-help.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Changes `placeholder` to be a visual hint rather than a tabbable value.
-5
.changeset/mean-years-remain.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Add support for signals in prompts, allowing them to be aborted.
-5
.changeset/moody-baboons-greet.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - Set initial values of auto complete prompt to first option when multiple is false.
-6
.changeset/nasty-parrots-laugh.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package.
-27
.changeset/odd-bikes-nail.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Updates the API for stopping spinners and progress bars to be clearer 6 - 7 - 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()`: 8 - 9 - ```diff 10 - const spinner = prompts.spinner(); 11 - spinner.start(); 12 - 13 - // Cancelling a spinner 14 - - spinner.stop(undefined, 1); 15 - + spinner.cancel(); 16 - 17 - // Stopping with an error 18 - - spinner.stop(undefined, 2); 19 - + spinner.error(); 20 - ``` 21 - 22 - As before, you can pass a message to each method to customize the output displayed: 23 - 24 - ```js 25 - spinner.cancel("Operation cancelled by user"); 26 - progressBar.error("An error occurred during processing"); 27 - ```
-5
.changeset/orange-deers-battle.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations.
-5
.changeset/plenty-snakes-ring.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fixes wrapping of cancelled and success messages of select prompt
-80
.changeset/pre.json
··· 1 - { 2 - "mode": "pre", 3 - "tag": "alpha", 4 - "initialVersions": { 5 - "@example/basic": "0.0.0", 6 - "@example/changesets": "0.0.0", 7 - "@clack/core": "0.4.1", 8 - "@clack/prompts": "0.10.0" 9 - }, 10 - "changesets": [ 11 - "afraid-rabbits-grin", 12 - "afraid-socks-deny", 13 - "afraid-worms-help", 14 - "better-hotels-fall", 15 - "bright-hornets-destroy", 16 - "brown-banks-play", 17 - "busy-baths-work", 18 - "calm-trains-camp", 19 - "chatty-islands-move", 20 - "crazy-ducks-shine", 21 - "cruel-hairs-swim", 22 - "curvy-seals-sit", 23 - "dirty-areas-sin", 24 - "dirty-papayas-happen", 25 - "dull-singers-mate", 26 - "early-maps-carry", 27 - "empty-buses-wonder", 28 - "evil-rats-turn", 29 - "famous-turkeys-burn", 30 - "fine-swans-retire", 31 - "five-chairs-poke", 32 - "floppy-laws-tan", 33 - "free-wasps-decide", 34 - "giant-dryers-serve", 35 - "great-lies-dance", 36 - "happy-parents-explain", 37 - "healthy-candles-admire", 38 - "healthy-kings-play", 39 - "honest-singers-cough", 40 - "hot-turkeys-knock", 41 - "itchy-coins-cry", 42 - "kind-yaks-clean", 43 - "late-squids-obey", 44 - "legal-bags-tie", 45 - "lemon-monkeys-help", 46 - "light-waves-jog", 47 - "little-ghosts-retire", 48 - "long-friends-smile", 49 - "loose-days-hug", 50 - "lucky-dragons-think", 51 - "mean-mice-train", 52 - "mean-turkeys-help", 53 - "mean-years-remain", 54 - "moody-baboons-greet", 55 - "nasty-parrots-laugh", 56 - "odd-bikes-nail", 57 - "orange-deers-battle", 58 - "plenty-snakes-ring", 59 - "rich-plants-call", 60 - "sharp-lemons-build", 61 - "short-squids-battle", 62 - "short-taxis-cross", 63 - "shy-ideas-shout", 64 - "silent-news-share", 65 - "slimy-roses-own", 66 - "solid-goats-shop", 67 - "strong-ravens-greet", 68 - "sweet-deers-smell", 69 - "sweet-garlics-win", 70 - "tall-cows-fold", 71 - "tall-keys-allow", 72 - "tasty-candies-tie", 73 - "thin-socks-travel", 74 - "three-boxes-follow", 75 - "three-ideas-refuse", 76 - "tough-crews-flow", 77 - "upset-showers-grow", 78 - "violet-hornets-turn" 79 - ] 80 - }
-5
.changeset/rich-plants-call.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - chore: use more accurate type to replace any in group select
-5
.changeset/sharp-lemons-build.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Using the `group` method, task logs can now have groups which themselves can have scrolling windows of logs.
-5
.changeset/short-squids-battle.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Handle `stop` calls on spinners which have not yet been started.
-6
.changeset/short-taxis-cross.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt.
-5
.changeset/shy-ideas-shout.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Added new `box` prompt for rendering boxed text, similar a note.
-5
.changeset/silent-news-share.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - fix: add missing guide line in autocomplete-multiselect
-5
.changeset/slimy-roses-own.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Adds new `progress` prompt to display a progess-bar
-6
.changeset/solid-goats-shop.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - "@clack/core": minor 4 - --- 5 - 6 - Add `clearOnError` option to password prompt to automatically clear input when validation fails
-5
.changeset/strong-ravens-greet.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Add a `required` option to autocomplete multiselect.
-5
.changeset/sweet-deers-smell.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - Avoid passing initial values to core when using auto complete prompt
-5
.changeset/sweet-garlics-win.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - fix: fix autocomplete bar color when validate
-5
.changeset/tall-cows-fold.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Fix spinner's dots behavior with custom frames
-6
.changeset/tall-keys-allow.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Add a new `withGuide` option to all prompts to disable the default clack border
-5
.changeset/tasty-candies-tie.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Show symbol when withGuide is true for log messages
-5
.changeset/thin-socks-travel.md
··· 1 - --- 2 - "@clack/prompts": minor 3 - --- 4 - 5 - Added support for custom frames in spinner prompt
-6
.changeset/three-boxes-follow.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - select-key: Fixed wrapping and added new `caseSensitive` option
-5
.changeset/three-ideas-refuse.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - refactor(progress): remove unnecessary return statement in start function
-6
.changeset/tough-crews-flow.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - "@clack/core": patch 4 - --- 5 - 6 - Allow custom writables as output stream.
-5
.changeset/upset-showers-grow.md
··· 1 - --- 2 - "@clack/core": patch 3 - --- 4 - 5 - add invert selection for multiselect prompt
-5
.changeset/violet-hornets-turn.md
··· 1 - --- 2 - "@clack/prompts": patch 3 - --- 4 - 5 - Update key binding text to show tab/space when navigating, and tab otherwise.
.github/assets/clack-dark.gif

This is a binary file and will not be displayed.

.github/assets/clack-light.gif

This is a binary file and will not be displayed.

.github/assets/clack-logs.png

This is a binary file and will not be displayed.

.github/assets/clack.gif

This is a binary file and will not be displayed.

.github/assets/clack.png

This is a binary file and will not be displayed.

+5 -16
README.md
··· 2 2 <br /> 3 3 4 4 <div align="center"> 5 - <picture> 6 - <source media="(prefers-color-scheme: dark)" srcset="/.github/assets/clack-dark.gif?sanitize=true"> 7 - <img alt="Clack logo" src="/.github/assets/clack-light.gif?sanitize=true" width="320"> 8 - </picture> 5 + <img alt="Clack logo" src="/.github/assets/clack.png?sanitize=true" width="320"> 9 6 </div> 10 - <h2 align="center">Effortlessly build beautiful command-line apps 🪄</h3> 7 + <h2 align="center">stylish interactive prompts for JavaScript CLIs</h3> 11 8 12 - <h4 align="center"><a href="packages/core#readme"><code>@clack/core</code></a>: unstyled, extensible primitives for CLIs</h4> 13 - <h4 align="center"><a href="packages/prompts#readme"><code>@clack/prompts</code></a>: beautiful, ready-to-use CLI prompt components</h4> 9 + <h4 align="center"><a href="packages/prompts#readme"><code>@clack/prompts</code></a>: opinionated, ready-to-use prompt components</h4> 14 10 15 - > [!WARNING] 16 - > Clack's `main` branch is tracking the [`alpha` release line for `v1.0.0+`](https://github.com/bombshell-dev/clack/pull/250). To view the relatively stable `v0` line, please browse the [v0](https://github.com/bombshell-dev/clack/tree/v0) branch. 11 + <h4 align="center"><a href="packages/core#readme"><code>@clack/core</code></a>: headless, unstyled prompt primitives</h4> 17 12 18 13 <br /> 19 14 <br /> 20 15 21 - <h3 align="center"><code>@clack/prompts</code> in action</h3> 22 - 23 - <div align="center"> 24 - 25 - https://user-images.githubusercontent.com/7118177/219649990-7afcb64a-246d-4ad2-9767-325298959790.mp4 26 - 27 - </div> 16 + <h3 align="center"><a href="https://bomb.sh/docs/clack/basics/getting-started/">Read the docs</a></h3>
+21 -70
packages/core/CHANGELOG.md
··· 1 1 # @clack/core 2 2 3 - ## 1.0.0-alpha.8 4 - 5 - ### Patch Changes 6 - 7 - - 68dbf9b: select-key: Fixed wrapping and added new `caseSensitive` option 8 - 9 - ## 1.0.0-alpha.7 10 - 11 - ### Patch Changes 12 - 13 - - 0718b07: fix: export `*Options` types for prompts. 14 - - 4ba2d78: Support short terminal windows when re-rendering by accounting for off-screen lines 15 - - acc4c3a: Add a new `withGuide` option to all prompts to disable the default clack border 16 - 17 - ## 1.0.0-alpha.6 18 - 19 - ### Patch Changes 20 - 21 - - b103ad3: Allow disabled options in multi-select and select prompts. 22 - 23 - ## 1.0.0-alpha.5 24 - 25 - ### Minor Changes 26 - 27 - - 55645c2: Support wrapping autocomplete and select prompts. 28 - 29 - ### Patch Changes 30 - 31 - - 71b5029: Add missing nullish checks around values. 32 - - 2310b43: Allow custom writables as output stream. 33 - 34 - ## 1.0.0-alpha.4 35 - 36 - ### Patch Changes 37 - 38 - - d98e033: add invert selection for multiselect prompt 39 - 40 - ## 1.0.0-alpha.3 41 - 42 - ### Minor Changes 43 - 44 - - 1604f97: Add `clearOnError` option to password prompt to automatically clear input when validation fails 45 - 46 - ### Patch Changes 47 - 48 - - 1a45f93: Switched from wrap-ansi to fast-wrap-ansi 49 - 50 - ## 1.0.0-alpha.2 51 - 52 - ### Patch Changes 53 - 54 - - 7df841d: Removed all trailing space in prompt output and fixed various padding rendering bugs. 55 - 56 - ## 1.0.0-alpha.1 57 - 58 - ### Minor Changes 59 - 60 - - 7bc3301: Prompts now have a `userInput` stored separately from their `value`. 61 - - 2837845: Adds suggestion and path prompts 62 - - df4eea1: Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt. 63 - 64 - ### Patch Changes 65 - 66 - - bfe0dd3: Prevents placeholder from being used as input value in text prompts 67 - - 34f52fe: Validates initial values immediately when using text prompts with initialValue and validate props. 68 - - 94fee2a: Changes `placeholder` to be a visual hint rather than a tabbable value. 69 - - 4f6b3c2: Set initial values of auto complete prompt to first option when multiple is false. 70 - - 8ead5d3: Avoid passing initial values to core when using auto complete prompt 71 - 72 - ## 1.0.0-alpha.0 3 + ## 1.0.0 73 4 74 5 ### Major Changes 75 6 ··· 79 10 80 11 ### Minor Changes 81 12 13 + - 7bc3301: Prompts now have a `userInput` stored separately from their `value`. 14 + - 2837845: Adds suggestion and path prompts 82 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. 83 16 84 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. ··· 107 40 }); 108 41 ``` 109 42 43 + - 55645c2: Support wrapping autocomplete and select prompts. 110 44 - f2c2b89: Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package. 45 + - df4eea1: Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt. 46 + - 1604f97: Add `clearOnError` option to password prompt to automatically clear input when validation fails 111 47 112 48 ### Patch Changes 113 49 50 + - 0718b07: fix: export `*Options` types for prompts. 51 + - bfe0dd3: Prevents placeholder from being used as input value in text prompts 114 52 - 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. 53 + - 7df841d: Removed all trailing space in prompt output and fixed various padding rendering bugs. 115 54 - 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. 55 + - b103ad3: Allow disabled options in multi-select and select prompts. 56 + - 71b5029: Add missing nullish checks around values. 116 57 - a36292b: Fix "TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)" error happening on Windows for non-tty terminals. 58 + - 1a45f93: Switched from wrap-ansi to fast-wrap-ansi 59 + - 4ba2d78: Support short terminal windows when re-rendering by accounting for off-screen lines 60 + - 34f52fe: Validates initial values immediately when using text prompts with initialValue and validate props. 61 + - 94fee2a: Changes `placeholder` to be a visual hint rather than a tabbable value. 62 + - 4f6b3c2: Set initial values of auto complete prompt to first option when multiple is false. 63 + - 8ead5d3: Avoid passing initial values to core when using auto complete prompt 64 + - acc4c3a: Add a new `withGuide` option to all prompts to disable the default clack border 65 + - 68dbf9b: select-key: Fixed wrapping and added new `caseSensitive` option 66 + - 2310b43: Allow custom writables as output stream. 67 + - d98e033: add invert selection for multiselect prompt 117 68 118 69 ## 0.4.1 119 70
+1 -1
packages/core/package.json
··· 1 1 { 2 2 "name": "@clack/core", 3 - "version": "1.0.0-alpha.8", 3 + "version": "1.0.0", 4 4 "type": "module", 5 5 "main": "./dist/index.mjs", 6 6 "module": "./dist/index.mjs",
+70 -174
packages/prompts/CHANGELOG.md
··· 1 1 # @clack/prompts 2 2 3 - ## 1.0.0-alpha.10 4 - 5 - ### Minor Changes 6 - 7 - - 415410b: This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic. 8 - 9 - ### Patch Changes 10 - 11 - - 55eb280: Fix placeholder rendering when using autocomplete. 12 - - 68dbf9b: select-key: Fixed wrapping and added new `caseSensitive` option 13 - - Updated dependencies [68dbf9b] 14 - - @clack/core@1.0.0-alpha.8 15 - 16 - ## 1.0.0-alpha.9 17 - 18 - ### Patch Changes 19 - 20 - - f952592: Fixes missing guide when rendering empty log lines. 21 - - 372b526: Add `clear` method to spinner for stopping and clearing. 22 - 23 - ## 1.0.0-alpha.8 24 - 25 - ### Patch Changes 26 - 27 - - 43aed55: Change styling of disabled multi-select options to have strikethrough. 28 - - 2feaebb: Fix duplicated logs when scrolling through options with multiline messages by calculating `rowPadding` dynamically based on actual rendered lines instead of using a hardcoded value. 29 - - 42adff8: fix: add missing guide line in autocomplete-multiselect 30 - - 8e2e30a: fix: fix autocomplete bar color when validate 31 - - 9b92161: Show symbol when withGuide is true for log messages 32 - 33 - ## 1.0.0-alpha.7 34 - 35 - ### Minor Changes 36 - 37 - - 38019c7: Updates the API for stopping spinners and progress bars to be clearer 38 - 39 - 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()`: 40 - 41 - ```diff 42 - const spinner = prompts.spinner(); 43 - spinner.start(); 44 - 45 - // Cancelling a spinner 46 - - spinner.stop(undefined, 1); 47 - + spinner.cancel(); 48 - 49 - // Stopping with an error 50 - - spinner.stop(undefined, 2); 51 - + spinner.error(); 52 - ``` 53 - 54 - As before, you can pass a message to each method to customize the output displayed: 55 - 56 - ```js 57 - spinner.cancel("Operation cancelled by user"); 58 - progressBar.error("An error occurred during processing"); 59 - ``` 60 - 61 - ### Patch Changes 62 - 63 - - 4d1d83b: Fixes rendering of multi-line messages and options in select prompt. 64 - - 6176ced: Add withGuide support to note prompt 65 - - 69681ea: Strip destructive ANSI codes from task log messages. 66 - - b0fa7d8: Add support for wrapped messages in multi line prompts 67 - - 7530af0: Fixes wrapping of cancelled and success messages of select prompt 68 - - acc4c3a: Add a new `withGuide` option to all prompts to disable the default clack border 69 - - Updated dependencies [0718b07] 70 - - Updated dependencies [4ba2d78] 71 - - Updated dependencies [acc4c3a] 72 - - @clack/core@1.0.0-alpha.7 73 - 74 - ## 1.0.0-alpha.6 75 - 76 - ### Minor Changes 77 - 78 - - 8409f2c: feat: add styleFrame option for spinner 79 - 80 - ### Patch Changes 81 - 82 - - aea4573: Clamp scrolling windows to 5 rows. 83 - - b103ad3: Allow disabled options in multi-select and select prompts. 84 - - Updated dependencies [b103ad3] 85 - - @clack/core@1.0.0-alpha.6 86 - 87 - ## 1.0.0-alpha.5 88 - 89 - ### Minor Changes 90 - 91 - - 55645c2: Support wrapping autocomplete and select prompts. 92 - 93 - ### Patch Changes 94 - 95 - - 9999adf: fix note component overflow bug 96 - - 2839c66: fix(note): hard wrap text to column limit 97 - - 71b5029: Add missing nullish checks around values. 98 - - d25f6d0: fix(note, box): handle CJK correctly 99 - - 0b852e1: Handle `stop` calls on spinners which have not yet been started. 100 - - 09e596c: refactor(progress): remove unnecessary return statement in start function 101 - - 2310b43: Allow custom writables as output stream. 102 - - Updated dependencies [71b5029] 103 - - Updated dependencies [55645c2] 104 - - Updated dependencies [2310b43] 105 - - @clack/core@1.0.0-alpha.5 106 - 107 - ## 1.0.0-alpha.4 108 - 109 - ### Patch Changes 110 - 111 - - 7b009df: Fix spinner clearing too many lines upwards when non-wrapping. 112 - - ae84dd0: Update key binding text to show tab/space when navigating, and tab otherwise. 113 - - Updated dependencies [d98e033] 114 - - @clack/core@1.0.0-alpha.4 115 - 116 - ## 1.0.0-alpha.3 117 - 118 - ### Minor Changes 119 - 120 - - 76fd17f: Added new `box` prompt for rendering boxed text, similar a note. 121 - - 1604f97: Add `clearOnError` option to password prompt to automatically clear input when validation fails 122 - 123 - ### Patch Changes 124 - 125 - - 1a45f93: Switched from wrap-ansi to fast-wrap-ansi 126 - - 4c89dd7: chore: use more accurate type to replace any in group select 127 - - Updated dependencies [1a45f93] 128 - - Updated dependencies [1604f97] 129 - - @clack/core@1.0.0-alpha.3 130 - 131 - ## 1.0.0-alpha.2 132 - 133 - ### Minor Changes 134 - 135 - - f10071e: Using the `group` method, task logs can now have groups which themselves can have scrolling windows of logs. 136 - 137 - ### Patch Changes 138 - 139 - - 282b39e: Wrap spinner output to allow for multi-line/wrapped messages. 140 - - 7df841d: Removed all trailing space in prompt output and fixed various padding rendering bugs. 141 - - 17d3650: Use a default import for picocolors to avoid run time errors in some environments. 142 - - Updated dependencies [7df841d] 143 - - @clack/core@1.0.0-alpha.2 144 - 145 - ## 1.0.0-alpha.1 146 - 147 - ### Minor Changes 148 - 149 - - 7bc3301: Prompts now have a `userInput` stored separately from their `value`. 150 - - 2837845: Adds suggestion and path prompts 151 - - 9e5bc6c: Add support for signals in prompts, allowing them to be aborted. 152 - - df4eea1: Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt. 153 - - 9bd8072: Add a `required` option to autocomplete multiselect. 154 - 155 - ### Patch Changes 156 - 157 - - bfe0dd3: Prevents placeholder from being used as input value in text prompts 158 - - 94fee2a: Changes `placeholder` to be a visual hint rather than a tabbable value. 159 - - Updated dependencies [bfe0dd3] 160 - - Updated dependencies [7bc3301] 161 - - Updated dependencies [2837845] 162 - - Updated dependencies [34f52fe] 163 - - Updated dependencies [94fee2a] 164 - - Updated dependencies [4f6b3c2] 165 - - Updated dependencies [df4eea1] 166 - - Updated dependencies [8ead5d3] 167 - - @clack/core@1.0.0-alpha.1 168 - 169 - ## 1.0.0-alpha.0 3 + ## 1.0.0 170 4 171 5 ### Major Changes 172 6 ··· 176 10 177 11 ### Minor Changes 178 12 13 + - 415410b: This adds a custom filter function to autocompleteMultiselect. It could be used, for example, to support fuzzy searching logic. 14 + - 7bc3301: Prompts now have a `userInput` stored separately from their `value`. 15 + - 8409f2c: feat: add styleFrame option for spinner 16 + - 2837845: Adds suggestion and path prompts 179 17 - 99c3530: Adds `format` option to the note prompt to allow formatting of individual lines 180 18 - 0aaee4c: Added new `taskLog` prompt for log output which is cleared on success 181 19 - 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. ··· 207 45 ``` 208 46 209 47 - 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. 48 + - 55645c2: Support wrapping autocomplete and select prompts. 49 + - 9e5bc6c: Add support for signals in prompts, allowing them to be aborted. 210 50 - f2c2b89: Adds `AutocompletePrompt` to core with comprehensive tests and implement both `autocomplete` and `autocomplete-multiselect` components in prompts package. 51 + - 38019c7: Updates the API for stopping spinners and progress bars to be clearer 52 + 53 + 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()`: 54 + 55 + ```diff 56 + const spinner = prompts.spinner(); 57 + spinner.start(); 58 + 59 + // Cancelling a spinner 60 + - spinner.stop(undefined, 1); 61 + + spinner.cancel(); 62 + 63 + // Stopping with an error 64 + - spinner.stop(undefined, 2); 65 + + spinner.error(); 66 + ``` 67 + 68 + As before, you can pass a message to each method to customize the output displayed: 69 + 70 + ```js 71 + spinner.cancel("Operation cancelled by user"); 72 + progressBar.error("An error occurred during processing"); 73 + ``` 74 + 211 75 - c45b9fb: Adds support for detecting spinner cancellation via CTRL+C. This allows for graceful handling of user interruptions during long-running operations. 76 + - f10071e: Using the `group` method, task logs can now have groups which themselves can have scrolling windows of logs. 77 + - df4eea1: Remove `suggestion` prompt and change `path` prompt to be an autocomplete prompt. 78 + - 76fd17f: Added new `box` prompt for rendering boxed text, similar a note. 212 79 - 9a09318: Adds new `progress` prompt to display a progess-bar 80 + - 1604f97: Add `clearOnError` option to password prompt to automatically clear input when validation fails 81 + - 9bd8072: Add a `required` option to autocomplete multiselect. 213 82 - 19558b9: Added support for custom frames in spinner prompt 214 83 215 84 ### Patch Changes 216 85 217 86 - 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. 87 + - aea4573: Clamp scrolling windows to 5 rows. 88 + - bfe0dd3: Prevents placeholder from being used as input value in text prompts 89 + - 55eb280: Fix placeholder rendering when using autocomplete. 90 + - 4d1d83b: Fixes rendering of multi-line messages and options in select prompt. 91 + - 6176ced: Add withGuide support to note prompt 92 + - 7b009df: Fix spinner clearing too many lines upwards when non-wrapping. 93 + - 43aed55: Change styling of disabled multi-select options to have strikethrough. 218 94 - 17342d2: Exposes a new `SpinnerResult` type to describe the return type of `spinner` 95 + - 282b39e: Wrap spinner output to allow for multi-line/wrapped messages. 96 + - 2feaebb: Fix duplicated logs when scrolling through options with multiline messages by calculating `rowPadding` dynamically based on actual rendered lines instead of using a hardcoded value. 97 + - 69681ea: Strip destructive ANSI codes from task log messages. 98 + - b0fa7d8: Add support for wrapped messages in multi line prompts 99 + - 9999adf: fix note component overflow bug 219 100 - 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. 101 + - 7df841d: Removed all trailing space in prompt output and fixed various padding rendering bugs. 102 + - 2839c66: fix(note): hard wrap text to column limit 220 103 - 7a556ad: Updates all prompts to accept a custom `output` and `input` stream 104 + - 17d3650: Use a default import for picocolors to avoid run time errors in some environments. 221 105 - 7cc8a55: Messages passed to the `stop` method of a spinner no longer have dots stripped. 106 + - b103ad3: Allow disabled options in multi-select and select prompts. 107 + - 71b5029: Add missing nullish checks around values. 108 + - 1a45f93: Switched from wrap-ansi to fast-wrap-ansi 109 + - f952592: Fixes missing guide when rendering empty log lines. 110 + - 372b526: Add `clear` method to spinner for stopping and clearing. 111 + - d25f6d0: fix(note, box): handle CJK correctly 112 + - 94fee2a: Changes `placeholder` to be a visual hint rather than a tabbable value. 113 + - 7530af0: Fixes wrapping of cancelled and success messages of select prompt 114 + - 4c89dd7: chore: use more accurate type to replace any in group select 115 + - 0b852e1: Handle `stop` calls on spinners which have not yet been started. 116 + - 42adff8: fix: add missing guide line in autocomplete-multiselect 117 + - 8e2e30a: fix: fix autocomplete bar color when validate 222 118 - 2048eb1: Fix spinner's dots behavior with custom frames 223 - - Updated dependencies [729bbb6] 224 - - Updated dependencies [6868c1c] 225 - - Updated dependencies [a4f5034] 226 - - Updated dependencies [c713fd5] 227 - - Updated dependencies [a36292b] 228 - - Updated dependencies [f2c2b89] 229 - - @clack/core@1.0.0-alpha.0 119 + - acc4c3a: Add a new `withGuide` option to all prompts to disable the default clack border 120 + - 9b92161: Show symbol when withGuide is true for log messages 121 + - 68dbf9b: select-key: Fixed wrapping and added new `caseSensitive` option 122 + - 09e596c: refactor(progress): remove unnecessary return statement in start function 123 + - 2310b43: Allow custom writables as output stream. 124 + - ae84dd0: Update key binding text to show tab/space when navigating, and tab otherwise. 125 + - Updated dependency on `@clack/core` to `1.0.0` 230 126 231 127 ## 0.10.0 232 128
+1 -1
packages/prompts/package.json
··· 1 1 { 2 2 "name": "@clack/prompts", 3 - "version": "1.0.0-alpha.10", 3 + "version": "1.0.0", 4 4 "type": "module", 5 5 "main": "./dist/index.mjs", 6 6 "module": "./dist/index.mjs",