Skip to content
Merged

Zod 4 #4074

Show file tree
Hide file tree
Changes from 244 commits
Commits
Show all changes
553 commits
Select commit Hold shift + click to select a range
df85b3e
feat(lang): Added initial Azerbaijani locale (#4158)
chz Apr 15, 2025
5e5e146
fix(docs): Typo fro (#4157)
chz Apr 15, 2025
a801ddd
Fix broken logo link (#3974)
kantuni Apr 16, 2025
8fc309a
Add packages/docs
colinhacks Apr 16, 2025
bfd0913
Remove packages/docs
colinhacks Apr 16, 2025
84f11eb
Clean up zodmini exports with underscores
colinhacks Apr 16, 2025
cde08de
Add precommit format
colinhacks Apr 16, 2025
a376eeb
Fix error generic
colinhacks Apr 16, 2025
c8e72e8
Fix optionality docs
colinhacks Apr 16, 2025
738fd95
tweak (#4173)
shivamvijaywargi Apr 16, 2025
54628fd
fix: dev:play script to use play.ts instead of playground.ts (#4177)
Abdalrhman-Almarakeby Apr 16, 2025
3e602d4
Optimize `extendShape` (#4150)
Andarist Apr 16, 2025
06db7f8
3.24.3
colinhacks Apr 16, 2025
a18d25b
add back packages/docs
colinhacks Apr 16, 2025
23819a0
Update
colinhacks Apr 16, 2025
9ea897e
Update benchmark
colinhacks Apr 16, 2025
ed48d93
Refactor `Extend` to preserve declaration links (#4155)
Andarist Apr 17, 2025
ecde00d
Fix en.ts
colinhacks Apr 17, 2025
1e272c2
0.5.2
colinhacks Apr 17, 2025
f3fe2d9
0.6.0
colinhacks Apr 17, 2025
8577f19
Fix enum type portability
colinhacks Apr 17, 2025
b9d781b
Clean up passthrough schemas in toJSONSchema
colinhacks Apr 17, 2025
6454862
0.6.3
colinhacks Apr 17, 2025
6c9d863
v4: fix typos in basics guide (#4211)
ShrewdLuni Apr 17, 2025
e4ede35
v4: fix typo in defining schemas section (#4219)
mhdalaa93 Apr 17, 2025
a2fabb2
fix migration guide typos (#4205)
jwaltz Apr 17, 2025
5bfccbf
partial record
colinhacks Apr 17, 2025
7f74bdc
Clean up toJSONSchema behavior. extract schemas with ids
colinhacks Apr 17, 2025
f6ab10d
Improve core.mdx
colinhacks Apr 18, 2025
eee2bfb
Fix missing methods
colinhacks Apr 18, 2025
d01d7d1
0.7.0
colinhacks Apr 18, 2025
57d8a55
Fix unrepresentable literals and onattach issues
colinhacks Apr 18, 2025
ab051c0
0.8.0
colinhacks Apr 18, 2025
8327094
Improve error customization docs
colinhacks Apr 18, 2025
c12f908
Clarify error docs
colinhacks Apr 18, 2025
21a582f
Closes #4089
colinhacks Apr 18, 2025
354c8d6
Fix starts_with
colinhacks Apr 20, 2025
75610da
docs: add zod-schema-faker to ecosystem (#4247)
soc221b Apr 21, 2025
e33407d
fix(docs): Correct "with with" typo. (#4243)
juangiordana Apr 21, 2025
105431c
fix(docs): Correct typo in Records (#4244)
juangiordana Apr 21, 2025
2b0141d
fix(docs): Typo in `z.object()` vs `z.interface()` (#4241)
juangiordana Apr 21, 2025
e2ef2aa
Correcting the default numeric range to be inclusive. (#4224)
RobinTail Apr 21, 2025
8fc4b1a
Reusing `Number.MAX_VALUE` for `float64` range (#4222)
RobinTail Apr 21, 2025
d6beb76
Clarify defaults for `toJsonSchema` options (#4223)
RobinTail Apr 21, 2025
5180d3a
docs: add GQLoom to ecosystem (#4225)
xcfox Apr 21, 2025
823413f
fix(docs): Swap Enum `.exclude() / .extract()` code samples. (#4242)
juangiordana Apr 21, 2025
92ee2b8
fix(docs): Grammatical error in Refinements (#4252)
juangiordana Apr 21, 2025
818cfe7
Improve handling of `.meta()`/`.describe()` in JSON Schema converter …
colinhacks Apr 21, 2025
4f4da12
WIP
colinhacks Apr 20, 2025
7051967
Lazy disc
colinhacks Apr 21, 2025
638b8b5
Add cybozu
colinhacks Apr 22, 2025
5a01d8d
0.9.0
colinhacks Apr 24, 2025
b34f831
Feature Stainless
colinhacks Apr 26, 2025
f210613
Edit alt text
colinhacks Apr 26, 2025
e1e75cc
doc: fixed missing comment in migration guide (#4293)
soartec-lab Apr 30, 2025
4fe8695
fix migration guide typo (#4291)
danmichaelo Apr 30, 2025
e85fb5f
Add "zod-config" to ecosystem.tsx (v4 support via pre-release) (#4282)
alexmarqs Apr 30, 2025
dd87082
docs: add support for `kubb` as part of the v4 upgrade (#4260)
stijnvanhulle Apr 30, 2025
763d95d
Add methods to string formats (#4296)
colinhacks Apr 30, 2025
bacbd90
0.10.0
colinhacks Apr 30, 2025
8873d42
Tweak
colinhacks May 1, 2025
af9b927
Tweak
colinhacks May 1, 2025
0259ca5
z._default
colinhacks May 1, 2025
6407fa9
Correct conditions for error in docs (#4312)
GeKorm May 3, 2025
a21a012
fix vscode debug issue with tsx runtime (#4306)
0xlakshan May 3, 2025
301e5ca
Tweak default docs
colinhacks May 3, 2025
2db8c81
correction in documentation (#4303)
kevindamm May 3, 2025
1c06209
WIP
colinhacks May 1, 2025
987c150
Make ulid case insensitive
colinhacks May 3, 2025
5bf1707
v0.10.1
colinhacks May 3, 2025
f36233e
Improve jsdoc
colinhacks May 3, 2025
7ed81b4
ULID
colinhacks May 3, 2025
b31750b
docs: in v4, `strict()` is not deprecated (#4298)
soartec-lab May 3, 2025
8c39be6
chore: add `orval` to XtoZod ecosystems in v4 (#4256)
soartec-lab May 3, 2025
376dc01
Add composable-functions as a library powered by Zod supporting v4 (#…
gustavoguichard May 3, 2025
681edec
Support recursive types in `z.object()`, drop `z..interface()` (#4271)
colinhacks May 4, 2025
4fc3de1
Drop `z.interface()` from docs (#4316)
colinhacks May 4, 2025
e00e6d8
Feature
colinhacks May 4, 2025
a429256
Allow HH:MM format in `z.string().datetime()` and `z.string().time()`…
timorthi May 4, 2025
e62341b
3.23.4
colinhacks May 4, 2025
e008d05
V4(fix): generate json-schema with min/max(0) (#4267)
PandaWorker May 4, 2025
b14e960
0.11.1
colinhacks May 4, 2025
68caa37
docs: added @regle/schemas to form ecosystem (#4169)
victorgarciaesgi May 4, 2025
8cdf540
Fix union inferred type issue
colinhacks May 5, 2025
1300758
v0.11.2
colinhacks May 5, 2025
054b1be
optionalObjectKeys -> optionalKeys
colinhacks May 5, 2025
eeca4b8
0.11.3
colinhacks May 5, 2025
0e9a411
Add test for union types
colinhacks May 5, 2025
99cc163
Fix assignability
colinhacks May 5, 2025
2a6a73f
0.11.4
colinhacks May 5, 2025
c6088b4
Add assignability tests
colinhacks May 5, 2025
1261297
Stack trace in parse and parseAsync
colinhacks May 5, 2025
0aa8491
Biome
colinhacks May 5, 2025
b8d9fca
Clean up code, fix lock
colinhacks May 5, 2025
380cc9f
Document default changes
colinhacks May 5, 2025
b0d39d2
Clarify deprecations
colinhacks May 5, 2025
2323259
Update changelog
colinhacks May 5, 2025
62d7232
v0.11.6. support recursive types in zodmini
colinhacks May 5, 2025
77d8e58
Add recursive type tests for zod mini
colinhacks May 6, 2025
3d869ad
Add recursive tests for zod mini
colinhacks May 6, 2025
703ad4a
fix(core): use `Object.create(null)` to cache ids (#4359)
ahrjarrett May 13, 2025
8dcc8a8
Jazz sponsorship
colinhacks May 13, 2025
3782fe2
Update Speakeasy sponsor URL (#4337)
ndimares May 13, 2025
7887349
fix: use input, not output, for input of ZodUnionInternals (#4330)
rikbrown May 13, 2025
42dcfa7
Languages: Add Japanese language (#4170)
yoshimatsu567 May 13, 2025
4b3e72a
New parse signature
colinhacks May 13, 2025
e7b6af4
Fix parse functions
colinhacks May 13, 2025
d086f19
Add Jazz
colinhacks May 13, 2025
840b805
Languages: Add Portuguese language (#4171)
helmerdx May 13, 2025
c2ca0dd
Languages: Add french language (#4172)
helmerdx May 13, 2025
07cee6d
Languages: Add Arabic language (#4176)
Abdalrhman-Almarakeby May 13, 2025
cae1ed3
Languages: Add Hebrew language (#4183)
TheOnlyTails May 13, 2025
82e1519
Languages: add Polish 🇵🇱 language (#4184)
szarbartosz May 13, 2025
0c4b731
Languages: add Ukrainian language (#4185)
MrBarracuda May 13, 2025
52a0fde
Languages: add Finnish language (#4188)
Heenkkk May 13, 2025
e7742c7
Languages: add Hungarian language (#4186)
Levminer May 13, 2025
caf6509
Add Simplified Chinese (#4189)
GrahamQuan May 13, 2025
0974947
feat(lang): add Vietnamese (vi) locale (#4191)
hoangtrung99 May 13, 2025
9e5fd81
Languages: add Czech language 🇨🇿 (#4192)
filipditrich May 13, 2025
7308262
Languages: add italian language (#4194)
berz8 May 13, 2025
5d11b76
Languages: add Indonesia language (#4195)
krisnaw May 13, 2025
8a8dc4f
feat(lang): Added initial Turkish locale (#4196)
ozgurozalp May 13, 2025
cf464eb
feat(locale): add russian language (#4197)
VladSez May 13, 2025
dbd75c3
feat(locale): add belarusian language (#4199)
VladSez May 13, 2025
e627c84
feat(lang): Add ota locale in Latin script (#4200)
kadimelifba May 13, 2025
44454e9
Languages: Add Korean language (#4206)
Geuni620 May 13, 2025
de5972f
Languages: Add Farsi language (#4207)
Mojtaba-NA May 13, 2025
e656082
feat(locale): Add Urdu language (#4208)
AsharibAli May 13, 2025
9365eb3
Add Macedonian locale support and update documentation (#4214)
antonio-ivanovski May 13, 2025
5d3414b
Add-fr-ca-locale (#4218)
sohocine May 13, 2025
5331f24
feat(locale): add Traditional Chinese (#4226)
neighborhood999 May 13, 2025
3792277
feat(locale): Add Norwegian (#4229)
mskutle May 13, 2025
58452a9
feat(lang): Added initial Thai locale (#4230)
mildronize May 13, 2025
a787455
feat(locale): Add SL locale (#4231)
TadejPolajnar May 13, 2025
a722359
feat(lang): Added initial `Tamil` locale (#4237)
sasivarnan May 13, 2025
2a4004e
Languages: add German language (#4253)
simon04 May 13, 2025
e465d5a
feat(locales): add Catalan locale support and update documentation (#…
pmontp19 May 13, 2025
79c876c
Languages: Add Malay language (#4204)
kyziq May 13, 2025
d133d7f
Fix issue issue
colinhacks May 13, 2025
31aabda
Subclass Error
colinhacks May 13, 2025
99746df
Update Error inheritance
colinhacks May 13, 2025
419abff
Clean up Error inheritance
colinhacks May 14, 2025
f890656
Fix prom test
colinhacks May 14, 2025
af48166
Refactor: add subpath imports `zod/v4` (#4364)
colinhacks May 14, 2025
6022f92
drop dryrun
colinhacks May 14, 2025
eb22f51
Add root re-export
colinhacks May 14, 2025
39de2a9
Add file
colinhacks May 14, 2025
608aa57
Update docs
colinhacks May 14, 2025
abfd195
Update guide
colinhacks May 14, 2025
49eee20
Docs and locales barrel file
colinhacks May 14, 2025
fd1add2
Update announcement and changelog
colinhacks May 14, 2025
b3e6685
Update anno
colinhacks May 14, 2025
476fc93
Add accordion
colinhacks May 14, 2025
530325b
Fix readonly issue on zodminienum. Rename _getter to innerType on zod…
colinhacks May 15, 2025
6d3aa58
Fix diagonal enum issue
colinhacks May 15, 2025
3af3ae9
Improve `z.url()`: support `hostname` and `protocol` regexes (#4367)
colinhacks May 15, 2025
a3281ea
Add z.core.$ZodBranded
colinhacks May 15, 2025
43306d5
Add jitless config flag (#4368)
colinhacks May 15, 2025
9400087
Remove util.Exactly from zod-mini masks
colinhacks May 15, 2025
6fc31a8
Roll back never toJSONSchema
colinhacks May 15, 2025
274805d
Update snaps
colinhacks May 15, 2025
722883c
v4: set additionalProperties to false when catchall is never (#4365)
jecquas May 15, 2025
0ea06f4
Document dropping of ctx.path in changelog
colinhacks May 15, 2025
6cada51
Remove z.core from zod/v4-mini
colinhacks May 15, 2025
7f4d2fb
Add back z.core
colinhacks May 15, 2025
b80e285
Document .refine overload drop
colinhacks May 15, 2025
28049f6
Fix input type for ZodMiniDate
colinhacks May 15, 2025
7ab764d
Add zodpipe mini test
colinhacks May 15, 2025
c87aff5
Clean up params
colinhacks May 15, 2025
954d4a2
Fix test
colinhacks May 15, 2025
b5002b6
docs: escape `.` in the example regex for `z.url` with `hostname` (#4…
LorisSigrist May 15, 2025
127837a
Document moduleResolution
colinhacks May 15, 2025
8d751ba
typo
colinhacks May 15, 2025
36b6a0b
Implement `z.prefault` (#4376)
colinhacks May 15, 2025
1898b1f
Document prefault
colinhacks May 15, 2025
f805353
Add link to function workaround
colinhacks May 15, 2025
48bef7a
Defer initialization to avoid crashes with z.lazy. Closes #4324. (#4377)
colinhacks May 15, 2025
52d5a4a
noPrecompilation -> jitless
colinhacks May 15, 2025
50211a5
Update ZodError section in changelog. Deprecate isOptional and isNull…
colinhacks May 15, 2025
26b108e
Return data on best-effort basis despite errors
colinhacks May 15, 2025
b7130de
Fix prefixIssues issue
colinhacks May 15, 2025
5d41114
Add fallback File interface
colinhacks May 15, 2025
089b052
Add back formatError and flattenError functions
colinhacks May 16, 2025
5e978db
Allow generic on coerce functions (#4379)
colinhacks May 16, 2025
8a966e1
Add union values test
colinhacks May 16, 2025
3f09e41
Add another lazy schema init test
colinhacks May 16, 2025
5b45ac1
Clean up
colinhacks May 16, 2025
5f54532
Add docs for recursive type debugging.
colinhacks May 16, 2025
5551dc5
Update recursive type docs
colinhacks May 16, 2025
8d1fb62
F
colinhacks May 16, 2025
b208f12
Improve discriminateduion errors (#4384)
colinhacks May 16, 2025
849f72e
Clean up Error inheritance
colinhacks May 16, 2025
a3f7bee
Remove examples from JSON Schema when io=input
colinhacks May 16, 2025
ab9ebb6
`z.toJSONSchema`: Defer execution of `override`, improve ref handling…
colinhacks May 17, 2025
281747e
Clean up enum input type
colinhacks May 17, 2025
ec7c89d
Improve base64 perf. Disallow padding in base64url. (#4386)
colinhacks May 17, 2025
8c393d6
Tweak
colinhacks May 17, 2025
cd5077a
Fix treeify error invalid_union handling
colinhacks May 17, 2025
547eb24
fix ensure catchValue is applied correctly on validation error (#4382)
chimame May 17, 2025
13c6f7d
Simplify object generics, add test for empty objects (#4387)
colinhacks May 17, 2025
406d422
Fix typo in json-schema.mdx (#4380)
fabian-hiller May 17, 2025
c40b5fc
fix: use JSON.stringify to escape toDotPath keys w/ quotes (#4374)
mmkal May 17, 2025
a847401
Improve min/max in JSON Schema (#4388)
colinhacks May 17, 2025
ca41a9e
Remove partial record accordion
colinhacks May 17, 2025
339d36b
Update ecosystem
colinhacks May 17, 2025
19d4f13
Add reference to instanceof Class
colinhacks May 17, 2025
5e933e6
Add JSON Schema (#4390)
colinhacks May 17, 2025
c00497d
Update prefault changelog
colinhacks May 17, 2025
94871b7
Lazy initialization in union and discunion
colinhacks May 17, 2025
e9bbca5
Clean up util
colinhacks May 17, 2025
c383555
Fix override execution order
colinhacks May 17, 2025
286b5e4
Add test for override execution order
colinhacks May 17, 2025
4cbc45a
Preserve shape key ordering in result (#4396)
colinhacks May 17, 2025
caf1a97
Clean up object parser
colinhacks May 17, 2025
dba825a
Fix discriminated union
colinhacks May 18, 2025
c6338d7
Add disc union test
colinhacks May 18, 2025
8f59ed8
Fix inheritance on ZodDiscriminatedUnion
colinhacks May 18, 2025
552ec78
Document metadata inheritance
colinhacks May 18, 2025
be3c3b9
Metadata inherited across clones (#4401)
colinhacks May 18, 2025
2816b76
Add back discriminator to `z.discriminatedUnion()` API (#4402)
colinhacks May 18, 2025
ec097dc
Add disc union test, improve docs
colinhacks May 18, 2025
701a3db
chore: add oRPC to the API Libraries ecosystem (#4349)
unnoq May 18, 2025
d5f6c19
Update benchmark
colinhacks May 18, 2025
867db55
[v3] Allow missing `type` in JWT (#4404)
colinhacks May 18, 2025
fcb64da
Implement pipe optionality. Drop `._zod.optionality` in favor of `._z…
colinhacks May 18, 2025
9109147
Redirect
colinhacks May 19, 2025
38fb11b
WIP
colinhacks May 19, 2025
64c7103
Page events
colinhacks May 19, 2025
25db3bb
Move up sponsors
colinhacks May 19, 2025
cd6abeb
Try scroller
colinhacks May 19, 2025
2e94fe7
Suspense
colinhacks May 19, 2025
89e5d69
No animation
colinhacks May 19, 2025
91076a8
Add redirects
colinhacks May 19, 2025
e5bb9dc
Remove logs
colinhacks May 19, 2025
add6b7d
Add Juno (new silver sponsor) (#4408)
peterpeterparker May 19, 2025
ac6a9f4
Add redirects
colinhacks May 19, 2025
6bf4ab7
WIP
colinhacks May 19, 2025
87679fa
Audit redirects
colinhacks May 19, 2025
71264f7
Tweak
colinhacks May 19, 2025
6f3b518
v4: Doc updates for release (#4409)
colinhacks May 19, 2025
1f2dcda
REmove banners
colinhacks May 19, 2025
75d40c7
Add tabs
colinhacks May 19, 2025
4ffac1e
Update intro
colinhacks May 19, 2025
2721cff
Merge branch 'v4' into v4-main
colinhacks May 19, 2025
663dc81
Zod 4
colinhacks May 19, 2025
961e2b4
Fix lint
colinhacks May 19, 2025
b96ef4f
Simplify readme
colinhacks May 19, 2025
a702b8f
Simplify readme
colinhacks May 19, 2025
c56890b
Simplify readme
colinhacks May 19, 2025
4a25968
Simplify readme
colinhacks May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
25 changes: 25 additions & 0 deletions .configs/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import filesize from "rollup-plugin-filesize";

/** @type {import('rollup').RollupOptions} */
export default {
input: "./scratch/input.ts", // Your TypeScript entry file
output: {
file: "./scratch/out_rollup.js", // Output file
format: "esm", // ES module format to enable tree-shaking
// sourcemap: true, // Generate sourcemaps for easier debugging
},
plugins: [
resolve(), // Resolve node_modules
commonjs(), // Convert CommonJS modules to ES6
typescript(), // Compile TypeScript
filesize(), // Display bundle size
],
treeshake: {
preset: "smallest",
// preset: "recommended",
annotations: true,
}, // Enable tree-shaking
};
35 changes: 35 additions & 0 deletions .configs/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"target": "es2020",
"lib": ["es6", "dom"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"jsx": "react",

"strict": true,
"alwaysStrict": true,

"exactOptionalPropertyTypes": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitOverride": true,

"noFallthroughCasesInSwitch": true,
"resolveJsonModule": true,

"removeComments": false,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"downlevelIteration": true,
"isolatedModules": true,

"pretty": true,
"customConditions": ["@zod/source"]
}
}
Loading