Description
Description:
Support using https://github.com/nodejs/corepack to manage non-NPM package managers.
Ideally in between installing node and bootstrapping the package manager cache, this action:
- enables corepack (could be a no-op depending on the node version)
- caches/restores the corepack root
- runs
corepack prepare --active
(after some research, that last one may not necessary but instead makes an implicit step explicit)
This behavior could either be trigged by the presence of the packageManager
field in the root package.json
(might be suprising), cache: 'auto'
as possibly envisioned in #306, or corepack: true
Justification:
Both pnpm and yarn support corepack, and yarn recommendeds corepack for package manager versioning. Currently using corepack with this action will break when using the cache
key as this action assumes the appropriate version manager has already been installed. However, you don't necessarily want to bootstrap with corepack until the appropriate node version has been installed and configured.
Are you willing to submit a PR?
Yes