Packages

zod

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

Upgrading zod From 4.0.2 to 4.6.7

55 releases in betweennotes for 54

Other targets from 4.0.2Clears its advisory4.6.6
  1. 4.0.2yours
  2. 38 releases
  3. 4.4.0security
  4. 3 releases
  5. 4.5.0breaking
  6. 11 releases
  7. 4.6.7target
  8. 8 pre
10+
changes to make
1
advisory fixed
101+
new
163+
fixes

Counted from 54 of 55 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 4.0.2

  • 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.7nothing new or fixed in the note

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

  3. 4.6.5

    13 Sep 20261 new
    • New

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

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

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

  6. 4.6.2

    10 Sep 20261 fix
    • Fixed

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

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

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

232 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

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