Skip to content

Upgrade Zod from v3 to v4#3

Merged
stack72 merged 1 commit intomainfrom
zod-v4-upgrade
Jan 28, 2026
Merged

Upgrade Zod from v3 to v4#3
stack72 merged 1 commit intomainfrom
zod-v4-upgrade

Conversation

@stack72
Copy link
Copy Markdown
Contributor

@stack72 stack72 commented Jan 28, 2026

Upgrades the Zod validation library from version 3 to version 4.3.6.

Changes

  • Updated deno.json to specify zod@4 instead of zod@3
  • Updated deno.lock with Zod 4.3.6 dependency resolution

Compatibility

All existing Zod usage in the codebase is fully compatible with v4:

  • Schema definitions (model input/resource schemas)
  • Type inference with z.infer
  • Validation methods (parse, safeParse)
  • Schema composition and chaining

Testing

  • ✅ Type checking passes (deno check)
  • ✅ All Zod-related tests pass (59 tests across model domain layer)
  • ✅ Integration tests pass
  • ✅ 145/146 tests pass (1 unrelated pre-existing failure in logger tests)

Migration Notes

No code changes required. Zod v4 maintains API compatibility with v3 for the features used in this codebase.

Upgrades the Zod validation library from version 3 to version 4.3.6.

### Changes

- Updated deno.json to specify zod@4 instead of zod@3
- Updated deno.lock with Zod 4.3.6 dependency resolution

### Compatibility

All existing Zod usage in the codebase is fully compatible with v4:
- Schema definitions (model input/resource schemas)
- Type inference with z.infer
- Validation methods (parse, safeParse)
- Schema composition and chaining

### Testing

- ✅ Type checking passes (deno check)
- ✅ All Zod-related tests pass (59 tests across model domain layer)
- ✅ Integration tests pass
- ✅ 145/146 tests pass (1 unrelated pre-existing failure in logger tests)

### Migration Notes

No code changes required. Zod v4 maintains API compatibility with v3 for the features used in this codebase.
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.

1 participant