chore(): Update dependency zod to v3.24.1 #152
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.22.4
->3.24.1
Release Notes
colinhacks/zod (zod)
v3.24.1
Compare Source
Commits:
0c6cbbd
Undeprecate .nonempty()4e219d6
Bump min TS version to 5.065adeea
v3.24.1v3.24.0
Compare Source
Implement
@standard-schema/spec
This is the first version of Zod to implement the Standard Schema spec. This is a new community effort among several validation library authors to implement a common interface, with the goal of simplifying the process of integrating schema validators with the rest of the ecosystem. Read more about the project and goals here.
z.string().jwt()
Thanks to @Mokshit06 and @Cognition-Labs for this contribution!
To verify that a string is a valid 3-part JWT.
To constrain the JWT to a specific algorithm:
z.string().base64url()
Thank you to @marvinruder!
To complement the JWT validation, Zod 3.24 implements a standalone
.base64url()
string validation API. (The three elements of JWTs are base64url-encoded JSON strings.)This functionality is available along the standard
z.string().base64()
validator added in Zod 3.23.z.string().cidr()
Thanks to @wataryooou for their work on this!
A validator for CIDR notation for specifying IP address ranges, e.g.
192.24.12.0/22
.To specify an IP version:
View the full diff from 3.23.8: colinhacks/zod@v3.23.8...v3.24.0
294f54f
Update README_ZH.md about Discriminated unions (#3493)1247caf
Add Kubb as X-to-Zod community tool (#3508)62b7842
Update default branchc6bc80d
Fix issue #3582 : ULID should be case insensitive (#3593)a5b9dc3
docs: add zod-schema-faker to ecosystem (#3605)9818d0e
Add zod-sockets (#3609)7173d0b
Add drizzle-zod library to X to Zod README.md section (#3648)c5a4edc
Add 'schemql' in Powered by Zod (#3800)85916b3
docs: add zod-form-renderer to form integration docs (#3697)51f1dc3
docs: add unplugin-environment in powered by zod (#3778)8e74db3
fix: ipv6 regex validation (#3513)1f4f0da
refactor: rename ip version types (#3755)f487d74
Remove faulty ip test case48f1c47
docs: Remove invalid semicolon in ERROR_HANDLING.md (#3857)1d0a4b9
fix: bigint coerce crash (#3822)14dceaa
Add API library (#3814)f82f817
feat: z.string.cidr() - support CIDR notation (#3820)71a0c33
docs: add info on unqualified local datetime strings (#3760)b85686a
Add support forbase64url
strings (#3712)6407bed
Allow creation of discriminated unions with a readonly array of options (#3535)3755146
Remove createParams cascade from .array() (#3530)963386d
Fix lint69a1798
Implement Standard Schema spec (#3850)c1dd537
Addsfrrm
package to documentation (#3818)b68c05f
feat: Add JWT string validator (#3893)v3.23.8
Compare Source
Commits:
0f4d403
Add Bronze logos (#3470)1968731
Tweak tiers (#3471)eda7df3
Change RefinementCtx to interfaceca42965
v3.23.8v3.23.7
Compare Source
v3.23.6
Compare Source
v3.23.5
Compare Source
v3.23.4
Compare Source
Commits:
157b18d
Add 3.23 announcementaedf93f
Revert change to default Input45107f7
v3.23.4v3.23.3
Compare Source
v3.23.2
Compare Source
Commits:
c340558
Update protocolef588d0
Fix t3env9df70dd
3.23.2v3.23.1
Compare Source
v3.23.0
Compare Source
Zod 3.23 is now available. This is the final
3.x
release before Zod 4.0. To try it out:Features
z.string().date()
Zod can now validate ISO 8601 date strings. Thanks @igalklebanov! https://github.com/colinhacks/zod/pull/1766
z.string().time()
Zod can now validate ISO 8601 time strings. Thanks @igalklebanov! https://github.com/colinhacks/zod/pull/1766
You can specify sub-second precision using the
precision
option:z.string().duration()
Zod can now validate ISO 8601 duration strings. Thanks @mastermatt! https://github.com/colinhacks/zod/pull/3265
Improvements to
z.string().datetime()
Thanks @bchrobot https://github.com/colinhacks/zod/pull/2522
You can now allow unqualified (timezone-less) datetimes using the
local: true
flag.Plus, Zod now validates the day-of-month correctly to ensure no invalid dates (e.g. February 30th) pass validation. Thanks @szamanr! https://github.com/colinhacks/zod/pull/3391
z.string().base64()
Zod can now validate base64 strings. Thanks @StefanTerdell! https://github.com/colinhacks/zod/pull/3047
Improved discriminated unions
The following can now be used as discriminator keys in
z.discriminatedUnion()
:ZodOptional
ZodNullable
ZodReadonly
ZodBranded
ZodCatch
Misc
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. https://github.com/colinhacks/zod/pull/3247Default generics in
ZodType
The third argument of the
ZodType
base class now defaults tounknown
. This makes it easier to define recursive schemas and write generic functions that accept Zod schemas.Unrecognized keys in
.pick()
and.omit()
This version fixes a bug where unknown keys were accidentally accepted in
.pick()
andomit()
. This has been fixed, which could cause compiler errors in some user code. https://github.com/colinhacks/zod/pull/3255Bugfixes and performance
ZodFirstPartySchemaTypes
by @MatthijsMud in https://github.com/colinhacks/zod/pull/3247input
of.required()
readonly by @KATT in https://github.com/colinhacks/zod/pull/3301addQuestionMarks
, fix #2184 by @colinhacks in https://github.com/colinhacks/zod/pull/3352src
forbun test
by @rotu in https://github.com/colinhacks/zod/pull/3038Docs and ecosystem
zod-dev
utility to eco-system section by @schalkventer in https://github.com/colinhacks/zod/pull/3113orval
to "X to Zod" ecosystems by @soartec-lab in https://github.com/colinhacks/zod/pull/3397New Contributors
Full Changelog: colinhacks/zod@v3.22.4...v3.23.0
v3.22.5
Compare Source
Configuration
📅 Schedule: Branch creation - "* 0-3 * * *" (UTC), 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.
This PR was generated by Mend Renovate. View the repository job log.