Repository navigation
feat: support zod 4 alongside zod 3 - #192
Open
casualuser wants to merge 1 commit into
Open
casualuser wants to merge 1 commit into
casualuser wants to merge 1 commit into
Conversation
Widen zod to ^3.25.0 || ^4.0.0 in both the root and mcp workspaces so consumers pinning zod 4 can install the SDK without peer conflicts. The core src/ tree has no zod imports (hand-rolled validators), so the relative impact is limited to the mcp workspace, which only uses z.string().describe() for MCP tool schemas — all 1065 tests pass under zod 4.6.7 with no source changes required. Fixes tinybirdco#191
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (Rationale & Problem)
package.jsonpinszod: ^3.25.0. Consumers that have migrated to zod 4 (stable since mid-2025) cannot install the SDK without a peer conflict: everypnpm/npminstall that pins zod 4 fails withERESOLVE/ERR_PNPM_PEER_DEP_ISSUES, forcing--legacy-peer-depsor duplicate zod copies in the bundle (bundle-size + dual-parse behavior risk).What For (Use Cases & Value)
^3.25.0 || ^4.0.0.How (Implementation, Invariants & Verification)
zodwidened to^3.25.0 || ^4.0.0in rootpackage.jsonandmcp/package.json.src/tree has zero zod imports (hand-rolled branded validators); only themcpworkspace imports zod, and solely forz.string().describe(...)MCP tool schemas — all zod-4 compatible without source changes.pnpm installresolves zod 4.6.7 across both workspaces.pnpm typecheckpasses.pnpm --filter mcp exec tsc --noEmitpasses.pnpm test:run: 1065/1065 tests passed under zod 4.