ajv
8.20.0 · 24 Apr 2026MIT544M / weekRepositoryHomepagenpmAtom feed
Upgrading ajv From 6.15.0 to 7.0.0
1 release in betweenevery note read
- 14
- changes to make
- 0
- advisories fixed
- 11
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
- Breaking7.0.0
Security
1 advisory still affects 7.0.0
- ajv has ReDoS when using `$data` optionmoderate · GHSA-2g4f-4pwh-qvx6
Upgrading to 8.18.0 clears it.
- 7.0.0
To make code injection from untrusted schemas impossible, code generation is fully re-written to be type-level safe against code injection.
Release by release
- Security
To make code injection from untrusted schemas impossible, code generation is fully re-written to be type-level safe against code injection.
- Breaking
Ajv no longer allows to create the instance without
newkeyword (it is ES6 class). - Breaking
errorDataPath - was deprecated, now removed.
- Breaking
Format -
validateFormats: falsecan be used instead, old format mode can be chosen via ajv-formats package.
- Security
19 other lines we could not sort, mostly version bumps
- 7.0.0
Comprehensive support for standalone validation code - compiling one or multiple schemas to standalone modules with one or multiple exports.
- 7.0.0
To reduce the mistakes in JSON schemas and unexpected validation results, strict mode is added - it prohibits ignored or ambiguous JSON Schema elements. See Strict mode and Options for more details
- 7.0.0
To simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas.
- 7.0.0
Schemas are compiled to ES6 code (ES5 code generation is supported with an option).
- 7.0.0
To improve reliability and maintainability the code is migrated to TypeScript.
- 7.0.0
Separate Ajv classes from draft-07 and draft-2019-09 support with different default imports (see Getting started or v7.0.0-beta.5 for the details).
- 7.0.0
The support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "$id" (or continue using version 6 that will be supported until 02/28/2021).
- 7.0.0
All formats are separated to ajv-formats package - they have to be explicitly added if you use them.
- 7.0.0
Ajv instance can only be created with
newkeyword, as Ajv is now ES6 class. - 7.0.0
Browser bundles are automatically published to ajv-dist package (but still available on cdnjs.com).
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.