- Add a
customoption to choose the name of the customization method. By default, it is'beautiful'.
- The output can be customized by defining an
error.beautiful(output)method returning a string.
- Previously, if the
propsoption wasfalse, nested errors (error.causeanderror.errors) were not printed. To achieve the same behavior, thecauseoption must now be set tofalse.
- Nested errors are now printed on their own, which result in a prettier output.
- Add option
logto customize printing the error message.
- Fix issues printing errors that include
]in their message, when thestackoption isfalse.
- Allow exit codes from 125 to 255.
- Split the core logic into a separate package:
beautiful-error. It can be used if you want to prettify an error but not exit the process.
- Improve documentation in
README.md
- Minimal supported Node.js version is now
18.18.0
- Upgrade internal dependencies
- Upgrade internal dependencies
- Minimal supported Node.js version is now
16.17.0
- Fix TypeScript types
- Improve tree-shaking support
- Fix handling of errors that do not have any stack trace
- Renamed the
shortoption tostack. Its value is inverted.
Before:
handleCliError(error, { short: true })After:
handleCliError(error, { stack: false })- The error's name is now always logged even if
stackisfalse.
- The
colorsoption has been added to show colors. It defaults totruein terminals. - Quoted strings in the error message are now colorized.
- An icon is now prepended to the error's name. This can be configured using the
iconoption. - The error's icon and name are now logged in red by default. This can be
configured using the
headeroption. - The
propsoption has been added to hide error properties.
- Fix
package.json
- Switch to MIT license
- Revert browsers support
- Fix error validation message
- Improve options validation
- Improve options validation
- Ensure error properties and colors are printed
- Browsers support
- Rename
typesoption toclasses
- Print error
nameandmessageon Firefox and Safari
- Reduce npm package size
Initial release