Skip to content

chore(mcp): upgrade zod to v4 to fix tsc OOM during build#964

Merged
brendan-kellam merged 3 commits intomainfrom
brendan/upgrade-mcp-zod-v4-SOU-167
Feb 27, 2026
Merged

chore(mcp): upgrade zod to v4 to fix tsc OOM during build#964
brendan-kellam merged 3 commits intomainfrom
brendan/upgrade-mcp-zod-v4-SOU-167

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Feb 27, 2026

Summary

  • Upgrades zod from ^3.24.3 to ^4.3.6 in the @sourcebot/mcp package
  • Fixes out-of-memory crashes during tsc build caused by @modelcontextprotocol/sdk's complex Zod-derived type definitions
  • Zod v4 has significantly simpler TypeScript generics by design, reducing the type resolution work tsc has to perform
  • Also satisfies the SDK's peer dependency requirement (^3.25 || ^4.0), which 3.24.x did not meet

No source code changes were required — the Zod v3 API used in this package is fully compatible with v4.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated dependencies to latest compatible versions for improved stability and security.

Upgrades zod from ^3.24.3 to ^4.3.6 in the mcp package to resolve out-of-memory
errors during TypeScript compilation caused by @modelcontextprotocol/sdk's complex
Zod-derived types. Zod v4 has significantly simpler TypeScript generics, and also
satisfies the SDK's peer dependency requirement (^3.25 || ^4.0).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7f7516c and f3432b9.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • packages/mcp/CHANGELOG.md
  • packages/mcp/package.json

Walkthrough

A zod dependency is bumped from version ^3.24.3 to ^4.3.6 in the MCP package, with a corresponding changelog entry documenting the update.

Changes

Cohort / File(s) Summary
Dependency Update
packages/mcp/package.json, packages/mcp/CHANGELOG.md
Zod dependency upgraded from ^3.24.3 to ^4.3.6; changelog entry added to document the version bump.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch brendan/upgrade-mcp-zod-v4-SOU-167

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

brendan-kellam and others added 2 commits February 27, 2026 15:14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@brendan-kellam brendan-kellam merged commit 4c13e73 into main Feb 27, 2026
7 checks passed
@brendan-kellam brendan-kellam deleted the brendan/upgrade-mcp-zod-v4-SOU-167 branch February 27, 2026 23:15
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