Open dominykas opened 2 years ago
Some thoughts on how this could be implemented...
npm@>=3 <7
)
latest
or it would break things on older Nodeslatest
for modern nodes, and an older version once the old version mapping is added) - i.e. unless specified otherwise, this would npm i -g npm@[latest supported]
(or the corepack
equivalent for Node.js 15+?)
corepack
or npm
be configurable? How does that affect caching?[manager]@latest
as "latest supported", as opposed to "version published at latest
dist-tag"runs-on
, i.e. support a YAML array inside a string as well as a comma separated string, so the following are equivalent:
package-manager: npm, yarn, pnpm
package-manager: "[ 'npm', 'yarn', 'pnpm' ]"
npm@default
version which would simply not install anythingexcludes
package-manager: yarn
is configured), then the matrix should use null
for the package-manager
(and fall back to correct value for the actual installation), so that the status check names are not cluttered.You can look at https://github.com/nvm-sh/nvm/blob/39d9a42c359df5dbf37c5000af8192f14a280b94/nvm.sh#L170-L330 for a mapping of actual npm/node versions that work; afaik that knowledge doesn't exist anywhere else.
I don't think we should be using corepack at all; it's experimental and has received some pushback around the way it works.
It should be possible to specify a package manager, package manager version or even a matrix of package managers.