Skip to content

Plugin probe location is higher priority than peer node_modules#51079

Merged
sheetalkamat merged 1 commit into
mainfrom
pluginProbeLocations
Oct 6, 2022
Merged

Plugin probe location is higher priority than peer node_modules#51079
sheetalkamat merged 1 commit into
mainfrom
pluginProbeLocations

Conversation

@sheetalkamat

Copy link
Copy Markdown
Member

Fixes #34616
#34656 fixed this only for global plugins. This fixes for plugins in the config file.

Comment thread src/server/project.ts
// Search any globally-specified probe paths, then our peer node_modules
return [
...this.projectService.pluginProbeLocations,
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aren't you walking up three directories here? But from "X/node_modules/typescript/lib/" to "X/node_modules" is only two directories up.

@sheetalkamat sheetalkamat Oct 6, 2022

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

combinePath makes it X/node_modules/typescript/lib/tsserver.js/../../../ and comes out with X/node_modules/
Note this didnt change as part of this PR.

@sheetalkamat sheetalkamat merged commit 5f3e6cc into main Oct 6, 2022
@sheetalkamat sheetalkamat deleted the pluginProbeLocations branch October 6, 2022 20:45
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Backlog Bug PRs that fix a backlog bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsserver should prioritize pluginProbeLocations over peer node_modules

4 participants