Skip to content

fix: client import & server imports #851

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jatinsandilya
Copy link

@jatinsandilya jatinsandilya commented Aug 7, 2025

Closes issue #511

Motivation and Context

Client imports were broken

How Has This Been Tested?

This is a trivial Metro bundler. Metro seems to have partial support for the exports keyword. Adding a couple of explicit ./client / ./client/index.js entries is the easiest cross-tool fix.

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

@jatinsandilya jatinsandilya requested a review from a team as a code owner August 7, 2025 02:42
@jatinsandilya jatinsandilya requested a review from ihrpr August 7, 2025 02:42
Copy link
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@jatinsandilya
Copy link
Author

@cliffhall could you approve it as well? Seems like merging is blocked

@KKonstantinov
Copy link
Contributor

Since client/index is about to be having its own export, probably good to do it with the server?

Also, index.ts is not a barrel file in this SDK, so you'll get a limited amount of types/classes exported by it.

Have suggested going for a single point of exports in #716, an introduction of a barrel index file can be done without it being a breaking change for both clients and servers.

@cliffhall
Copy link
Member

@cliffhall could you approve it as well? Seems like merging is blocked

Also, in the title for this PR, what does RN refer to? This is a change to package.json

@cliffhall
Copy link
Member

Since client/index is about to be having its own export, probably good to do it with the server?

This makes sense. @jatinsandilya would you care to add that?

Also, index.ts is not a barrel file in this SDK, so you'll get a limited amount of types/classes exported by it.

Have suggested going for a single point of exports in #716, an introduction of a barrel index file can be done without it being a breaking change for both clients and servers.

@KKonstantinov agreed, but until we get a single point of exports (a good Idea I heartily support), this PR fixes a current problem in the field, and I think we should move ahead with it when we have the servers/index change added. Do you foresee any problems with refactoring toward index.ts being single barrel file subsequently?

@jatinsandilya jatinsandilya changed the title fix: client import in RN fix: client import was broken Aug 11, 2025
@jatinsandilya
Copy link
Author

jatinsandilya commented Aug 11, 2025

Since client/index is about to be having its own export, probably good to do it with the server?

This makes sense. @jatinsandilya would you care to add that?

Also, index.ts is not a barrel file in this SDK, so you'll get a limited amount of types/classes exported by it.
Have suggested going for a single point of exports in #716, an introduction of a barrel index file can be done without it being a breaking change for both clients and servers.

@KKonstantinov agreed, but until we get a single point of exports (a good Idea I heartily support), this PR fixes a current problem in the field, and I think we should move ahead with it when we have the servers/index change added. Do you foresee any problems with refactoring toward index.ts being single barrel file subsequently?

Ah it was React Native, since the original issue was about RN.

  1. I've updated the PR title now for clarity
  2. Added server exports

@jatinsandilya jatinsandilya changed the title fix: client import was broken fix: client import & server imports Aug 11, 2025
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.

3 participants