Skip to content

v4.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 07:27

Major Changes

  • Require Node.js 24 or later.

Minor Changes

  • Rewrite the source in TypeScript and generate the type declarations from it: dist/index.d.mts and dist/index.d.cts replace the hand-written typings.d.mts and typings.d.cts. IOutputError gains path, which the js format has returned since 0.6.5, and errors accepts null and undefined, as ajv's validate.errors can be. When the json option lacks part of an error's path, the error names that part, such as Couldn't find index 1 of /a/1, instead of throwing Cannot destructure property 'loc'.

Patch Changes

  • Measure the distance for "Did you mean" suggestions in enum errors without leven, which removes it from the dependencies.

  • Remove the code meant to add an array element's type after its index in error paths. It has matched nothing since 1.1.0, so the output is unchanged.