Skip to content

Fix global plugin search paths, fixes #62618 - #62619

Closed
Ben Delarre (benjamind) wants to merge 1 commit into
microsoft:mainfrom
benjamind:patch-1
Closed

Fix global plugin search paths, fixes #62618#62619
Ben Delarre (benjamind) wants to merge 1 commit into
microsoft:mainfrom
benjamind:patch-1

Conversation

@benjamind

Copy link
Copy Markdown

The global plugin search path was resolving to "X/node_modules/node_modules" due to incorrect number of updirs in the initial path.

Fixes #

The global plugin search path was resolving to "X/node_modules/node_modules" due to incorrect number of updirs in the initial path.
Copilot AI review requested due to automatic review settings October 16, 2025 21:08
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 16, 2025
@typescript-bot TypeScript Bot (typescript-bot) added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 16, 2025
@typescript-bot

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

1 similar comment
@typescript-bot

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

Copilot AI left a comment

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.

Pull Request Overview

This PR fixes an incorrect global plugin search path that was resolving to "X/node_modules/node_modules" instead of the intended location. The fix corrects the number of parent directory traversals when computing the plugin search path from the TypeScript server executable location.

Key Changes:

  • Updated the path traversal from "../../../" to "../../../../" to correctly walk from the tsserver.js location to the appropriate directory
  • Enhanced code comments to clarify the intended path resolution behavior

Comment thread src/server/project.ts
...this.projectService.pluginProbeLocations,
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/node_modules/
combinePaths(this.projectService.getExecutingFilePath(), "../../.."),
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/

Copilot AI Oct 16, 2025

Copy link

Choose a reason for hiding this comment

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

The comment mentions '../../..' (3 updirs) but the code now uses '../../../..' (4 updirs). The comment should be updated to match the actual number of updirs used in the code below.

Suggested change
// ../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/
// ../../../.. to walk from X/node_modules/typescript/lib/tsserver.js to X/

Copilot uses AI. Check for mistakes.
@github-project-automation github-project-automation Bot moved this from Not started to Done in PR Backlog Mar 24, 2026
@typescript-bot

Copy link
Copy Markdown
Contributor

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants