[Feature] Add hash for packageManager
to set version
CLI command
#6657
Labels
enhancement
New feature or request
packageManager
to set version
CLI command
#6657
Describe the user story
As a package creator or maintainer, I want to add or update the version of Yarn stored in the packageManager key of the package.json manifest for use when Corepack is enabled.
I want to have consistent results whether I use the
to set the Yarn package manager version.
Describe the solution you'd like
When the Yarn CLI command set version is executed, and it places a packageManager key into the package.json manifest, the key should include a hash. The effect should be the same as executing corepack use.
Describe the drawbacks of your solution
There should not be any drawbacks, because Corepack already uses and generates a packageManager key with a hash, and Yarn is already using this.
Describe alternatives you've considered
This is an update to an existing Yarn CLI command, so it could not easily be put into a plugin.
Other
package.json
examples:Example yarn (4.6.0)
Execute
yarn set version 4.6.0
Example corepack (0.30.0)
Execute
corepack use [email protected]
The text was updated successfully, but these errors were encountered: