corepack
corepack copied to clipboard
`corepack prepare` with a range of versions is unexpected
corepack prepare command with a range of versions behaves differently than expected.
Case 1
When:
[email protected]is the latest published version- no local cache (In OSX,
$HOME/.cache/node/corepack/yarnis empty)
Actually:
$ corepack prepare yarn@~3.2.0
Usage Error: Failed to successfully resolve '~3.2.0' to a valid yarn release
My expectation:
corepack installs [email protected] in the local cache.
Case 2
When:
[email protected]is the latest published version- Only
[email protected]is in the local cache
Actually:
$ corepack prepare yarn@~3.2.0
Preparing yarn@~3.2.0...
but no additional versions are installed.
There is nothing but [email protected] in the local cache.
My expectation:
corepack installs [email protected] in the local cache.