Packages

ata-validator

1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed

Your version

1.29.0

24 Sep 2026Where it was published

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 way validate(data) has since 1.9.0. Reading .valid on a 50 KB invalid document went from 585 to 152 microseconds, which is what the same validator costs with richErrors: 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 the validate wrapper on every rejection where validateJSON had set the raw input, before the rejection object was even built, and the validateJSON wrapper 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 reads result.errors[0] to test for a docUrl and 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. ataVersion sits next to schemaHash and 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.