ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
Upgrading ata-validator from 1.17.0 to 1.17.1
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 0
- changes to make
- 0
- advisories fixed
- 0
- new
- 2
- fixes
Release by release
- fixed
validateJSON()reports errors in schema declaration order, asvalidate()does. The text path enriched errors in emission order, so the first error could differ between the two entry points for the same document. - fixed
An instance built with options no longer answers a later
new Validator(sameSchema)without options. The identity cache was seeded by every instance, so a validator created withrichErrors: falseorcoerceTypescould be handed back to a caller that asked for the defaults.
- fixed
2 other lines we could not sort, mostly version bumps
- 1.17.1
The rejection object behind a failing
validate()is an instance of a class with prototype accessors rather than an object literal that defined a getter and a closure on every rejection. Same shape, same laziness, same caching;JSON.stringifystill sees the errors. - 1.17.1
Declaration-order sorting of short error lists is a stable in-place insertion sort over the integer keys, with no comparator and no index array. Measured on the raw error list of the schema-benchmarks product schema, 15 errors: 1.49 to 1.10 µs; through the Standard Schema bridge 2.02 to 1.63 µs. Since 1.16.2 that row has gone from 3.30 to 1.63 µs on the same machine, and in the schema-benchmarks harness itself standard invalid went from 3.57 to 1.44 µs (60 percent less), every other row within noise.