For the OSS Review Toolkit project, I would like to identify which version of yarn is used by a given project in a given repository.
Which criteria should be used ? There is:
package.json/packageManagerwhich requires Corepack and may not be used by all projects.- look at the version
.yarn/releases/* - check the
.yarnrcfile: if this isyarnrc.ymlthen this is Yarn 2+. - the version in
yarn.lockseems to not be related to the Yarn version used for the project (but please correct me if I am wrong).
Is there any other criteria that could be used to disambiguiate if this is a Yarn 1, 2 or 3 project ?