We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using semver.lt() returns the incorrect value when comparing pre-release version with includePrerelease set to false (or the default).
semver.lt()
includePrerelease
By comparison, explicitly coercing you get:
semver_1.lt(semver_1.coerce('0.2.0-1'), minVersion) false
My assumption is that strings are implicitly coerced when calling comparison functions, perhaps this is incorrect?
semver.lt('0.2.0-1', '0.2.0', { includePrerelease: false }) should return false.
semver.lt('0.2.0-1', '0.2.0', { includePrerelease: false })
true
The text was updated successfully, but these errors were encountered:
This is similar to #345, and I think the fix might even be the same for both.
Sorry, something went wrong.
semver@8
No branches or pull requests
Is there an existing issue for this?
Current Behavior
Using
semver.lt()
returns the incorrect value when comparing pre-release version withincludePrerelease
set to false (or the default).By comparison, explicitly coercing you get:
My assumption is that strings are implicitly coerced when calling comparison functions, perhaps this is incorrect?
Expected Behavior
semver.lt('0.2.0-1', '0.2.0', { includePrerelease: false })
should return false.Steps To Reproduce
true
is returnedEnvironment
The text was updated successfully, but these errors were encountered: