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

Missing patch number in one of the Semver breaks the comparison logic #70

Open
tejasjadhav opened this issue Mar 6, 2023 · 1 comment

Comments

@tejasjadhav
Copy link

tejasjadhav commented Mar 6, 2023

I'm trying to test a scenario where I'm comparing two versions: A (Semver("1.0.0", Semver.LOOSE)) and B (Semver("1.0", Semver.LOOSE)). Comparing these two versions yields extremely inconsistent results

  • Scenario: A.isEqualTo(B), Result: false
  • Scenario: A.isGreaterThan(B), Result: false
  • Scenario: A.isLowerThan(B), Result: true

After flipping the operands, the result remains weirdly the same,

  • Scenario: B.isEqualTo(A), Result: false
  • Scenario: B.isGreaterThan(A), Result: false (expected to be true)
  • Scenario: B.isLowerThan(A), Result: true (expected to be false)

Library version: 3.1.0

@tejasjadhav tejasjadhav changed the title Missing patch number in one Semver breaks the comparison logic Missing patch number in one of the Semver breaks the comparison logic Mar 6, 2023
@piotrooo
Copy link

Maybe you will be interested in an active copy of this great library.

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