Skip to content

@inquirer/[email protected]

Compare
Choose a tag to compare
@SBoudrias SBoudrias released this 28 Jul 20:15
· 195 commits to main since this release

All custom errors thrown from inquirer now includes a name attribute reflecting the error class. When checking if an error comes from inquirer AND using a bundler (like tsup, rollup, etc), instanceof might not work as you expect it to. So instead, it is recommend to follow this example:

- if (error instanceof ExitPromptError) {
+ if (error.name === 'ExitPromptError') {