Packages

ata-validator

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

Upgrading ata-validator from 1.28.0 to 1.29.0

1 release in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 1.28.0Newest 1.x, Latest1.61.3
1
change to make
0
advisories fixed
0
new
0
fixes

Before you upgrade

Tick each one off as you go
  • breaking1.29.0
2 other lines we could not sort, mostly version bumps
  • 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.

    1.29.0
  • 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.

    1.29.0