Change8

v4.0.6

Breaking Changes
📦 zodView on GitHub →
1 breaking5 features🐛 4 fixes🔧 5 symbols

Summary

Zod v4.0.6 introduces new Icelandic, Bulgarian, and Danish translations, fixes literal escaping bugs, and refines the catch input type. It also updates documentation for RFC 9562 and provides resources for Zod 3 to Zod 4 migration.

⚠️ Breaking Changes

  • Unwidened the catch input type, which may affect how error types are inferred in .catch() blocks.

Migration Steps

  1. If upgrading from Zod 3 to Zod 4, use the zod-v3-to-v4 codemod as referenced in the migration guide.
  2. Review .catch() usage if relying on specific input type widening.

✨ New Features

  • Added Icelandic (is) translation for error messages.
  • Added Bulgarian (bg) translation for error messages.
  • Added Danish (da) translation for error messages.
  • Added RFC 9562 mentions to documentation regarding UUIDs.
  • Added @hey-api/openapi-ts to the ecosystem documentation for both Zod 3 and Zod 4.

🐛 Bug Fixes

  • Fixed issue where decimal places were not correctly escaped in z.literal.
  • Fixed URL support example in documentation.
  • Corrected documentation regarding spread vs destructuring.
  • Removed outdated moduleResolution callout from documentation.

🔧 Affected Symbols

z.catchz.literallocales.islocales.bglocales.da