-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ZodString.date()
& ZodString.time()
.
#1766
Conversation
✅ Deploy Preview for guileless-rolypoly-866f8a ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @igalklebanov I promise I'm not following you 😆 I'm just going down the PRs to check them out!
👍 LGTM, just a couple of comments you may want to consider!
Co-authored-by: Max Arturo <5713763+maxArturo@users.noreply.github.com>
Co-authored-by: Max Arturo <5713763+maxArturo@users.noreply.github.com>
Co-authored-by: Max Arturo <5713763+maxArturo@users.noreply.github.com>
@maxArturo Thanks again for the thorough review and great feedback! 💪 |
Hi @igalklebanov, there seems to be just a linting/prettier error preventing the merge :) Would be amazing if this could get in soon! |
Co-authored-by: Frederik Eychenié <277455+feychenie@users.noreply.github.com>
d79d11c
to
10da48c
Compare
😢 (Although, I guess he did suggest it, I just created the issue about the general idea ) |
Did I do anything wrong? 🤷 |
Any updates on when this will be merged? |
Would be awesome to have this!! |
Hello, any updates on when this will be merged? |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zod](https://zod.dev) ([source](https://togithub.com/colinhacks/zod)) | [`3.23.6` -> `3.23.7`](https://renovatebot.com/diffs/npm/zod/3.22.4/3.23.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/zod/3.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/zod/3.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/zod/3.22.4/3.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/zod/3.22.4/3.23.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>colinhacks/zod (zod)</summary> ### [`v3.23.7`](https://togithub.com/colinhacks/zod/compare/v3.23.6...f985b5b922cb357dbf4b25bb43814d19f838e046) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.6...v3.23.7) ### [`v3.23.6`](https://togithub.com/colinhacks/zod/compare/v3.23.5...93b480b12ec3466cbd3b4182f7ce292e5c61528c) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.5...v3.23.6) ### [`v3.23.5`](https://togithub.com/colinhacks/zod/compare/v3.23.4...541a862e978f96eb391849a6bf16be84231aa1b3) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.4...v3.23.5) ### [`v3.23.4`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.4) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.3...v3.23.4) #### Commits: - [`157b18d`](https://togithub.com/colinhacks/zod/commit/157b18d742c86d85b26a8421af46ad6d6d6b6ea7) Add 3.23 announcement - [`aedf93f`](https://togithub.com/colinhacks/zod/commit/aedf93f1435a29463d915c3be45b4dcbeefa8cc1) Revert change to default Input - [`45107f7`](https://togithub.com/colinhacks/zod/commit/45107f7a7230fe48ee24dc37e621422c9dc64ec4) v3.23.4 ### [`v3.23.3`](https://togithub.com/colinhacks/zod/compare/v3.23.2...103d2436f85872ca0e0e6247652989cc93d46a39) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.2...v3.23.3) ### [`v3.23.2`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.2) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.1...v3.23.2) #### Commits: - [`c340558`](https://togithub.com/colinhacks/zod/commit/c340558d14f5222a2ca177e0591463c06cc5edc3) Update protocol - [`ef588d0`](https://togithub.com/colinhacks/zod/commit/ef588d036f3e98b832796e9a681dbaf097631ea0) Fix t3env - [`9df70dd`](https://togithub.com/colinhacks/zod/commit/9df70dd71195df951c43f180fbe5e64ea1f835df) 3.23.2 ### [`v3.23.1`](https://togithub.com/colinhacks/zod/compare/v3.23.0...2ff5ceb428634de0ea4501495039c05a8e95b60a) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.0...v3.23.1) ### [`v3.23.0`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.0) [Compare Source](https://togithub.com/colinhacks/zod/compare/e7a9b9b3033991be6b4225f1be21da39c250bbb0...v3.23.0) Zod 3.23 is now available. This is the final `3.x` release before Zod 4.0. To try it out: ```sh npm install zod ``` #### Features ##### `z.string().date()` Zod can now validate ISO 8601 date strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().date(); schema.parse("2022-01-01"); // OK ``` ##### `z.string().time()` Zod can now validate ISO 8601 time strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().time(); schema.parse("12:00:00"); // OK ``` You can specify sub-second precision using the `precision` option: ```ts const schema = z.string().time({ precision: 3 }); schema.parse("12:00:00.123"); // OK schema.parse("12:00:00.123456"); // Error schema.parse("12:00:00"); // Error ``` ##### `z.string().duration()` Zod can now validate ISO 8601 duration strings. Thanks [@​mastermatt](https://togithub.com/mastermatt)! [colinhacks/zod#3265 ```ts const schema = z.string().duration(); schema.parse("P3Y6M4DT12H30M5S"); // OK ``` ##### Improvements to `z.string().datetime()` Thanks [@​bchrobot](https://togithub.com/bchrobot) [colinhacks/zod#2522 You can now allow *unqualified* (timezone-less) datetimes using the `local: true` flag. ```ts const schema = z.string().datetime({ local: true }); schema.parse("2022-01-01T12:00:00"); // OK ``` Plus, Zod now validates the day-of-month correctly to ensure no invalid dates (e.g. February 30th) pass validation. Thanks [@​szamanr](https://togithub.com/szamanr)! [colinhacks/zod#3391 ##### `z.string().base64()` Zod can now validate base64 strings. Thanks [@​StefanTerdell](https://togithub.com/StefanTerdell)! [colinhacks/zod#3047 ```ts const schema = z.string().base64(); schema.parse("SGVsbG8gV29ybGQ="); // OK ``` ##### Improved discriminated unions The following can now be used as discriminator keys in `z.discriminatedUnion()`: - `ZodOptional` - `ZodNullable` - `ZodReadonly` - `ZodBranded` - `ZodCatch` ```ts const schema = z.discriminatedUnion("type", [ z.object({ type: z.literal("A").optional(), value: z.number() }), z.object({ type: z.literal("B").nullable(), value: z.string() }), z.object({ type: z.literal("C").readonly(), value: z.boolean() }), z.object({ type: z.literal("D").brand<"D">(), value: z.boolean() }), z.object({ type: z.literal("E").catch("E"), value: z.unknown() }), ]); ``` ##### Misc - feature: allow falsy error message by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3178 - feature: add attribute message to enum validatiion by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3169 #### Breaking changes There are no breaking changes to the public API of Zod. However some changes can impact ecosystem tools that rely on Zod internals. ##### `ZodFirstPartySchemaTypes` Three new types have been added to the `ZodFirstPartySchemaTypes` union. This may impact some codegen libraries. [colinhacks/zod#3247 ```diff + | ZodPipeline<any, any> + | ZodReadonly<any> + | ZodSymbol; ``` ##### Default generics in `ZodType` The third argument of the `ZodType` base class now defaults to `unknown`. This makes it easier to define recursive schemas and write generic functions that accept Zod schemas. ```diff - class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {} + class ZodType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = unknown> {} ``` ##### Unrecognized keys in `.pick()` and `.omit()` This version fixes a bug where unknown keys were accidentally accepted in `.pick()` and `omit()`. This has been fixed, which could cause compiler errors in some user code. [colinhacks/zod#3255 ```ts z.object({ name: z.string() }).pick({ notAKey: true // no longer allowed }) ``` #### Bugfixes and performance - Bugfix: Enum.extract/exclude should not remove error mapping by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3240 - Added latest stable Node and TypeScript versions to test matrix for up-to-date testing. by [@​m10rten](https://togithub.com/m10rten) in [colinhacks/zod#3278 - Add types to `ZodFirstPartySchemaTypes` by [@​MatthijsMud](https://togithub.com/MatthijsMud) in [colinhacks/zod#3247 - fix: make `input` of `.required()` readonly by [@​KATT](https://togithub.com/KATT) in [colinhacks/zod#3301 - add never props to safe parse return types by [@​schicks](https://togithub.com/schicks) in [colinhacks/zod#3295 - Reporting errors of the preprocess that is the second property of object by [@​yukukotani](https://togithub.com/yukukotani) in [colinhacks/zod#2912 - Improve `addQuestionMarks`, fix [#​2184](https://togithub.com/colinhacks/zod/issues/2184) by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3352 - fix for njs by [@​dvv](https://togithub.com/dvv) in [colinhacks/zod#3063 - only look in `src` for `bun test` by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3038 - Restrict .pick()/.omit() mask type to only known properties by [@​petrovmiroslav](https://togithub.com/petrovmiroslav) in [colinhacks/zod#3255 - Make EnumValues generic by [@​IlyaSemenov](https://togithub.com/IlyaSemenov) in [colinhacks/zod#2338 - perf: avoid unnecessary error maps by [@​xuxucode](https://togithub.com/xuxucode) in [colinhacks/zod#2532 - Bugfix: z.record().parse should not filter out undefined values by [@​raik-casimiro](https://togithub.com/raik-casimiro) in [colinhacks/zod#3251 - Use Set.has instead of Array.indexOf for enum comparison (perf improvement) by [@​jmike](https://togithub.com/jmike) in [colinhacks/zod#2659 - \[2888] fix emails with single quotes failing validation by [@​Mansehej](https://togithub.com/Mansehej) in [colinhacks/zod#2889 - Bugfix: Commas are incorrectly allowed in email regex. by [@​mokemoko](https://togithub.com/mokemoko) in [colinhacks/zod#3286 - Fix regex in cuid2 validation to be what cuid2 library expects by [@​etareduction](https://togithub.com/etareduction) in [colinhacks/zod#2961 - Make depcruise pass by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3037 - Faster ipv4 parsing by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3413 #### Docs and ecosystem - chore: add pastel package to ecosystem by [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) in [colinhacks/zod#2949 - added required styles. by [@​Ansh101112](https://togithub.com/Ansh101112) in [colinhacks/zod#2955 - Feature/better chinese translate by [@​NWYLZW](https://togithub.com/NWYLZW) in [colinhacks/zod#2988 - Fix z.instanceof example by [@​alexnault](https://togithub.com/alexnault) in [colinhacks/zod#3003 - Add documentation to Zod enum exclude/extract functions by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3044 - Add docs for coercing nullish values by [@​rbuetzer](https://togithub.com/rbuetzer) in [colinhacks/zod#3067 - Adds `zod-dev` utility to eco-system section by [@​schalkventer](https://togithub.com/schalkventer) in [colinhacks/zod#3113 - Add zhttp library to docs by [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) in [colinhacks/zod#3134 - fixed Readme typo in NaNs example by [@​RashJrEdmund](https://togithub.com/RashJrEdmund) in [colinhacks/zod#3181 - adds zod-config library to the ecosystem by [@​alexmarqs](https://togithub.com/alexmarqs) in [colinhacks/zod#3200 - docs: update link and description of conform integration by [@​g1eny0ung](https://togithub.com/g1eny0ung) in [colinhacks/zod#3238 - Update README.md by [@​yugmade13](https://togithub.com/yugmade13) in [colinhacks/zod#3317 - feat: overhaul generics section of readme to include more details on z.ZodTypeAny usage by [@​braden-w](https://togithub.com/braden-w) in [colinhacks/zod#3321 - Fix small typos by [@​mmorearty](https://togithub.com/mmorearty) in [colinhacks/zod#3336 - docs: update Chinese docs and correct some of the typos by [@​jiechen257](https://togithub.com/jiechen257) in [colinhacks/zod#3338 - docs: improve chinese readme by [@​luckrnx09](https://togithub.com/luckrnx09) in [colinhacks/zod#3371 - Add java-to-zod in X to Zod section by [@​ivangreene](https://togithub.com/ivangreene) in [colinhacks/zod#3385 - docs: add `orval` to "X to Zod" ecosystems by [@​soartec-lab](https://togithub.com/soartec-lab) in [colinhacks/zod#3397 #### New Contributors - [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) made their first contribution in [colinhacks/zod#2949 - [@​Ansh101112](https://togithub.com/Ansh101112) made their first contribution in [colinhacks/zod#2955 - [@​NWYLZW](https://togithub.com/NWYLZW) made their first contribution in [colinhacks/zod#2988 - [@​alexnault](https://togithub.com/alexnault) made their first contribution in [colinhacks/zod#3003 - [@​shaharke](https://togithub.com/shaharke) made their first contribution in [colinhacks/zod#3044 - [@​rbuetzer](https://togithub.com/rbuetzer) made their first contribution in [colinhacks/zod#3067 - [@​schalkventer](https://togithub.com/schalkventer) made their first contribution in [colinhacks/zod#3113 - [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) made their first contribution in [colinhacks/zod#3134 - [@​RashJrEdmund](https://togithub.com/RashJrEdmund) made their first contribution in [colinhacks/zod#3181 - [@​alexmarqs](https://togithub.com/alexmarqs) made their first contribution in [colinhacks/zod#3200 - [@​JonnyBurger](https://togithub.com/JonnyBurger) made their first contribution in [colinhacks/zod#3214 - [@​fernandollisboa](https://togithub.com/fernandollisboa) made their first contribution in [colinhacks/zod#3178 - [@​g1eny0ung](https://togithub.com/g1eny0ung) made their first contribution in [colinhacks/zod#3238 - [@​m10rten](https://togithub.com/m10rten) made their first contribution in [colinhacks/zod#3278 - [@​MatthijsMud](https://togithub.com/MatthijsMud) made their first contribution in [colinhacks/zod#3247 - [@​yugmade13](https://togithub.com/yugmade13) made their first contribution in [colinhacks/zod#3317 - [@​braden-w](https://togithub.com/braden-w) made their first contribution in [colinhacks/zod#3321 - [@​mmorearty](https://togithub.com/mmorearty) made their first contribution in [colinhacks/zod#3336 - [@​schicks](https://togithub.com/schicks) made their first contribution in [colinhacks/zod#3295 - [@​yukukotani](https://togithub.com/yukukotani) made their first contribution in [colinhacks/zod#2912 - [@​jiechen257](https://togithub.com/jiechen257) made their first contribution in [colinhacks/zod#3338 - [@​luckrnx09](https://togithub.com/luckrnx09) made their first contribution in [colinhacks/zod#3371 - [@​dvv](https://togithub.com/dvv) made their first contribution in [colinhacks/zod#3063 - [@​rotu](https://togithub.com/rotu) made their first contribution in [colinhacks/zod#3038 - [@​petrovmiroslav](https://togithub.com/petrovmiroslav) made their first contribution in [colinhacks/zod#3255 - [@​ivoilic](https://togithub.com/ivoilic) made their first contribution in [colinhacks/zod#2364 - [@​telemakhos](https://togithub.com/telemakhos) made their first contribution in [colinhacks/zod#3388 - [@​bchrobot](https://togithub.com/bchrobot) made their first contribution in [colinhacks/zod#2522 - [@​szamanr](https://togithub.com/szamanr) made their first contribution in [colinhacks/zod#3391 - [@​ivangreene](https://togithub.com/ivangreene) made their first contribution in [colinhacks/zod#3385 - [@​xuxucode](https://togithub.com/xuxucode) made their first contribution in [colinhacks/zod#2532 - [@​raik-casimiro](https://togithub.com/raik-casimiro) made their first contribution in [colinhacks/zod#3251 - [@​jmike](https://togithub.com/jmike) made their first contribution in [colinhacks/zod#2659 - [@​Mansehej](https://togithub.com/Mansehej) made their first contribution in [colinhacks/zod#2889 - [@​mokemoko](https://togithub.com/mokemoko) made their first contribution in [colinhacks/zod#3286 - [@​etareduction](https://togithub.com/etareduction) made their first contribution in [colinhacks/zod#2961 - [@​mastermatt](https://togithub.com/mastermatt) made their first contribution in [colinhacks/zod#3265 - [@​soartec-lab](https://togithub.com/soartec-lab) made their first contribution in [colinhacks/zod#3397 **Full Changelog**: colinhacks/zod@v3.22.4...v3.23.0 ### [`v3.22.5`](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zod](https://zod.dev) ([source](https://togithub.com/colinhacks/zod)) | [`3.23.7` -> `3.23.8`](https://renovatebot.com/diffs/npm/zod/3.22.4/3.23.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/zod/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/zod/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/zod/3.22.4/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/zod/3.22.4/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>colinhacks/zod (zod)</summary> ### [`v3.23.8`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.8) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.7...v3.23.8) #### Commits: - [`0f4d403`](https://togithub.com/colinhacks/zod/commit/0f4d403558ae0490c711e4c2bfcf6c200bd14e11) Add Bronze logos ([#​3470](https://togithub.com/colinhacks/zod/issues/3470)) - [`1968731`](https://togithub.com/colinhacks/zod/commit/19687315b5b24bbd1ff6c346bfc2975700221748) Tweak tiers ([#​3471](https://togithub.com/colinhacks/zod/issues/3471)) - [`eda7df3`](https://togithub.com/colinhacks/zod/commit/eda7df314399929f7ed737423868a5a0780cd944) Change RefinementCtx to interface - [`ca42965`](https://togithub.com/colinhacks/zod/commit/ca42965df46b2f7e2747db29c40a26bcb32a51d5) v3.23.8 ### [`v3.23.7`](https://togithub.com/colinhacks/zod/compare/v3.23.6...f985b5b922cb357dbf4b25bb43814d19f838e046) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.6...v3.23.7) ### [`v3.23.6`](https://togithub.com/colinhacks/zod/compare/v3.23.5...93b480b12ec3466cbd3b4182f7ce292e5c61528c) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.5...v3.23.6) ### [`v3.23.5`](https://togithub.com/colinhacks/zod/compare/v3.23.4...541a862e978f96eb391849a6bf16be84231aa1b3) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.4...v3.23.5) ### [`v3.23.4`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.4) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.3...v3.23.4) #### Commits: - [`157b18d`](https://togithub.com/colinhacks/zod/commit/157b18d742c86d85b26a8421af46ad6d6d6b6ea7) Add 3.23 announcement - [`aedf93f`](https://togithub.com/colinhacks/zod/commit/aedf93f1435a29463d915c3be45b4dcbeefa8cc1) Revert change to default Input - [`45107f7`](https://togithub.com/colinhacks/zod/commit/45107f7a7230fe48ee24dc37e621422c9dc64ec4) v3.23.4 ### [`v3.23.3`](https://togithub.com/colinhacks/zod/compare/v3.23.2...103d2436f85872ca0e0e6247652989cc93d46a39) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.2...v3.23.3) ### [`v3.23.2`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.2) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.1...v3.23.2) #### Commits: - [`c340558`](https://togithub.com/colinhacks/zod/commit/c340558d14f5222a2ca177e0591463c06cc5edc3) Update protocol - [`ef588d0`](https://togithub.com/colinhacks/zod/commit/ef588d036f3e98b832796e9a681dbaf097631ea0) Fix t3env - [`9df70dd`](https://togithub.com/colinhacks/zod/commit/9df70dd71195df951c43f180fbe5e64ea1f835df) 3.23.2 ### [`v3.23.1`](https://togithub.com/colinhacks/zod/compare/v3.23.0...2ff5ceb428634de0ea4501495039c05a8e95b60a) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.0...v3.23.1) ### [`v3.23.0`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.0) [Compare Source](https://togithub.com/colinhacks/zod/compare/e7a9b9b3033991be6b4225f1be21da39c250bbb0...v3.23.0) Zod 3.23 is now available. This is the final `3.x` release before Zod 4.0. To try it out: ```sh npm install zod ``` #### Features ##### `z.string().date()` Zod can now validate ISO 8601 date strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().date(); schema.parse("2022-01-01"); // OK ``` ##### `z.string().time()` Zod can now validate ISO 8601 time strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().time(); schema.parse("12:00:00"); // OK ``` You can specify sub-second precision using the `precision` option: ```ts const schema = z.string().time({ precision: 3 }); schema.parse("12:00:00.123"); // OK schema.parse("12:00:00.123456"); // Error schema.parse("12:00:00"); // Error ``` ##### `z.string().duration()` Zod can now validate ISO 8601 duration strings. Thanks [@​mastermatt](https://togithub.com/mastermatt)! [colinhacks/zod#3265 ```ts const schema = z.string().duration(); schema.parse("P3Y6M4DT12H30M5S"); // OK ``` ##### Improvements to `z.string().datetime()` Thanks [@​bchrobot](https://togithub.com/bchrobot) [colinhacks/zod#2522 You can now allow *unqualified* (timezone-less) datetimes using the `local: true` flag. ```ts const schema = z.string().datetime({ local: true }); schema.parse("2022-01-01T12:00:00"); // OK ``` Plus, Zod now validates the day-of-month correctly to ensure no invalid dates (e.g. February 30th) pass validation. Thanks [@​szamanr](https://togithub.com/szamanr)! [colinhacks/zod#3391 ##### `z.string().base64()` Zod can now validate base64 strings. Thanks [@​StefanTerdell](https://togithub.com/StefanTerdell)! [colinhacks/zod#3047 ```ts const schema = z.string().base64(); schema.parse("SGVsbG8gV29ybGQ="); // OK ``` ##### Improved discriminated unions The following can now be used as discriminator keys in `z.discriminatedUnion()`: - `ZodOptional` - `ZodNullable` - `ZodReadonly` - `ZodBranded` - `ZodCatch` ```ts const schema = z.discriminatedUnion("type", [ z.object({ type: z.literal("A").optional(), value: z.number() }), z.object({ type: z.literal("B").nullable(), value: z.string() }), z.object({ type: z.literal("C").readonly(), value: z.boolean() }), z.object({ type: z.literal("D").brand<"D">(), value: z.boolean() }), z.object({ type: z.literal("E").catch("E"), value: z.unknown() }), ]); ``` ##### Misc - feature: allow falsy error message by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3178 - feature: add attribute message to enum validatiion by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3169 #### Breaking changes There are no breaking changes to the public API of Zod. However some changes can impact ecosystem tools that rely on Zod internals. ##### `ZodFirstPartySchemaTypes` Three new types have been added to the `ZodFirstPartySchemaTypes` union. This may impact some codegen libraries. [colinhacks/zod#3247 ```diff + | ZodPipeline<any, any> + | ZodReadonly<any> + | ZodSymbol; ``` ##### Default generics in `ZodType` The third argument of the `ZodType` base class now defaults to `unknown`. This makes it easier to define recursive schemas and write generic functions that accept Zod schemas. ```diff - class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {} + class ZodType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = unknown> {} ``` ##### Unrecognized keys in `.pick()` and `.omit()` This version fixes a bug where unknown keys were accidentally accepted in `.pick()` and `omit()`. This has been fixed, which could cause compiler errors in some user code. [colinhacks/zod#3255 ```ts z.object({ name: z.string() }).pick({ notAKey: true // no longer allowed }) ``` #### Bugfixes and performance - Bugfix: Enum.extract/exclude should not remove error mapping by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3240 - Added latest stable Node and TypeScript versions to test matrix for up-to-date testing. by [@​m10rten](https://togithub.com/m10rten) in [colinhacks/zod#3278 - Add types to `ZodFirstPartySchemaTypes` by [@​MatthijsMud](https://togithub.com/MatthijsMud) in [colinhacks/zod#3247 - fix: make `input` of `.required()` readonly by [@​KATT](https://togithub.com/KATT) in [colinhacks/zod#3301 - add never props to safe parse return types by [@​schicks](https://togithub.com/schicks) in [colinhacks/zod#3295 - Reporting errors of the preprocess that is the second property of object by [@​yukukotani](https://togithub.com/yukukotani) in [colinhacks/zod#2912 - Improve `addQuestionMarks`, fix [#​2184](https://togithub.com/colinhacks/zod/issues/2184) by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3352 - fix for njs by [@​dvv](https://togithub.com/dvv) in [colinhacks/zod#3063 - only look in `src` for `bun test` by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3038 - Restrict .pick()/.omit() mask type to only known properties by [@​petrovmiroslav](https://togithub.com/petrovmiroslav) in [colinhacks/zod#3255 - Make EnumValues generic by [@​IlyaSemenov](https://togithub.com/IlyaSemenov) in [colinhacks/zod#2338 - perf: avoid unnecessary error maps by [@​xuxucode](https://togithub.com/xuxucode) in [colinhacks/zod#2532 - Bugfix: z.record().parse should not filter out undefined values by [@​raik-casimiro](https://togithub.com/raik-casimiro) in [colinhacks/zod#3251 - Use Set.has instead of Array.indexOf for enum comparison (perf improvement) by [@​jmike](https://togithub.com/jmike) in [colinhacks/zod#2659 - \[2888] fix emails with single quotes failing validation by [@​Mansehej](https://togithub.com/Mansehej) in [colinhacks/zod#2889 - Bugfix: Commas are incorrectly allowed in email regex. by [@​mokemoko](https://togithub.com/mokemoko) in [colinhacks/zod#3286 - Fix regex in cuid2 validation to be what cuid2 library expects by [@​etareduction](https://togithub.com/etareduction) in [colinhacks/zod#2961 - Make depcruise pass by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3037 - Faster ipv4 parsing by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3413 #### Docs and ecosystem - chore: add pastel package to ecosystem by [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) in [colinhacks/zod#2949 - added required styles. by [@​Ansh101112](https://togithub.com/Ansh101112) in [colinhacks/zod#2955 - Feature/better chinese translate by [@​NWYLZW](https://togithub.com/NWYLZW) in [colinhacks/zod#2988 - Fix z.instanceof example by [@​alexnault](https://togithub.com/alexnault) in [colinhacks/zod#3003 - Add documentation to Zod enum exclude/extract functions by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3044 - Add docs for coercing nullish values by [@​rbuetzer](https://togithub.com/rbuetzer) in [colinhacks/zod#3067 - Adds `zod-dev` utility to eco-system section by [@​schalkventer](https://togithub.com/schalkventer) in [colinhacks/zod#3113 - Add zhttp library to docs by [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) in [colinhacks/zod#3134 - fixed Readme typo in NaNs example by [@​RashJrEdmund](https://togithub.com/RashJrEdmund) in [colinhacks/zod#3181 - adds zod-config library to the ecosystem by [@​alexmarqs](https://togithub.com/alexmarqs) in [colinhacks/zod#3200 - docs: update link and description of conform integration by [@​g1eny0ung](https://togithub.com/g1eny0ung) in [colinhacks/zod#3238 - Update README.md by [@​yugmade13](https://togithub.com/yugmade13) in [colinhacks/zod#3317 - feat: overhaul generics section of readme to include more details on z.ZodTypeAny usage by [@​braden-w](https://togithub.com/braden-w) in [colinhacks/zod#3321 - Fix small typos by [@​mmorearty](https://togithub.com/mmorearty) in [colinhacks/zod#3336 - docs: update Chinese docs and correct some of the typos by [@​jiechen257](https://togithub.com/jiechen257) in [colinhacks/zod#3338 - docs: improve chinese readme by [@​luckrnx09](https://togithub.com/luckrnx09) in [colinhacks/zod#3371 - Add java-to-zod in X to Zod section by [@​ivangreene](https://togithub.com/ivangreene) in [colinhacks/zod#3385 - docs: add `orval` to "X to Zod" ecosystems by [@​soartec-lab](https://togithub.com/soartec-lab) in [colinhacks/zod#3397 #### New Contributors - [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) made their first contribution in [colinhacks/zod#2949 - [@​Ansh101112](https://togithub.com/Ansh101112) made their first contribution in [colinhacks/zod#2955 - [@​NWYLZW](https://togithub.com/NWYLZW) made their first contribution in [colinhacks/zod#2988 - [@​alexnault](https://togithub.com/alexnault) made their first contribution in [colinhacks/zod#3003 - [@​shaharke](https://togithub.com/shaharke) made their first contribution in [colinhacks/zod#3044 - [@​rbuetzer](https://togithub.com/rbuetzer) made their first contribution in [colinhacks/zod#3067 - [@​schalkventer](https://togithub.com/schalkventer) made their first contribution in [colinhacks/zod#3113 - [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) made their first contribution in [colinhacks/zod#3134 - [@​RashJrEdmund](https://togithub.com/RashJrEdmund) made their first contribution in [colinhacks/zod#3181 - [@​alexmarqs](https://togithub.com/alexmarqs) made their first contribution in [colinhacks/zod#3200 - [@​JonnyBurger](https://togithub.com/JonnyBurger) made their first contribution in [colinhacks/zod#3214 - [@​fernandollisboa](https://togithub.com/fernandollisboa) made their first contribution in [colinhacks/zod#3178 - [@​g1eny0ung](https://togithub.com/g1eny0ung) made their first contribution in [colinhacks/zod#3238 - [@​m10rten](https://togithub.com/m10rten) made their first contribution in [colinhacks/zod#3278 - [@​MatthijsMud](https://togithub.com/MatthijsMud) made their first contribution in [colinhacks/zod#3247 - [@​yugmade13](https://togithub.com/yugmade13) made their first contribution in [colinhacks/zod#3317 - [@​braden-w](https://togithub.com/braden-w) made their first contribution in [colinhacks/zod#3321 - [@​mmorearty](https://togithub.com/mmorearty) made their first contribution in [colinhacks/zod#3336 - [@​schicks](https://togithub.com/schicks) made their first contribution in [colinhacks/zod#3295 - [@​yukukotani](https://togithub.com/yukukotani) made their first contribution in [colinhacks/zod#2912 - [@​jiechen257](https://togithub.com/jiechen257) made their first contribution in [colinhacks/zod#3338 - [@​luckrnx09](https://togithub.com/luckrnx09) made their first contribution in [colinhacks/zod#3371 - [@​dvv](https://togithub.com/dvv) made their first contribution in [colinhacks/zod#3063 - [@​rotu](https://togithub.com/rotu) made their first contribution in [colinhacks/zod#3038 - [@​petrovmiroslav](https://togithub.com/petrovmiroslav) made their first contribution in [colinhacks/zod#3255 - [@​ivoilic](https://togithub.com/ivoilic) made their first contribution in [colinhacks/zod#2364 - [@​telemakhos](https://togithub.com/telemakhos) made their first contribution in [colinhacks/zod#3388 - [@​bchrobot](https://togithub.com/bchrobot) made their first contribution in [colinhacks/zod#2522 - [@​szamanr](https://togithub.com/szamanr) made their first contribution in [colinhacks/zod#3391 - [@​ivangreene](https://togithub.com/ivangreene) made their first contribution in [colinhacks/zod#3385 - [@​xuxucode](https://togithub.com/xuxucode) made their first contribution in [colinhacks/zod#2532 - [@​raik-casimiro](https://togithub.com/raik-casimiro) made their first contribution in [colinhacks/zod#3251 - [@​jmike](https://togithub.com/jmike) made their first contribution in [colinhacks/zod#2659 - [@​Mansehej](https://togithub.com/Mansehej) made their first contribution in [colinhacks/zod#2889 - [@​mokemoko](https://togithub.com/mokemoko) made their first contribution in [colinhacks/zod#3286 - [@​etareduction](https://togithub.com/etareduction) made their first contribution in [colinhacks/zod#2961 - [@​mastermatt](https://togithub.com/mastermatt) made their first contribution in [colinhacks/zod#3265 - [@​soartec-lab](https://togithub.com/soartec-lab) made their first contribution in [colinhacks/zod#3397 **Full Changelog**: colinhacks/zod@v3.22.4...v3.23.0 ### [`v3.22.5`](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Nextjs).
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zod](https://zod.dev) ([source](https://togithub.com/colinhacks/zod)) | [`3.22.4` -> `3.23.8`](https://renovatebot.com/diffs/npm/zod/3.22.4/3.23.8) | [![age](https://developer.mend.io/api/mc/badges/age/npm/zod/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/zod/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/zod/3.22.4/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/zod/3.22.4/3.23.8?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>colinhacks/zod (zod)</summary> ### [`v3.23.8`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.8) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.7...v3.23.8) #### Commits: - [`0f4d403`](https://togithub.com/colinhacks/zod/commit/0f4d403558ae0490c711e4c2bfcf6c200bd14e11) Add Bronze logos ([#​3470](https://togithub.com/colinhacks/zod/issues/3470)) - [`1968731`](https://togithub.com/colinhacks/zod/commit/19687315b5b24bbd1ff6c346bfc2975700221748) Tweak tiers ([#​3471](https://togithub.com/colinhacks/zod/issues/3471)) - [`eda7df3`](https://togithub.com/colinhacks/zod/commit/eda7df314399929f7ed737423868a5a0780cd944) Change RefinementCtx to interface - [`ca42965`](https://togithub.com/colinhacks/zod/commit/ca42965df46b2f7e2747db29c40a26bcb32a51d5) v3.23.8 ### [`v3.23.7`](https://togithub.com/colinhacks/zod/compare/v3.23.6...f985b5b922cb357dbf4b25bb43814d19f838e046) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.6...v3.23.7) ### [`v3.23.6`](https://togithub.com/colinhacks/zod/compare/v3.23.5...93b480b12ec3466cbd3b4182f7ce292e5c61528c) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.5...v3.23.6) ### [`v3.23.5`](https://togithub.com/colinhacks/zod/compare/v3.23.4...541a862e978f96eb391849a6bf16be84231aa1b3) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.4...v3.23.5) ### [`v3.23.4`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.4) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.3...v3.23.4) #### Commits: - [`157b18d`](https://togithub.com/colinhacks/zod/commit/157b18d742c86d85b26a8421af46ad6d6d6b6ea7) Add 3.23 announcement - [`aedf93f`](https://togithub.com/colinhacks/zod/commit/aedf93f1435a29463d915c3be45b4dcbeefa8cc1) Revert change to default Input - [`45107f7`](https://togithub.com/colinhacks/zod/commit/45107f7a7230fe48ee24dc37e621422c9dc64ec4) v3.23.4 ### [`v3.23.3`](https://togithub.com/colinhacks/zod/compare/v3.23.2...103d2436f85872ca0e0e6247652989cc93d46a39) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.2...v3.23.3) ### [`v3.23.2`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.2) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.1...v3.23.2) #### Commits: - [`c340558`](https://togithub.com/colinhacks/zod/commit/c340558d14f5222a2ca177e0591463c06cc5edc3) Update protocol - [`ef588d0`](https://togithub.com/colinhacks/zod/commit/ef588d036f3e98b832796e9a681dbaf097631ea0) Fix t3env - [`9df70dd`](https://togithub.com/colinhacks/zod/commit/9df70dd71195df951c43f180fbe5e64ea1f835df) 3.23.2 ### [`v3.23.1`](https://togithub.com/colinhacks/zod/compare/v3.23.0...2ff5ceb428634de0ea4501495039c05a8e95b60a) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.23.0...v3.23.1) ### [`v3.23.0`](https://togithub.com/colinhacks/zod/releases/tag/v3.23.0) [Compare Source](https://togithub.com/colinhacks/zod/compare/e7a9b9b3033991be6b4225f1be21da39c250bbb0...v3.23.0) Zod 3.23 is now available. This is the final `3.x` release before Zod 4.0. To try it out: ```sh npm install zod ``` #### Features ##### `z.string().date()` Zod can now validate ISO 8601 date strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().date(); schema.parse("2022-01-01"); // OK ``` ##### `z.string().time()` Zod can now validate ISO 8601 time strings. Thanks [@​igalklebanov](https://togithub.com/igalklebanov)! [colinhacks/zod#1766 ```ts const schema = z.string().time(); schema.parse("12:00:00"); // OK ``` You can specify sub-second precision using the `precision` option: ```ts const schema = z.string().time({ precision: 3 }); schema.parse("12:00:00.123"); // OK schema.parse("12:00:00.123456"); // Error schema.parse("12:00:00"); // Error ``` ##### `z.string().duration()` Zod can now validate ISO 8601 duration strings. Thanks [@​mastermatt](https://togithub.com/mastermatt)! [colinhacks/zod#3265 ```ts const schema = z.string().duration(); schema.parse("P3Y6M4DT12H30M5S"); // OK ``` ##### Improvements to `z.string().datetime()` Thanks [@​bchrobot](https://togithub.com/bchrobot) [colinhacks/zod#2522 You can now allow *unqualified* (timezone-less) datetimes using the `local: true` flag. ```ts const schema = z.string().datetime({ local: true }); schema.parse("2022-01-01T12:00:00"); // OK ``` Plus, Zod now validates the day-of-month correctly to ensure no invalid dates (e.g. February 30th) pass validation. Thanks [@​szamanr](https://togithub.com/szamanr)! [colinhacks/zod#3391 ##### `z.string().base64()` Zod can now validate base64 strings. Thanks [@​StefanTerdell](https://togithub.com/StefanTerdell)! [colinhacks/zod#3047 ```ts const schema = z.string().base64(); schema.parse("SGVsbG8gV29ybGQ="); // OK ``` ##### Improved discriminated unions The following can now be used as discriminator keys in `z.discriminatedUnion()`: - `ZodOptional` - `ZodNullable` - `ZodReadonly` - `ZodBranded` - `ZodCatch` ```ts const schema = z.discriminatedUnion("type", [ z.object({ type: z.literal("A").optional(), value: z.number() }), z.object({ type: z.literal("B").nullable(), value: z.string() }), z.object({ type: z.literal("C").readonly(), value: z.boolean() }), z.object({ type: z.literal("D").brand<"D">(), value: z.boolean() }), z.object({ type: z.literal("E").catch("E"), value: z.unknown() }), ]); ``` ##### Misc - feature: allow falsy error message by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3178 - feature: add attribute message to enum validatiion by [@​fernandollisboa](https://togithub.com/fernandollisboa) in [colinhacks/zod#3169 #### Breaking changes There are no breaking changes to the public API of Zod. However some changes can impact ecosystem tools that rely on Zod internals. ##### `ZodFirstPartySchemaTypes` Three new types have been added to the `ZodFirstPartySchemaTypes` union. This may impact some codegen libraries. [colinhacks/zod#3247 ```diff + | ZodPipeline<any, any> + | ZodReadonly<any> + | ZodSymbol; ``` ##### Default generics in `ZodType` The third argument of the `ZodType` base class now defaults to `unknown`. This makes it easier to define recursive schemas and write generic functions that accept Zod schemas. ```diff - class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {} + class ZodType<Output = unknown, Def extends ZodTypeDef = ZodTypeDef, Input = unknown> {} ``` ##### Unrecognized keys in `.pick()` and `.omit()` This version fixes a bug where unknown keys were accidentally accepted in `.pick()` and `omit()`. This has been fixed, which could cause compiler errors in some user code. [colinhacks/zod#3255 ```ts z.object({ name: z.string() }).pick({ notAKey: true // no longer allowed }) ``` #### Bugfixes and performance - Bugfix: Enum.extract/exclude should not remove error mapping by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3240 - Added latest stable Node and TypeScript versions to test matrix for up-to-date testing. by [@​m10rten](https://togithub.com/m10rten) in [colinhacks/zod#3278 - Add types to `ZodFirstPartySchemaTypes` by [@​MatthijsMud](https://togithub.com/MatthijsMud) in [colinhacks/zod#3247 - fix: make `input` of `.required()` readonly by [@​KATT](https://togithub.com/KATT) in [colinhacks/zod#3301 - add never props to safe parse return types by [@​schicks](https://togithub.com/schicks) in [colinhacks/zod#3295 - Reporting errors of the preprocess that is the second property of object by [@​yukukotani](https://togithub.com/yukukotani) in [colinhacks/zod#2912 - Improve `addQuestionMarks`, fix [#​2184](https://togithub.com/colinhacks/zod/issues/2184) by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3352 - fix for njs by [@​dvv](https://togithub.com/dvv) in [colinhacks/zod#3063 - only look in `src` for `bun test` by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3038 - Restrict .pick()/.omit() mask type to only known properties by [@​petrovmiroslav](https://togithub.com/petrovmiroslav) in [colinhacks/zod#3255 - Make EnumValues generic by [@​IlyaSemenov](https://togithub.com/IlyaSemenov) in [colinhacks/zod#2338 - perf: avoid unnecessary error maps by [@​xuxucode](https://togithub.com/xuxucode) in [colinhacks/zod#2532 - Bugfix: z.record().parse should not filter out undefined values by [@​raik-casimiro](https://togithub.com/raik-casimiro) in [colinhacks/zod#3251 - Use Set.has instead of Array.indexOf for enum comparison (perf improvement) by [@​jmike](https://togithub.com/jmike) in [colinhacks/zod#2659 - \[2888] fix emails with single quotes failing validation by [@​Mansehej](https://togithub.com/Mansehej) in [colinhacks/zod#2889 - Bugfix: Commas are incorrectly allowed in email regex. by [@​mokemoko](https://togithub.com/mokemoko) in [colinhacks/zod#3286 - Fix regex in cuid2 validation to be what cuid2 library expects by [@​etareduction](https://togithub.com/etareduction) in [colinhacks/zod#2961 - Make depcruise pass by [@​rotu](https://togithub.com/rotu) in [colinhacks/zod#3037 - Faster ipv4 parsing by [@​colinhacks](https://togithub.com/colinhacks) in [colinhacks/zod#3413 #### Docs and ecosystem - chore: add pastel package to ecosystem by [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) in [colinhacks/zod#2949 - added required styles. by [@​Ansh101112](https://togithub.com/Ansh101112) in [colinhacks/zod#2955 - Feature/better chinese translate by [@​NWYLZW](https://togithub.com/NWYLZW) in [colinhacks/zod#2988 - Fix z.instanceof example by [@​alexnault](https://togithub.com/alexnault) in [colinhacks/zod#3003 - Add documentation to Zod enum exclude/extract functions by [@​shaharke](https://togithub.com/shaharke) in [colinhacks/zod#3044 - Add docs for coercing nullish values by [@​rbuetzer](https://togithub.com/rbuetzer) in [colinhacks/zod#3067 - Adds `zod-dev` utility to eco-system section by [@​schalkventer](https://togithub.com/schalkventer) in [colinhacks/zod#3113 - Add zhttp library to docs by [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) in [colinhacks/zod#3134 - fixed Readme typo in NaNs example by [@​RashJrEdmund](https://togithub.com/RashJrEdmund) in [colinhacks/zod#3181 - adds zod-config library to the ecosystem by [@​alexmarqs](https://togithub.com/alexmarqs) in [colinhacks/zod#3200 - docs: update link and description of conform integration by [@​g1eny0ung](https://togithub.com/g1eny0ung) in [colinhacks/zod#3238 - Update README.md by [@​yugmade13](https://togithub.com/yugmade13) in [colinhacks/zod#3317 - feat: overhaul generics section of readme to include more details on z.ZodTypeAny usage by [@​braden-w](https://togithub.com/braden-w) in [colinhacks/zod#3321 - Fix small typos by [@​mmorearty](https://togithub.com/mmorearty) in [colinhacks/zod#3336 - docs: update Chinese docs and correct some of the typos by [@​jiechen257](https://togithub.com/jiechen257) in [colinhacks/zod#3338 - docs: improve chinese readme by [@​luckrnx09](https://togithub.com/luckrnx09) in [colinhacks/zod#3371 - Add java-to-zod in X to Zod section by [@​ivangreene](https://togithub.com/ivangreene) in [colinhacks/zod#3385 - docs: add `orval` to "X to Zod" ecosystems by [@​soartec-lab](https://togithub.com/soartec-lab) in [colinhacks/zod#3397 #### New Contributors - [@​jlarmstrongiv](https://togithub.com/jlarmstrongiv) made their first contribution in [colinhacks/zod#2949 - [@​Ansh101112](https://togithub.com/Ansh101112) made their first contribution in [colinhacks/zod#2955 - [@​NWYLZW](https://togithub.com/NWYLZW) made their first contribution in [colinhacks/zod#2988 - [@​alexnault](https://togithub.com/alexnault) made their first contribution in [colinhacks/zod#3003 - [@​shaharke](https://togithub.com/shaharke) made their first contribution in [colinhacks/zod#3044 - [@​rbuetzer](https://togithub.com/rbuetzer) made their first contribution in [colinhacks/zod#3067 - [@​schalkventer](https://togithub.com/schalkventer) made their first contribution in [colinhacks/zod#3113 - [@​evertdespiegeleer](https://togithub.com/evertdespiegeleer) made their first contribution in [colinhacks/zod#3134 - [@​RashJrEdmund](https://togithub.com/RashJrEdmund) made their first contribution in [colinhacks/zod#3181 - [@​alexmarqs](https://togithub.com/alexmarqs) made their first contribution in [colinhacks/zod#3200 - [@​JonnyBurger](https://togithub.com/JonnyBurger) made their first contribution in [colinhacks/zod#3214 - [@​fernandollisboa](https://togithub.com/fernandollisboa) made their first contribution in [colinhacks/zod#3178 - [@​g1eny0ung](https://togithub.com/g1eny0ung) made their first contribution in [colinhacks/zod#3238 - [@​m10rten](https://togithub.com/m10rten) made their first contribution in [colinhacks/zod#3278 - [@​MatthijsMud](https://togithub.com/MatthijsMud) made their first contribution in [colinhacks/zod#3247 - [@​yugmade13](https://togithub.com/yugmade13) made their first contribution in [colinhacks/zod#3317 - [@​braden-w](https://togithub.com/braden-w) made their first contribution in [colinhacks/zod#3321 - [@​mmorearty](https://togithub.com/mmorearty) made their first contribution in [colinhacks/zod#3336 - [@​schicks](https://togithub.com/schicks) made their first contribution in [colinhacks/zod#3295 - [@​yukukotani](https://togithub.com/yukukotani) made their first contribution in [colinhacks/zod#2912 - [@​jiechen257](https://togithub.com/jiechen257) made their first contribution in [colinhacks/zod#3338 - [@​luckrnx09](https://togithub.com/luckrnx09) made their first contribution in [colinhacks/zod#3371 - [@​dvv](https://togithub.com/dvv) made their first contribution in [colinhacks/zod#3063 - [@​rotu](https://togithub.com/rotu) made their first contribution in [colinhacks/zod#3038 - [@​petrovmiroslav](https://togithub.com/petrovmiroslav) made their first contribution in [colinhacks/zod#3255 - [@​ivoilic](https://togithub.com/ivoilic) made their first contribution in [colinhacks/zod#2364 - [@​telemakhos](https://togithub.com/telemakhos) made their first contribution in [colinhacks/zod#3388 - [@​bchrobot](https://togithub.com/bchrobot) made their first contribution in [colinhacks/zod#2522 - [@​szamanr](https://togithub.com/szamanr) made their first contribution in [colinhacks/zod#3391 - [@​ivangreene](https://togithub.com/ivangreene) made their first contribution in [colinhacks/zod#3385 - [@​xuxucode](https://togithub.com/xuxucode) made their first contribution in [colinhacks/zod#2532 - [@​raik-casimiro](https://togithub.com/raik-casimiro) made their first contribution in [colinhacks/zod#3251 - [@​jmike](https://togithub.com/jmike) made their first contribution in [colinhacks/zod#2659 - [@​Mansehej](https://togithub.com/Mansehej) made their first contribution in [colinhacks/zod#2889 - [@​mokemoko](https://togithub.com/mokemoko) made their first contribution in [colinhacks/zod#3286 - [@​etareduction](https://togithub.com/etareduction) made their first contribution in [colinhacks/zod#2961 - [@​mastermatt](https://togithub.com/mastermatt) made their first contribution in [colinhacks/zod#3265 - [@​soartec-lab](https://togithub.com/soartec-lab) made their first contribution in [colinhacks/zod#3397 **Full Changelog**: colinhacks/zod@v3.22.4...v3.23.0 ### [`v3.22.5`](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) [Compare Source](https://togithub.com/colinhacks/zod/compare/v3.22.4...e7a9b9b3033991be6b4225f1be21da39c250bbb0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/JoshuaKGoldberg/boston-ts-website). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Hey 👋
This PR resolves #1676, as suggested by @colinhacks @ comment.
ZodString.date()
.ZodString.time()
.