ata-validator 1.14.0 → 1.14.1

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/aot.d.ts CHANGED
@@ -6,6 +6,11 @@ export interface StandaloneOptions {
6
6
  format?: 'esm' | 'cjs';
7
7
  /** Use stub error functions for the smallest output. Default: false. */
8
8
  abortEarly?: boolean;
9
+ /**
10
+ * Also export `parse(data)`: validate, then return a copy of the input
11
+ * holding only the properties the schema declares. Default: false.
12
+ */
13
+ parse?: boolean;
9
14
  [key: string]: unknown;
10
15
  }
11
16
 
package/build.d.ts CHANGED
@@ -97,6 +97,14 @@ export interface ToStandaloneModuleOptions {
97
97
  formats?: Record<string, (value: string) => boolean>;
98
98
  /** See {@link BundleStandaloneOptions.formatMode}. */
99
99
  formatMode?: 'embed' | 'inject';
100
+ /**
101
+ * Also export `parse(data)`: validate, then return a copy of the input
102
+ * holding only the properties the schema declares. Off by default because
103
+ * it adds to the emitted module's size. Emitted only where the copy is
104
+ * provably exact; a schema using `$ref`, a composition, `patternProperties`,
105
+ * an `additionalProperties` schema or an array of objects gets no `parse`.
106
+ */
107
+ parse?: boolean;
100
108
  }
101
109
 
102
110
  /** Bundle multiple schemas into one self-contained module (no ata-validator runtime). */
@@ -105,5 +113,6 @@ export function bundleStandalone(schemas: unknown[], options?: BundleStandaloneO
105
113
  /** Like {@link bundleStandalone} but deduplicates shared bodies for smaller output. */
106
114
  export function bundleCompact(schemas: unknown[], options?: BundleStandaloneOptions): string;
107
115
 
108
- /** Emit a self-contained `validate`/`isValid` module string for a single schema. */
116
+ /** Emit a self-contained `validate`/`isValid` module string for a single
117
+ * schema, plus `parse` when {@link ToStandaloneModuleOptions.parse} is set. */
109
118
  export function toStandaloneModule(schema: unknown, options?: ToStandaloneModuleOptions): string | null;
package/lib/version.js CHANGED
@@ -7,4 +7,4 @@
7
7
  //
8
8
  // Kept in lockstep with package.json by `tests/test_version_sync.js`.
9
9
 
10
- module.exports = '1.14.0';
10
+ module.exports = '1.14.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ata-validator",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "JSON Schema validation with first-class TypeScript and zero runtime cost. AOT compile to per-schema ESM modules with zero validator dependency. Generic Validator<T> for TypeBox/Zod/Valibot composition. Optional runtime API. Standard Schema V1 compatible.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -122,13 +122,13 @@
122
122
  "LICENSE"
123
123
  ],
124
124
  "optionalDependencies": {
125
- "@ata-validator/native-darwin-arm64": "1.14.0",
126
- "@ata-validator/native-darwin-x64": "1.14.0",
127
- "@ata-validator/native-linux-x64-gnu": "1.14.0",
128
- "@ata-validator/native-linux-arm64-gnu": "1.14.0",
129
- "@ata-validator/native-linux-x64-musl": "1.14.0",
130
- "@ata-validator/native-linux-arm64-musl": "1.14.0",
131
- "@ata-validator/native-win32-x64": "1.14.0"
125
+ "@ata-validator/native-darwin-arm64": "1.14.1",
126
+ "@ata-validator/native-darwin-x64": "1.14.1",
127
+ "@ata-validator/native-linux-x64-gnu": "1.14.1",
128
+ "@ata-validator/native-linux-arm64-gnu": "1.14.1",
129
+ "@ata-validator/native-linux-x64-musl": "1.14.1",
130
+ "@ata-validator/native-linux-arm64-musl": "1.14.1",
131
+ "@ata-validator/native-win32-x64": "1.14.1"
132
132
  },
133
133
  "peerDependencies": {
134
134
  "yaml": "^2.0.0"