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: switch to pnpm #2027

Merged
merged 3 commits into from
May 26, 2023
Merged

chore: switch to pnpm #2027

merged 3 commits into from
May 26, 2023

Conversation

dummdidumm
Copy link
Member

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
Copy link
Member

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...

Copy link
Member Author

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

Copy link
Contributor

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.

Copy link
Member

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. 🤔

Copy link
Member

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.

Copy link
Contributor

@gtm-nayan gtm-nayan May 25, 2023

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.

vuejs/language-tools@ab1fafc

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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

@dummdidumm dummdidumm merged commit bae2bb1 into sveltejs:master May 26, 2023
1 of 2 checks passed
@dummdidumm dummdidumm deleted the pnpm branch May 26, 2023 07:12
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.

None yet

3 participants