Inquirer.js Versions Save

A collection of common interactive command line user interfaces.

@inquirer/[email protected]

3 months ago
  • Now exposes utilities to allow theming prompts (type Theme, makeTheme)
  • message option isn't transformed by the core anymore - options are now passed through as-is to the prompt.
  • Node 18 required

@inquirer/[email protected]

4 months ago
  • Breaking: usePagination now requires pageSize to be passed in. The size of the pages should inform the help shown on the screen, and keeping this information in 2 areas leave a change the default value will mistmatch.

@inquirer/[email protected]

6 months ago

New features!

  • New required prompt config. Makes sure at least one choice is selected.
  • New validate prompt config. Provide a function that'll validate the user selection with any logic you want (like enforcing a min or max selection amount.) Please use this config with parsimony since complicated validation scheme can lead to sub-optimal UX!

@inquirer/[email protected]

7 months ago
  • Now supports the loop: false option. (This feature was available on inquirer, but not ported to new prompts yet)

@inquirer/[email protected]

7 months ago
  • Now supports the loop: false option. (This feature was available on inquirer, but not ported to new prompts yet)

@inquirer/[email protected]

7 months ago
  • Introduces a new useMemo hook.

@inquirer/[email protected]

8 months ago
  • Bugfix: infinite loop occurring when changing state from useEffect body. See #1307

@inquirer/[email protected]

8 months ago
  • Breaking (low chance): The typing always defined a validate config; but it was rarely used. It's been removed and prompts relying on it are expected to handle it on their own (no default value.) The types were updated accordingly and will raise issue if you're using typescript.
  • Deprecation warning (TS only): If your custom prompt extended AsyncPromptConfig, it's been deprecated in favour of PromptConfig
- import type { AsyncPromptConfig } from '@inquirer/core';
+ import type { PromptConfig } from '@inquirer/core';

- type Config = AsyncPromptConfig & { custom: 'value' };
+ type Config = PromptConfig<{ custom: 'value' }>;

Note: Old interface works for now, but is marked as deprecated.

@inquirer/[email protected]

8 months ago
  • Fix: There was an issue with ESM/CJS imports interoperability that should now be fixed. Ref #1297

@inquirer/[email protected]

8 months ago
  • Review how force exit events are handled to make sure we restore the cursor properly.
  • Various dependencies bump (including TS 5.2.2)