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

chore(vscode): switch from npm to pnpm #219

Merged
merged 2 commits into from
Sep 11, 2023
Merged

chore(vscode): switch from npm to pnpm #219

merged 2 commits into from
Sep 11, 2023

Conversation

nhedger
Copy link
Member

@nhedger nhedger commented Sep 10, 2023

Summary

This PR:

  • Replaces npm with pnpm for managing the dependencies of the VS Code extension.
  • Adds the editors/vscode folder as a pnpm workspace

Additionally, this PR updates the package script so that vsce does not attempt to include node_modules in the VSIX file. This is required because at the moment vsce is not able to resolve dependencies downloaded by pnpm. This should not have any effect because we're already bundling the extension with all of its dependencies (--bundle is compile script).

Test Plan

  • Run pnpm build
  • Run pnpm package
  • Run pnpm pack:dev
  • Actually run extension and test formatting works

@ematipico
Copy link
Member

ematipico commented Sep 10, 2023

Does vsce support pnpm now? The main reason we stayed at npm was because pnpm wasn't supported

microsoft/vscode-vsce#421

@nhedger
Copy link
Member Author

nhedger commented Sep 10, 2023

Since we bundle the extension, it does not matter.

The reason vsce does not work with pnpm is that it cannot correctly resolve node_modules and include them in the VSIX file, which is not necessary in our case because the dependencies are bundled in the output file.

@nhedger nhedger marked this pull request as ready for review September 10, 2023 10:46
@ematipico ematipico merged commit 979dca4 into biomejs:main Sep 11, 2023
4 checks passed
@nhedger nhedger deleted the chore/vscode-pnpm branch September 11, 2023 08:00
@ematipico
Copy link
Member

@nhedger we need to update the workflows with pnpm

The release workflow is failing

https://github.com/biomejs/biome/actions/runs/6153342088/job/16697066155#step:13:1

@nhedger
Copy link
Member Author

nhedger commented Sep 12, 2023

I can take a stab at it later today.

@nhedger
Copy link
Member Author

nhedger commented Sep 12, 2023

@nhedger we need to update the workflows with pnpm

The release workflow is failing

biomejs/biome/actions/runs/6153342088/job/16697066155#step:13:1

#249

@lppedd
Copy link

lppedd commented Nov 14, 2023

The reason vsce does not work with pnpm is that it cannot correctly resolve node_modules and include them in the VSIX file, which is not necessary in our case because the dependencies are bundled in the output file.

@nhedger not sure if this was explained in the vsce repository discussion, but thanks!
This made it more clear on why and when we can bypass the issue.

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.

3 participants