Skip to content
Snippets Groups Projects
Unverified Commit 1e1c7512 authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(npm): don't coerce npm constraint if already an exact version (#13202)

parent df1d8b83
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,10 @@ export async function getLockedVersions(
const { lockfileVersion } = lockFileCache[npmLock];
if (lockfileVersion === 1) {
if (packageFile.constraints.npm) {
packageFile.constraints.npm += ' <7';
// Add a <7 constraint if it's not already a fixed version
if (!valid(packageFile.constraints.npm)) {
packageFile.constraints.npm += ' <7';
}
} else {
packageFile.constraints.npm = '<7';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment