-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(npm): use more relaxed package.json version constraint parsing #24202
fix(npm): use more relaxed package.json version constraint parsing #24202
Conversation
@@ -75,13 +75,13 @@ pub fn get_local_package_json_version_reqs( | |||
}); | |||
} | |||
let (name, version_req) = parse_dep_entry_name_and_raw_version(key, value); | |||
let result = VersionReq::parse_from_specifier(version_req); | |||
let result = VersionReq::parse_from_npm(version_req); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is here. I think this was just a mistake initially.
@@ -2,7 +2,7 @@ | |||
"name": "npmrc_test", | |||
"version": "0.0.1", | |||
"dependencies": { | |||
"@denotest/basic": "1.0.0", | |||
"@denotest/basic": "^=1.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I piggy-backed on a random test. It causes the more relaxed parsing to be hit.
@@ -227,6 +227,26 @@ mod test { | |||
); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it looks like this was previously purposefully done, but we should try to be as npm compatible as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Includes: