fix(mcpb): preserve yaml/dist/doc and install required peer deps#202
Merged
fix(mcpb): preserve yaml/dist/doc and install required peer deps#202
Conversation
MCPB bundles crashed on startup due to missing dependencies: 1. yaml/dist/doc/ was deleted by cleanup (contains actual code, not documentation - directives.js is required by composer.js) 2. zod was not installed because --omit=peer skipped it, but @modelcontextprotocol/sdk requires zod as peer dependency Changes: - Exclude yaml package from doc directory cleanup - Replace --omit=peer with --omit=dev to install peer deps - Manually remove optional large packages (prisma CLI, typescript) Fixes #201
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR fixes critical runtime issues in MCPB bundles that were caused by overly aggressive cleanup in the build script. The bundle previously crashed on startup due to two missing dependencies.
Changes:
- Changed npm install flags from
--omit=peerto--omit=devto ensure peer dependencies likezodare installed - Added manual removal of large optional peer dependencies (prisma CLI, typescript) after installation to reduce bundle size
- Modified directory cleanup logic to preserve the
yaml/dist/doc/directory which contains actual code, not documentation
|
🎉 This PR is included in version 6.43.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
yaml/dist/docdirectoryzodpeer dependency required by@modelcontextprotocol/sdkRoot Cause
The
build-mcpb.shscript had two issues:Deleted
yaml/dist/doc/- The cleanup removed alldocdirectories, butyamlpackage has actual code indist/doc/directives.js(not documentation)Skipped peer dependencies - The
--omit=peerflag preventedzodinstallation, which is required by MCP SDKChanges
yamlpackage fromdocdirectory cleanup--omit=peerwith--omit=devto install peer depsTest plan
yaml/dist/docdirectory preservedzodinstalled in bundleFixes #201