fastify-ata 0.9.3 → 0.9.5
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/README.md +4 -4
- package/compat/COMPATIBILITY.md +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -312,13 +312,13 @@ For browser / edge deployments, ata ships an `ata compile` CLI that turns a JSON
|
|
|
312
312
|
npx ata compile schemas/user.json -o src/user.validator.mjs --name User
|
|
313
313
|
```
|
|
314
314
|
|
|
315
|
-
A 10-field schema produces:
|
|
315
|
+
A 10-field schema produces, on ata-validator 1.25.0, whose emitted modules carry full error detail and a schema hash:
|
|
316
316
|
|
|
317
317
|
| Variant | Raw | Gzipped |
|
|
318
318
|
|---|---|---|
|
|
319
|
-
| ata runtime bundle |
|
|
320
|
-
| `ata compile` standard |
|
|
321
|
-
| `ata compile --abort-early` |
|
|
319
|
+
| ata runtime bundle | 325 KB | 87 KB |
|
|
320
|
+
| `ata compile` standard | 32.1 KB | **4.8 KB** |
|
|
321
|
+
| `ata compile --abort-early` | 7.5 KB | **2.5 KB** |
|
|
322
322
|
|
|
323
323
|
Generated file has zero runtime dependency on `ata-validator`. `isValid` is emitted as a TypeScript type predicate, so consumers get narrowing out of the box.
|
|
324
324
|
|
package/compat/COMPATIBILITY.md
CHANGED
|
@@ -12,7 +12,7 @@ The preload swaps the single `require('@fastify/ajv-compiler')` inside Fastify's
|
|
|
12
12
|
|
|
13
13
|
## Current score
|
|
14
14
|
|
|
15
|
-
**178 of 184 tests pass** (Fastify main at
|
|
15
|
+
**178 of 184 tests pass** (Fastify main at dce0d47a, ata-validator 1.11.0, fastify-ata 0.9.4).
|
|
16
16
|
|
|
17
17
|
Everything Fastify's suite asserts about validation behavior passes: type checks and coercion (including the `array` coercion mode), defaults, `removeAdditional`, required and enum handling, cross-schema `$ref` through `addSchema`, draft-07 `$id` anchors, `nullable`, `oneOf`/`anyOf` branching, custom error messages via `errorMessage`, `$merge`/`$patch` keywords, fail-fast startup errors for unresolvable references, encapsulation scoping, error shape (exact default error object layout, mutable for plugins like ajv-i18n), the error paths in `validation-error-handling`, and shared-schema `$ref` into `/definitions` across the validator AND the serializer (ata never mutates caller-provided schema objects, so fast-json-stringify sees them untouched).
|
|
18
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastify-ata",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "Fastify plugin for ata-validator. Runtime-competitive with the default, 24x faster serverless cold start, Standard Schema V1.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/ata-core/fastify-ata#readme",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"ata-validator": "^1.
|
|
29
|
+
"ata-validator": "^1.25.0",
|
|
30
30
|
"fastify-plugin": "^5.1.0",
|
|
31
31
|
"sanitize-filename": "^1.6.4"
|
|
32
32
|
},
|