diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-09-02 11:21:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 11:21:40 -0400 |
commit | 03e6727a0461bf83865f6f0412f4fb8990cf27e6 (patch) | |
tree | f4fc8193c83b0a4f4864f0861029321f974b255e /cli/npm/semver/mod.rs | |
parent | 387300aed0133e369af090d3795a1fce89603737 (diff) |
fix(npm): correct exact matching of pre-release versions (#15745)
Diffstat (limited to 'cli/npm/semver/mod.rs')
-rw-r--r-- | cli/npm/semver/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/npm/semver/mod.rs b/cli/npm/semver/mod.rs index 2b5cc5a03..10a87a13f 100644 --- a/cli/npm/semver/mod.rs +++ b/cli/npm/semver/mod.rs @@ -313,9 +313,7 @@ fn simple(input: &str) -> ParseResult<VersionRange> { } } }), - map(partial, |partial| { - partial.as_greater_range(VersionBoundKind::Inclusive) - }), + map(partial, |partial| partial.as_equal_range()), )(input) } @@ -842,6 +840,8 @@ mod tests { ("1.0.0 - x", "1.9.7"), ("1.x - x", "1.9.7"), ("<=7.x", "7.9.9"), + // additional tests + ("1.0.0-alpha.13", "1.0.0-alpha.13"), ]; for (req_text, version_text) in fixtures { let req = NpmVersionReq::parse(req_text).unwrap(); |