In a project that contains this in package.json:
"engines": {
"yarn": ">=1.7.0 <2",
"node": ">=16"
},
and has both .yarnrc and yarn.lock files.
(For reference the project where I tried this is: https://github.com/eclipse-theia/theia)
Using dev I get the following:
env +nodejs.org>=18.3 +yarnpkg.com +classic.yarnpkg.com +git-scm.org
It picks up both +yarnpkg.com and +classic.yarnpkg.com.
I guess mostly by coincidence +yarnpkg.com gets precedence over +classic.yarnpkg.com which means it uses yarn 4.x instead of yarn 1.x.
IMO the correct behavior would be to only detect +classic.yarnpkg.com since package.json specifies yarn version <2.
Somewhat related: Is there a way to turn off an automatically detected package from e.g. pkgx.yaml?
In a project that contains this in
package.json:and has both
.yarnrcandyarn.lockfiles.(For reference the project where I tried this is: https://github.com/eclipse-theia/theia)
Using
devI get the following:It picks up both
+yarnpkg.comand+classic.yarnpkg.com.I guess mostly by coincidence
+yarnpkg.comgets precedence over+classic.yarnpkg.comwhich means it uses yarn 4.x instead of yarn 1.x.IMO the correct behavior would be to only detect
+classic.yarnpkg.comsincepackage.jsonspecifies yarn version<2.Somewhat related: Is there a way to turn off an automatically detected package from e.g.
pkgx.yaml?