npm / schema-utils
schema-utils
What changed in schema-utils 1 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
15 breaking4 new APIs and options6 behavior and defaults5 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initschema-utils 421 changes
Breaking changes 8
formatMinimum, formatMaximum, formatExclusiveMinimum, and formatExclusiveMaximum now use exact comparisons for time and date-time formats, including fractions beyond milliseconds and format-specific timezone handling.
A boolean formatExclusiveMinimum now makes formatMinimum exclusive instead of comparing the value against true.
The keyword accepts an optional file:// prefix for absolute paths, allowing paths from import.meta.resolve(); relative-path options now reject that value.
The environment variable is read when schema-utils is loaded, so set it before starting the process; enableValidation() and disableValidation() still take effect immediately and share state across copies.
The logic for formatExclusiveMaximum changed due to use of the ajv-formats package.
The logic for formatExclusiveMinimum changed due to use of the ajv-formats package.
The minimum supported Node.js version is now >= 12.13.0.
Changes in ajv properties mean postFormatter may require updates.
New APIs and options 3
Adds a flag that writes a smaller check which loads faster, minified with webpack's minifier (webpack 5.112.0 or later).
precompile takes an esm option and writes an ES module check for packages with "type": "module".
Adds a way to compile a schema ahead of time into a check that validate accepts as its fourth argument, allowing valid options to be validated without loading ajv.
Behavior and default changes 5
Accepts any webpack 5 as the optional peer dependency; only precompile with minify requires webpack 5.112.0 or later, and reports when webpack is older.
The keyword accepts file URLs with any number of slashes after the scheme and matches the scheme case-insensitively; file:directory remains rejected.
The format keyword is reported as part of the type, such as “should be a date string,” instead of as a separate format-matching message.
Messages list at most 100 errors and count the remainder as “and N more errors”; the errors property still holds every error.
Error messages now include the types of object properties.
Fixes and other changes 5
A boolean formatExclusiveMaximum now makes formatMaximum exclusive instead of comparing the value against true.
minify works from a webpack bundle without errors or warnings.
Strings covered by the keyword are described as absolute or relative path strings rather than bare strings.
A failure reached through multiple schema branches is listed once instead of repeatedly.
Error filtering is no longer quadratic, sibling property errors are no longer dropped when one name prefixes another, and large arrays of options no longer overflow the call stack instead of producing a ValidationError.
schema-utils 34 changes
Breaking changes 4
The minimum supported Node.js version is now 10.13.0.
The package exports changed; use destructuring to require validate.
The ValidateError export was removed in favor of ValidationError.
Use the ValidationError export in place of ValidateError.
schema-utils 24 changes
Breaking changes 3
Support for errorMessage was dropped; use description for links.
Node.js versions earlier than 8.9.0 are no longer supported.
The API changed; consult the documentation for the updated API.
Behavior and default changes 1
Error messages were fully rewritten, changing the messages developers see.
schema-utils 11 changes
New APIs and options 1
Adds support for custom error messages.