Uh oh!
There was an error while loading. Please reload this page.
feat(zod)!: upgrade to Zod v4, remove zod-to-json-schema - #3482
feat(zod)!: upgrade to Zod v4, remove zod-to-json-schema#3482MuntasirSZN wants to merge 22 commits into
Conversation
@MuntasirSZN is attempting to deploy a commit to the NuxtLabs Team on Vercel. A member of the Team first needs to authorize it. |
MuntasirSZN
commented
Jul 26, 2025
Maybe this should be a breaking change? |
commit: |
- Replace complex post-processing with Zod v4's built-in override
callback
- Use target: 'draft-7' for proper nullable handling (anyOf instead of
oneOf)
- Handle dates with override callback for {type: "string", format:
"date-time"}
- Reduce implementation from ~100 lines to ~20 lines of processing
- Fix import paths from 'zod/v4/core' to 'zod/v4' across codebasefarnabaz
commented
Aug 4, 2025
Thanks for the PR @MuntasirSZN Meanwhile I'll keep it PR pending so users can user Zod4 with PR release |
MuntasirSZN
commented
Aug 4, 2025
@farnabaz what about Standard Schema? I am happy to implement that. |
farnabaz
commented
Aug 5, 2025
AFAIK, The issue with standard schema is it does not expose schema and only expose unified validation. But I would be happy to see Standard Schema working in Nuxt Content |
We need nuxt/content#3482, to resolve some very interesting issues while running vitest on GitHub actions.
Norbiros
commented
Aug 16, 2025
Maybe for now a compatibility layer could be added to fix #3462 without fully updating to zod v4? |
We need nuxt/content#3482, to resolve some very interesting issues while running vitest on GitHub actions.
test: add raw zod toJSONSchema passthrough tests (editor meta, nullable anyOf, union anyOf, intersection allOf) chore: satisfy eslint for zod editor augmentation and tests chore: lint and fix chore: fix typo
MuntasirSZN
commented
Sep 5, 2025
Checkout #3524 |
🔗 Linked issue
❓ Type of change
📚 Description
Upgrades from Zod v3 to v4 using native toJSONSchema() method, replacing the zod-to-json-schema dependency. toJsonSchema doesn't support dates, so had to go through that.
📝 Checklist