-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CTX7-854: Migrate to pnpm monorepo #1058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…TX7-854 # Conflicts: # packages/mcp/eslint.config.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, I am just curious about how we will update the workflows once we have other packages
Also, did you try the release workflow? I didn't try in detail, just built the package and ran npm pack --dry-run to see what's included in the tarball. It included dist and package.json. License and README were missing.
We have license and README in the current release
|
We could copy the README at directory in the build script instead of duplicating the README maybe, to avoid having to maintain two files at the same time 8e8f2f5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request migrates the Context7 repository from a single-package structure to a pnpm monorepo with workspace support. The MCP server implementation is moved to packages/mcp while the root becomes a private monorepo coordinator focused on documentation tools and SDKs.
Key changes:
- Converted to pnpm workspaces with
packages/*pattern - Isolated MCP server package at
packages/mcpwith dedicated configuration - Implemented changesets for version management and automated releases
- Updated CI/CD workflows to support monorepo builds and releases
Reviewed changes
Copilot reviewed 21 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
package.json |
Root package converted to private monorepo coordinator with workspace scripts |
pnpm-workspace.yaml |
Workspace configuration defining packages/* pattern |
packages/mcp/package.json |
Dedicated MCP package with isolated dependencies and scripts |
packages/mcp/tsconfig.json |
Package-level TypeScript config extending root configuration |
tsconfig.json |
Simplified root TypeScript config for shared compiler options |
.github/workflows/* |
Updated CI/CD workflows for pnpm and changeset-based releases |
.changeset/* |
Changeset configuration for version management |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
packages/mcp/src/lib/api.ts:114
- Adding an explicit type assertion
as SearchResponseafter parsing JSON is good, but the response isn't validated against the SearchResponse interface. Consider adding runtime validation using Zod (which is already a dependency) to ensure the API response matches the expected type structure before casting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request restructures the repository into a monorepo with support for multiple packages, introduces configuration and tooling for consistent development workflows, and sets up the foundation for both MCP server and SDK packages. The changes include monorepo setup, package isolation, and standardized linting and formatting.
Monorepo and Package Structure:
pnpmworkspaces, with a new rootpackage.jsondescribing the monorepo and specifyingpackages/*as workspaces. The root package is now private and focused on documentation tools and SDKs.@upstash/context7-mcppackage inpackages/mcpwith its ownpackage.json, dependencies, scripts, and metadata, isolating the MCP server implementation from the root.