v4.4.0
Minor Changes
-
The
absolutePathkeyword accepts an optionalfile://prefix now, so a path fromimport.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_VALIDATIONis now read whenschema-utilsis 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 ofschema-utilsin 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.errorsstill holds every error. (by @alexander-akait in #217)
Patch Changes
-
read the
formatkeyword as part of the type, i.e.should be a date stringinstead ofshould 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
ajvto8.20.0,ajv-formatsto3.0.1and@types/json-schemato7.0.15.ajv-formats3 only movesajvto a peer dependency, the formats themselves are unchanged. (by @alexander-akait in #221) -
A string an
absolutePathkeyword applies to is described as anabsolute path stringor arelative path stringrather than as a barestring, 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 exceededinstead of aValidationError. (by @alexander-akait in #217)
All notable changes to this project will be documented in this file.