Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vscode): biome resolution #492

Merged
merged 3 commits into from
Oct 6, 2023
Merged

fix(vscode): biome resolution #492

merged 3 commits into from
Oct 6, 2023

Conversation

nhedger
Copy link
Member

@nhedger nhedger commented Oct 6, 2023

Summary

This PR attempts to fix recently reported issues regarding the Biome VS Code extension.

Instead of relying on the node_modules/.bin folder and a shell to run the biome CLI, this PR leverages Node's createRequire function to create a module resolver scoped to the @biomejs/biome npm package. This allows us to resolve @biomejs/cli-*-* packages reliably across package managers.

I'm hoping this will fix:

  1. Spawn issues
  2. Resolution when using pnpm

Related issues: biomejs/biome-vscode#19, biomejs/biome-vscode#20

Test Plan

NPM

  • npm on Linux
  • npm on macOS
  • npm on Windows

PNPM

  • pnpm on Linux
  • pnpm on macOS
  • pnpm on Windows

Yarn 3

  • yarn on Linux
  • yarn on macOS
  • yarn on Windows

Bun

  • bun on Linux
  • bun on macOS
  • bun on Windows (not applicable)

@nhedger nhedger temporarily deployed to Website deployment October 6, 2023 09:46 — with GitHub Actions Inactive
@nhedger
Copy link
Member Author

nhedger commented Oct 6, 2023

Note to self: make sure it works with paths that contain spaces.

@nhedger nhedger temporarily deployed to Website deployment October 6, 2023 15:20 — with GitHub Actions Inactive
@nhedger nhedger added the A-Editors Area: editors label Oct 6, 2023
@nhedger nhedger temporarily deployed to Website deployment October 6, 2023 15:52 — with GitHub Actions Inactive
@github-actions github-actions bot removed the A-Editors Area: editors label Oct 6, 2023
@nhedger
Copy link
Member Author

nhedger commented Oct 6, 2023

I'll merge this so we can build a nightly version and ask a few people to check if it solves their issues.

@nhedger nhedger marked this pull request as ready for review October 6, 2023 16:25
@nhedger nhedger merged commit fd28773 into main Oct 6, 2023
7 checks passed
@nhedger nhedger deleted the fix/biome-resolution branch October 6, 2023 16:25
nhedger added a commit to biomejs/biome-vscode that referenced this pull request Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants