Skip to content

fix: declare zod runtime deps for TS servers#4291

Open
xianzuyang9-blip wants to merge 4 commits into
modelcontextprotocol:mainfrom
xianzuyang9-blip:codex/declare-zod-runtime-deps
Open

fix: declare zod runtime deps for TS servers#4291
xianzuyang9-blip wants to merge 4 commits into
modelcontextprotocol:mainfrom
xianzuyang9-blip:codex/declare-zod-runtime-deps

Conversation

@xianzuyang9-blip
Copy link
Copy Markdown

Summary

  • declare zod as a runtime dependency for the filesystem, memory, and sequential-thinking server packages
  • sync package-lock.json so strict package managers install zod with each published server package that imports it directly

Why

src/filesystem/index.ts, src/memory/index.ts, and src/sequentialthinking/index.ts all import zod directly. Without a direct package dependency, strict package managers can omit a co-located zod install for these published packages and the server entrypoints can fail with ERR_MODULE_NOT_FOUND.

Verification

pm install --package-lock-only --ignore-scripts

pm install --ignore-scripts

pm run build -w src/sequentialthinking

pm run build -w src/memory

pm run build -w src/filesystem

pm run test -w src/sequentialthinking (14 passed)

pm run test -w src/memory (45 passed)

pm run test -w src/filesystem (147 passed; symlink-only cases skipped by test suite on Windows)

  • static dependency check: every workspace package that directly imports zod now declares dependencies.zod

Fixes #4288

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 declared in both dependencies and peerDependencies causes ERR_MODULE_NOT_FOUND with pnpm strict isolation

1 participant