Migrate to Zod v4
Author: peterpeterparkerCreated Jul 15, 2025Updated Jul 14, 2026
Is your feature request related to a problem? Please describe.
It would be great if the library could be migrated to the newly released Zod v4.
Describe the solution you'd like
I had a quick look. Generally speaking, it should be fairly straightforward to migrate, as the library mostly uses Zod primitives. However, there is a breaking change regarding Function in Zod v4, and I'm not exactly sure how you'd like to handle it when migrating the callback in PrintOptionsSchema. That’s why I didn’t provide a PR directly.
Additional context
- Zod v4 migration: https://zod.dev/v4/changelog
- Zod Function breaking change workaround and discussion: https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912
Source: jimp-dev/jimp