mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix(install): semver mistaking . as the beginning of pre/build tags (#11577)
This commit is contained in:
@@ -1199,7 +1199,8 @@ pub const Version = extern struct {
|
||||
}
|
||||
|
||||
if (i < input.len and switch (input[i]) {
|
||||
'.' => true,
|
||||
// `.` is expected only if there are remaining core version numbers
|
||||
'.' => part_i != 3,
|
||||
else => false,
|
||||
}) {
|
||||
i += 1;
|
||||
|
||||
@@ -6421,6 +6421,10 @@ const prereleaseFailTests = [
|
||||
title: "greater than or equal to highest prerelease + 1",
|
||||
depVersion: ">=5.0.0-alpha.154",
|
||||
},
|
||||
{
|
||||
title: "`.` instead of `-` should fail",
|
||||
depVersion: "5.0.0.alpha.150",
|
||||
},
|
||||
],
|
||||
// prereleases-4 has one version
|
||||
// - 2.0.0-pre.0
|
||||
|
||||
Reference in New Issue
Block a user