From 03e6727a0461bf83865f6f0412f4fb8990cf27e6 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 2 Sep 2022 11:21:40 -0400 Subject: fix(npm): correct exact matching of pre-release versions (#15745) --- cli/npm/semver/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/npm/semver/mod.rs') 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 { } } }), - 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(); -- cgit v1.2.3