Skip to content

Commit 4d0b645

Browse files
aryaemami59timdorr
andauthored
Upgrade to Yarn 4 (#2135)
Co-authored-by: Tim Dorr <[email protected]>
1 parent c0106e8 commit 4d0b645

File tree

14 files changed

+7257
-7079
lines changed

14 files changed

+7257
-7079
lines changed

.codesandbox/ci.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sandboxes": ["vanilla", "vanilla-ts"],
3-
"node": "14",
3+
"node": "18",
44
"buildCommand": "build",
55
"packages": ["."]
66
}

.github/workflows/publish.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
id-token: write
1212
contents: read
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1616
with:
17-
node-version: '18.x'
17+
node-version: '20.x'
1818
registry-url: 'https://registry.npmjs.org'
1919
cache: 'yarn'
2020
- run: yarn install --frozen-lockfile
2121
- run: yarn test
2222
- run: npm publish --access public --provenance
2323
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/size.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 1
1414
- uses: preactjs/compressed-size-action@v2

.github/workflows/test.yml

+25-21
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Tests
22

33
on:
44
push:
5-
branches: [master, v9.0-integration]
5+
branches: [master]
66
pull_request:
7-
branches: [master, v9.0-integration]
7+
branches: [master]
88
workflow_dispatch:
99

1010
jobs:
@@ -14,12 +14,12 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Set up Node
20-
uses: actions/setup-node@v3
20+
uses: actions/setup-node@v4
2121
with:
22-
node-version: 18.x
22+
node-version: 20.x
2323
cache: 'yarn'
2424

2525
- name: Install dependencies
@@ -37,7 +37,7 @@ jobs:
3737
- name: Pack
3838
run: yarn pack
3939

40-
- uses: actions/upload-artifact@v3
40+
- uses: actions/upload-artifact@v4
4141
with:
4242
name: package
4343
path: ./package.tgz
@@ -50,15 +50,15 @@ jobs:
5050
strategy:
5151
fail-fast: false
5252
matrix:
53-
node: ['18.x']
53+
node: ['20.x']
5454
ts: ['4.7', '4.8', '4.9', '5.0', '5.1', '5.2', '5.3', '5.4']
5555

5656
steps:
5757
- name: Checkout repo
58-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
5959

6060
- name: Use node ${{ matrix.node }}
61-
uses: actions/setup-node@v3
61+
uses: actions/setup-node@v4
6262
with:
6363
node-version: ${{ matrix.node }}
6464
cache: 'yarn'
@@ -82,12 +82,12 @@ jobs:
8282
strategy:
8383
fail-fast: false
8484
matrix:
85-
node: ['18.x']
85+
node: ['20.x']
8686
steps:
8787
- name: Checkout repo
88-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8989

90-
- uses: actions/download-artifact@v3
90+
- uses: actions/download-artifact@v4
9191
with:
9292
name: package
9393
path: .
@@ -106,7 +106,7 @@ jobs:
106106
strategy:
107107
fail-fast: false
108108
matrix:
109-
node: ['18.x']
109+
node: ['20.x']
110110
example:
111111
[
112112
'cra4',
@@ -123,7 +123,7 @@ jobs:
123123
uses: actions/checkout@v4
124124

125125
- name: Use node ${{ matrix.node }}
126-
uses: actions/setup-node@v3.8.1
126+
uses: actions/setup-node@v4
127127
with:
128128
node-version: ${{ matrix.node }}
129129
cache: 'yarn'
@@ -146,14 +146,16 @@ jobs:
146146

147147
- name: Install deps
148148
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
149-
run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
149+
env:
150+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
151+
run: rm yarn.lock && yarn install
150152

151153
- name: Install Playwright browser if necessary
152154
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
153155
continue-on-error: true
154156
run: yarn playwright install
155157

156-
- uses: actions/download-artifact@v2
158+
- uses: actions/download-artifact@v4
157159
with:
158160
name: package
159161
path: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
@@ -179,7 +181,9 @@ jobs:
179181

180182
- name: Build example
181183
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
182-
run: NODE_OPTIONS=--openssl-legacy-provider yarn build
184+
env:
185+
NODE_OPTIONS: --openssl-legacy-provider
186+
run: yarn build
183187

184188
- name: Run test step
185189
working-directory: ./redux-toolkit/examples/publish-ci/${{ matrix.example }}
@@ -193,17 +197,17 @@ jobs:
193197
strategy:
194198
fail-fast: false
195199
matrix:
196-
node: ['18.x']
200+
node: ['20.x']
197201
example: ['rr-rsc-context']
198202
defaults:
199203
run:
200204
working-directory: ./examples/publish-ci/${{ matrix.example }}
201205
steps:
202206
- name: Checkout repo
203-
uses: actions/checkout@v3
207+
uses: actions/checkout@v4
204208

205209
- name: Use node ${{ matrix.node }}
206-
uses: actions/setup-node@v3
210+
uses: actions/setup-node@v4
207211
with:
208212
node-version: ${{ matrix.node }}
209213
cache: 'yarn'
@@ -214,7 +218,7 @@ jobs:
214218
- name: Remove existing React-Redux
215219
run: yarn remove react-redux
216220

217-
- uses: actions/download-artifact@v3
221+
- uses: actions/download-artifact@v4
218222
with:
219223
name: package
220224
path: ./examples/publish-ci/${{ matrix.example }}

.yarn/plugins/@yarnpkg/plugin-compat.cjs

-9
This file was deleted.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

-29
This file was deleted.

.yarn/releases/yarn-3.4.1.cjs

-873
This file was deleted.

.yarn/releases/yarn-4.1.0.cjs

+893
Large diffs are not rendered by default.

.yarnrc.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
nodeLinker: node-modules
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
24

3-
plugins:
4-
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
5-
spec: "@yarnpkg/plugin-workspace-tools"
6-
- path: .yarn/plugins/@yarnpkg/plugin-compat.cjs
7-
spec: "@yarnpkg/plugin-compat"
5+
nodeLinker: node-modules
86

9-
yarnPath: .yarn/releases/yarn-3.4.1.cjs
7+
yarnPath: .yarn/releases/yarn-4.1.0.cjs

0 commit comments

Comments
 (0)