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

fix(yarn): use major range for v2 constraint (#9482)

parent 2a05964f
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ exports[`manager/npm/extract/locked-versions .getLockedVersions() uses yarn.lock ...@@ -126,7 +126,7 @@ exports[`manager/npm/extract/locked-versions .getLockedVersions() uses yarn.lock
Array [ Array [
Object { Object {
"constraints": Object { "constraints": Object {
"yarn": ">= 2.0.0", "yarn": "^2.0.0",
}, },
"deps": Array [ "deps": Array [
Object { Object {
...@@ -153,7 +153,7 @@ exports[`manager/npm/extract/locked-versions .getLockedVersions() uses yarn.lock ...@@ -153,7 +153,7 @@ exports[`manager/npm/extract/locked-versions .getLockedVersions() uses yarn.lock
Array [ Array [
Object { Object {
"constraints": Object { "constraints": Object {
"yarn": ">= 2.2.0", "yarn": "^2.2.0",
}, },
"deps": Array [ "deps": Array [
Object { Object {
......
...@@ -24,9 +24,9 @@ export async function getLockedVersions( ...@@ -24,9 +24,9 @@ export async function getLockedVersions(
if (!isYarn1) { if (!isYarn1) {
if (lockfileVersion >= 6) { if (lockfileVersion >= 6) {
// https://github.com/yarnpkg/berry/commit/f753790380cbda5b55d028ea84b199445129f9ba // https://github.com/yarnpkg/berry/commit/f753790380cbda5b55d028ea84b199445129f9ba
packageFile.constraints.yarn = '>= 2.2.0'; packageFile.constraints.yarn = '^2.2.0';
} else { } else {
packageFile.constraints.yarn = '>= 2.0.0'; packageFile.constraints.yarn = '^2.0.0';
} }
} }
for (const dep of packageFile.deps) { for (const dep of packageFile.deps) {
......
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