fix(nodejs): add .js extension to vscode-jsonrpc/node import in session.ts#734
Closed
or2ooo wants to merge 1 commit intogithub:mainfrom
Closed
fix(nodejs): add .js extension to vscode-jsonrpc/node import in session.ts#734or2ooo wants to merge 1 commit intogithub:mainfrom
or2ooo wants to merge 1 commit intogithub:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a Node.js ESM runtime resolution failure in the Node SDK by aligning session.ts with the existing client.ts import pattern for vscode-jsonrpc.
Changes:
- Update
vscode-jsonrpcsubpath imports innodejs/src/session.tsto include the.jsextension for ESM compatibility.
…on.ts session.ts imports vscode-jsonrpc/node without the .js file extension. Since the SDK uses ESM (type: module) and vscode-jsonrpc@8.2.1 has no exports map, Node.js cannot resolve the extensionless subpath. client.ts already uses the correct 'vscode-jsonrpc/node.js' form. This is the same class of fix as github#8. Fixes github#707
790e733 to
5f78d8c
Compare
Contributor
|
Thanks for the contribution. This issue was already fixed by another commit, so I'll close it. |
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
.jsfile extension tovscode-jsonrpc/nodeimports innodejs/src/session.tsclient.ts(from "vscode-jsonrpc/node.js")Problem
SDK 0.1.31 added a new import to
session.ts:Since the SDK declares
"type": "module"(ESM) andvscode-jsonrpc@8.2.1has noexportsmap, Node.js ESM resolution cannot resolve the bare subpath without the.jsextension.Error:
Fix
Fixes #707