-
Notifications
You must be signed in to change notification settings - Fork 115
Description
I'm posting this issue to all the libraries currently listed in the Ecosystem section of Zod's README. Apologies for the spam! But I can't think of a better way to notify the ecosystem :)
Zod 4 is now in beta
Hello! Colin here, creator of Zod. Thank you for contributing this package to the Zod ecosystem!
FYI, the first beta of Zod 4 has been released. It will be in beta for 4 weeks to allow time for ecosystem libraries (such as yours) to implement support before the first stable version is released.
Announcement post: https://v4.zod.dev/v4
Migration guide: https://v4.zod.dev/v4/changelog (note the "Internal changes" section in particular)
Migration
The beta period for Zod 4 will last roughly four weeks. The first stable version will be released in mid-May. Keep an eye on this PR to track progress: colinhacks/zod#4074
There have been some significant changes. It would be difficult to enumerate all the internal changes, but here is a quick summary:
-
A new library
@zod/minihas been released with a treeshakable/functional API that mirrors Zod's. -
To facilitate code sharing between
zodand@zod/mini, they both have a dependency on a new common core library@zod/core. -
This new package implements the schema subclasses that are then extended by zod and @zod/mini (and potentially future libraries). It makes it easy to support all these libraries simultaneously, with just one peerDependency on your end.
pnpm install @zod/core@^0.0.1
This page is intended as a jumping-off point with some guidance for library authors: https://v4.zod.dev/packages/core
Don't hesitate to reach out for help/guidance!
- Post to the #zod4 channel on the Discord
- Open an issue/discussion on the repo
- DM me on Discord or X
You guys maintain a particularly important set of libraries. You'll definitely find some interested stuff in the launch post: z.toJSONSchema, metadata & registries, etc. Let me know how I can help with migration!