github SBoudrias/Inquirer.js @inquirer/prompts@8.8.1

latest releases: @inquirer/editor@5.5.0, @inquirer/i18n@1.5.0, @inquirer/testing@3.4.1...
one hour ago

@inquirer/prompts@8.8.1

What's new

  • Node.js 20 support is restored — the engines range accidentally dropped it in 8.8.0 (#2449, see #2431); it will be dropped properly in the next major release

Fixes in the bundled prompts

  • input: keys typed while a validation is pending no longer leak into the answer; pattern validation is repeatable (a g-flagged regex no longer fails the second submission); keys typed during a pending validation are discarded
  • number: input left empty on an optional prompt now calls validate with undefined; pending keystrokes no longer leak into the retry; only plain decimal input is accepted (0x10/0b11/0o7 are rejected)
  • password: pending keystrokes during validation no longer leak into the retry
  • confirm: keyword hints show complete characters/emoji instead of broken halves; built-in y/n answers always work, even when custom keywords start with n/y
  • checkbox: a number key on a disabled choice shows the disabled error instead of nothing; toggling with all/invert/number shortcuts clears a stale validation error
  • rawlist: rejected input stays editable instead of being wiped; the input is only matched by exact key or a plain digit index (2x no longer selects choice 2); arrow-key picks keep the line editable; an explicit null default preselects the null choice
  • expand: rejected input stays editable; expanding the help list no longer leaves a stale h on the line
  • search: the query survives arrow navigation; the prompt stops its loading spinner when the source fails; the query is preserved while a selection is being validated
  • editor: user edits are kept when a validator throws (per validationFailureMode); Ctrl+D during validation no longer crashes with an unhandled error
  • select: only plain digit lines jump to a numbered choice (2e1 no longer jumps to item 21)
  • The editor's validation error message is now localizable via @inquirer/i18n@1.5.0

Don't miss a new Inquirer.js release

NewReleases is sending notifications on new releases.