[Bug?]: `yarn version <version>` doesn't work when the version jump isn't major/minor/patch/prerelease/decline
See original GitHub issueSelf-service
- I’d be willing to implement a fix
Describe the bug
See title and the reproduction below.
Originally reported by @vefydwy in #3278.
To reproduce
await packageJsonAndInstall({
version: `0.0.0`,
});
await expect(yarn(`version`, `2.0.0`))
.resolves.toBeTruthy();
Environment
System:
OS: Linux 5.13 Arch Linux
CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
Binaries:
Node: 16.0.0 - /tmp/xfs-049440fa/node
Yarn: 3.0.1.dev - /tmp/xfs-049440fa/yarn
npm: 7.10.0 - ~/.nvm/versions/node/v16.0.0/bin/npm
Additional context
Broken by https://github.com/yarnpkg/berry/pull/3158.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:11 (3 by maintainers)
Top Results From Across the Web
`yarn version` doesn't accept `premajor`, `preminor`, `prepatch ...
Self-service I'd be willing to implement a fix Describe the bug According to the inline help: $ yarn version --help .
Read more >`yarn set version` | Yarn - Package Manager
This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will...
Read more >Why Running `yarn upgrade` Does Not Update My `package ...
I faced a bug because of the old dependencies. Tried yarn upgrade , never get it to work. I finally upgraded all my...
Read more >How do I change the version of yarn used? - Stack Overflow
I ran brew upgrade yarn to get the latest version, which is 0.24.6 . After Homebrew successfully upgrades yarn , I run yarn...
Read more >How To Install and Use the Yarn Package Manager for Node.js
If you see a version number, such as v12.16.3 printed, you have Node.js installed. If you get a command not found error (or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

set version latestdownloads the latest stable >2 if the current release you use is already >2, otherwise the latest 1.x (in other words it doesn’t silently upgrade past 1.x, for backward compatibility)set version berryalways downloads the latest stable version >2 (including by upgrading to higher majors)set version canary(new in 3.0) always downloads the latest release candidate.The difference between stable and rc is very small - it’s almost more a marketing difference than functional one, as all the tests need to pass whether it’s one or the other. At Datadog we even use builds built straight from sources, for example.
It’s available in the latest canary builds