Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for usage with Yarn Berry / Modern (Version 2 and later) #798

Closed
MikeMcC399 opened this issue Feb 17, 2023 · 1 comment
Closed

Comments

@MikeMcC399
Copy link
Collaborator

MikeMcC399 commented Feb 17, 2023

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

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 --silent

See 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

Related open PRs

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Feb 19, 2023

@MikeMcC399 MikeMcC399 changed the title Documentation for usage with Yarn Berry (Version 2 and later) Documentation for usage with Yarn Berry / Modern (Version 2 and later) Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant