zod 3.23.5 → 3.23.7

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
@@ -53,6 +53,7 @@
53
53
  - [Gold](#gold)
54
54
  - [Silver](#silver)
55
55
  - [Bronze](#bronze)
56
+ - [Copper](#copper)
56
57
  - [Ecosystem](#ecosystem)
57
58
  - [Resources](#resources)
58
59
  - [API libraries](#api-libraries)
@@ -186,201 +187,98 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
186
187
 
187
188
  #### Gold
188
189
 
189
- <table>
190
+ > This tier was just added. [Be the first Gold Sponsor!](https://github.com/sponsors/colinhacks/sponsorships?sponsor=colinhacks&tier_id=399648&preview=false)
191
+
192
+ <!-- <table>
190
193
  <tr>
191
194
  <td align="center">
192
- <a href="https://speakeasyapi.dev/" target="_blank">
193
- <img src="https://avatars.githubusercontent.com/u/91446104?s=200&v=4" width="200px;" alt="Speakeasy API" />
194
- </a>
195
- <br />
196
- <b>Speakeasy</b>
197
- <br />
198
- <a href="https://speakeasyapi.dev/" target="_blank">speakeasyapi.dev</a>
199
- <br />
200
- <p width="200px">SDKs, Terraform, Docs.<br/>Your API made enterprise-ready</p>
201
- </td>
202
- <td align="center">
203
- <a href="https://deletype.com/" target="_blank">
204
- <img src="https://avatars0.githubusercontent.com/u/15068039?s=200&v=4" width="200px;" alt="Deletype logo" />
195
+ <a href="https://www.example.com" target="_blank">
196
+ <img src="https://example.com/image.png" height="100px;" alt="XXX" />
205
197
  </a>
206
198
  <br />
207
- <b>Deletype</b>
199
+ <b>XXX</b>
208
200
  <br />
209
- <a href="https://deletype.com" target="_blank">deletype.com</a>
201
+ <a href="https://www.example.com" target="_blank">example.com</a>
210
202
  </td>
211
203
  </tr>
204
+ </table> -->
205
+
206
+ #### Silver
207
+
208
+ <table>
212
209
  <tr>
213
210
  <td align="center">
214
- <a href="https://trigger.dev/" target="_blank">
215
- <img src="https://avatars.githubusercontent.com/u/95297378?s=200&v=4" width="200px;" alt="Trigger.dev logo" />
216
- </a>
211
+ <img src="https://avatars.githubusercontent.com/u/80861386?s=200&v=4" height="45px;" alt="Cerbos" />
217
212
  <br />
218
- <b>Trigger.dev</b>
219
- <br />
220
- <a href="https://trigger.dev" target="_blank">trigger.dev</a>
221
- <br/>
222
- <p>Effortless automation for developers</p>
213
+ <a href="https://cerbos.dev/" target="_blank">Cerbos</a>
223
214
  </td>
224
215
  <td align="center">
225
- <a href="https://transloadit.com/?utm_source=zod&utm_medium=referral&utm_campaign=sponsorship&utm_content=github" target="_blank">
226
- <img src="https://avatars.githubusercontent.com/u/125754?s=200&v=4" width="200px;" alt="Transloadit logo" />
227
- </a>
216
+ <img src="https://avatars.githubusercontent.com/u/301879?s=200&v=4" height="45px;" alt="Scalar.com logo" />
228
217
  <br />
229
- <b>Transloadit</b>
230
- <br />
231
- <a href="https://transloadit.com/?utm_source=zod&utm_medium=referral&utm_campaign=sponsorship&utm_content=github" target="_blank">transloadit.com</a>
232
- <br/>
233
- <p>Simple file processing for developers</p>
218
+ <a href="https://scalar.com/" target="_blank">Scalar</a>
234
219
  </td>
235
- </tr>
236
- <tr>
237
220
  <td align="center">
238
- <a href="https://infisical.com" target="_blank">
239
- <img src="https://avatars.githubusercontent.com/u/107880645?s=200&v=4" width="200px;" alt="Infisical logo" />
240
- </a>
241
- <br />
242
- <b>Infisical</b>
221
+ <img src="https://avatars.githubusercontent.com/u/91446104?s=200&v=4" height="45px;" alt="Speakeasy API" />
243
222
  <br />
244
- <a href="https://infisical.com" target="_blank">infisical.com</a>
245
- <br/>
246
- <p>Open-source platform for secret<br/>management: sync secrets across your<br/>team/infrastructure and prevent secret leaks</p>
223
+ <a href="https://speakeasyapi.dev/" target="_blank">Speakeasy</a>
247
224
  </td>
248
225
  <td align="center">
249
- <a href="https://whop.com/" target="_blank">
250
- <img src="https://avatars.githubusercontent.com/u/91036480?s=200&v=4" width="200px;" alt="Whop logo" />
251
- </a>
252
- <br />
253
- <b>Whop</b>
254
- <br />
255
- <a href="https://whop.com/" target="_blank">whop.com</a>
226
+ <img src="https://avatars0.githubusercontent.com/u/15068039?s=200&v=4" height="45px;" alt="Deletype logo" />
256
227
  <br />
257
- <p width="200px">A marketplace for really cool internet products</p>
228
+ <a href="https://deletype.com" target="_blank">Deletype</a>
258
229
  </td>
259
- </tr>
260
- <tr>
261
230
  <td align="center">
262
- <a href="https://cryptojobslist.com/" target="_blank">
263
- <img src="https://avatars.githubusercontent.com/u/36402888?s=200&v=4" width="200px;" alt="CryptoJobsList logo" />
264
- </a>
265
- <br />
266
- <b>CryptoJobsList</b>
267
- <br />
268
- <a href="https://cryptojobslist.com/" target="_blank">cryptojobslist.com</a>
231
+ <img src="https://avatars.githubusercontent.com/u/95297378?s=200&v=4" height="45px;" alt="Trigger.dev logo" />
269
232
  <br />
270
- <p width="200px">The biggest list of crypto, blockchain and Web3 jobs</p>
233
+ <a href="https://trigger.dev" target="_blank">Trigger.dev</a>
271
234
  </td>
235
+ </tr><tr>
272
236
  <td align="center">
273
- <a href="https://plain.com/" target="_blank">
274
- <img src="https://avatars.githubusercontent.com/u/70170949?s=200&v=4" width="200px;" alt="Plain logo" />
275
- </a>
276
- <br />
277
- <b>Plain.</b>
237
+ <img src="https://avatars.githubusercontent.com/u/125754?s=200&v=4" height="45px;" alt="Transloadit logo" />
278
238
  <br />
279
- <a href="https://plain.com/" target="_blank">plain.com</a>
280
- <br />
281
- <p width="200px">How developers support their users</p>
239
+ <a href="https://transloadit.com/?utm_source=zod&utm_medium=refe
240
+ rral&utm_campaign=sponsorship&utm_content=github" target="_blank">Transloadit</a>
282
241
  </td>
283
- </tr>
284
- <tr>
285
242
  <td align="center">
286
- <a href="https://inngest.com/" target="_blank">
287
- <img src="https://avatars.githubusercontent.com/u/78935958?s=200&v=4" width="200px;" alt="Inngest logo" />
288
- </a>
289
- <br />
290
- <b>Inngest</b>
243
+ <img src="https://avatars.githubusercontent.com/u/107880645?s=200&v=4" height="45px;" alt="Infisical logo" />
291
244
  <br />
292
- <a href="https://inngest.com/" target="_blank">inngest.com</a>
293
- <br />
294
- <p width="200px">Serverless queues + durable workflows for TypeScript</p>
245
+ <a href="https://infisical.com" target="_blank">Infisical</a>
295
246
  </td>
296
247
  <td align="center">
297
- <a href="https://storyblok.com/" target="_blank">
298
- <img src="https://avatars.githubusercontent.com/u/13880908?s=200&v=4" width="200px;" alt="Storyblok CMS" />
299
- </a>
300
- <br />
301
- <b>Storyblok</b>
302
- <br />
303
- <a href="https://storyblok.com/" target="_blank">storyblok.com</a>
248
+ <img src="https://avatars.githubusercontent.com/u/91036480?s=200&v=4" height="45px;" alt="Whop logo" />
304
249
  <br />
305
- <p width="200px">The only headless CMS with a visual editor</p>
250
+ <a href="https://whop.com/" target="_blank">Whop</a>
306
251
  </td>
307
- </tr>
308
- <tr>
309
252
  <td align="center">
310
- <a href="https://mux.link/zod" target="_blank">
311
- <img src="https://avatars.githubusercontent.com/u/16199997?s=200&v=4" width="200px;" alt="Mux logo" />
312
- </a>
313
- <br />
314
- <b>Mux</b>
315
- <br />
316
- <a href="https://mux.link/zod" target="_blank">mux.com</a>
253
+ <img src="https://avatars.githubusercontent.com/u/36402888?s=200&v=4" height="45px;" alt="CryptoJobsList logo" />
317
254
  <br />
318
- <p width="200px">The internet's video infrastructure</p>
255
+ <a href="https://cryptojobslist.com/" target="_blank">CryptoJobsList</a>
319
256
  </td>
320
257
  <td align="center">
321
- <a href="https://scalar.com/" target="_blank">
322
- <img src="https://avatars.githubusercontent.com/u/301879?s=200&v=4" width="200px;" alt="Scalar.com logo" />
323
- </a>
324
- <br />
325
- <b>Scalar</b>
326
- <br />
327
- <a href="https://scalar.com/" target="_blank">scalar.com</a>
328
- <br />
329
- <p width="200px">Document, discover & test APIs with Scalar</p>
330
- </td>
331
- </tr>
332
- </table>
333
-
334
- #### Silver
335
-
336
- <table>
337
- <tr>
338
- <td align="center" colspan="2">
339
- <a href="https://www.numeric.io" target="_blank">
340
- <img src="https://i.imgur.com/kTiLtZt.png" width="250px;" alt="Numeric logo" />
341
- </a>
342
- <br />
343
- <b>Numeric</b>
258
+ <img src="https://avatars.githubusercontent.com/u/70170949?s=200&v=4" height="45px;" alt="Plain logo" />
344
259
  <br />
345
- <a href="https://www.numeric.io" target="_blank">numeric.io</a>
260
+ <a href="https://plain.com/" target="_blank">Plain.</a>
346
261
  </td>
262
+ </tr><tr>
347
263
  <td align="center">
348
- <a href="https://marcatopartners.com/" target="_blank">
349
- <img src="https://avatars.githubusercontent.com/u/84106192?s=200&v=4" width="150px;" alt="Marcato Partners" />
350
- </a>
351
- <br />
352
- <b>Marcato Partners</b>
264
+ <img src="https://avatars.githubusercontent.com/u/78935958?s=200&v=4" height="45px;" alt="Inngest logo" />
353
265
  <br />
354
- <a href="https://marcatopartners.com/" target="_blank">marcatopartners.com</a>
266
+ <a href="https://inngest.com/" target="_blank">Inngest</a>
355
267
  </td>
356
- </tr>
357
- <tr>
358
268
  <td align="center">
359
- <a href="https://interval.com" target="_blank">
360
- <img src="https://avatars.githubusercontent.com/u/67802063?s=200&v=4" width="150px;" alt="" />
361
- </a>
269
+ <img src="https://avatars.githubusercontent.com/u/13880908?s=200&v=4" height="45px;" alt="Storyblok CMS" />
362
270
  <br />
363
- <b>Interval</b>
364
- <br />
365
- <a href="https://interval.com" target="_blank">interval.com</a>
271
+ <a href="https://storyblok.com/" target="_blank">Storyblok</a>
366
272
  </td>
367
273
  <td align="center">
368
- <a href="https://seasoned.cc" target="_blank">
369
- <img src="https://avatars.githubusercontent.com/u/33913103?s=200&v=4" width="150px;" alt="" />
370
- </a>
371
- <br />
372
- <b>Seasoned Software</b>
274
+ <img src="https://avatars.githubusercontent.com/u/16199997?s=200&v=4" height="45px;" alt="Mux logo" />
373
275
  <br />
374
- <a href="https://seasoned.cc" target="_blank">seasoned.cc</a>
276
+ <a href="https://mux.link/zod" target="_blank">Mux</a>
375
277
  </td>
376
278
  <td align="center">
377
- <a href="https://www.bamboocreative.nz/" target="_blank">
378
- <img src="https://avatars.githubusercontent.com/u/41406870?v=4" width="150px;" alt="Bamboo Creative logo" />
379
- </a>
380
- <br />
381
- <b>Bamboo Creative</b>
279
+ <img src="https://avatars.githubusercontent.com/u/180984?v=4" height="45px;" alt="@emreb" />
382
280
  <br />
383
- <a href="https://www.bamboocreative.nz" target="_blank">bamboocreative.nz</a>
281
+ <a href="https://github.com/emreb" target="_blank"><code>@emreb</code></a>
384
282
  </td>
385
283
  </tr>
386
284
  </table>
@@ -389,177 +287,45 @@ Sponsorship at any level is appreciated and encouraged. For individual developer
389
287
 
390
288
  <table>
391
289
  <tr>
392
- <td align="center">
393
- <a href="https://twitter.com/flybayer" target="_blank">
394
- <img src="https://avatars2.githubusercontent.com/u/8813276?s=460&u=4ff8beb9a67b173015c4b426a92d89cab960af1b&v=4" width="100px;" alt=""/>
395
- </a>
396
- <br />
397
- <b>Brandon Bayer</b>
398
- <br/>
399
- <a href="https://twitter.com/flybayer" target="_blank">@flybayer</a>,
400
- <span>creator of <a href="https://blitzjs.com">Blitz.js</a></span>
401
- <br />
402
- </td>
403
- <td align="center">
404
- <a href="https://github.com/brabeji" target="_blank">
405
- <img src="https://avatars.githubusercontent.com/u/2237954?v=4" width="100px;" alt=""/>
406
- </a>
407
- <br />
408
- <b>Jiří Brabec</b>
409
- <br/>
410
- <a href="https://github.com/brabeji" target="_blank">@brabeji</a>
411
- <br />
412
- </td>
413
- <td align="center">
414
- <a href="https://twitter.com/alexdotjs" target="_blank">
415
- <img src="https://avatars.githubusercontent.com/u/459267?v=4" width="100px;" alt="" />
416
- </a>
417
- <br />
418
- <b>Alex Johansson</b>
419
- <br />
420
- <a href="https://twitter.com/alexdotjs" target="_blank">@alexdotjs</a>
421
- </td>
290
+ <td><a href="https://www.numeric.io">Numeric</a></td>
291
+ <td><a href="https://marcatopartners.com/">Marcato Partners</a></td>
292
+ <td><a href="https://interval.com">Interval</a></td>
293
+ <td><a href="https://seasoned.cc">Seasoned Software</a></td>
422
294
  </tr>
423
295
  <tr>
424
- <td align="center">
425
- <a href="https://fungible.systems/" target="_blank">
426
- <img src="https://avatars.githubusercontent.com/u/80220121?s=200&v=4" width="100px;" alt="Fungible Systems logo"/>
427
- </a>
428
- <br />
429
- <b>Fungible Systems</b>
430
- <br/>
431
- <a href="https://fungible.systems/" target="_blank">fungible.systems</a>
432
- <br />
433
- </td>
434
- <td align="center">
435
- <a href="https://adaptable.io/" target="_blank">
436
- <img src="https://avatars.githubusercontent.com/u/60378268?s=200&v=4" width="100px;" alt=""/>
437
- </a>
438
- <br />
439
- <b>Adaptable</b>
440
- <br/>
441
- <a href="https://adaptable.io/" target="_blank">adaptable.io</a>
442
- <br />
443
- </td>
444
- <td align="center">
445
- <a href="https://www.avanawallet.com/" target="_blank">
446
- <img src="https://avatars.githubusercontent.com/u/105452197?s=200&v=4" width="100px;" alt="Avana Wallet logo"/>
447
- </a>
448
- <br />
449
- <b>Avana Wallet</b>
450
- <br/>
451
- <a href="https://www.avanawallet.com/" target="_blank">avanawallet.com</a><br/>
452
- <span>Solana non-custodial wallet</span>
453
- <br />
454
- </td>
296
+ <td><a href="https://www.bamboocreative.nz/">Bamboo Creative</a></td>
455
297
  </tr>
298
+ </table>
299
+
300
+ #### Copper
301
+
302
+ <table>
456
303
  <tr>
457
- <td align="center">
458
- <a href="https://learnwithjason.dev" target="_blank">
459
- <img src="https://avatars.githubusercontent.com/u/66575486?s=200&v=4" width="100px;" alt="Learn with Jason logo"/>
460
- </a>
461
- <br />
462
- <b>Jason Lengstorf</b>
463
- <br/>
464
- <a href="https://learnwithjason.dev/" target="_blank">learnwithjason.dev</a>
465
- <br />
466
- </td>
467
- <td align="center">
468
- <a href="https://ill.inc/" target="_blank">
469
- <img src="https://avatars.githubusercontent.com/u/89107581?s=200&v=4" width="100px;" alt="Global Illumination"/>
470
- </a>
471
- <br />
472
- <b>Global Illumination, Inc.</b>
473
- <br/>
474
- <a href="https://ill.inc/" target="_blank">ill.inc</a>
475
- <br />
476
- </td>
477
- <td align="center">
478
- <a href="https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=zodsponsoring" target="_blank">
479
- <img src="https://avatars.githubusercontent.com/u/48984031?s=200&v=4" width="100px;" alt="MasterBorn logo"/>
480
- </a>
481
- <br />
482
- <b>MasterBorn</b>
483
- <br/>
484
- <a href="https://www.masterborn.com/career?utm_source=github&utm_medium=referral&utm_campaign=zodsponsoring" target="_blank">masterborn.com</a>
485
- <br />
486
- </td>
304
+ <td>Brandon Bayer</td>
305
+ <td>Jiří Brabec</td>
306
+ <td>Alex Johansson</td>
307
+ <td>Fungible Systems</td>
487
308
  </tr>
488
309
  <tr>
489
- <td align="center">
490
- <a href="https://github.com/kronodeus" target="_blank">
491
- <img src="https://avatars.githubusercontent.com/u/18314366?v=4" width="100px;" alt="Ryan Palmer"/>
492
- </a>
493
- <br />
494
- <b>Ryan Palmer</b>
495
- <br/>
496
- <a href="https://github.com/kronodeus" target="_blank">@kronodeus</a>
497
- <br />
498
- </td>
499
- <td align="center">
500
- <a href="https://github.com/overthemike" target="_blank">
501
- <img src="https://avatars.githubusercontent.com/u/223509?v=4" width="100px;" alt="Michael Sweeney"/>
502
- </a>
503
- <br />
504
- <b>Michael Sweeney</b>
505
- <br/>
506
- <a href="https://github.com/overthemike" target="_blank">@overthemike</a>
507
- <br />
508
- </td>
509
- <td align="center">
510
- <a href="https://usenextbase.com/" target="_blank">
511
- <img src="https://pbs.twimg.com/profile_images/1692236063409070080/28yXFtop_400x400.jpg" width="100px;" alt="Nextbase logo"/>
512
- </a>
513
- <br />
514
- <b>Nextbase</b>
515
- <br/>
516
- <a href="https://usenextbase.com/" target="_blank">usenextbase.com</a>
517
- <br />
518
- </td>
310
+ <td>Adaptable</td>
311
+ <td>Avana Wallet</td>
312
+ <td>Jason Lengstorf</td>
313
+ <td>Global Illumination, Inc.</td>
519
314
  </tr>
520
315
  <tr>
521
- <td align="center">
522
- <a href="https://remotion.dev" target="_blank">
523
- <img src="https://avatars.githubusercontent.com/u/85344006" width="100px;" alt="Remotion logo"/>
524
- </a>
525
- <br />
526
- <b>Remotion</b>
527
- <br/>
528
- <a href="https://remotion.dev" target="_blank">remotion.dev</a>
529
- <br />
530
- </td>
531
- <td align="center">
532
- <a href="https://github.com/ConnorSinnott" target="_blank">
533
- <img src="https://avatars.githubusercontent.com/u/12754711?v=4" width="100px;" alt="Connor Sinnott profile"/>
534
- </a>
535
- <br />
536
- <b>Connor Sinnott</b>
537
- <br/>
538
- <a href="https://github.com/ConnorSinnott" target="_blank">@ConnorSinnott</a>
539
- <br />
540
- </td>
541
- <td align="center">
542
- <a href="https://aerabi.com/" target="_blank">
543
- <img src="https://avatars.githubusercontent.com/u/44623032?v=4" width="100px;" alt="aerabi"/>
544
- </a>
545
- <br />
546
- <b>Mohammad-Ali A'râbi</b>
547
- <br/>
548
- <a href="https://aerabi.com/" target="_blank">aerabi.com</a>
549
- <br />
550
- </td>
316
+ <td>MasterBorn</td>
317
+ <td>Ryan Palmer</td>
318
+ <td>Michael Sweeney</td>
319
+ <td>Nextbase</td>
551
320
  </tr>
552
321
  <tr>
553
- <td align="center">
554
- <a href="https://supatool.io/" target="_blank">
555
- <img src="https://github.com/colinhacks/zod/assets/3084745/d0ec96c9-bf79-494f-9caa-9233da251f55" width="100px;" alt="Supatool logo"/>
556
- </a>
557
- <br />
558
- <b>Supatool</b>
559
- <br/>
560
- <a href="https://supatool.io/" target="_blank">supatool.io</a>
561
- <br />
562
- </td>
322
+ <td>Remotion</td>
323
+ <td>Connor Sinnott</td>
324
+ <td>Mohammad-Ali A'râbi</td>
325
+ <td>Supatool</td>
326
+ </tr>
327
+ <tr>
328
+ <td>Social Crow</td>
563
329
  </tr>
564
330
  </table>
565
331
 
@@ -653,6 +419,7 @@ There are a growing number of tools that are built atop or support Zod natively!
653
419
  #### Utilities for Zod
654
420
 
655
421
  - [`zod_utilz`](https://github.com/JacobWeisenburger/zod_utilz): Framework agnostic utilities for Zod.
422
+ - [`zod-playground`](https://github.com/marilari88/zod-playground): A tool for learning and testing Zod schema validation functionalities. [Link](https://zod-playground.vercel.app/).
656
423
  - [`zod-sandbox`](https://github.com/nereumelo/zod-sandbox): Controlled environment for testing zod schemas. [Live demo](https://zod-sandbox.vercel.app/).
657
424
  - [`zod-dev`](https://github.com/schalkventer/zod-dev): Conditionally disables Zod runtime parsing in production.
658
425
  - [`zod-accelerator`](https://github.com/duplojs/duplojs-zod-accelerator): Accelerates Zod's throughput up to ~100x.
@@ -1957,7 +1724,9 @@ Thanks to [ggoodman](https://github.com/ggoodman) for suggesting this.
1957
1724
 
1958
1725
  ### Cyclical objects
1959
1726
 
1960
- Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop.
1727
+ Despite supporting recursive schemas, passing cyclical data into Zod will cause an infinite loop in some cases.
1728
+
1729
+ > To detect cyclical objects before they cause problems, consider [this approach](https://gist.github.com/colinhacks/d35825e505e635df27cc950776c5500b).
1961
1730
 
1962
1731
  ## Promises
1963
1732
 
@@ -2679,7 +2448,7 @@ Note that branded types do not affect the runtime result of `.parse`. It is a st
2679
2448
  This method returns a `ZodReadonly` schema instance that parses the input using the base schema, then calls `Object.freeze()` on the result. The inferred type is also marked as `readonly`.
2680
2449
 
2681
2450
  ```ts
2682
- const schema = z.object({ name: string }).readonly();
2451
+ const schema = z.object({ name: z.string() }).readonly();
2683
2452
  type schema = z.infer<typeof schema>;
2684
2453
  // Readonly<{name: string}>
2685
2454
 
@@ -50,7 +50,9 @@ export declare namespace objectUtil {
50
50
  }>;
51
51
  export const mergeShapes: <U, T>(first: U, second: T) => T & U;
52
52
  export type extendShape<A extends object, B extends object> = {
53
- [K in keyof A | keyof B]: K extends keyof B ? B[K] : K extends keyof A ? A[K] : never;
53
+ [K in keyof A as K extends keyof B ? never : K]: A[K];
54
+ } & {
55
+ [K in keyof B]: B[K];
54
56
  };
55
57
  export {};
56
58
  }
package/lib/index.mjs CHANGED
@@ -3977,10 +3977,15 @@ class ZodPipeline extends ZodType {
3977
3977
  class ZodReadonly extends ZodType {
3978
3978
  _parse(input) {
3979
3979
  const result = this._def.innerType._parse(input);
3980
- if (isValid(result)) {
3981
- result.value = Object.freeze(result.value);
3982
- }
3983
- return result;
3980
+ const freeze = (data) => {
3981
+ if (isValid(data)) {
3982
+ data.value = Object.freeze(data.value);
3983
+ }
3984
+ return data;
3985
+ };
3986
+ return isAsync(result)
3987
+ ? result.then((data) => freeze(data))
3988
+ : freeze(result);
3984
3989
  }
3985
3990
  unwrap() {
3986
3991
  return this._def.innerType;
package/lib/index.umd.js CHANGED
@@ -3983,10 +3983,15 @@
3983
3983
  class ZodReadonly extends ZodType {
3984
3984
  _parse(input) {
3985
3985
  const result = this._def.innerType._parse(input);
3986
- if (isValid(result)) {
3987
- result.value = Object.freeze(result.value);
3988
- }
3989
- return result;
3986
+ const freeze = (data) => {
3987
+ if (isValid(data)) {
3988
+ data.value = Object.freeze(data.value);
3989
+ }
3990
+ return data;
3991
+ };
3992
+ return isAsync(result)
3993
+ ? result.then((data) => freeze(data))
3994
+ : freeze(result);
3990
3995
  }
3991
3996
  unwrap() {
3992
3997
  return this._def.innerType;
package/lib/types.js CHANGED
@@ -3486,10 +3486,15 @@ exports.ZodPipeline = ZodPipeline;
3486
3486
  class ZodReadonly extends ZodType {
3487
3487
  _parse(input) {
3488
3488
  const result = this._def.innerType._parse(input);
3489
- if ((0, parseUtil_1.isValid)(result)) {
3490
- result.value = Object.freeze(result.value);
3491
- }
3492
- return result;
3489
+ const freeze = (data) => {
3490
+ if ((0, parseUtil_1.isValid)(data)) {
3491
+ data.value = Object.freeze(data.value);
3492
+ }
3493
+ return data;
3494
+ };
3495
+ return (0, parseUtil_1.isAsync)(result)
3496
+ ? result.then((data) => freeze(data))
3497
+ : freeze(result);
3493
3498
  }
3494
3499
  unwrap() {
3495
3500
  return this._def.innerType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "3.23.5",
3
+ "version": "3.23.7",
4
4
  "author": "Colin McDonnell <colin@colinhacks.com>",
5
5
  "repository": {
6
6
  "type": "git",