json-schema-traverse traverses a JSON Schema and calls a callback for each schema object, including the root, using a pre-order traversal. It can also call separate pre and post functions, provides JSON pointer and parent/context details to the callback, and does not resolve $ref values.
Project status
- Maintenance status: The upstream GitHub push was in 2021-07-26, and the most recent packaged updates listed are from 2020-12-13. As of 2026-06-09, this indicates a quiet or maintenance-mode trajectory rather than active maintenance.
- Update cadence: Updates appear to have stopped for roughly 5+ years from the latest evidence (2020-12-13 updates and 2021-07-26 upstream push). Prior to that, updates were clustered in late 2020 (v0.5.0 and v1.0.0), then earlier iterations spread across 2017 to 2019.
AI summary generated
Recent updates
v1.0.0
Release v1.0.0 adds support for traversing JSON Schema draft-2019-09 by recognizing the $defs keyword. In the same release, the repo also migrates CI and publishing to GitHub Actions (replacing Travis) and makes minor dev dependency changes.
Featuresv0.5.0
Release v0.5.0 adds traversal support for the JSON Schema keywords if, then, else, and introduces a new TypeScript declaration file (index.d.ts). It also updates various project tooling and CI configuration (dev dependencies, lint settings, and Travis Node versions).
Featuresv0.4.1
Release v0.4.1 makes the schema traversal skip the `default` keyword so that traversal does not descend into values under `default`. The package version is bumped to 0.4.1.
v0.3.0
v0.3.0 introduces an `allKeys` traversal option, allowing the library to recurse into schema objects found under keywords that are not part of its standard keyword lists. The implementation also adds a hardcoded skip list to avoid traversing certain constraint-like keywords even when `allKeys` is enabled.
Featuresv0.4.0
v0.4.0 adds support for pre- and post-order callbacks to json-schema-traverse. The traversal now invokes a pre hook before descending into child schema nodes, and a post hook after all children have been visited. The release notes state this is backwards compatible, and the code includes explicit legacy argument handling.
Featuresv0.2.0
Release v0.2.0 modifies json-schema-traverse so the traversal callback receives an additional argument: the JSON pointer to the parent schema object. This is implemented by threading a new internal parameter (parentJsonPtr) through the recursive _traverse calls and updating tests and the README accordingly.
BreakingFeaturesv0.1.0
This release changes how schema traversal works during callback execution. When traversing schemas, the callback now receives only schema objects, not any other values that may have been included previously.
Breaking