Packages

ata-validator

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

Your version

1.26.0

17 Sep 2026Where it was published

1.61.3 is the newest release of 1.x.

In short

2 new2 fixed

Release note

Added

  • toStandaloneModule(schema, { parse: true }) inlines local, acyclic $refs before the clone proof runs, so schemas that keep their shapes in $defs and reference them, which is every schema a generator emits, now get a parse(). Only a node that is exactly a $ref plus annotations is inlined; a cycle, an external reference or a constraining sibling keyword leaves the reference in place and the clone declines as before. Defaults follow the runtime exactly: a default written next to the $ref fills, a default written inside the referenced definition does not, and a test holds parse() output equal to the runtime's validate().data on the same input.

  • When parse: true is requested and the clone still cannot be proven, the decline is loud: onWarning fires with the reason, and the emitted module carries a NOTE comment saying it has no parse export. Previously the only way to notice was reading the export list.

Fixed

  • The runtime compiler built patternProperties (and combined additionalProperties) child validators with new Function, which discarded the parent's helper scope: a child schema that needed a compiled pattern or format helper threw ReferenceError at validation time. Child checks are now generated inline in the parent validator and share its helper bindings. Reported and fixed

  • The TypeScript declarations emitted next to a compiled module now declare the schemaHash export; 1.25.0 added it to every module but not to the generated .d.mts, so importing it by name failed type checking while working at runtime.