Skip to content

[Bug?]: yarn version <version> doesn't work when the version jump isn't major/minor/patch/prerelease/decline #3322

@paul-soporan

Description

@paul-soporan

Self-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 #3158.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreproducibleThis issue can be successfully reproduced

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions