Packages

@clack/core

1.6.0 · 9 Nov 2026MIT48.6M / weekRepositoryHomepagenpmAtom feed

Your version

1.0.0

major28 Jan 2026Where it was published

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 v0 releases, the package was dual-published as CJS and ESM.

Release note

Major Changes

  • Breaking

    The package is now distributed as ESM-only. In v0 releases, 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 userInput stored separately from their value.

  • 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 updateSettings function 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 AutocompletePrompt to core with comprehensive tests and implement both autocomplete and autocomplete-multiselect components in prompts package.

  • Remove suggestion prompt and change path prompt to be an autocomplete prompt.

  • Add clearOnError option to password prompt to automatically clear input when validation fails

Patch Changes

  • Export *Options types for prompts.

  • Prevents placeholder from being used as input value in text prompts

  • 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.

  • Removed all trailing space in prompt output and fixed various padding rendering bugs.

  • 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.

  • 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 placeholder to 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 withGuide option to all prompts to disable the default clack border

  • select-key: Fixed wrapping and added new caseSensitive option

  • Allow 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.