@clack/core
1.6.0 · 9 Nov 2026MIT48.6M / weekRepositoryHomepagenpmAtom feed
1.6.0 is the newest release of 1.x.
In short
1 breaking14 new11 fixed
- Breaking
The package is now distributed as ESM-only. In
v0releases, the package was dual-published as CJS and ESM.
Release note
Major Changes
- Breaking
The package is now distributed as ESM-only. In
v0releases, the package was dual-published as CJS and ESM.For existing CJS projects using Node v20+, please see Node's guide on Loading ECMAScript modules using
require().
Minor Changes
Prompts now have a
userInputstored separately from theirvalue.Adds suggestion and path prompts
Add support for customizable spinner cancel and error messages. Users can now customize these messages either per spinner instance or globally via the
updateSettingsfunction to support multilingual CLIs.This update also improves the architecture by exposing the core settings to the prompts package, enabling more consistent default message handling across the codebase.
// Per-instance customization const spinner = prompts.spinner({ cancelMessage: "Operación cancelada", // "Operation cancelled" in Spanish errorMessage: "Se produjo un error", // "An error occurred" in Spanish }); // Global customization via updateSettings prompts.updateSettings({ messages: { cancel: "Operación cancelada", // "Operation cancelled" in Spanish error: "Se produjo un error", // "An error occurred" in Spanish }, }); // Settings can now be accessed directly console.log(prompts.settings.messages.cancel); // "Operación cancelada" // Direct options take priority over global settings const spinner = prompts.spinner({ cancelMessage: "Cancelled", // This will be used instead of the global setting });Support wrapping autocomplete and select prompts.
Adds
AutocompletePromptto core with comprehensive tests and implement bothautocompleteandautocomplete-multiselectcomponents in prompts package.Remove
suggestionprompt and changepathprompt to be an autocomplete prompt.Add
clearOnErroroption to password prompt to automatically clear input when validation fails
Patch Changes
Export
*Optionstypes for prompts.Prevents placeholder from being used as input value in text prompts
Adds a new
selectableGroupsboolean to the group multi-select prompt. UsingselectableGroups: falsewill disable the ability to select a top-level group, but still allow every child to be selected individually.Removed all trailing space in prompt output and fixed various padding rendering bugs.
Fixes an edge case for placeholder values. Previously, when pressing
enteron an empty prompt, placeholder values would be ignored. Now, placeholder values are treated as the prompt value.Allow disabled options in multi-select and select prompts.
Add missing nullish checks around values.
Fix "TTY initialization failed: uv_tty_init returned EBADF (bad file descriptor)" error happening on Windows for non-tty terminals.
Switched from wrap-ansi to fast-wrap-ansi
Support short terminal windows when re-rendering by accounting for off-screen lines
Validates initial values immediately when using text prompts with initialValue and validate props.
Changes
placeholderto be a visual hint rather than a tabbable value.Set initial values of auto complete prompt to first option when multiple is false.
Avoid passing initial values to core when using auto complete prompt
Add a new
withGuideoption to all prompts to disable the default clack borderselect-key: Fixed wrapping and added new
caseSensitiveoptionAllow custom writables as output stream.
Add invert selection for multiselect prompt
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.