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

[Question] How does this compare to npm i -g pnpm? #30

Open
privatenumber opened this issue Feb 8, 2022 · 2 comments
Open

[Question] How does this compare to npm i -g pnpm? #30

privatenumber opened this issue Feb 8, 2022 · 2 comments

Comments

@privatenumber
Copy link
Sponsor

Out of curiosity, are there any non-syntax/usability benefits to using this action over doing an install with npm?:

npm i -g pnpm@5
pnpm i --frozen-lockfile # Or `npx pnpm ...`

Or npx?:

npx pnpm@5 i --frozen-lockfile

In the case with npx, I'm thinking the benefit is simply that pnpm can be used multiple times without re-installing.

@zkochan
Copy link
Member

zkochan commented Feb 8, 2022

There is currently no difference but I think we will update this action to install the pnpm binaries instead. So it will be different #18

Also, from pnpm v7, pnpm will not install global packages to the same directory to which npm installs them (pnpm/pnpm#4280). So if you will do just npm i -g pnpm@7, then pnpm i -g eslint will not work.

@kidonng
Copy link

kidonng commented Sep 14, 2022

Using this action adds ~3s to "Set up job" and itself needs ~2s to run, while npm i -g pnpm finishes in <1s. So, you may want to choose the latter if you want to save some seconds1.

I doubt there's any need to do pnpm i -g in the CI.

Footnotes

  1. this measurement may not be accurate

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

No branches or pull requests

3 participants