npm / @inquirer/prompts
@inquirer/prompts
What changed in @inquirer/prompts 5 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-22.
16 breaking1 security10 new APIs and options6 behavior and defaults2 tooling23 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@inquirer/prompts 852 changes
Breaking changes 13
Select and rawlist prompts use strict digit-index parsing.
Node.js 20 is no longer supported; the minimum is now ^22.22.2 || ^24.15.0 || >=26.0.0.
Validation now runs on empty optional answers.
While an async validator is pending, checkbox no longer accepts edits or submissions; selection is captured at submit time and repeated Enter presses run the validator only once.
Whitespace-only input is treated as empty, so a space-padded submission resolves to the default or undefined answer instead of a validation error.
The prompt accepts single-key
yandnresponses even with localized keywords, and unrecognized input no longer silently selects the default answer.Adjusted the explicit engine limits to match the higher minimum already enforced, affecting which runtime versions are supported.
Checked and disabled elements are always included in the returned array.
The cancel() method on prompt return custom Promise was removed; use AbortSignal instead.
All packages are ESM-only; CommonJS imports are no longer supported.
The instructions config property was removed from checkbox, search, and select prompts; use theme.style.keysHelpTip instead.
Node.js 20 or later is now required; versions below 20 are no longer supported.
The helpMode theme property was removed from checkbox, search, and select prompts; use theme.style.keysHelpTip instead.
Security 1
Security warnings in external-editor are fixed.
New APIs and options 8
The password prompt gains the toggleMask option, allowing users to reveal the typed value with ctrl+t.
A new initialValue option pre-fills the search input.
Set INQUIRER_KEYBINDINGS to vim or emacs to enable those keybindings as a user preference; this disables search in the select prompt.
A new package is available for internationalization.
Various new theme options make all prompts content localizable.
Choices can have a description, displayed under the list when the choice is highlighted.
The search prompt supports default.
The rawlist prompt now supports the default option.
Behavior and default changes 6
User theme overrides now take precedence over locale defaults.
Answers may include surrounding whitespace, which the prompt now ignores.
The confirm prompt now matches localized yes/no answers per locale.
The useState setter now accepts a reducer/updater function, changing its type.
A loading message is shown while editor prompt input is being validated.
The cursor can hover disabled options in select and checkbox lists, but cannot interact with them.
Tooling 2
Type inference is improved for checkbox prompts.
Type inference is improved for search prompts.
Fixes and other changes 22
Theme keys set to undefined no longer crash prompts.
Answers from piped stdin are no longer dropped before the first render.
The password prompt cursor no longer overlaps the message when the prompt is empty.
Cancelling or aborting a prompt before its first render no longer writes to an ended output stream or reinstalls keypress listeners.
Answers may include surrounding whitespace, which the prompt now ignores.
While async search is loading, Enter waits for fresh results and preserves the query; repeated Enter presses during validation no longer run the async validator more than once.
confirm() trims surrounding whitespace from answers before matching yes/no keywords.
Keystrokes batched with the key that settles a prompt no longer reach keypress handlers after the prompt is done, cancelled, or aborted.
Bundled prompts pin @inquirer/type to an exact version in published manifests to prevent its type definitions from breaking downstream TypeScript builds.
An explicit undefined is accepted as the default.
An explicit undefined is accepted as the default.
An explicit undefined is accepted as the default.
Floating-point step errors are avoided.
Fixes the cursor being mispositioned relative to the input when lines wrap.
Preserves exact literal types in the choices array.
Allows the input default value to have type undefined.
Fixes some Windows terminals freezing and not reacting to keypresses.
Fixes editor prompt handling of editor paths on Windows.
Improves type inference for the expand prompt type.
Keypresses that happen before a prompt is rendered are ignored.
The return type is now inferred properly when choices is an array of string literals.
Fixes TypeScript not discovering types when moduleResolution is set to commonjs.
@inquirer/prompts 74 changes
Breaking changes 1
Moved @types/node to peerDependencies, reducing install size for users not using TypeScript; TypeScript users may need to install it as a dev dependency.
New APIs and options 2
Adds simple RegExp validation for input prompts using pattern.
Adds patternError for simple RegExp validation in input prompts.
Fixes and other changes 1
Downgraded to mute-stream@2 to maintain Node 18 compatibility.
@inquirer/prompts 61 changes
Breaking changes 1
After a question is answered, its prefix becomes a tick mark instead of the idle question mark; this can be overridden with theme.prefix.
@inquirer/prompts 51 changes
Breaking changes 1
@inquirer/core is no longer exported from @inquirer/prompts; import from the core package to create custom prompts.