ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
Upgrading ata-validator from 1.54.0 to 1.55.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 0
- changes to make
- 0
- advisories fixed
- 0
- new
- 1
- fix
Release by release
- fixed
bundleStandaloneandbundleCompactmodules threwReferenceError: _cpLen is not definedon a string whoseminLengthormaxLengthneeded counting code points: a one-character value underminLength: 1, an emoji under amaxLength. The length checks call a code-point counter thattoStandaloneModuleembeds and the two bundles did not. This goes back to 1.10.0 at least, and reached forms built on rjsf's precompiled validator, which usesbundleStandalone: typing one character into a required name field threw. The bundles now embed the counter when their code calls it;tests/test_bundle_cplen.jsruns both bundles in both formats.
- fixed
3 other lines we could not sort, mostly version bumps
- 1.55.0
The interpreted engine, which answers where code generation is blocked (Cloudflare Workers, Deno Deploy, a strict Content-Security-Policy), does the same work in fewer calls. A leaf of one type and only that type's keywords (
{ type: 'string', maxLength: 80 },{ type: 'integer', minimum: 1 }) is one closure overtypeofand the check, with no type bits computed first; an object's value checks run inside its property step instead of beside it; and a required key that is also a declared property is counted while the properties are walked, not looked up again. A declared property of an ordinary object (one whose prototype isObject.prototype) is read directly where its name is not on that prototype, instead of after an own-property test; a key such asconstructorortoString, and any other object, keep the test. An enum of primitive values is one Set lookup, and aminLengthwith amaxLengthis one closure that decides most strings from their UTF-16 length. On the request benchmark with code generation blocked, against 1.53.0: accepting the body 240 to 155 µs, rejecting it 106 to 73, the error list read 577 to 506; the hot loop 195 to 142 ns a document. A hand-written closure tree for the same schema measures 136 ns, so the engine is within 5% of what closures can do; the generated code's 20 ns is a different mechanism.ata-validator/lite, which is this engine, grows from 54.8 to 55.5 KB gzipped for it.tests/test_plan_compiles.jsholds the closure-tree compiler to every schema of the official suite, since the engine quietly falls back to its plain walk when the compiler throws, and did so for a while during this work with every test green;ATA_DEBUG=1now reports that fallback. - 1.55.0
A compact module (
ata build --errors auto,toCompactModule, the bundler plugin'ssharedErrors) takes the RFC 3986 walk behind the URI formats from the error runtime it already imports (uriWalk), instead of carrying the factory's text. 1.54.0 put that text, about 1.3 KB gzipped, in every module with auri,uri-reference,irioriri-referencefield: forty SchemaStore schemas built that way went from 213.3 to 224.9 KB gzipped, and measure 217.9 now (the rest is the 1.54.0 email and record-list code, which stays). A self-contained module still carries it, since it imports nothing.ata-validator/error-runtimeexportsuriWalkfor the same reason; a compact module written by 1.55 needs that export, so build and runtime come from one version, as before. - 1.55.0
ata-validator/liteis 55.5 KB gzipped, up from 54.8 in 1.54.0, for the interpreted engine's fused checks. Compact modules that check a URI format are about 1.3 KB smaller each.
1 internal line (docs, tests, tooling) left out.