Change8

Zod

Backend & Infra

TypeScript-first schema validation with static type inference

Latest: v4.5.425 releases4 breaking changes4 common errorsView on GitHub

Release History

View all versions →
v4.5.41 fix
Aug 29, 2026

This release includes a bug fix that prevents the default factory from firing during a cycle walk.

v4.5.32 fixes
Aug 29, 2026

This release includes bug fixes for toJSONSchema and documentation display issues. It also introduces performance improvements and documentation updates related to z.compile.

v4.5.25 fixes
Aug 29, 2026

This release includes several bug fixes related to documentation rendering, blog post display, and ISR on the docs route. It also addresses an issue with vi.spyOn functionality.

v4.5.1
Aug 28, 2026

This release primarily focuses on CI improvements, gating GitHub releases and JSR publishing to ensure they only occur when the version is live on npm. It also marks the release of version 4.5.1.

v4.5.07 features
Aug 28, 2026

Zod 4.5 introduces `z.compile()` for significant parsing performance improvements and adds new validators like `z.creditCard()` and `z.properties()`. It also includes a fast-path validation function `z.validate()` and reduces memory footprint.

v4.4.32 fixes
May 4, 2026

This release focuses on bug fixes for v4 related to object key handling and includes numerous documentation updates regarding sponsor recognition.

v4.4.21 fix3 features
May 1, 2026

This release focuses on documentation improvements, including fixing heading anchor links and updating guidance, alongside a minor feature enhancement for z.preprocess optionality handling.

v4.4.11 fix
Apr 29, 2026

This release (4.4.1) includes a bug fix related to tuple handling in v4 and updates to CI/CD processes, such as gating release publishing on a full test workflow.

v4.4.0Breaking18 fixes5 features
Apr 29, 2026

This minor release focuses heavily on correctness and soundness fixes, particularly around tuple parsing defaults, object property requirements when using z.undefined(), and stricter string validation rules. Several changes are potentially breaking for code relying on previously ambiguous input handling.

v4.3.62 fixes1 feature
Jan 22, 2026

This release introduces generalized numeric key handling and includes minor fixes like correcting a typo and updating robots.txt configuration.

v4.3.51 feature
Jan 4, 2026

This release introduces improvements to mini treeshaking and documents the deprecation of the 'message' symbol.

v4.3.4Breaking1 fix3 features
Dec 31, 2025

This release introduces patternProperties support for looseRecord and improves documentation, while removing the .refine() method from ZodMiniType and dropping ISO time in fromJSONSchema.

v4.3.3
Dec 31, 2025

Version 4.3.3 release containing a single commit update.

v4.3.2Breaking1 fix
Dec 31, 2025

Version 4.3.2 is a maintenance release that removes the Juno integration and refines strictObject validation within intersections.

v4.3.11 feature
Dec 31, 2025

This release introduces support for non-overwriting extends when using refinements, improving how configurations or schemas are merged.

v4.3.0Breaking2 fixes12 features
Dec 31, 2025

Zod 4.x introduces major features including JSON Schema to Zod conversion, exclusive unions (xor), exact optional properties, and improved intersection logic for strict objects.

v4.2.1
Dec 16, 2025

Version 4.2.1 is a maintenance release containing a single commit.

v4.2.05 features
Dec 15, 2025

This release introduces native JSON Schema interoperability with z.fromJSONSchema() and .toJSONSchema(), alongside new schema types like z.xor() and z.looseRecord().

v4.1.138 fixes6 features
Nov 24, 2025

Zod v4.1.13 introduces MAC address validation, z.meta/z.describe, and significant performance optimizations for initialization. It also addresses several edge-case bugs in records, tuples, and localization.

v4.1.124 fixes2 features
Oct 6, 2025

Version 4.1.12 focuses on bug fixes for ZodError flattening, internal error type refactoring, and significant updates to the ecosystem documentation.

v4.1.11
Sep 20, 2025

Version 4.1.11 is a maintenance release identified by commit 2bed4b3.

v4.1.101 fix
Sep 20, 2025

Version 4.1.10 is a patch release that addresses a bug in shape caching.

v4.1.91 fix
Sep 16, 2025

This release updates the zshy dependency and publishes zod version 4.1.9.

v4.1.81 fix
Sep 11, 2025

Version 4.1.8 is a maintenance release that switches an internal implementation back to using WeakMap.

v4.1.76 fixes5 features
Sep 11, 2025

Release 4.1.7 focuses on expanding locale support (Lithuanian, Georgian), fixing CIDRv6 validation logic, and ensuring array defaults are shallow-cloned. It also includes significant documentation improvements and ecosystem updates.

Common Errors

ZodError3 reports

A ZodError usually indicates that the data you're trying to parse with a Zod schema doesn't conform to the schema's defined structure or validation rules. To fix this, carefully inspect the Zod schema and the data you're providing to identify any type mismatches, missing required fields, or validation failures. Adjust either the schema to accommodate the data or modify the data to align with the schema's expectations.

PriceOptionsError1 report

The "PriceOptionsError" in zod usually stems from providing incorrect or missing fields when defining a price option schema, like forgetting the `price` or `label` fields and their respective types, or attempting to set invalid `price_type` if the options don't correspond to their allowed formats. Ensure that price option schema definitions include all required fields with the correct types and values, according to the specific validations set within your codebase or any third-party library constraints relevant to your pricing logic.

PickOnlyUnexpectedKeysDoesCorrectlyError1 report

This error usually arises when the `pick` method on Zod objects doesn't properly enforce key constraints at compile time, allowing unexpected keys to slip through. To fix it, ensure the `pick` method's return type accurately reflects the picked schema and introduce a type-level check that explicitly verifies the provided keys in the `pick` call are valid for the original Zod object schema, throwing a TypeScript error otherwise. This will re-establish compile-time safety.

AxiosError1 report

The "AxiosError" in Zod often arises because the type of the data received from the Axios request does not match the schema defined by Zod. To fix this, carefully inspect the structure of the Axios response and adjust your Zod schema to accurately reflect the actual data type and properties. Consider using `.transform()` to map the response data to the expected format before validation if necessary.

Related Backend & Infra Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed