Skip to content

chore: refactor vitest usage, ts config, shuffle dependencies#1540

Open
josefaidt wants to merge 1 commit intomodelcontextprotocol:mainfrom
josefaidt:update-vitest-config-sharing
Open

chore: refactor vitest usage, ts config, shuffle dependencies#1540
josefaidt wants to merge 1 commit intomodelcontextprotocol:mainfrom
josefaidt:update-vitest-config-sharing

Conversation

@josefaidt
Copy link

Motivation and Context

ref #1537, item 2 and 12

The vitest setup can benefit from exporting the TypeScript-based config directly, and consumed with type-safety in consuming packages. This PR:

  1. renames all occurrences of vitest.config.js to vitest.config.ts
  2. removes unused main export pointing to vitest.config.mjs in shared package
  3. removes vitest/globals from shared tsconfig -- overriding TypeScript's default type resolution behavior
  4. creates env.d.ts in each consuming package (this can also be made more specific to just the tests by creating a separate tsconfig for test files, that way vitest/globals aren't polluting the global namespace of source files -- happy to make this adjustment)
  5. removes vitest from the root package.json as it is unneeded

How Has This Been Tested?

re-ran pnpm test:all to ensure tests are still running and completing successfully

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@josefaidt josefaidt requested a review from a team as a code owner February 15, 2026 18:55
@changeset-bot
Copy link

changeset-bot bot commented Feb 15, 2026

⚠️ No Changeset found

Latest commit: 0dcbb06

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 15, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1540

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1540

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1540

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1540

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1540

commit: 0dcbb06

@josefaidt
Copy link
Author

ah this is failing because the module resolution is set to NodeNext instead of bundler, but I'll cover that in a separate PR with an adjustment to the tsconfig usage and sharing

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