Skip to content

Conversation

@benjamind
Copy link

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 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 added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 16, 2025
@typescript-bot
Copy link
Collaborator

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
Collaborator

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

Copy link

Copilot AI left a comment

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

...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/
Copy link

Copilot AI Oct 16, 2025

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.

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: Not started

Development

Successfully merging this pull request may close these issues.

2 participants