ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
Upgrading ata-validator from 1.58.1 to 1.59.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
Release by release
- new
bundleStandalone(schemas, { order: true })hands each validator's errors out in the runtime's order, astoStandaloneModuledoes with the same option. rjsf's precompiled validator writes its module withbundleStandalone, and its error list showed anadditionalPropertieserror before thepropertieserrors where the runtime validator shows it after.tests/test_aot_order_defaults.jsholds 553 bundled groups of the 2020-12 and draft-07 suites to the runtime's errors, in order. - new
Each validator of a bundle whose schema has a default carries
applyDefaults(data), the runtime's defaults pass, as a property, as standalone modules export it. rjsf's precompiled validator can call it to match its runtime validator.tests/test_bundle_preprocess.jscompares 8400 generated documents with the runtime: the data afterwards, the verdict and the errors in order. - fixed
bundleStandaloneleftcoerceTypesandremoveAdditionalout without a word, so a bundle built withcoerceTypes: truerejected{ age: "5" }, which the runtime accepts. Each bundled validator now runs the runtime's pass over the data for those options before it checks, and withuseDefaults: truefills defaults the same way. Where the generated pass cannot carry what the runtime would do (coercing the items of an array at the root, for one),bundleStandalonethrows instead of writing a module that answers differently. Without these options a bundle checks the data as it is, as before.
- new
1 other line we could not sort, mostly version bumps
- 1.59.0
Requiring the package no longer loads the code generator. It loads when a validator first compiles, or once the event loop is free, so a server reaches its first request without waiting for it. Importing the package went from 4.55 to 1.64 ms (Node 25, the median of 21 interleaved runs), and a server building 20 validators at startup from 4.71 to 1.83 ms. Validators still compile at their first call, and a script that validates as soon as it starts takes as long as before.
benchmark/bench_fastify_boot.mjsnow counts loading the library on both sides, as "from a cold process" says; the README's Fastify figure moves from 18.3 against 2.67 ms (loading left out) to 30.3 against 9.7 ms.