You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By design the maximum value for any semver component is Number.MAX_SAFE_INTEGER. So 9007199254740991.9007199254740991.9007199254740991 is a valid version. But in order to create the range ~9007199254740991.9007199254740991.900719925474099 it has to increment the minor component which results in an invalid version being created in order to create the range:
> new semver.Range('~9007199254740991.9007199254740991.900719925474099')
Uncaught TypeError: Invalid minor version
semver.satisfies catches any error and returns false which might seem weird in this case since the range isn't obviously invalid, but that's what it does for all cases:
> semver.satisfies("1.0.0", "hello")
false
I created #450 to add an explicit test for this behavior, but I don't see any way around fixing this.
What / Why
returns false whereas I'd expect it to return true. Note that 9007199254740991 is max safe int, and replacing all those with
1
makes it returntrue
.When
Where
How
Current Behavior
semver.satisfies("9007199254740991.9007199254740991.9007199254740991--", "~9007199254740991.9007199254740991.9007199254740991-1")
false
is returnedSteps to Reproduce
semver.satisfies("9007199254740991.9007199254740991.9007199254740991--", "~9007199254740991.9007199254740991.9007199254740991-1")
Expected Behavior
true
is returnedWho
References
The text was updated successfully, but these errors were encountered: