Skip to content

[Snyk] Upgrade zod from 3.23.8 to 4.2.0#8

Open
johnny603 wants to merge 8 commits intodevelopfrom
snyk-upgrade-3e5fa7ea92ee3da23b04eed5dc2180e9
Open

[Snyk] Upgrade zod from 3.23.8 to 4.2.0#8
johnny603 wants to merge 8 commits intodevelopfrom
snyk-upgrade-3e5fa7ea92ee3da23b04eed5dc2180e9

Conversation

@johnny603
Copy link
Copy Markdown
Owner

snyk-top-banner

Snyk has created this PR to upgrade zod from 3.23.8 to 4.2.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 457 versions ahead of your current version.

  • The recommended version was released 21 days ago.

Release notes
Package name: zod
  • 4.2.0 - 2025-12-15

    Features

    Implement Standard JSON Schema

    standard-schema/standard-schema#134

    Implement z.fromJSONSchema()

    const jsonSchema = {
    type: "object",
    properties: {
    name: { type: "string" },
    age: { type: "number" }
    },
    required: ["name"]
    };

    const schema = z.fromJSONSchema(jsonSchema);

    Implement z.xor()

    const schema = z.xor(
      z.object({ type: "user", name: z.string() }),
      z.object({ type: "admin", role: z.string() })
    );
    // Exactly one of the schemas must match

    Implement z.looseRecord()

    const schema = z.looseRecord(z.string(), z.number());
    // Allows additional properties beyond those defined

    Commits:

    • af49c08 Update docs for JSON Schema conversion of z.undefined() (#5504)
    • 767f320 Add .toJSONSchema() method (#5477)
    • e17dcb6 Add z.fromJSONSchema(), z.looseRecord(), z.xor() (#5534)
  • 4.2.0-canary.20251215T071855 - 2025-12-15
  • 4.2.0-canary.20251213T203150 - 2025-12-13
  • 4.2.0-canary.20251207T223211 - 2025-12-07
  • 4.2.0-canary.20251202T062120 - 2025-12-02
  • 4.2.0-canary.20251124T022609 - 2025-11-24
  • 4.2.0-canary.20251118T192410 - 2025-11-18
  • 4.2.0-canary.20251118T185426 - 2025-11-18
  • 4.2.0-canary.20251118T063547 - 2025-11-18
  • 4.2.0-canary.20251118T062010 - 2025-11-18
  • 4.2.0-canary.20251118T055751 - 2025-11-18
  • 4.2.0-canary.20251118T055142 - 2025-11-18
  • 4.2.0-canary.20251118T055019 - 2025-11-18
  • 4.2.0-canary.20251118T054932 - 2025-11-18
  • 4.2.0-canary.20251106T231624 - 2025-11-06
  • 4.2.0-canary.20251106T214835 - 2025-11-06
  • 4.2.0-canary.20251106T214242 - 2025-11-06
  • 4.2.0-canary.20251106T212241 - 2025-11-06
  • 4.2.0-canary.20251022T022243 - 2025-10-22
  • 4.2.0-canary.20251021T174027 - 2025-10-21
  • 4.2.0-canary.20251021T172355 - 2025-10-21
  • 4.2.0-canary.20251017T221623 - 2025-10-17
  • 4.2.0-canary.20251016T223057 - 2025-10-16
  • 4.2.0-canary.20251015T161525 - 2025-10-15
  • 4.2.0-canary.20251001T172710 - 2025-10-01
  • 4.2.0-canary.20250921T171445 - 2025-09-21
  • 4.2.0-canary.20250920T163917 - 2025-09-20
  • 4.2.0-canary.20250911T052041 - 2025-09-11
  • 4.2.0-canary.20250911T051520 - 2025-09-11
  • 4.2.0-canary.20250911T051312 - 2025-09-11
  • 4.2.0-canary.20250911T045937 - 2025-09-11
  • 4.2.0-canary.20250911T045735 - 2025-09-11
  • 4.2.0-canary.20250911T045022 - 2025-09-11
  • 4.2.0-canary.20250911T044631 - 2025-09-11
  • 4.2.0-canary.20250911T044505 - 2025-09-11
  • 4.2.0-canary.20250911T000242 - 2025-09-11
  • 4.2.0-canary.20250828T181323 - 2025-08-28
  • 4.2.0-canary.20250827T203557 - 2025-08-27
  • 4.2.0-canary.20250827T070334 - 2025-08-27
  • 4.2.0-canary.20250826T001214 - 2025-08-26
  • 4.2.0-canary.20250826T001136 - 2025-08-26
  • 4.2.0-canary.20250826T000512 - 2025-08-26
  • 4.2.0-canary.20250825T235836 - 2025-08-25
  • 4.2.0-canary.20250825T230433 - 2025-08-25
  • 4.2.0-canary.20250824T204911 - 2025-08-24
  • 4.1.13 - 2025-11-24

    Commits:

  • 4.1.13-beta.0 - 2025-10-15
  • 4.1.12 - 2025-10-06

    Commits:

  • 4.1.11 - 2025-09-20

    Commits:

  • 4.1.10 - 2025-09-20

    Commits:

  • 4.1.9 - 2025-09-16

    Commits:

  • 4.1.8 - 2025-09-11

    Commits:

  • 4.1.7 - 2025-09-11

    Commits:

    • 0cca351 Fix variable name inconsistency in coercion documentation (#5188)
    • aa78c27 Add copy/edit buttons
    • 76452d4 Update button txt
    • 937f73c Fix tsconfig issue in bench
    • 976b436 v4.1.6 (#5222)
    • 4309c61 Fix cidrv6 validation - cidrv6 should reject invalid strings with multiple slashes (#5196)
    • ef95a73 feat(locales): Add Lithuanian (lt) locale (#5210)
    • 3803f3f docs: update wrong contents in codeblocks in api.mdx (#5209)
    • 8a47d5c docs: update coerce example in api.mdx (#5207)
    • e87db13 feat(locales): Add Georgian (ka) locale (#5203)
    • c54b123 docs: adds @ traversable/zod and @ traversable/zod-test to v4 ecosystem (#5194)
    • c27a294 Fix two tiny grammatical errors in the docs. (#5193)
    • 23a2d66 docs: fix broken links in async refinements and transforms references (#5190)
    • 845a230 fix(locales): Add type name translations to Spanish locale (#5187)
    • 27f13d6 Improve regex precision and eliminate duplicates in regexes.ts (#5181)
    • a8a52b3 fix(v4): fix Khmer and Ukrainian locales (#5177)
    • 887e37c Update slugs
    • e1f1948 fix(v4): ensure array defaults are shallow-cloned (#5173)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants