Skip to content

Commit d0cc001

Browse files
authored
chore: migrate yarn modern to npm registry corepack (cypress-io#1420)
1 parent 43c624e commit d0cc001

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed

.github/workflows/example-yarn-modern-pnp.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15-
- run: corepack enable yarn # experimental - see https://nodejs.org/docs/latest/api/corepack.html
15+
- name: Enable Corepack # see https://yarnpkg.com/getting-started/install
16+
run: |
17+
npm install -g corepack
18+
corepack enable yarn
1619
- name: Set up Yarn cache
1720
uses: actions/setup-node@v4
1821
with:
1922
node-version-file: '.node-version'
2023
cache: yarn
2124
cache-dependency-path: examples/yarn-modern-pnp/yarn.lock
25+
- name: Reinstall Corepack # actions/setup-node may have replaced Corepack with an older version
26+
run: |
27+
npm install -g corepack
28+
corepack enable yarn
2229
- name: Custom Yarn command
2330
uses: ./
2431
with:

.github/workflows/example-yarn-modern.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ jobs:
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@v4
15-
- run: corepack enable yarn # experimental - see https://nodejs.org/docs/latest/api/corepack.html
15+
- name: Enable Corepack # see https://yarnpkg.com/getting-started/install
16+
run: |
17+
npm install -g corepack
18+
corepack enable yarn
1619
- name: Set up Yarn cache
1720
uses: actions/setup-node@v4
1821
with:
1922
node-version-file: '.node-version'
2023
cache: yarn
2124
cache-dependency-path: examples/yarn-modern/yarn.lock
25+
- name: Reinstall Corepack # actions/setup-node may have replaced Corepack with an older version
26+
run: |
27+
npm install -g corepack
28+
corepack enable yarn
2229
- name: Custom Yarn command
2330
uses: ./
2431
with:

docs/MAINTENANCE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _The previous [examples/v9](https://github.com/cypress-io/github-action/tree/v5/
2020

2121
- [npm](https://www.npmjs.com/), which is installed with [Node.js](https://nodejs.org/).
2222

23-
- [corepack](https://github.com/nodejs/corepack), which is installed with [Node.js](https://nodejs.org/).
23+
- [corepack](https://github.com/nodejs/corepack). This is currently installed with [Node.js](https://nodejs.org/). Due to plans of Node.js to remove it in versions Node.js `25.x` and later, you may need to install it separately with `npm install -g corepack`.
2424

2525
- [pnpm](https://pnpm.io/) installed through:
2626

examples/yarn-modern-pnp/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This example demonstrates installing dependencies using [Yarn Modern v4](https:/
55
Run locally with:
66

77
```shell
8+
npm install -g corepack
89
corepack enable yarn
910
yarn
1011
yarn test

examples/yarn-modern/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This example demonstrates installing dependencies using [Yarn Modern v4](https:/
55
Run locally with:
66

77
```shell
8+
npm install -g corepack
89
corepack enable yarn
910
yarn
1011
yarn test

0 commit comments

Comments
 (0)