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
Copy file name to clipboardExpand all lines: README.md
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1262,7 +1262,7 @@ See the example project [start-and-pnpm-workspaces](examples/start-and-pnpm-work
1262
1262
1263
1263
### Yarn Classic
1264
1264
1265
-
If a `yarn.lock` file is found, the action uses the [Yarn 1 (Classic)](https://classic.yarnpkg.com/) command `yarn --frozen-lockfile` by default to install dependencies.
1265
+
If a `yarn.lock` file is found, the action uses the [Yarn 1 (Classic)](https://classic.yarnpkg.com/) command `yarn --frozen-lockfile` by default to install dependencies, unless [Yarn Modern](#yarn-modern) is detected.
1266
1266
1267
1267
```yaml
1268
1268
name: example-yarn-classic
@@ -1283,7 +1283,7 @@ jobs:
1283
1283
1284
1284
### Yarn Modern
1285
1285
1286
-
To install dependencies using a `yarn.lock` file from [Yarn Modern](https://yarnpkg.com/) (Yarn 2 and later) you need to override the default [Yarn 1 (Classic)](https://classic.yarnpkg.com/) installation command `yarn --frozen-lockfile`. You can do this by using the `install-command` parameter and specifying `yarn install` as in the example below.
1286
+
If a `yarn.lock` file is found with a Yarn Modern format, the [Yarn Modern install](https://yarnpkg.com/cli/install) command, `yarn install --immutable`, is used to install dependencies.
1287
1287
1288
1288
The action supports built-in caching of Yarn Classic dependencies only. To cache Yarn Modern dependencies additionally use [actions/setup-node](https://github.com/actions/setup-node) and specify `cache: yarn`.
1289
1289
@@ -1307,7 +1307,6 @@ jobs:
1307
1307
uses: cypress-io/github-action@v7
1308
1308
with:
1309
1309
working-directory: examples/yarn-modern
1310
-
install-command: yarn install
1311
1310
```
1312
1311
1313
1312
This example covers the [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) configuration `nodeLinker: node-modules` which Yarn uses by default for projects updated from Yarn Classic. For `nodeLinker: pnp` see [Yarn Plug'n'Play](#yarn-plugnplay) below.
@@ -1325,7 +1324,7 @@ See the above [Yarn Modern](#yarn-modern) section for information on caching Yar
1325
1324
name: example-yarn-modern-pnp
1326
1325
on: push
1327
1326
jobs:
1328
-
yarn-classic:
1327
+
yarn-modern-pnp:
1329
1328
runs-on: ubuntu-24.04
1330
1329
steps:
1331
1330
- name: Checkout
@@ -1334,7 +1333,6 @@ jobs:
1334
1333
uses: cypress-io/github-action@v7
1335
1334
with:
1336
1335
working-directory: examples/yarn-modern-pnp
1337
-
install-command: yarn install
1338
1336
command: yarn run --binaries-only cypress run
1339
1337
```
1340
1338
@@ -1668,8 +1666,7 @@ This action installs local dependencies using lock files. Ensure that exactly on
0 commit comments