Skip to content

v4.4.0

Choose a tag to compare

@github-actions github-actions released this 09 Sep 12:31
· 2 commits to main since this release
b4fd660

Minor Changes

  • The absolutePath keyword accepts an optional file:// prefix now, so a path from import.meta.resolve() can be passed to an option that takes an absolute path. Options that take a relative path reject such a value instead, they used to accept it. (by @laymonage, @alexander-akait in #222)

  • process.env.SKIP_VALIDATION is now read when schema-utils is loaded rather than on every validation, so set it before starting the process. enableValidation()/disableValidation() still take effect immediately and now share their state with every copy of schema-utils in the process directly. (by @alexander-akait in #217)

  • At most 100 errors of a list are listed in the message now, the rest is counted as and N more errors. errors still holds every error. (by @alexander-akait in #217)

Patch Changes

  • read the format keyword as part of the type, i.e. should be a date string instead of should be a string (should match format "date") (by @alexander-akait in #225)

  • output the type of object properties in error messages, i.e. object { foo?: boolean, bar?: integer } (by @alexander-akait in #224)

  • Updated ajv to 8.20.0, ajv-formats to 3.0.1 and @types/json-schema to 7.0.15. ajv-formats 3 only moves ajv to a peer dependency, the formats themselves are unchanged. (by @alexander-akait in #221)

  • A string an absolutePath keyword applies to is described as an absolute path string or a relative path string rather than as a bare string, which read as though any string would do. A failure a schema reaches through more than one branch is listed once instead of repeatedly, so a relative path given to a rule condition is reported as the one line that says so. (by @alexander-akait in #223)

  • Fixed error filtering being quadratic in the amount of reported errors, which let a large invalid configuration lock up the process, and stopped errors from being dropped when one instance path merely contained another as a substring - two sibling properties where one name is a prefix of the other were enough to lose an error. An array of options reporting a lot of errors no longer throws RangeError: Maximum call stack size exceeded instead of a ValidationError. (by @alexander-akait in #217)

All notable changes to this project will be documented in this file.

4.3.3 (2025-10-02)

Bug Fixes

  • reexport ValidationErrorConfiguration type (#204) (49af922)

4.3.2 (2025-04-22)

Bug Fixes

4.3.1 (2025-04-22)

Bug Fixes

  • export Schema and additional schemas (#197) (f72cd60)