chore: remove committed Yarn 1.22.22 cjs #1610
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
The repo is currently configured to use .yarn/releases/yarn-1.22.22.cjs as Yarn 1 Classic package manager if the user has Node.js experimental corepack enabled.
For comparison, the cypress repo is now configured with its package.json defining the
packageManager
key without however committing any Yarn package manager executable code to its repo.The cypress setup is sufficient to enable Yarn 1 Classic to be used. If a user does not have the configured
packageManager
version installed locally, thencorepack
will install it and store it in thenode/corepack
cache - on Ubuntu in~/.cache/node/corepack
. It is not necessary to commit Yarn to the repo.Concerns were raised by @emilyrohrbough in #1408 (comment) from Nov 2023, although these were not followed up with actions until now.
Background
Alternatives:
Change
packageManager
for[email protected]
equivalent to the version installed bynpm install yarn@latest -g
withoutcorepack
enabled.Verification
On Ubuntu
24.04.1
LTS, using Node.js20.12.0
according to .node-version.Corepack disabled
Install Yarn Classic globally and run
yarn
:Confirm that Yarn
v1.22.22
is used to install, that there are no errors and no files identified by git for committing.Corepack enabled
Enable
corepack
and runyarn
:Confirm that Corepack prompts to install https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz, and after confirming with "Y", that yarn is downloaded and then installs dependencies with no errors. There should also be no files identified by git for committing after yarn install has completed.