ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
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$defsand reference them, which is every schema a generator emits, now get aparse(). Only a node that is exactly a$refplus 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: adefaultwritten next to the$reffills, adefaultwritten inside the referenced definition does not, and a test holdsparse()output equal to the runtime'svalidate().dataon the same input.When
parse: trueis requested and the clone still cannot be proven, the decline is loud:onWarningfires with the reason, and the emitted module carries a NOTE comment saying it has noparseexport. Previously the only way to notice was reading the export list.
Fixed
The runtime compiler built
patternProperties(and combinedadditionalProperties) child validators withnew Function, which discarded the parent's helper scope: a child schema that needed a compiled pattern or format helper threwReferenceErrorat validation time. Child checks are now generated inline in the parent validator and share its helper bindings. Reported and fixedThe TypeScript declarations emitted next to a compiled module now declare the
schemaHashexport; 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.