Skip to content

Releases

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 09 Nov 13:07
Immutable release. Only release title and notes can be modified.
50c8ea0

Minor Changes

  • #596 cbeefcb Thanks @dreyfus92! - Add accessible mode to spinner: when enabled via the accessible option, the global setting, or the ACCESSIBLE env var, the spinner emits static, append-only, screen-reader friendly output, a plain start line, a "still working" heartbeat every 30 seconds, and a plain final line. Instead of animated in-place repaints.

  • #614 5ac9e73 Thanks @btea! - Allow multiselect to accept readonly option arrays, e.g. options declared with as const. The Value type parameter is now inferred as a literal union ('a' | 'b') from such arrays, and initialValues also accepts readonly arrays.

  • #622 1835f41 Thanks @btea! - Add support for disabled selectKey options: they are rendered dimmed, cannot be selected by keypress, and are ignored when set as the initial value.

Patch Changes

  • #610 be35482 Thanks @43081j! - Update sisteransi to 2.x (ESM only).

  • #618 3e0bffd Thanks @btea! - Use an explicit undefined check when forwarding autocomplete initialValue so 0, false, and empty strings remain selectable instead of falling back to the first option.

  • #631 9053625 Thanks @43081j! - Account for escape sequences in prefixes during line wrapping. Very narrow outputs will now render correctly.

  • #616 f325a53 Thanks @btea! - Fix that isCancelled returned after calling cancel and start methods in progress does not refresh.

  • #627 34976a7 Thanks @b84330808! - Fix the path prompt in directory mode on Windows: typing a trailing \ after a directory now lists its children instead of showing no matches.

  • #628 85f6aff Thanks @imharjot! - Render falsy primitive options through the limitOptions style callback instead of leaving blank rows.

  • Updated dependencies [be35482, 9053625, f2bc46b, f325a53, 5ac9e73, e66ab12, 1835f41]:

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 09 Nov 13:07
Immutable release. Only release title and notes can be modified.
50c8ea0

Minor Changes

  • #622 1835f41 Thanks @btea! - Add support for disabled selectKey options: they are rendered dimmed, cannot be selected by keypress, and are ignored when set as the initial value.

Patch Changes

  • #610 be35482 Thanks @43081j! - Update sisteransi to 2.x (ESM only).

  • #631 9053625 Thanks @43081j! - Account for escape sequences in prefixes during line wrapping. Very narrow outputs will now render correctly.

  • #608 f2bc46b Thanks @kai-natori! - Treat an ideographic space (U+3000) committed by IMEs (e.g. Japanese or Chinese input) as space when toggling options in multi-select prompts.

  • #616 f325a53 Thanks @btea! - Fix that isCancelled returned after calling cancel and start methods in progress does not refresh.

  • #614 5ac9e73 Thanks @btea! - Allow multiselect to accept readonly option arrays, e.g. options declared with as const. The Value type parameter is now inferred as a literal union ('a' | 'b') from such arrays, and initialValues also accepts readonly arrays.

  • #630 e66ab12 Thanks @imharjot! - Use the configured output stream's width when wrapping and clearing prompt frames, including prompts written to stderr while stdout is redirected.

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 13 Sep 17:00
Immutable release. Only release title and notes can be modified.
da44e23

Patch Changes

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 13 Sep 17:00
Immutable release. Only release title and notes can be modified.
da44e23

Patch Changes

  • 8bd9129 Thanks @gameroman! - Return type for prompts now correctly specifies CANCEL_SYMBOL instead of symbol

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 07 Sep 20:12
Immutable release. Only release title and notes can be modified.
de1ef16

Minor Changes

  • #592 caa32e8 Thanks @gameroman! - Export CANCEL_SYMBOL constant from @clack/core and @clack/prompts

  • #594 37fca4e Thanks @dreyfus92! - Add tab-completion to the path prompt: pressing Tab fills the input with the focused suggestion, so you can quickly descend into deep directories (type / and Tab again). Powered by a new opt-in completeOnTab option on autocomplete, which also shows a Tab: complete hint in the instructions footer. Default autocomplete behavior is unchanged.

  • #583 ae636dd Thanks @43081j! - Add async validation support to prompts, and validation state rendering to text prompts.

Patch Changes

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 07 Sep 20:12
Immutable release. Only release title and notes can be modified.
de1ef16

Minor Changes

  • #595 227583e Thanks @dreyfus92! - Add an accessible option to the shared PromptOptions and a resolved accessible getter on the base Prompt, so any prompt can opt into accessible mode individually. Resolution order: per-prompt option > updateSettings({ accessible }) > the ACCESSIBLE environment variable.

  • #592 caa32e8 Thanks @gameroman! - Export CANCEL_SYMBOL constant from @clack/core and @clack/prompts

  • #594 37fca4e Thanks @dreyfus92! - Add tab-completion to the path prompt: pressing Tab fills the input with the focused suggestion, so you can quickly descend into deep directories (type / and Tab again). Powered by a new opt-in completeOnTab option on autocomplete, which also shows a Tab: complete hint in the instructions footer. Default autocomplete behavior is unchanged.

  • #583 ae636dd Thanks @43081j! - Add async validation support to prompts, and validation state rendering to text prompts.

  • #593 b20fa2b Thanks @dreyfus92! - Add isAccessible() and an accessible setting as the foundation for accessible mode. Resolution order: per-call option > updateSettings({ accessible }) > the ACCESSIBLE environment variable (any non-empty value enables it, except 0 and false).

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 03 Jul 22:59
Immutable release. Only release title and notes can be modified.
dc5bce8

Minor Changes

  • #574 8f1c380 Thanks @dreyfus92! - Add showInstructions option to select, multiselect, and groupMultiselect. Keyboard hints remain shown by default; pass showInstructions: false to hide them.

Patch Changes

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 03 Jul 22:59
Immutable release. Only release title and notes can be modified.
dc5bce8

Patch Changes

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 19 Jun 17:53
Immutable release. Only release title and notes can be modified.
0e70056

Minor Changes

  • #568 f87933f Thanks @florian-lefebvre! - Updates default formatter of note() to note dim lines anymore

    If you want the old behavior, provide a format() function:

    import { note } from '@clack/prompts';
    +import { styleText } from 'node:util';
    
    note(
      'You can edit the file src/index.jsx',
      'Next steps.'
    +  { format: (text) => styleText('dim', text) }
    );
  • #567 cc6aab5 Thanks @dreyfus92! - Add keyboard instruction footers to select, multiselect, and groupMultiselect in the active state, matching autocomplete. No option — always shown.

Patch Changes

@clack/[email protected]

Choose a tag to compare

@bombshell-bot bombshell-bot released this 19 Jun 17:53
Immutable release. Only release title and notes can be modified.
0e70056

Patch Changes

  • #561 2f2b52f Thanks @avallete! - Fix password prompt resolving to undefined on empty submit. It now normalizes an empty submission to "", matching the text prompt behavior and the documented Promise<string | symbol> return type.

  • #569 e1b6ee7 Thanks @43081j! - fix: only submit multi-line prompt when double-return happens at end of input.

    Also fixes two minor things:

    • Initial value is used as initial user input for multi-line prompts
    • Cursor is placed at the end when there is initial input