nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.56k stars 169 forks source link

test: check that a semver version is required #312

Closed merceyz closed 1 year ago

merceyz commented 1 year ago

Adds a test to ensure that not specifying a semver version in package.json#packageManager isn't allowed. Ref https://github.com/nodejs/corepack/pull/300#pullrequestreview-1608951980.

rotu commented 1 year ago

How does this work with package managers that use non-semver versioning or for package specifiers like npm@github:npm/cli#c12ea07 or yarn@https://registry.npmjs.org/yarn/-/yarn-2.4.3.tgz?

merceyz commented 1 year ago

It doesn't, neither of those are supported. Note that this PR doesn't change the behaviour of Corepack, it merely tests existing behaviour.