ata-validator
1.61.3 · 29 Oct 2026MIT21.8k / weekRepositoryHomepagenpmAtom feed
1.61.3 is the newest release of 1.x.
In short
6 changed
Release note
Changed
The browser build (the
browserexport condition, which Vite, webpack, Rollup and esbuild use for a page) no longer puts the code generator in the page. Every schema starts on the interpreted engine, and a validator called a thousand times within a second loads the generator through a dynamic import, which bundlers split into a chunk of its own, and is rebuilt on generated code in place, one validator per idle task, so that several turning hot together do not hold the main thread (lib/tiering.js). Calls spread out further, a form checked as the user types, never load it: there generated code would save tens of nanoseconds a check against about 6 ms to load the generator and compile. Once rebuilt, a validator is as fast as one compiled from the start (16 ns a check on a form schema, both ways). The answers are the same on both engines, valid and errors alike. On a react-jsonschema-form page the validator's share of the first load goes from 134.7 KB to 57.5 KB gzipped with esbuild's splitting (205.9 KB for the whole page with Vite, 280.2 before); the generator chunk is 77 to 80 KB when it loads. A bundler that does not split chunks puts it back in the page, as before. Where code generation is blocked the chunk is never fetched.ata-validator/codegenregisters the generator at once, for a page that wants generated code from the first call.The docs no longer point pages under a strict Content-Security-Policy or Manifest V3 extensions to
ata-validator/lite: the browser build checks whether generated code can run before it fetches the generator, soata-validatorcovers them.ata-validator/litestays and works as before for code that imports it.In the browser build,
parse()waits for the generator: before it has loaded, it throws aTypeErrorthat namesata-validator/codegen, and once it has, it works. The ahead-of-time bundle methods were already left out of the browser build and still point toata-validator/aot.tests/test_browser_tiering.jscovers the switch, a cold validator, blocked code generation and the eager import.
Size
ata-validator/liteis 55.7 KB gzipped, up 0.2 KB for the core's hooks for the on-demand generator, which lite does not carry.
Not changed
Node, the edge entry (
workerd,edge-light) andata buildmodules work as in 1.55.0. On Node the regression gate shows no group outside noise, and SchemaStore gives the same verdicts on 31,822 documents.