zod-compiler 1.22.5 → 1.22.6

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 CHANGED
@@ -13,11 +13,11 @@ Keep your existing Zod schemas. Get **2-43x faster** validation. No code changes
13
13
 
14
14
  ## Usage
15
15
 
16
- There are three ways to use zod-compiler. Choose the one that fits your project.
16
+ Three ways to use zod-compiler pick one:
17
17
 
18
18
  ### 1. Automatic Mode (Default)
19
19
 
20
- The plugin automatically detects and compiles all exported Zod schemas at build time. No wrappers, no imports from `zod-compiler` in your source code.
20
+ The plugin detects and compiles every exported Zod schema at build time. No wrappers, no imports from `zod-compiler` in your source.
21
21
 
22
22
  **vite.config.ts:**
23
23
 
@@ -42,11 +42,11 @@ export const CreateUserSchema = z.object({
42
42
  });
43
43
  ```
44
44
 
45
- Use them as usual. Compiled methods are installed on the original schema object, so `.shape`, `._zod`,
46
- Standard Schema, `instanceof` and `z.toJSONSchema()` keep working and consumers need no changes.
45
+ Use them as usual. Methods are installed on the original schema object, so `.shape`, `._zod`, Standard
46
+ Schema, `instanceof` and `z.toJSONSchema()` keep working.
47
47
 
48
- Compiled schemas also expose **`.is(input): input is T`** — the compiled check itself, allocating
49
- nothing. A drop-in replacement for `safeParse(x).success`.
48
+ Compiled schemas also expose **`.is(input): input is T`** — a zero-allocation drop-in for
49
+ `safeParse(x).success`.
50
50
 
51
51
  ### 2. compile() (Explicit)
52
52
 
@@ -69,7 +69,7 @@ validateUser.parse(data);
69
69
  validateUser.safeParse(data);
70
70
  ```
71
71
 
72
- `compile()` and auto mode coexist `compile()` schemas are detected first, then every remaining plain Zod export is picked up. To make `compile()` the _only_ path (no automatic detection, no build-time execution of plain schema files), pair it with `schemas: "explicit"` in the plugin options.
72
+ `compile()` and auto mode coexist. Pair with `schemas: "explicit"` to make `compile()` the _only_ path no automatic detection, no build-time execution of plain schema files.
73
73
 
74
74
  ### 3. CLI (No Bundler)
75
75
 
@@ -148,8 +148,7 @@ export default defineConfig({
148
148
 
149
149
  ### Bun
150
150
 
151
- zod-compiler is a build-time tool, so on Bun it applies wherever your code passes through a build step.
152
- Requires **Bun ≥ 1.2.22**.
151
+ Applies wherever your code passes through a build step. Requires **Bun ≥ 1.2.22**.
153
152
 
154
153
  ```typescript
155
154
  import zodCompiler from "zod-compiler/bun";
@@ -179,16 +178,14 @@ Only expressions built from imported bindings and literals move; anything touchi
179
178
  `new Date()` stays put. Combinator chains on imported schemas qualify via `schemaNamePattern`
180
179
  (default `/ZodSchema$/`).
181
180
 
182
- In auto mode hoisted schemas also **compile** which rescues the schema that never leaves a function
183
- (a slonik query, a tRPC input), invisible to export scanning. Measured on that pattern: ~16,700 ns →
184
- ~14 ns per call.
181
+ In auto mode hoisted schemas also **compile**, rescuing the schema that never leaves a function (a
182
+ slonik query, a tRPC input) and so is invisible to export scanning: ~16,700 ns → ~14 ns per call.
185
183
 
186
184
  ### Bundle Size & Cross-File Dedup
187
185
 
188
186
  Validators share a runtime helper layer imported from one module, so each helper appears once per
189
- bundle. Schemas in a file sharing a structurally identical sub-shape emit its error walk once, which
190
- scales with how much a file repeats: **19% raw / 10% gzipped** for two exports reusing one nested
191
- shape, **28% / 18%** for four exports reusing two.
187
+ bundle. Schemas in a file sharing a structurally identical sub-shape emit its error walk once
188
+ **19-28% raw / 10-18% gzipped**, scaling with how much the file repeats.
192
189
 
193
190
  **Transpile-only esbuild builds** (no `--bundle`) never fire the bundler's resolve hooks, so the
194
191
  `virtual:` specifier would survive into `dist/` and fail at runtime. Set `codegenMode: "inline"` to emit
@@ -202,8 +199,8 @@ Set `output: "bag"` to also drop the retained Zod schema when you don't need `.s
202
199
 
203
200
  ### SWC
204
201
 
205
- `zod-compiler/swc` is a programmatic `@swc/core` bridge, not a `.swcrc` WASM plugin — discovery needs
206
- Node.js, so it wraps `transform()`. Install `@swc/core`, then:
202
+ A programmatic `@swc/core` bridge wrapping `transform()`, not a `.swcrc` plugin. Install
203
+ `@swc/core`, then:
207
204
 
208
205
  ```typescript
209
206
  import { transform } from "zod-compiler/swc";
@@ -220,13 +217,9 @@ Defaults `codegenMode` to `"inline"` (SWC has no virtual-module hook); pass
220
217
 
221
218
  ### Compact Output (`output: "compact"`)
222
219
 
223
- The error-collecting walk is 64–77% of the generated bytes, and it only reproduces Zod's issues on
224
- failure which the retained Zod schema already does. `output: "compact"` (CLI: `--emit compact`)
225
- compiles the fast path and delegates the cold error path to it.
226
-
227
- On 50 distinct schemas, output drops **~73% raw / ~71% gzipped**. The hot path is unchanged, errors are
228
- Zod's own, and `safeParse(x).success` / `.is(x)` never invoke Zod — only reading `.error` does. Mutation
229
- schemas keep the compiled path. Mutually exclusive with `output: "bag"`.
220
+ Compiles the fast path and delegates the cold error path to the retained Zod schema, dropping
221
+ **~73% raw / ~71% gzipped** on 50 distinct schemas. The hot path is unchanged and errors are Zod's own;
222
+ only reading `.error` invokes Zod. Mutually exclusive with `output: "bag"`.
230
223
 
231
224
  ### Auto Mode: Side Effects Warning
232
225
 
@@ -245,16 +238,6 @@ if (!process.env.ZOD_COMPILER) {
245
238
 
246
239
  With `@t3-oss/env-*`, pass `skipValidation: !!process.env.ZOD_COMPILER`.
247
240
 
248
- ### schemas: "auto" vs "explicit"
249
-
250
- | | `"auto"` (default) | `"explicit"` + compile() |
251
- | ---------------------------- | ---------------------------------------------------------- | ------------------------------------------- |
252
- | Source code changes | None | Wrap each schema |
253
- | `zod-compiler` import needed | No | Yes |
254
- | What gets compiled | All exported Zod schemas | Only wrapped schemas |
255
- | Build-time file execution | Zod-importing files that may export schemas (pre-filtered) | Files with `import ... from "zod-compiler"` |
256
- | Best for | New projects, framework integration | Gradual adoption, selective optimization |
257
-
258
241
  ### Large projects and CI
259
242
 
260
243
  Discovery executes each schema file inside the bundler's process, so the **first cold run** is the
@@ -267,14 +250,13 @@ expensive one — later runs hit the persistent cache.
267
250
  key: zod-compiler-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
268
251
  ```
269
252
 
270
- Cache entries self-validate against dependency hashes, so a stale cache can only cause recompiles.
271
- Scope discovery with `include`; set `ZOD_COMPILER_TIMING=1` to see per-phase wall time. Files that never
272
- mention `zod` cost nothing.
253
+ Scope discovery with `include`; set `ZOD_COMPILER_TIMING=1` for a per-phase breakdown. Files that
254
+ never mention `zod` cost nothing.
273
255
 
274
256
  ## Framework Examples
275
257
 
276
- Nothing framework-specific is needed. In auto mode your exported schemas are compiled in place, so
277
- anything that accepts a Zod schema keeps working and picks up the compiled version:
258
+ Nothing framework-specific is needed exported schemas are compiled in place, so anything accepting
259
+ a Zod schema picks up the compiled version:
278
260
 
279
261
  ```typescript
280
262
  // tRPC — no .input(compile(...)) needed
@@ -287,14 +269,15 @@ app.post("/users", zValidator("json", UserSchema), (c) => c.json(c.req.valid("js
287
269
  useForm({ resolver: zodResolver(SignupSchema) });
288
270
  ```
289
271
 
290
- The same applies to any [Standard Schema](https://standardschema.dev) consumer. `~standard.validate`
291
- is re-installed on top of the compiled path — Zod's own builds it around its internal parse, so
292
- leaving it alone would have handed these consumers plain Zod. Its `version`/`vendor` are unchanged,
293
- and an async refinement still resolves through Zod.
272
+ The same applies to any [Standard Schema](https://standardschema.dev) consumer `~standard.validate`
273
+ routes through the compiled validator.
274
+
275
+ Compiled methods live on the schema object, so Zod's functional API (`z.safeParse(Schema, x)`) and a
276
+ compiled schema composed into an uncompiled parent stay on plain Zod.
294
277
 
295
278
  ## Schema Diagnostics
296
279
 
297
- Analyze your schemas before compiling — check coverage, Fast Path eligibility, and get actionable hints:
280
+ Check coverage and Fast Path eligibility before compiling:
298
281
 
299
282
  ```bash
300
283
  npx zod-compiler check src/schemas.ts
@@ -374,16 +357,18 @@ see what compiled.
374
357
  ### Behavioral Differences from Zod
375
358
 
376
359
  Compiled validators match Zod on verdicts, output data and error messages, including issue ordering.
377
- Two things differ by design, both from the zero-allocation fast path:
360
+ Three things differ by design:
361
+
362
+ | Behavior | Zod | zod-compiler |
363
+ | ------------------------- | ----------------------------------------------- | ------------------------------------------------------- |
364
+ | Record key iteration | All own keys (`Reflect.ownKeys`) | Own enumerable **string** keys only |
365
+ | Container output identity | A fresh array / set / map / object | The input container, by reference (array holes survive) |
366
+ | Per-call parse params | `safeParse(x, { error, reportInput })` honoured | Ignored; global `z.config()` maps still apply |
378
367
 
379
- | Behavior | Zod | zod-compiler |
380
- | ------------------------- | ---------------------------------- | ------------------------------------------------------- |
381
- | Record key iteration | All own keys (`Reflect.ownKeys`) | Own enumerable **string** keys only |
382
- | Container output identity | A fresh array / set / map / object | The input container, by reference (array holes survive) |
368
+ Schema-level `error` and `z.config()` maps are unaffected; for a per-call map use
369
+ `z.safeParse(Schema, x, params)`.
383
370
 
384
- A container whose contents need no rewriting is validated in place and handed back, where Zod always
385
- rebuilds it. `z.object()` is the exception — it strips unknown keys exactly as Zod does, so its output
386
- is always a fresh object.
371
+ `z.object()` strips unknown keys exactly as Zod does, so its output is always a fresh object.
387
372
 
388
373
  ## Benchmark
389
374
 
@@ -441,9 +426,8 @@ pnpm benchmark # run locally
441
426
  An eligible schema compiles to a **fast path** — one `&&` chain validating the whole input with zero
442
427
  allocations, reused by `.is()` and `parse()` — plus a **slow path** that collects errors, run only on
443
428
  failure and deferred until `.error` is read. A `z.object()` strips, so it instead compiles to a single
444
- pass that validates and rebuilds together, bailing on the first failure. That pass also covers the
445
- idioms that reshape a value — array size checks, `.refine()`, `.default()`, `.trim()`, `.transform()`
446
- so one of them in a schema no longer costs it the whole single-pass parse.
429
+ pass that validates and rebuilds together, bailing on the first failure including the reshaping
430
+ idioms (array size checks, `.refine()`, `.default()`, `.trim()`, `.transform()`).
447
431
 
448
432
  Regexes are pre-compiled with bounded repeats unrolled, checks run cheapest-first, discriminated unions
449
433
  dispatch through a jump table (plain tagged unions are auto-discriminated into it), and oversized check
@@ -11,8 +11,26 @@ import type { CompiledSchemaInfo } from "./pipeline.js";
11
11
  * parse raises (see ZC_SR_DECL).
12
12
  */
13
13
  export declare const ZOD_CONFIG_IMPORT = "import { config as __zodCompilerConfig, core as __zcCore, ZodRealError as __zcZodError } from \"zod\";";
14
- /** File-level __zcMsg declaration (must appear once after ZOD_CONFIG_IMPORT). */
15
- export declare const ZOD_MSG_DECLARATION = "var __zcMsg=__zodCompilerConfig().localeError;";
14
+ /**
15
+ * File-level `__zcMsg` declaration (must appear once after ZOD_CONFIG_IMPORT):
16
+ * the message an issue gets when nothing was baked into it at build time.
17
+ *
18
+ * Resolves zod's tail of `finalizeIssue` — `config.customError` then
19
+ * `config.localeError` then "Invalid input" — and does it PER CALL, because the
20
+ * config is mutable: `z.config({ localeError })` in an entry point runs after
21
+ * the schema modules it imports, so a value snapshotted at module init misses
22
+ * it. Reading a captured `localeError` alone also dropped `customError`
23
+ * outright, silently ignoring the global map most i18n setups install.
24
+ *
25
+ * The head of zod's chain — the schema's own `error` option — is baked into the
26
+ * issue at build time and short-circuits this. The one link that cannot be
27
+ * reproduced is a per-CALL `ctx.error`, which would have to travel through
28
+ * `safeParse`; that entry point sits at V8's inlining budget, where even an
29
+ * unused extra parameter measured ~12% on every parse.
30
+ *
31
+ * Only ever called while building an error, never on a successful parse.
32
+ */
33
+ export declare const ZOD_MSG_DECLARATION: string;
16
34
  /**
17
35
  * Shared failure-result for __zcFin / __zcFinD. Inline mode (CLI emitter)
18
36
  * declares it once per compiled file; lean mode (all unplugin bundlers) declares
@@ -1 +1 @@
1
- {"version":3,"file":"iife.d.ts","sourceRoot":"","sources":["../../src/core/iife.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,2GAC0E,CAAC;AAEzG,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,mDAAmD,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,eAAe,QAMe,CAAC;AAE5C;yEACyE;AACzE,eAAO,MAAM,QAAQ,sGACgF,C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BAAiB,QAIhB,CAAC;AAUf;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GAC5C,MAAM,CAuBR"}
package/dist/core/iife.js CHANGED
@@ -10,8 +10,30 @@
10
10
  * parse raises (see ZC_SR_DECL).
11
11
  */
12
12
  export const ZOD_CONFIG_IMPORT = 'import { config as __zodCompilerConfig, core as __zcCore, ZodRealError as __zcZodError } from "zod";';
13
- /** File-level __zcMsg declaration (must appear once after ZOD_CONFIG_IMPORT). */
14
- export const ZOD_MSG_DECLARATION = "var __zcMsg=__zodCompilerConfig().localeError;";
13
+ /**
14
+ * File-level `__zcMsg` declaration (must appear once after ZOD_CONFIG_IMPORT):
15
+ * the message an issue gets when nothing was baked into it at build time.
16
+ *
17
+ * Resolves zod's tail of `finalizeIssue` — `config.customError` then
18
+ * `config.localeError` then "Invalid input" — and does it PER CALL, because the
19
+ * config is mutable: `z.config({ localeError })` in an entry point runs after
20
+ * the schema modules it imports, so a value snapshotted at module init misses
21
+ * it. Reading a captured `localeError` alone also dropped `customError`
22
+ * outright, silently ignoring the global map most i18n setups install.
23
+ *
24
+ * The head of zod's chain — the schema's own `error` option — is baked into the
25
+ * issue at build time and short-circuits this. The one link that cannot be
26
+ * reproduced is a per-CALL `ctx.error`, which would have to travel through
27
+ * `safeParse`; that entry point sits at V8's inlining budget, where even an
28
+ * unused extra parameter measured ~12% on every parse.
29
+ *
30
+ * Only ever called while building an error, never on a successful parse.
31
+ */
32
+ export const ZOD_MSG_DECLARATION = 'function __zcUw(m){return typeof m==="string"?m:(m===undefined||m===null?undefined:m.message);}' +
33
+ "var __zcMsg=function(iss){var c=__zodCompilerConfig(),m;" +
34
+ "if(c.customError){m=__zcUw(c.customError(iss));if(m!==undefined&&m!==null)return m;}" +
35
+ "if(c.localeError){m=__zcUw(c.localeError(iss));if(m!==undefined&&m!==null)return m;}" +
36
+ 'return "Invalid input";};';
15
37
  /**
16
38
  * Shared failure-result for __zcFin / __zcFinD. Inline mode (CLI emitter)
17
39
  * declares it once per compiled file; lean mode (all unplugin bundlers) declares
@@ -1 +1 @@
1
- {"version":3,"file":"iife.js","sourceRoot":"","sources":["../../src/core/iife.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,sGAAsG,CAAC;AAEzG,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAG,gDAAgD,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,eAAe,GAC1B,+FAA+F;IAC/F,qFAAqF;IACrF,4BAA4B;IAC5B,gDAAgD;IAChD,wIAAwI;IACxI,yCAAyC,CAAC;AAE5C;yEACyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GACnB,mGAAmG,CAAC;AAEtG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,4DAA4D,CAAC;AAE9F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,oFAAoF;IACpF,sFAAsF;IACtF,uDAAuD,CAAC;AAE1D,qGAAqG;AACrG,MAAM,CAAC,MAAM,SAAS,GAAG,oDAAoD,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,6oBAA6oB;IAC7oB,wCAAwC;IACxC,iSAAiS;IACjS,YAAY,CAAC;AAEf,SAAS,mBAAmB,CAAC,WAAmB;IAC9C,MAAM,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzD,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAA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AC;QACtE,aAAa,CAAC,WAAW;QACzB,kBAAkB,MAAM,IAAI,SAAS,IAAI,KAAK,IAAI,KAAK,IAAI;QAC3D,MAAM;KACP,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod-compiler",
3
- "version": "1.22.5",
3
+ "version": "1.22.6",
4
4
  "description": "Compile Zod schemas into zero-overhead validation functions",
5
5
  "keywords": [
6
6
  "aot",