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

do not suggest using cache: npm on pnpm based projects #17

Open
dominikg opened this issue Jul 19, 2021 · 7 comments
Open

do not suggest using cache: npm on pnpm based projects #17

dominikg opened this issue Jul 19, 2021 · 7 comments

Comments

@dominikg
Copy link

What’s missing?

A filter to prevent PR's like this: sveltejs/vite-plugin-svelte#102

Why?

it won't work

Alternatives you tried

as of now, keep using manual caching, but it looks like setup-node is adding pnpm support actions/setup-node#301

@oscard0m
Copy link
Owner

Same for yarn projects

@dominikg
Copy link
Author

FYI setup-node offers pnpm cache option now. Needs pnpm installed already so a bit more work than npm

@oscard0m
Copy link
Owner

FYI setup-node offers pnpm cache option now.

🥳

Needs pnpm installed already so a bit more work than npm

Well, this would be something on action's author right? This script should be aware on which Package Manager is being used and that's it? Or is it necessary a certain version of pnpm for it? (pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 -> reference)

@dominikg
Copy link
Author

dominikg commented Oct 16, 2021

Well, if you send them a PR to use cache: pnpm in a workflow, it would be your responsibility to include the installation of pnpm prior to using that option.

The pnpm action setup is one way to do it, another is running setup node twice and use npm i -g pnpm
e.g.
https://github.com/sveltejs/vite-plugin-svelte/blob/250b80431bbee5232785a26eb3330e0204f803e8/.github/workflows/ci.yml#L30

@oscard0m
Copy link
Owner

Well, if you send them a PR to use cache: pnpm in a workflow, it would be your responsibility to include the installation of pnpm prior to using that option.

Agree on that, but if this script is detecting the usage of pnpm in a concrete workflow (\pnpm install\), means the owner of this workflow should have installed already pnpm somehow, right (use action/action-which-includes-pnpm, npm install -g pnpm, etc.)?

@dominikg
Copy link
Author

Without the cache option it is safe to install pnpm after setup-node.

@oscard0m
Copy link
Owner

Without the cache option it is safe to install pnpm after setup-node.

🎯 Got you

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

2 participants