Skip to content

Conversation

@fahreddinozcan
Copy link
Contributor

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:

  • Converted the repository into a monorepo using pnpm workspaces, with a new root package.json describing the monorepo and specifying packages/* as workspaces. The root package is now private and focused on documentation tools and SDKs.
  • Created a dedicated @upstash/context7-mcp package in packages/mcp with its own package.json, dependencies, scripts, and metadata, isolating the MCP server implementation from the root.

@linear
Copy link

linear bot commented Nov 22, 2025

CTX7-854 Context7 TS SDK

@fahreddinozcan fahreddinozcan marked this pull request as draft November 22, 2025 16:14
@fahreddinozcan fahreddinozcan changed the title CTX7-854: Typescript SDK CTX7-854: Migrate to pnpm monorepo Nov 22, 2025
@fahreddinozcan fahreddinozcan marked this pull request as ready for review November 24, 2025 08:18
Copy link

@CahidArda CahidArda left a 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

@CahidArda
Copy link

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

@CahidArda CahidArda requested a review from Copilot November 26, 2025 14:40
Copilot finished reviewing on behalf of CahidArda November 26, 2025 14:41
Copy link

Copilot AI left a 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/mcp with 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 SearchResponse after 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.

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.

4 participants