You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The two examples for Yarn Modern v4 are currently set up so that the Yarn package manager executables are committed to the repo in each corresponding examples directory under .yarn/releases with the Yarn config parameter yarnPath pointing to the file, for example yarnPath: .yarn/releases/yarn-4.6.0.cjs.
The current Yarn Modern Installation instructions recommend managing Yarn through Corepack. This is not currently the case for the Yarn Modern examples:
Updates to Yarn Modern versions are being done together with Cypress version updates through scripts/update-cypress-latest-yarn.sh and yarn set version latest commands.
Background
Yarn Modern versions, before the v4 release, initialized Yarn Modern projects with the Yarn package manager executables being committed into the repo.
In the meantime, Corepack has been introduced. It automatically installs a selected Yarn package manager version defined in a packageManager field in package.json. (See explanation in Release: Yarn 4.0 blog from Oct 2023.)
Corepack is currently shipped with all supported Node.js releases (18, 20, 22, 23) and installing Node.js automatically installs corepack and npm as global packages (list with the command: npm ls -g).
Corepack is the method recommended by Yarn Modern for managing its installations.
At this time it is unclear whether or not:
Corepack will move to Node.js Stability 2 - Stable
Corepack will continue to be shipped with Node.js
or if alternatives will be offered for installing Yarn Modern, such as publishing Yarn Modern as a package to the npm registry.
Despite any uncertainty about the future status of Corepack, it is the method recommended by Yarn Modern for managing its installations.
Not migrating to Corepack means continuing to require Yarn Modern large binary files be committed to the repo. Git is not particularly suited to manage binaries as git differences. It works best with configuration parameters and source files.
Recommendation
Convert the Yarn Modern examples to follow the Yarn Modern Installation instruction recommendations to use Corepack:
Situation
The two examples for Yarn Modern v4 are currently set up so that the Yarn package manager executables are committed to the repo in each corresponding examples directory under
.yarn/releases
with the Yarn config parameter yarnPath pointing to the file, for exampleyarnPath: .yarn/releases/yarn-4.6.0.cjs
.The current Yarn Modern Installation instructions recommend managing Yarn through Corepack. This is not currently the case for the Yarn Modern examples:
Updates to Yarn Modern versions are being done together with Cypress version updates through scripts/update-cypress-latest-yarn.sh and
yarn set version latest
commands.Background
Yarn Modern versions, before the v4 release, initialized Yarn Modern projects with the Yarn package manager executables being committed into the repo.
In the meantime, Corepack has been introduced. It automatically installs a selected Yarn package manager version defined in a packageManager field in
package.json
. (See explanation in Release: Yarn 4.0 blog from Oct 2023.)Corepack is currently shipped with all supported Node.js releases (18, 20, 22, 23) and installing Node.js automatically installs
corepack
andnpm
as global packages (list with the command:npm ls -g
).Corepack comes from an open source GitHub repo https://github.com/nodejs/corepack.
Node.js documentation for corepack and for the related packageManager field for Node.js
package.json
files are marked with Stability: 1 - ExperimentalThere are open discussional PRs in https://github.com/nodejs/node about removing corepack from the Node.js distribution.
In GitHub Actions runner images
corepack
is disabled by default.Assessment
Corepack is the method recommended by Yarn Modern for managing its installations.
At this time it is unclear whether or not:
or if alternatives will be offered for installing Yarn Modern, such as publishing Yarn Modern as a package to the npm registry.
Despite any uncertainty about the future status of Corepack, it is the method recommended by Yarn Modern for managing its installations.
Not migrating to Corepack means continuing to require Yarn Modern large binary files be committed to the repo. Git is not particularly suited to manage binaries as git differences. It works best with configuration parameters and source files.
Recommendation
Convert the Yarn Modern examples to follow the Yarn Modern Installation instruction recommendations to use Corepack:
The text was updated successfully, but these errors were encountered: