Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@oxc
Copy link

@oxc oxc commented Oct 4, 2025

Description 🦫

This PR adds compatibility with both Zod v3 and Zod v4 to command-zod and event-type-zod. Not all users will be able to upgrade to Zod v4 immediately, so keeping compatibility with both versions is important.

I believe this is the cleanest way to support both versions at the same time, following the instructions from Zod's guide for library authors on "How to support Zod 3 and Zod 4 simultaneously?".

Fixes #197

Important

This change requires a version of Zod >= 3.25.0. Unfortunately, neither v3 nor v4 will compile with the typescript version currently included by castore, so for this PR to work, typescript must be updated as well. Feel free to cherry-pick this change into your mass upgrade PR, or alternatively I can bump typescript in this PR.

Type of change 📝

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested? 🧑‍🔬

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration: 🔧

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist: ✅

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oxc oxc changed the title feat: make command-zod and event-type-zod compatible with zod v3/v4 update(command-zod,event-type-zod): make compatible with zod v3/v4 Oct 4, 2025
@oxc oxc mentioned this pull request Oct 4, 2025
16 tasks
CorentinDoue added a commit that referenced this pull request Oct 5, 2025
CorentinDoue added a commit that referenced this pull request Oct 5, 2025
@CorentinDoue
Copy link
Collaborator

now included in #199

@oxc oxc closed this Oct 12, 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.

Zod 4 / Standard Schema support

2 participants