Packages

zod

4.6.7 · 12 Oct 2026MIT467.6M / weekRepositoryHomepagenpmAtom feed

Upgrading zod From 3.25.31 to 4.6.6

102 releases in betweennotes for 100

Other targets from 3.25.31Newest 3.x3.25.76Latest4.6.7
  1. 3.25.31yours
  2. 45 releases
  3. 4.0.0major
  4. 40 releases
  5. 4.4.0security
  6. 3 releases
  7. 4.5.0breaking
  8. 10 releases
  9. 4.6.6target
  10. 8 pre
10+
changes to make
1
advisory fixed
133+
new
196+
fixes

Counted from 100 of 102 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking4.5.0
  • Breaking4.5.0
  • Breaking4.4.0
  • Breaking4.4.0
  • Breaking4.4.0
  • Breaking4.4.0
  • Breaking4.4.0
  • Breaking4.4.0
  • Deprecated4.5.0
  • Deprecated4.4.0

Security

Fixes 1 advisory affecting 3.25.31

  • Closed #5743 via #5744: increase timeout for the datetime ReDoS checker test.

    4.4.0
  • Commit ddb41391 test: increase timeout for redos checker in datetime.test.ts

    4.4.0

Release by release

  1. 4.6.6

    11 Oct 20262 fixes
    • 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

  2. 4.6.5

    13 Sep 20261 new
    • New

      instanceof: Key the .properties() shape off the instance type

  3. 4.6.4

    13 Sep 20262 new
    • New

      Add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI

    • New

      z.url() rejects an invalid URL with URL.canParse() instead of a throwing constructor, about 50x faster; fewer allocations on the validation path

  4. 4.6.3

    12 Sep 20261 fix
    • Fixed

      v4: Make z.properties() a check again (#6594) — removes the standalone z.properties() schema from 4.6.0; z.instanceof().properties() and .check(...z.properties()) are unchanged

  5. 4.6.2

    10 Sep 20261 fix
    • Fixed

      Preserve undefined prefault outputs and object keys (#6587) — closes #6585

  6. 4.6.1

    9 Sep 20261 new · 2 fixes
    • New

      lang: Add Tajik (tg) locale

    • Fixed

      Preserve unique tags with defaulted discriminators (#6582) — closes #6577

    • Fixed

      v4: Defer recursive object index inference

  7. 4.6.0

    9 Sep 202615 new · 8 fixes
    • 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

  8. 4.5.4

    29 Aug 20261 fix
    • Fixed

      v4: Stop the cycle walk from firing a default factory

306 other lines we could not sort, mostly version bumps
  • Revert "feat: add z.currencyCode() over a vendored ISO 4217 list, refreshed weekly by CI (#6595)"

    4.6.5
  • .validate() — checks input validity without building a result (up to 35x faster than .safeParse().success on 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 without new Function

    4.6.0
  • Faster CommonJS — drops the getter on every export (~3x faster z.validate() under require)

    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 with zod since 4.5

    4.6.0
  • Migrate development and CI to Nub

    4.6.0

241 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.