Skip to content

Commit 2e1e89e

Browse files
nicolethoenclaude
andcommitted
chore: migrate from Yarn 1 to Yarn 4 and update GitHub Actions
- Update packageManager to yarn@4.10.3 - Add .yarnrc.yml with nodeLinker: node-modules - Replace --frozen-lockfile with --immutable in all CI workflows - Bump actions/checkout@v2 to @v4 in all workflows - Add corepack enable step after setup-node in all workflows - Fix promote.yml step ordering (setup-node before yarn install) - Update cache labels from "Cache npm deps" to "Cache yarn deps" - Add .yarn/* and .pnp.* to .gitignore - Regenerate yarn.lock in Yarn 4 format Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d20572f commit 2e1e89e

8 files changed

Lines changed: 18409 additions & 13498 deletions

File tree

.github/workflows/build-lint-test.yml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,26 @@ jobs:
77
env:
88
GH_PR_NUM: ${{ github.event.number }}
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
- run: |
1212
if [[ ! -z "${GH_PR_NUM}" ]]; then
1313
echo "Checking out PR"
1414
git fetch origin pull/$GH_PR_NUM/head:tmp
1515
git checkout tmp
1616
fi
17-
- uses: actions/setup-node@v1
17+
- uses: actions/setup-node@v4
1818
with:
19-
node-version: '18'
19+
node-version: '22'
20+
- run: corepack enable
2021
- uses: actions/cache@v4
2122
id: yarn-cache
22-
name: Cache npm deps
23+
name: Cache yarn deps
2324
with:
2425
path: |
2526
node_modules
2627
**/node_modules
2728
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
28-
- run: yarn install --frozen-lockfile
29+
- run: yarn install --immutable
2930
if: steps.yarn-cache.outputs.cache-hit != 'true'
3031
- uses: actions/cache@v4
3132
id: dist
@@ -43,25 +44,26 @@ jobs:
4344
GH_PR_NUM: ${{ github.event.number }}
4445
needs: build
4546
steps:
46-
- uses: actions/checkout@v2
47+
- uses: actions/checkout@v4
4748
- run: |
4849
if [[ ! -z "${GH_PR_NUM}" ]]; then
4950
echo "Checking out PR"
5051
git fetch origin pull/$GH_PR_NUM/head:tmp
5152
git checkout tmp
5253
fi
53-
- uses: actions/setup-node@v1
54+
- uses: actions/setup-node@v4
5455
with:
55-
node-version: '18'
56+
node-version: '22'
57+
- run: corepack enable
5658
- uses: actions/cache@v4
5759
id: yarn-cache
58-
name: Cache npm deps
60+
name: Cache yarn deps
5961
with:
6062
path: |
6163
node_modules
6264
**/node_modules
6365
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
64-
- run: yarn install --frozen-lockfile
66+
- run: yarn install --immutable
6567
if: steps.yarn-cache.outputs.cache-hit != 'true'
6668
- uses: actions/cache@v4
6769
id: lint-cache
@@ -79,27 +81,28 @@ jobs:
7981
GH_PR_NUM: ${{ github.event.number }}
8082
needs: build
8183
steps:
82-
- uses: actions/checkout@v2
84+
- uses: actions/checkout@v4
8385
# Yes, we really want to checkout the PR
8486
- run: |
8587
if [[ ! -z "${GH_PR_NUM}" ]]; then
8688
echo "Checking out PR"
8789
git fetch origin pull/$GH_PR_NUM/head:tmp
8890
git checkout tmp
8991
fi
90-
- uses: actions/setup-node@v1
92+
- uses: actions/setup-node@v4
9193
with:
92-
node-version: '18'
94+
node-version: '22'
95+
- run: corepack enable
9396
- uses: actions/cache@v4
9497
id: yarn-cache
95-
name: Cache npm deps
98+
name: Cache yarn deps
9699
with:
97100
path: |
98101
node_modules
99102
**/node_modules
100103
~/.cache/Cypress
101104
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
102-
- run: yarn install --frozen-lockfile
105+
- run: yarn install --immutable
103106
if: steps.yarn-cache.outputs.cache-hit != 'true'
104107
- uses: actions/cache@v4
105108
id: dist
@@ -120,27 +123,28 @@ jobs:
120123
GH_PR_NUM: ${{ github.event.number }}
121124
needs: build
122125
steps:
123-
- uses: actions/checkout@v2
126+
- uses: actions/checkout@v4
124127
# Yes, we really want to checkout the PR
125128
- run: |
126129
if [[ ! -z "${GH_PR_NUM}" ]]; then
127130
echo "Checking out PR"
128131
git fetch origin pull/$GH_PR_NUM/head:tmp
129132
git checkout tmp
130133
fi
131-
- uses: actions/setup-node@v1
134+
- uses: actions/setup-node@v4
132135
with:
133-
node-version: '18'
136+
node-version: '22'
137+
- run: corepack enable
134138
- uses: actions/cache@v4
135139
id: yarn-cache
136-
name: Cache npm deps
140+
name: Cache yarn deps
137141
with:
138142
path: |
139143
node_modules
140144
**/node_modules
141145
~/.cache/Cypress
142146
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
143-
- run: yarn install --frozen-lockfile
147+
- run: yarn install --immutable
144148
if: steps.yarn-cache.outputs.cache-hit != 'true'
145149
- uses: actions/cache@v4
146150
id: dist

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
env:
88
GH_PR_NUM: ${{ github.event.number }}
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
- run: |
1212
if [[ ! -z "${GH_PR_NUM}" ]]; then
1313
echo "Checking out PR"
@@ -30,18 +30,19 @@ jobs:
3030
run: ./devSetup.sh
3131
shell: bash
3232
if: steps.setup-cache.outputs.cache-hit != 'true'
33-
- uses: actions/setup-node@v1
33+
- uses: actions/setup-node@v4
3434
with:
35-
node-version: '18'
35+
node-version: '22'
36+
- run: corepack enable
3637
- uses: actions/cache@v4
3738
id: yarn-cache
38-
name: Cache npm deps
39+
name: Cache yarn deps
3940
with:
4041
path: |
4142
node_modules
4243
**/node_modules
4344
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
44-
- run: yarn install --frozen-lockfile
45+
- run: yarn install --immutable
4546
if: steps.yarn-cache.outputs.cache-hit != 'true'
4647
- uses: actions/cache@v4
4748
id: dist

.github/workflows/promote.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: promote
22
on:
33
push:
44
# Sequence of patterns matched against refs/tags
5-
tags:
5+
tags:
66
- v6.*
77
jobs:
88
build-and-promote:
@@ -12,13 +12,14 @@ jobs:
1212
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1313
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1414
steps:
15-
- uses: actions/checkout@v2
16-
- name: Build for promotion
17-
run: yarn install --frozen-lockfile && yarn build
18-
- uses: actions/setup-node@v3
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
1917
with:
20-
node-version: '16.x'
18+
node-version: '22'
2119
registry-url: 'https://registry.npmjs.org'
20+
- run: corepack enable
21+
- name: Build for promotion
22+
run: yarn install --immutable && yarn build
2223
- name: GitHub Tag Name example
2324
run: |
2425
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ jobs:
1414
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1515
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-node@v1
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
1919
with:
20-
node-version: '18'
20+
node-version: '22'
21+
- run: corepack enable
2122
- uses: actions/cache@v4
2223
id: yarn-cache
23-
name: Cache npm deps
24+
name: Cache yarn deps
2425
with:
2526
path: |
2627
node_modules
2728
**/node_modules
2829
~/.cache/Cypress
2930
key: ${{ runner.os }}-yarn-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
30-
- run: yarn install --frozen-lockfile
31+
- run: yarn install --immutable
3132
if: steps.yarn-cache.outputs.cache-hit != 'true'
3233
- uses: actions/cache@v4
3334
id: dist

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ coverage
1414
# package managers
1515
yarn-error.log
1616
lerna-debug.log
17+
.yarn/*
18+
!.yarn/patches
19+
!.yarn/plugins
20+
!.yarn/releases
21+
!.yarn/sdks
22+
.pnp.*
1723

1824
# IDEs and editors
1925
.idea

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@
2828
"@babel/preset-flow": "^7.27.1",
2929
"@babel/preset-react": "^7.28.5",
3030
"@babel/preset-typescript": "^7.28.5",
31+
"@eslint/js": "^9.27.0",
32+
"@eslint/markdown": "^7.0.3",
3133
"@testing-library/dom": "9.0.0",
3234
"@testing-library/jest-dom": "^6.9.1",
3335
"@testing-library/react": "^13.4.0",
3436
"@testing-library/user-event": "14.6.1",
3537
"@types/file-saver": "^2.0.7",
3638
"@types/react": "^18",
3739
"@types/react-dom": "^18",
38-
"typescript-eslint": "^8.57.0",
3940
"babel-jest": "^30.3.0",
4041
"concurrently": "^9.2.1",
4142
"eslint": "^9.27.0",
4243
"eslint-config-prettier": "^10.1.8",
4344
"eslint-plugin-react": "^7.37.5",
4445
"eslint-plugin-react-hooks": "^5.2.0",
45-
"@eslint/js": "^9.27.0",
4646
"globals": "^16.2.0",
47-
"@eslint/markdown": "^7.0.3",
4847
"jest": "^30.3.0",
4948
"jest-canvas-mock": "^2.5.2",
5049
"jest-environment-jsdom": "^30.3.0",
5150
"prettier": "3.8.1",
5251
"react": "^18",
5352
"react-dom": "^18",
5453
"tslib": "^2.8.1",
55-
"typescript": "^5.9.3"
54+
"typescript": "^5.9.3",
55+
"typescript-eslint": "^8.57.0"
5656
},
57-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
57+
"packageManager": "yarn@4.10.3"
5858
}

0 commit comments

Comments
 (0)