Skip to content

Comments

refactor(zod): upgrade to v4#20

Merged
vabatta merged 6 commits intomainfrom
refactor/zod-upgrade-to-v4
Aug 30, 2025
Merged

refactor(zod): upgrade to v4#20
vabatta merged 6 commits intomainfrom
refactor/zod-upgrade-to-v4

Conversation

@vabatta
Copy link
Contributor

@vabatta vabatta commented Aug 19, 2025

Upgrade zod to v4, dropping the support of zod v3.

Release-As: 1.2.0

@vabatta vabatta requested a review from konsti August 19, 2025 23:18
@vabatta vabatta self-assigned this Aug 19, 2025
@vabatta vabatta requested review from jamescallumyoung and removed request for konsti August 20, 2025 12:30
Copy link
Collaborator

@jamescallumyoung jamescallumyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You support zod v3.x but import always from zod/v4, will that work? Do you need to use a dynamic import import alias?

@vabatta
Copy link
Contributor Author

vabatta commented Aug 26, 2025

That's how you use it as a consumer, but further looking into it looks like I need to use core: https://zod.dev/library-authors?id=how-to-support-zod-4

I'll rework it.

@vabatta
Copy link
Contributor Author

vabatta commented Aug 30, 2025

We are not going to support zod v3 from this new version onwards - this would require otherwise to duplicate all code to run V3 and V4 (as in V4 the changes to how to build the error are substantially changed using zod v4 methods directly instead of custom methods).
If one wants zod v3, uses the old version.

@vabatta vabatta merged commit 32b5dca into main Aug 30, 2025
5 checks passed
@vabatta vabatta deleted the refactor/zod-upgrade-to-v4 branch August 30, 2025 16:12
@vabatta vabatta mentioned this pull request Aug 30, 2025
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