Releases: SBoudrias/Inquirer.js
@inquirer/[email protected]
- Performance improvements
- Includes updates in
@inquirer/[email protected]
@inquirer/[email protected]
- When setting a state (
useState
), it'll only re-renders if the value changed. - When setting multiple states at once, we'll only trigger one re-renders if it happens inside a hook callback (previously each state change triggered one re-render.)
If you're setting multiple state in a callback from an async function (like setTimeout
or a network call), those will not be merged in a single re-renders. For those case, you're better using a state object holding all values to reduce the amount of re-renders. Open to discuss this in #1251
@inquirer/[email protected]
Now exposes the waitForUserInput
option. Setting it to false will automatically launch the editor.
Be careful using this option as this mean the user will not have read the question/instruction before reaching the editor.
@inquirer/[email protected]
useEffect
now pass the active Readline instance to the effect callback. e.g useEffect((readline) => ...
@inquirer/[email protected]
Rewrote how raw input is handled. This shouldn't cause issue for most, but if you had specific or uncommon use of the testing framework, this could be a breaking change.
@inquirer/[email protected]
Major refactor of the core to allow multiple features:
- Prompt function now return cancelable promise (e.g
input(...).cancel()
) - Reduced amount of writes to the readline (should now be ~1 per render cycle)
- Make sure to restore the cursor on force exit.
@inquirer/[email protected]
Now includes a stricter answer parser. Prior to this change, the prompt would default to Yes
on almost any input.
[email protected]
Fix issue with the default value disappearing from prompt.
[email protected]
Inquirer is now a native Node ECMAScript module. This will require your Node runtime to support es modules, and your app to be an es module. Node documentation over here: https://nodejs.org/api/esm.html#modules-ecmascript-modules
If you cannot migrate, please remember you can keep using the v8.x release line until you're ready.
[email protected]
- Fix line wrapping with using with terminal links
- Fix number prompt not working with negative numbers