languageserver: add .js extensions to imports (ESM prep) #259
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
Adds
.jsextensions to all relative imports in the languageserver package as preparation for ESM migration.This is a partial migration for package
languageserverwhich is blocked from completing the migration becausevscode-languageserver@8.0.2lacks ESM exports.Follow-up from PR:
Related Issues:
moduleResolutionfromnodetonode16ornodenextin tsconfig #154@actions/workflow-parser#146Changes
languageserver/src/to use.jsextensions in importsskipLibCheck: truetolanguageserver/tsconfig.build.json(required for@types/nodecompatibility)docs/esm-migration-plan.mdwith current status and documentationpackage-lock.jsonWhy partial?
Full migration requires
moduleResolution: "node16", which fails becausevscode-languageserverdoesn't have anexportsfield for subpath imports likevscode-languageserver/node. Once stable v10+ releases with ESM support, we can complete the migration.