ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
1.61.3 is the newest release of 1.x.
In short
1 breaking2 changed
- breaking
The npm package no longer ships
CHANGELOG.md. Its history had reached about 13% of the packed tarball, 40 KB of every install, and it is a click away in the repository. The tarball is 264035 bytes, against a 307200 byte ceiling that had 3270 bytes of headroom.
Release note
Reading a verdict from JSON text no longer pays for error messages nobody reads, an emitted module records the ata that wrote it, and the package is 13% smaller to install.
Changed
validateJSON(text)defers every diagnostic to first access to.errors, the wayvalidate(data)has since 1.9.0. Reading.validon a 50 KB invalid document went from 585 to 152 microseconds, which is what the same validator costs withrichErrors: false, and it parses the document zero times instead of once. Two things were eager and both had to move: the position map was resolved in thevalidatewrapper on every rejection wherevalidateJSONhad set the raw input, before the rejection object was even built, and thevalidateJSONwrapper then parsed the document and ran the whole enrich, frame and payload pass. Deferring only the first makes it slower, not faster, because the wrapper readsresult.errors[0]to test for adocUrland that realizes the map, whose cache is then reset, so the wrapper builds it again. Error content is unchanged. A check on a timer that reads a verdict and no message, which is where this shows up, now pays nothing for messages it does not read.An emitted module records the ata that wrote it.
ataVersionsits next toschemaHashand is declared in the emitted.d.ts, and every generated artifact names the version on its first line. Staleness was detectable on one axis only: the schema hash catches a changed schema, and an ata upgrade leaves it matching, so a module compiled by an older version reads as current and goes on being used, which hides anything that improves inside the emitted code. A standalone module imports nothing by design and cannot ask the installed ata about itself, so it carries the fact instead and a build compares both. The two CJS bundle paths had emitted no provenance line at all.- breaking
The npm package no longer ships
CHANGELOG.md. Its history had reached about 13% of the packed tarball, 40 KB of every install, and it is a click away in the repository. The tarball is 264035 bytes, against a 307200 byte ceiling that had 3270 bytes of headroom.
If you generate modules with ata build, re-run it after upgrading. The position walker and everything else inside an emitted module only changes when the file is rebuilt, which is the gap ataVersion now closes.
Suite unchanged at 100% on all three dialects, identical with code generation blocked: draft 2020-12 1301/1301, draft 7 929/929, the v1 dialect 1135/1135.