fix(vscode): resolve binary paths with node resolver#17970
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
eaca237 to
d52e318
Compare
82b44d7 to
8d48bd7
Compare
1f20f99 to
446f709
Compare
There was a problem hiding this comment.
Pull request overview
This pull request refactors binary path resolution in the VS Code extension to use Node.js's require.resolve instead of filesystem globbing. The change aims to simplify and potentially improve the reliability of locating oxlint and oxfmt binaries in node_modules.
Changes:
- Replaced workspace file globbing with
require.resolvefor binary discovery - Updated
runExecutablefunction to accept anodeBinNameparameter for better path pattern detection - Simplified test helpers and removed file system operations from tests
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| editors/vscode/client/ConfigService.ts | Replaced file globbing with require.resolve and removed cancellation token logic |
| editors/vscode/client/tools/lsp_helper.ts | Added nodeBinName parameter and path pattern detection for Node.js binaries |
| editors/vscode/client/tools/linter.ts | Updated runExecutable call to pass "oxlint" as tool name |
| editors/vscode/client/tools/formatter.ts | Updated runExecutable call to pass "oxfmt" as tool name |
| editors/vscode/tests/unit/lsp_helper.spec.ts | Updated all test calls to include the new tool parameter |
| editors/vscode/tests/unit/ConfigService.spec.ts | Simplified test helpers and removed file system setup/teardown operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
446f709 to
dacfcb8
Compare
ba57f47 to
cd64640
Compare
|
Confirming as an affected user in #17936, this fixes the problem for me (mac/pnpm). |
|
@connorshea / @Boshen: I think @camc314 is not available before the next release. Could you look into this stack :)? The most code was inspired by biome: |
Merge activity
|
Refactored the search to use `path.resolve` instead of glob search with VSCode. The VSCode snippet did some excludes in the background with `search.excludes` and/or other settings. Now it should work without these restriction and hopefully closes #17936 closes #17881 closes #17744 It will not search for globally installed oxlint/oxfmt. Created an extra issue for this: #18005
cd64640 to
a7e2eb2
Compare
|
Speak of the devil and he shall appear :) |

Refactored the search to use
path.resolveinstead of glob search with VSCode.The VSCode snippet did some excludes in the background with
search.excludesand/or other settings.Now it should work without these restriction and hopefully
closes #17936
closes #17881
closes #17744
It will not search for globally installed oxlint/oxfmt. Created an extra issue for this: #18005