What would you like?
Detect Yarn Modern automatically and install dependencies with:
instead of using yarn --frozen-lockfile also for Yarn Modern.
Why is this needed?
The installation command for Yarn 1 Classic is yarn --frozen-lockfile. This option is deprecated for Yarn Modern, and provokes the warning:
➤ YN0050: The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead
Yarn 1 Classic is itself frozen and no longer supported. See also #1819 calling for deprecation of support.
Other
yarn install sets
--immutable to true by default in CI
Currently the action documentation Yarn Modern advises using the install-command parameter to install Yarn Modern. This would no longer be necessary if the above proposed enhancement is implemented.
name: example-yarn-modern
on: push
jobs:
yarn-modern:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
- run: corepack enable # (experimental and optional)
- name: Set up Yarn cache
uses: actions/setup-node@v6
with:
node-version: 24
cache: yarn
cache-dependency-path: examples/yarn-modern/yarn.lock
- name: Cypress run
uses: cypress-io/github-action@v7
with:
working-directory: examples/yarn-modern
install-command: yarn install
What would you like?
Detect Yarn Modern automatically and install dependencies with:
instead of using
yarn --frozen-lockfilealso for Yarn Modern.Why is this needed?
The installation command for Yarn 1 Classic is
yarn --frozen-lockfile. This option is deprecated for Yarn Modern, and provokes the warning:➤ YN0050: The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache insteadYarn 1 Classic is itself frozen and no longer supported. See also #1819 calling for deprecation of support.
Other
yarn install sets
--immutableto true by default in CICurrently the action documentation Yarn Modern advises using the
install-commandparameter to install Yarn Modern. This would no longer be necessary if the above proposed enhancement is implemented.name: example-yarn-modern on: push jobs: yarn-modern: runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v7 - run: corepack enable # (experimental and optional) - name: Set up Yarn cache uses: actions/setup-node@v6 with: node-version: 24 cache: yarn cache-dependency-path: examples/yarn-modern/yarn.lock - name: Cypress run uses: cypress-io/github-action@v7 with: working-directory: examples/yarn-modern install-command: yarn install