@inquirer/core@13.0.0
Breaking changes
- Node.js 20 is no longer supported: engines are now
^22.22.2 || ^24.15.0 || >=26.0.0. usePaginationis removed from the root export. List prompts now useuseListPrompt, available from the new@inquirer/core/listsubpath export, which combines choice navigation and pagination in a single hook (#2492). The migration guide covers list prompts and non-choice lists, and includes a copy-paste-able prompt for coding agents.
What's new
useListPromptreturns{ choices, active, page }: navigation readsactive.next().setActive(), bulk updateschoices.forEach(...), and choices expose their data safely to user callbacks viachoice.toData()(#2492).- Arrow-key navigation skips disabled choices, and lists with no selectable choices raise a validation error (#2492).
- A keypress handler that throws now rejects the prompt with that error, instead of silently swallowing it (#2486).
- List rendering now only renders the visible page instead of every choice, making arrow-key navigation on large lists over 20x faster (#2492).