ata-validator 0.13.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/index.js +6 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to ata-validator are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/), and this project adheres to semantic versioning.
|
|
4
4
|
|
|
5
|
+
## 0.13.3 — 2026-05-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **`Validator.bundleStandalone` dropped hoisted anyOf/oneOf branch helpers from the bundle output.** Schemas whose codegen hoists branch functions like `_af1_b0` to the per-schema preamble (e.g. allOf wrapping an anyOf, or schemas pulled into a cross-`$ref` bundle) emitted JS that referenced these helpers without defining them, so loading the bundle threw `ReferenceError: _af1_b0 is not defined` on first validation. The standalone preamble now propagates through to the bundle alongside the format-closure serialization that was already there. `toStandalone` (single-schema) was unaffected. Fixes #24.
|
|
10
|
+
|
|
5
11
|
## 0.13.2 — 2026-05-09
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/index.js
CHANGED
|
@@ -1256,6 +1256,12 @@ Validator.bundleStandalone = function (schemas, opts) {
|
|
|
1256
1256
|
.map(({ name, fn }) => `var ${name}=${fn.toString()};`)
|
|
1257
1257
|
.join('\n');
|
|
1258
1258
|
}
|
|
1259
|
+
// Include hoisted anyOf/oneOf branch helpers (e.g. `_af1_b0`) so the
|
|
1260
|
+
// bundle output is self-contained. `toStandalone` emits this same source
|
|
1261
|
+
// for single-schema standalone output.
|
|
1262
|
+
if (jsFn._preambleSource) {
|
|
1263
|
+
preamble = preamble ? `${preamble}\n${jsFn._preambleSource}` : jsFn._preambleSource;
|
|
1264
|
+
}
|
|
1259
1265
|
if (opts && opts.verbose) {
|
|
1260
1266
|
// Embed the schema and a small resolver so errors carry parentSchema.
|
|
1261
1267
|
const schemaLit = JSON.stringify(typeof schema === 'string' ? JSON.parse(schema) : schema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ata-validator",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "Ultra-fast JSON Schema validator. 5x faster validation, 159,000x faster compilation. Works without native addon. Cross-schema $ref, Draft 2020-12 + Draft 7, V8-optimized JS codegen, simdjson, RE2, multi-core. Standard Schema V1 compatible.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"rebuild": "cmake-js rebuild --target ata",
|
|
41
41
|
"prebuild": "pkg-prebuilds-copy --baseDir build/Release --source ata.node --name=ata --strip --napi_version=10",
|
|
42
42
|
"prebuild-all": "npm run prebuild -- --arch x64 && npm run prebuild -- --arch arm64",
|
|
43
|
-
"test": "node test.js && node tests/test_no_native.js && node tests/test_aot_build.js && node tests/test_aot_differential.js && node tests/test_aot_cli_build.js && node tests/test_aot_cli_smoke.js",
|
|
43
|
+
"test": "node test.js && node tests/test_no_native.js && node tests/test_aot_build.js && node tests/test_aot_differential.js && node tests/test_aot_cli_build.js && node tests/test_aot_cli_smoke.js && node tests/test_bundle_standalone.js",
|
|
44
44
|
"test:suite": "node tests/run_suite.js",
|
|
45
45
|
"test:compat": "node tests/test_compat.js",
|
|
46
46
|
"test:standard-schema": "node tests/test_standard_schema.js",
|