-
-
Notifications
You must be signed in to change notification settings - Fork 209
chore: switch to pnpm #2027
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: switch to pnpm #2027
Conversation
Svelte repos use it, we should, too
|
||
# To deploy we need isolated node_modules folders which yarn won't do because it is a workspace | ||
# To deploy we need isolated node_modules folders which pnpm won't do because it is a workspace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what exactly is this about? sounds like pnpm deploy
could help you. running npm install
(see below) would get very different versions of the dependencies...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's intended. We want to get the latest minors of everything we specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried it last time, pnpm deploy still left symlinks in the node_modules folder which the VSIX format can't handle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we can't use symlinks, then we should use node-linker=hoisted
instead. or stick with npm . the way it's done now basically means that whatever we tested is not what gets released. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried to use pnpm --config.node-linker=hoisted --filter svelte-vscode deploy --prod output-dir
and also tried symlink=false and package import copy, didn't work as intendent. the only other option i can think of with pnpm deploy would be to resolve the symlinks on the fs level after it is done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node-linker=hoisted
didn't work either for me. IIRC it was because it's in a workspace, the npmrc doesn't apply if it's not at the workspace root, but putting it in the workspace root had some weird changes that I don't fully remember.
FWIW I looked at how Vue does it and they just bundle it with esbuild instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...ooooor we just use npm, as done here, because it works as I want it to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've changed some of the specifiers to use the workspace:
protocol, does npm install
resolve them correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the yaml script I modify the package.json to change it back to *
so npm knows what to do
Svelte repos use it, we should, too