Self-service
Describe the bug
We have some internal packages with large numbers in semver components, which fail on install.
To reproduce
This addition to the max_safe_integer test will fail; it should pass:
diff --git a/packages/zpm-semver/src/version.test.rs b/packages/zpm-semver/src/version.test.rs
index 70453d7..04e8157 100644
--- a/packages/zpm-semver/src/version.test.rs
+++ b/packages/zpm-semver/src/version.test.rs
@@ -44,6 +44,7 @@ fn test_version_max_length() {
#[test]
fn test_version_max_safe_integer() {
+ assert!(Version::from_file_string("1.2.9007199254740991").is_ok());
assert!(Version::from_file_string("1.2.9007199254740992").is_err());
}
Local install with an example package from our internal npm:
"$HOME/.yarn/switch/bin/yarn" install --immutable
➤ · Yarn 6.0.0-rc.19
➤ ┌ Installing packages
➤ │ example-package@npm:^0.99999999150214.0: File parsing error (Invalid syntax: Invalid semver version: 12.99999999204721.0 at line 1 column 91
04721.0"}, "vers
........^.......
)
Self-service
Describe the bug
We have some internal packages with large numbers in semver components, which fail on install.
To reproduce
This addition to the max_safe_integer test will fail; it should pass:
Local install with an example package from our internal npm: