Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] diff('2.0.0-alpha.15', '2.0.0') returns prerelease when it should return major #288

Closed
lazd opened this issue Sep 12, 2019 · 1 comment

Comments

@lazd
Copy link

lazd commented Sep 12, 2019

What / Why

A bump from an alpha of a major release to the actual major release is considered a prerelease by diff when it's actually a major release.

When

  • Always

Where

  • npm/semver

How

Current Behavior

  • diff('2.0.0-alpha.15', '2.0.0') returns prerelease

Steps to Reproduce

const semver = require('semver');
semver.diff('2.0.0-alpha.15', '2.0.0'); // == prerelease

Expected Behavior

  • diff('2.0.0-alpha.15', '2.0.0') returns major
  • That is, the output of diff('2.0.0-alpha.15', '2.0.0') should be consistent with inc('2.0.0-alpha.15', 'major').
  • When we increment 2.0.0-alpha.15 by major, we get 2.0.0, and when we diff 2.0.0-alpha.15 against 2.0.0, we should also get major.

Who

  • n/a

References

@lukekarrys
Copy link
Contributor

Closing as a duplicate of #333 which we'll use to track this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants