zod
4.6.7 · 12 Oct 2026MIT468.6M / weekRepositoryHomepagenpmAtom feed
Upgrading zod From 4.4.1 to 4.6.7
15 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- Breaking4.5.0
- Breaking4.5.0
- Deprecated4.5.0
Security
Fixes 1 advisory affecting 4.4.1
- Zod can exhaust memory while validating oversized constrained collectionshigh · GHSA-mrhx-c7xc-m3w5
Release by release
4.6.7nothing new or fixed in the note
- Fixed
types: Declare record output and input as members, not base type arguments
- Fixed
v4: Check array, set and map size bounds before parsing elements
- Fixed
- New
instanceof: Key the .properties() shape off the instance type
- New
- New
Add
z.currencyCode()over a vendored ISO 4217 list, refreshed weekly by CI - New
z.url()rejects an invalid URL withURL.canParse()instead of a throwing constructor, about 50x faster; fewer allocations on the validation path
- New
- New
compile: Add z.withParser for externally generated parsers
- New
v4: Drop the lookaheads from the email regex
- New
v4: Add z.iban() string format with mod-97 checksum
- New
compile: for-in record walk, cheaper issue finalization, and a generative compile differential
- New
33 other lines we could not sort, mostly version bumps
- 4.6.5
Revert "feat: add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI (#6595)"
- 4.6.0
.validate()— checks input validity without building a result (up to 35x faster than.safeParse().successon a compiled schema) - 4.6.0
z.instanceof().properties()— validates properties of an instance - 4.6.0
fromJSONSchema()— enforces six validation keywords it used to ignore - 4.6.0
z.iban()— electronic-format IBAN plus mod-97 checksum - 4.6.0
z.withParser()— installs a parser generated elsewhere, for environments withoutnew Function - 4.6.0
Faster CommonJS — drops the getter on every export (~3x faster
z.validate()underrequire) - 4.6.0
Memory retention in recursive schemas — releases the parsed input, fixing a 4.5 out-of-memory regression
- 4.6.0
@zod/mini— Zod Mini as a standalone package, versioned in lockstep withzodsince 4.5 - 4.6.0
Migrate development and CI to Nub
134 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.