schema-utils is a JavaScript package used to validate the options for webpack loaders and plugins using JSON schema. It provides a validate function that checks an options object against a schema and can format validation errors, with configuration for error naming and base data paths.
Project status
- Actively maintained, with an upstream push on November 1, 2026 and several updates in October.
- Cadence is uneven: a quiet stretch from October 2025 to September 2026 was followed by a concentrated run of updates in September and October 2026.
AI summary generated
Recent updates
v4.8.3
v4.8.3 broadens the optional webpack peer dependency to accept any webpack 5, fixing install failures for projects using older webpack 5 releases. The release notes clarify that `precompile` with `minify` still requires webpack 5.112.0 or later.
v4.8.2
v4.8.2 updates precompiled-check minification to use webpack's SourceProcessor when available, retaining the existing printer-based fallback for webpack versions without it. The lockfile also updates fast-uri and changes its recorded package version, neither of which is mentioned in the release notes.
v4.8.1
v4.8.1 is a patch release focused on making `precompile` work cleanly when `schema-utils` itself is bundled by build tooling. The main change is adjusting how `schema-utils` loads required AJV runtime helpers for inlining and how it loads webpack's minifier, to avoid bundler resolution issues and warnings.
v4.8.0
v4.8.0 adds an optional `--minify` CLI flag and a `minify` option to `precompile` to generate smaller, faster-loading precompiled checks using webpack's minifier. The implementation introduces new code-generation paths that strip AJV error-object content and inlines some runtime helpers when minification is enabled.
Featuresv4.7.0
schema-utils v4.7.0 adds ES module support to `precompile`, and updates the `schema-utils precompile --check` CLI behavior to generate an ES module check when the nearest package.json uses `"type": "module"`. The underlying generator now supports an `esm` option and conditionally injects an ES module runtime import when needed.
BreakingFeaturesv4.6.0
v4.6.0 adds a precompilation workflow that turns a JSON schema into a standalone validation check, so `validate` can skip compiling the schema with AJV for valid inputs. It also introduces a `schema-utils precompile` CLI command and new APIs/types to support generating and using these checks.
Featuresv4.5.0
v4.5.0 updates the `absolutePath` JSON schema keyword to accept `file:` URLs in a way that matches Node's URL parsing behavior. In practice, it now accepts `file:/...` in addition to `file:///...`, supports case-insensitive `FILE:` schemes, and continues to reject `file:directory` where no slash follows the scheme.
v4.4.0
v4.4.0 improves schema validation behavior and error reporting. It expands `absolutePath` handling to accept optional `file://` prefixes, changes `SKIP_VALIDATION` to be evaluated at module load time with shared in-process state, and refactors error filtering to avoid quadratic slowdowns and missing errors.
Featuresv4.3.3
v4.3.3 is primarily a TypeScript surface-area fix: it reexports the `ValidationErrorConfiguration` type. The diff also includes a broad internal refactor of `ValidationError` and related utilities/keywords, along with updated tests and snapshots.
v4.3.2
Release v4.3.2 is a small update focused on TypeScript type compatibility. The release notes only mention a bug fix for compatibility with old types, and the code diff shows changes limited to type definitions and JSDoc, with no runtime logic modifications.
v4.3.1
v4.3.1 primarily improves TypeScript typings by exporting additional schema-related types, including Schema and JSONSchema variants. The code diff shows only typing and documentation changes, plus a CI action version bump.
Featuresv4.3.0
v4.3.0 introduces validation behavior changes intended to “backport old logic from v3”, plus a bug fix around how “object” is detected. The code diff shows a substantial AJV customization for format comparison keywords, along with updated TypeScript typings and a broad lockfile churn.
Featuresv3.3.0
v3.3.0 adds a public API to disable or enable schema validation, and includes a performance improvement related to caching compiled schema/validator state. The release notes do not mention additional validation-control behavior or any new schema keywords/API exports beyond the enable/disable functions.
Featuresv4.2.0
v4.2.0 is primarily described as adding an API to disable and enable schema validation, plus a performance-oriented change to lazily load some internal modules. The code diff shows additional functional and behavioral changes beyond those notes, including new exports, changes in how Ajv error paths are represented, and changes to schema typing and validation logic.
Featuresv3.2.0
v3.2.0 adds support for a new `undefinedAsNull` keyword that integrates with enum validation. When enabled, the library treats `undefined` values as `null` for schemas using `enum`, and updates test fixtures and validation error output accordingly.
Featuresv4.1.0
schema-utils v4.1.0 adds a new `undefinedAsNull` keyword intended to let `undefined` values behave like `null` for `enum` validations. However, the included code changes also show several broader behavioral and typing changes (not mentioned in the v4.1.0 release notes), especially around AJV v8 error path handling (`instancePath` vs `dataPath`) and date format exclusive bounds typing/behavior.
Featuresv3.1.2
v3.1.2 is a small release focused on improving startup performance. The only code change is in how the AJV validator instance is created and reused.
v4.0.1
Release v4.0.1 notes only mention a performance improvement to improve initial start time. The actual code diff for this release includes much larger behavioral and API surface changes around AJV integration, validation error formatting, and schema typing that are not mentioned in the release notes.