# What changed in zod

> 216 changes in zod 4 from its official release notes, upgrade guides and advisories: 41 breaking, 3 deprecations, 2 security, 65 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/zod/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## zod 4

### Breaking changes

- The standalone z.properties() schema is removed; the .properties() method form remains available. (4.6.3) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.3)
- Now enforces minProperties, maxProperties, uniqueItems, contains, minContains, and maxContains instead of ignoring them. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Error maps now run when result.error is first read, so configuration changes between parsing and reading affect the message. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Rejects component-only strings and now requires at least one pictograph, regional indicator, or keycap. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Embedding z.email no longer applies the email segment's no-consecutive-dots rule to the rest of the template string. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Folds chained checks as a conjunction so tighter bounds are preserved and check order no longer changes emitted JSON Schema. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Empty enums and literals now match nothing. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Imported tuples are open-ended by default. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- String exact-length validation now counts Unicode code points instead of UTF-16 code units. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- String maximum-length validation now counts Unicode code points instead of UTF-16 code units. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- String minimum-length validation now counts Unicode code points instead of UTF-16 code units. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Parsed objects consistently strip __proto__ keys, improving protection against prototype pollution. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Object and record parsers strip __proto__ keys and protect formatters and JSON Schema converters from prototype pollution paths. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Record key schemas now govern only matching keys, and pattern-keyed record intersections no longer reject unrelated object keys. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Strict object parsing reports an own __proto__ key instead of treating it as inherited. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Measures string length in Unicode code points. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Zod Mini requires registering a memoizer before defining schemas to support cyclical inputs. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Requires seconds when a datetime includes Z or an offset. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Enforces RFC 1035 host length limits, matching z.hostname(). (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Validates IPv6 strings directly against the address alphabet, rejecting values previously accepted through URL parsing. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- RFC 3339 datetime validation now requires seconds unless local mode is enabled. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Rejects ULIDs whose first character exceeds 7 because the encoded timestamp would overflow 48 bits. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Base64 validation rejects whitespace to prevent an atob bypass. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The ecosystem ESLint plugin is now named eslint-plugin-zod instead of eslint-plugin-zod-x. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Non-JSON-like inputs such as cyclic objects and BigInt are now rejected or normalized more consistently. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The .merge() method now throws when the receiver has refinements, avoiding ambiguous refinement behavior. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Merging a schema with receiver refinements now throws, while refinements from the second schema are preserved. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Object catchall paths now skip __proto__ keys to harden against prototype pollution. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Object catchall parsing skips the __proto__ key. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Tuple defaults now materialize in parsed output, while absent optional tails remain absent and explicit undefined values are preserved. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Base64 validation now rejects whitespace instead of accepting inputs after atob-style whitespace stripping. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- CUID validation has been tightened, changing which inputs are accepted. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Malformed HTTP(S) URLs missing a slash after the protocol are now rejected instead of being accepted after URL normalization. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Object properties using z.undefined() are now required to be present; use .optional() when the key may be absent. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- ISO time handling was dropped from fromJSONSchema. (4.3.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.4)
- ZodMiniType no longer provides the refine method. (4.3.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.4)
- Tightens the E.164 regex to require a non-zero leading digit and 7–15 total digits. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Throws when overwriting existing properties on object schemas with refinements. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Throws when called on object schemas containing refinements instead of silently dropping those refinements. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Throws when called on object schemas containing refinements instead of silently dropping those refinements. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Intersections reject keys only when unrecognized by both sides, allowing keys recognized by either side to pass validation. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)

### Security

- Uses linear runtime character-set validation with code-enforced length and padding, preventing regex stack overflow on huge inputs. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Reserved-key handling is hardened across Zod 4 schemas. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)

### Deprecations

- The cuid regex is tightened and CUID v1 is deprecated. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- CUID v1 is now deprecated. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The message API is deprecated; developers should consult the migration guide for the replacement. (4.3.5) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.5)

### New APIs and options

- Adds z.currencyCode() using a vendored ISO 4217 list refreshed weekly by CI. (4.6.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.5), [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.4)
- Adds the Tajik locale for localized Zod messages. (4.6.1) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.1)
- Adds asynchronous boolean validation for schemas with async refinements. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Adds IBAN string validation in electronic format with an ISO 7064 MOD 97-10 checksum. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Adds a properties method for validating properties on instances without replacing the instance. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Adds in-place validation of selected object properties while preserving the input instance and prototype. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Allows extra arguments to be passed to apply(). (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Bun can preload zod/compile through the preload configuration. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds partial schemas that allow omitted keys but reject explicitly provided undefined values. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Supports format: "hostname" when converting JSON Schema. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds Hindi, Kannada, Slovak, Bengali, Turkmen, Norwegian Nynorsk, Central Kurdish, Brazilian Portuguese, Greek, and Croatian locale support. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Node.js can preload zod/compile before application modules define schemas. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Nub can preload zod/compile through the preload configuration. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Allows tuple items to become optional with .partial(). (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Accepts a function for unrepresentable values and runs override before the unrepresentable error. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds boolean validation without constructing a result or ZodError, with type-guard narrowing and short-circuiting. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0), [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Pre-compiles any Zod schema for substantially faster parsing while preserving normal schema behavior and error reporting. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds ahead-of-time schema compilation. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds string validation for 12–19 digit credit-card values with optional separators and a valid Luhn checksum. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds credit-card string validation. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Restores deep partial schema construction as a top-level functional API. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds deep partial schemas and runtime z.input and z.output helpers. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds extraction of a discriminated-union member by discriminator value. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds a helper for retrieving a discriminated-union option. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Results from .implement() expose the underlying function schema. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds projection of a schema onto its input side for independently validating codec inputs. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds synchronous and asynchronous boolean validation helpers. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Accepts a custom length for generated or validated NanoIDs. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Object shapes can declare symbol keys, which are tracked by TypeScript and validated as required keys. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds projection of a schema onto its output side for independently validating codec outputs. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds a multi-property counterpart to z.property() for checking several properties together. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Exposes stringbool truthy, falsy, and case settings through _zod.bag. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds a utility for defining a Zod schema that agrees exactly with a static TypeScript type. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds the z.toZod helper. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds asynchronous boolean validation for schemas with async refinements. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Importing zod/compile automatically compiles schemas when they are first used to parse data. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Adds .exactPartial() to ZodObject. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Croatian locale support was added. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Greek locale support was added. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The JSONType export was added. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- A Romanian locale is added for Zod error messages. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Romanian locale support was added. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The when option was added to conditionally run .superRefine() checks. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Transform callbacks can now report validation issues through ctx.addIssue(). (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Uzbek map support was added to locale support. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Codec inversion was added, allowing a codec with reversed input and output directions. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- looseRecord now supports patternProperties. (4.3.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.4)
- Adds a utility method for applying arbitrary transformations to a schema. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds the Armenian locale for localized Zod error messages. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Accepts a second argument controlling whether branding applies to input, output, or both. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds a wrapper that permits omitted properties but rejects explicit undefined values. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds an extension method that preserves refinements while statically preventing incompatible property overwrites. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds the Uzbek locale for localized Zod error messages. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds a more readable alias for check to support explicit schema composition. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Converts JSON Schema definitions directly into Zod schemas, supporting several JSON Schema drafts and OpenAPI 3.0. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds record validation that validates matching keys while passing through non-matching keys unchanged. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Adds z.fromJSONSchema() to create a Zod schema from a JSON Schema definition. (4.2.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.2.0)
- Adds z.looseRecord() to allow additional properties beyond those defined. (4.2.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.2.0)
- Zod implements Standard JSON Schema interoperability. (4.2.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.2.0)
- Adds a .toJSONSchema() method for converting Zod schemas to JSON Schema. (4.2.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.2.0)
- Adds an exclusive union that requires exactly one option to match and emits oneOf in JSON Schema. (4.2.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0), [release notes](https://github.com/colinhacks/zod/releases/tag/v4.2.0)
- Adds z.describe for describing schemas. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- MAC address validation was added to Zod 4 and Zod Mini. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Adds z.meta for attaching metadata to schemas. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Adds a transform that converts strings into URL-friendly slugs. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0), [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)

### Performance

- Size bounds are checked before parsing elements, preventing unnecessary element parsing. (4.6.6) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.6)
- Invalid URL rejection is about 50x faster with fewer allocations during validation. (4.6.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.4)
- The CommonJS build uses plain properties and frozen exports, making namespace calls such as z.validate faster under require. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Removes lookaheads from the email pattern while preserving validation behavior, making valid-address validation roughly twice as fast. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- The emoji regex no longer uses exponential backtracking. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Failure-path safeParse no longer captures an error stack trace, making invalid parses substantially faster. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Schema instances retain substantially less heap memory through lazy method memoization. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Three dead declarations can now be removed by esbuild tree shaking. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Avoids exponential regex backtracking when emoji validation fails. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- ZodError construction is deferred, reducing unnecessary error-construction work. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Classic builder methods are lazily bound through a shared prototype, reducing per-schema method allocation overhead. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Top-level factory calls are marked pure so bundlers can eliminate unused code more effectively. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)

### Behavior and default changes

- Record input and output types are declared as members rather than base type arguments. (4.6.6) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.6)
- The .properties() shape is keyed off the instance type. (4.6.5) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.5)
- Zod Classic metadata members are prototype getters that materialize as own properties only after first read. (4.6.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.0)
- Recursive schemas now support cyclical input data and preserve cyclic references in parsed results. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Emits a root $ref when the root schema has an id. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Compacts simple anyOf unions into a JSON Schema type array. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Unrecognized-key issues no longer abort their schema, allowing strict-object extra-key and invalid-value issues to be reported together. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Dynamic .catch() is allowed when unrepresentable is set to any. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Falls back instead of throwing when compilation cannot be used. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Supports declared symbol keys in object schemas. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Parses input containing reference cycles. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Generates a JSON Schema pattern allowing at least N leading characters for includes with a position. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Discriminated union option typing is tightened. (4.4.2) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.2)
- Optionality is deferred to the inner schema. (4.4.2) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.2)
- Invalid discriminated union errors now include discriminator options and improved messages. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Global configuration is now shared through globalThis across mixed CommonJS and ESM module instances. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- globalConfig is shared across module systems through globalThis. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Jitless mode now avoids eval probing when enabled before first access. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Object and tuple optionality handling is aligned, including optionality propagation behavior. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Object constructors and shape operations apply writable types for consistent shape display and inference. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Key schema transforms are now applied when parsing records. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Generated stub package manifests now declare sideEffects: false, improving bundler tree-shaking. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Record key refinement failures now surface as structured invalid_key issues. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Record schemas now apply transforms to record keys before producing parsed output. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Numeric key handling was generalized, potentially affecting schemas or APIs that process numeric keys. (4.3.6) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.6)
- strictObject is less restrictive when used inside an intersection. (4.3.2) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.2)
- Removes registry-level enforcement that metadata IDs must be unique. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- z.record now supports number literal keys and TypeScript enum keys. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)

### Fixes and other changes

- Preserves undefined prefault outputs and object keys, preventing those values or keys from being lost. (4.6.2) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.2)
- Unique tags are preserved when discriminators have defaults. (4.6.1) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.1)
- Recursive object index inference is deferred. (4.6.1) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.6.1)
- Cycle walking no longer fires a default factory unexpectedly. (4.5.4) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.4)
- Record numeric keys are emitted as strings in JSON Schema output. (4.5.3) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.3)
- Prototype method getters now answer a bare call, allowing vi.spyOn to work. (4.5.2) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.2)
- Stops resurrecting issues that an optional schema already resolved. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Builds catch context from the input that failed. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- The cidrv6 JSON Schema pattern now matches runtime validation. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Constrains emitted JSON Schema tuple length. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- The default English locale is preserved in tree-shaken bundles. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Error-tree walkers use own-property semantics consistently. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- formatError correctly handles inherited-name path elements. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Respects additionalProperties:false together with patternProperties. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- propertyNames now composes with the other object keywords. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Correctly escapes and unescapes reserved JSON Pointer characters in JSON Schema references. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- JSON Schema conversion keeps __proto__ keys as own properties. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Corrects date/time format keywords in both JSON Schema directions. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- The documented keyof() ZodEnum type uses the Zod 4 form. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Allows bundlers to tree-shake locales out of the default import. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Accepts exact decimal multiples that were previously rejected. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Declared __proto__ keys are written as own properties. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Record input keys become optional when the value schema can supply them. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- No longer throws when bigint multipleOf is configured as 0n. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- treeifyError correctly handles inherited-name path elements. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Record keys are re-checked after the key schema runs, preventing transformed keys from bypassing validation. (4.5.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.5.0)
- Catch handling for absent object keys was restored. (4.4.3) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.3)
- Preprocess handling for absent object keys was restored. (4.4.3) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.3)
- Opt-in and fallback behavior was generalized to transform. (4.4.3) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.3)
- Tuple holes are rejected before required defaults are applied, correcting validation behavior. (4.4.1) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.1)
- Map and Set defaults are cloned during parsing, preventing shared state across parses. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Encoding now works when the discriminator uses a codec. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- French issue origin translations were added or updated. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Schema generation applies metadata more consistently across several JSON Schema constructs. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The Georgian translation for string validation was corrected. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Italian validation messages were updated. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The allowsEval probe now honors the jitless configuration. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Length validation logic is corrected so schemas validate lengths as intended. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Map defaults are now cloned instead of shared across parses. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Floating-point multipleOf validation is now more accurate for decimal and exponent edge cases. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Parse functions preserve context immutability. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Falsy prefault values are emitted correctly in generated JSON Schema. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Set defaults are now cloned instead of shared across parses. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Floating-point step validation is now more accurate for decimal and exponent edge cases. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Empty unions are constructed instead of causing a crash. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Nested union paths are now preserved correctly in formatted errors. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Non-enumerable properties are now skipped more consistently during record validation. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- The v3-style single-argument z.record(valueType) form works again. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Redundant id fields are removed from $defs entries to preserve correct reference resolution in older JSON Schema dialects. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Nested union paths are now preserved correctly in treeified errors. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Empty unions now construct successfully and fail at parse time instead of crashing during construction. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- Empty xor schemas now construct successfully and fail at parse time instead of crashing during construction. (4.4.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.4.0)
- extend now allows non-overwriting extensions on schemas with refinements. (4.3.1) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.1)
- Fixes inferred types so implementAsync always returns a promise. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Updates parameter typing to accept string or $ZodCheckIncludesParams. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Converts Date instances to numbers for maximum checks. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Converts Date instances to numbers for minimum checks. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Fixes JSON Schema generation for time values with minute precision. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- Improves handling of numeric keys in record schemas. (4.3.0) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.3.0)
- The dual package hazard affecting globalRegistry was fixed for projects using multiple package entry points. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Partial record handling was fixed for schemas using partial record behavior. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Recursive tuples no longer trigger infinite recursion during processing. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Regexes are reflected correctly in validation errors, making reported patterns accurate to developers. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- The inferred type for z.promise() was corrected, improving TypeScript accuracy for promise schemas. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
- Discriminated unions now use oneOf in generated JSON Schema. (4.1.13) — [release notes](https://github.com/colinhacks/zod/releases/tag/v4.1.13)
