-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Upgrade to Zod 4 #14956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Upgrade to Zod 4 #14956
Conversation
Consolidate Zod v3 to v4 upgrade with comprehensive changes: - Remove dual Zod version support, standardize on v4 - Simplify type systems and remove experimental.zod4 flag - Update dependencies: js-yaml, magic-string, magicast to latest versions - Replace kleur with piccolore for CLI colors - Refactor content layer, actions, and config to use unified Zod handling - Simplify JSON schema generation and type generation - Remove z3/z4 branching logic throughout codebase - Update error handling to work with unified Zod implementation BREAKING CHANGE: Zod v3 support removed, project now requires Zod v4+
- Remove all z3 imports and replace with z4/zod - Remove z3-specific functions (formDataToZ3Object, handleZ3FormDataGetAll/Get, unwrapBaseZ3ObjectSchema, createZ3Image) - Remove dual-version type unions, simplify to z4-only types - Remove z3ErrorMap function, keep only z4ErrorMap - Remove checkZodSchemaCompatibility calls (no longer needed) - Simplify vite-plugin-experimental-zod4/utils.ts to no-op - Update package.json to require zod ^4.0.0 - Update test files and exports to reference z4 versions
🦋 Changeset detectedLatest commit: d10cb61 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
Co-authored-by: Florian Lefebvre <[email protected]>
|
| 📦 Package | 🔒 Before | 🔓 After |
|---|---|---|
| @cloudflare/unenv-preset | trusted-with-provenance | none |
| workerd | trusted-with-provenance | none |
| undici | provenance | none |
| miniflare | trusted-with-provenance | none |
| youch | provenance | none |
| @cloudflare/workerd-darwin-64 | trusted-with-provenance | none |
| @cloudflare/workerd-darwin-arm64 | trusted-with-provenance | none |
| @cloudflare/workerd-linux-64 | trusted-with-provenance | none |
| @cloudflare/workerd-linux-arm64 | trusted-with-provenance | none |
| @cloudflare/workerd-windows-64 | trusted-with-provenance | none |
| wrangler | trusted-with-provenance | none |
|
Is the bot incorrect? #14956 (comment) |
florian-lefebvre
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only some small things. Some of my older reviews need to be addressed still
|
So the missing things to address are:
|
I think it’s not working correctly currently: we need e18e/action-dependency-diff#95 which isn’t released yet. I’ve asked if they can release that. If not, I’ll send a PR pinning to that commit hash directly. |
Changes
.prefault()and changingz.object(z.number())toz.object(z.string(), z.number())Testing
Docs