-
Notifications
You must be signed in to change notification settings - Fork 360
Description
The README does not differentiate between the two very different versions of yarn: Yarn 1 (Classic) and the later Yarn Berry versions 2 and 3. This should be improved and specific instructions given.
Yarn 1 (Classic) is still in significant usage today even though it is officially in maintenance mode, so both this version and the later Yarn Berry versions need to be covered by the documentation.
Current situation
- GHA is programmed to support Yarn 1 (Classic) inherently, since version 1.8.0
- The
install-command:parameter (see README: Custom install command) extends GHA's flexibility to support Yarn Berry through the ability to specify a different install command, since version 2.7.0
There is no specific mention of Yarn 1 (Classic) or Yarn Berry in the README file, which uses only the generic term yarn.
The README: Custom install command appears as follows:
Custom install command
If you want to overwrite the install command
- uses: cypress-io/github-action@v5
with:
install-command: yarn --frozen-lockfile --silentSee example-install-command.yml workflow file.
In the example above it uses the install command yarn --frozen-lockfile --silent for Yarn 1 (Classic). When this command is executed using Yarn 3.4.1 (Berry) a warning is output:
➤ YN0050: The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead
There are two sections in the table of contents with the text "custom install command". This is confusing:
The README: Installation section shows the following which omits any differentation between Yarn 1 (Classic) and Yarn Berry:
Installation
This action installs local dependencies using lock files. If yarn.lock file is found, the install uses yarn --frozen-lockfile command. Otherwise it expects to find package-lock.json and install using npm ci command.
Suggestion
Change the install-command: example from install-command: yarn --frozen-lockfile --silent. This command is almost the same as the default command used when a yarn lockfile is found, which is yarn --frozen-lockfile. This is a Yarn 1 (Classic) command, which is deprecated in Yarn Berry.
Refer to the Yarn Berry CLI documentation for the appropriate command, considering also that Yarn offers different features: Zero-Installs, Plug'n'Play.
Consider also the alignment of documentation and programmed examples.
Clarify also the two sections with almost identical headings (see above).
Revise the README: Installation section to differentiate between Yarn 1 (Classic) and Yarn Berry.
Related open issues
- yarn cache saving nothing #407
- Error "Cannot find module 'cypress'" using Yarn Berry #430
- Yarn Plug and Play Zero-Installs: Cannot Cy with github actions #441
- Lerna + Yarn workspaces + component testing #455
- Error: The process '/usr/bin/yarn' failed with exit code 1 #797