ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
Upgrading ata-validator from 1.15.0 to 1.16.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 0
- changes to make
- 0
- advisories fixed
- 3
- new
- 0
- fixes
Release by release
- new
Custom keywords.
new Validator(schema, { keywords: { name: definition } })registers keywords with avalidate(value, data, parentSchema)function, acompile(value, parentSchema)factory, or amacro(value, parentSchema)that returns a schema applied in place. A definition can name the JSON Schematypeit applies to. A schema that uses a registered keyword runs on the interpreted engine, soanyOf,not,$refand the other applicators keep their meaning around the custom check; the compiled engines, the tier-0 plan and the native walker are routed away from such schemas, and the AOT emitters refuse them instead of emitting a module that would ignore the keyword. See docs/custom-keywords.md. - new
ata-validator/compatcovers the reference class's surface:compileAsync,removeSchema,validateSchemaagainst the vendored meta-schemas,addFormatin its four forms,addKeywordin thevalidate,compileandmacroforms plus the bare-name form,addVocabulary,getKeyword,removeKeyword,errorsText,addMetaSchema,ajv.errorsandajv.opts; and the constructor optionsallErrors,useDefaults(off by default, as in the reference),coerceTypes,removeAdditional,verbose,validateFormats,validateSchema,formats,keywordsandschemas. A schema with no$schemais read as draft-07. - new
The shim reports errors in the reference's shape and order: keywords in evaluation order rather than declaration order, the failing branches before an
anyOforoneOf, each bad property name with its own errors and apropertyNameserror, items beforecontainsand aniferror after a failedthen/elseunderallErrors, draft-07dependenciesnamed as such, and withallErrorsoff the first failing keyword's whole group.tests/test_ajv_parity.jsruns 32 scenarios of real consumer call shapes through both implementations and compares the results field by field.
- new
1 other line we could not sort, mostly version bumps
- 1.16.0
ata-validator/compatrefuses what it cannot honour instead of accepting it:$data: truethrows at construction, acode-only keyword throws ataddKeyword, and the reference's formats plugin throws with a note that its formats are built in.