Revert "[ci] Update yarn and node_modules cache key (#32603)" (#32607)
This reverts commit 67338703aa52d662998733e58671dc9fe1edae47. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32607). * #32609 * #32608 * __->__ #32607
lauren committed
Mar 13, 2025 at 22:14 UTC
5200721e5c93a59f8af0403d61abe513cb7d32fe
7 files changed
+41
-66
.github/workflows/runtime_build_and_test.yml
+28
-52
@@ -50,13 +50,13 @@ jobs:
50
with:
51
node-version-file: '.nvmrc'
52
cache: yarn
53
- cache-dependency-path: '**/yarn.lock'
53
+ cache-dependency-path: yarn.lock
54
- name: Restore cached node_modules
55
uses: actions/cache@v4
56
id: node_modules
57
with:
58
path: "**/node_modules"
59
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
59
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
60
- name: Ensure clean build directory
61
run: rm -rf build
62
- run: yarn install --frozen-lockfile
@@ -74,18 +74,16 @@ jobs:
74
with:
75
node-version-file: '.nvmrc'
76
cache: yarn
77
- cache-dependency-path: '**/yarn.lock'
77
+ cache-dependency-path: yarn.lock
78
- name: Restore cached node_modules
79
uses: actions/cache@v4
80
id: node_modules
81
with:
82
path: "**/node_modules"
83
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
83
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
84
- name: Ensure clean build directory
85
run: rm -rf build
86
- run: yarn install --frozen-lockfile
87
- - run: yarn install --frozen-lockfile
88
- working-directory: compiler
87
- run: |
88
yarn generate-inline-fizz-runtime
89
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
@@ -102,18 +100,16 @@ jobs:
100
with:
101
node-version-file: '.nvmrc'
102
cache: yarn
105
- cache-dependency-path: '**/yarn.lock'
103
+ cache-dependency-path: yarn.lock
104
- name: Restore cached node_modules
105
uses: actions/cache@v4
106
id: node_modules
107
with:
108
path: "**/node_modules"
111
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
109
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
110
- name: Ensure clean build directory
111
run: rm -rf build
112
- run: yarn install --frozen-lockfile
115
- - run: yarn install --frozen-lockfile
116
- working-directory: compiler
113
- run: yarn flags
114
115
# ----- TESTS -----
@@ -157,18 +153,16 @@ jobs:
153
with:
154
node-version-file: '.nvmrc'
155
cache: yarn
160
- cache-dependency-path: '**/yarn.lock'
156
+ cache-dependency-path: yarn.lock
157
- name: Restore cached node_modules
158
uses: actions/cache@v4
159
id: node_modules
160
with:
161
path: "**/node_modules"
166
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
162
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
163
- name: Ensure clean build directory
164
run: rm -rf build
165
- run: yarn install --frozen-lockfile
170
- - run: yarn install --frozen-lockfile
171
- working-directory: compiler
166
- run: yarn test ${{ matrix.params }} --ci --shard=${{ matrix.shard }}
167
168
# ----- BUILD -----
@@ -189,7 +183,7 @@ jobs:
183
with:
184
node-version-file: '.nvmrc'
185
cache: yarn
192
- cache-dependency-path: '**/yarn.lock'
186
+ cache-dependency-path: yarn.lock
187
- uses: actions/setup-java@v4
188
with:
189
distribution: temurin
@@ -199,12 +193,10 @@ jobs:
193
id: node_modules
194
with:
195
path: "**/node_modules"
202
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
196
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
197
- name: Ensure clean build directory
198
run: rm -rf build
199
- run: yarn install --frozen-lockfile
206
- - run: yarn install --frozen-lockfile
207
- working-directory: compiler
200
- run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci
201
env:
202
CI: github
@@ -269,18 +261,16 @@ jobs:
261
with:
262
node-version-file: '.nvmrc'
263
cache: yarn
272
- cache-dependency-path: '**/yarn.lock'
264
+ cache-dependency-path: yarn.lock
265
- name: Restore cached node_modules
266
uses: actions/cache@v4
267
id: node_modules
268
with:
269
path: "**/node_modules"
278
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
270
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
271
- name: Ensure clean build directory
272
run: rm -rf build
273
- run: yarn install --frozen-lockfile
282
- - run: yarn install --frozen-lockfile
283
- working-directory: compiler
274
- name: Restore archived build
275
uses: actions/download-artifact@v4
276
with:
@@ -303,18 +293,16 @@ jobs:
293
with:
294
node-version-file: '.nvmrc'
295
cache: yarn
306
- cache-dependency-path: '**/yarn.lock'
296
+ cache-dependency-path: yarn.lock
297
- name: Restore cached node_modules
298
uses: actions/cache@v4
299
id: node_modules
300
with:
301
path: "**/node_modules"
312
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
302
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
303
- name: Ensure clean build directory
304
run: rm -rf build
305
- run: yarn install --frozen-lockfile
316
- - run: yarn install --frozen-lockfile
317
- working-directory: compiler
306
- name: Restore archived build
307
uses: actions/download-artifact@v4
308
with:
@@ -352,18 +340,16 @@ jobs:
340
with:
341
node-version-file: '.nvmrc'
342
cache: yarn
355
- cache-dependency-path: '**/yarn.lock'
343
+ cache-dependency-path: yarn.lock
344
- name: Restore cached node_modules
345
uses: actions/cache@v4
346
id: node_modules
347
with:
348
path: "**/node_modules"
361
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
349
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
350
- name: Ensure clean build directory
351
run: rm -rf build
352
- run: yarn install --frozen-lockfile
365
- - run: yarn install --frozen-lockfile
366
- working-directory: compiler
353
- name: Restore archived build
354
uses: actions/download-artifact@v4
355
with:
@@ -389,18 +375,16 @@ jobs:
375
with:
376
node-version-file: '.nvmrc'
377
cache: yarn
392
- cache-dependency-path: '**/yarn.lock'
378
+ cache-dependency-path: yarn.lock
379
- name: Restore cached node_modules
380
uses: actions/cache@v4
381
id: node_modules
382
with:
383
path: "**/node_modules"
398
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
384
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
385
- name: Ensure clean build directory
386
run: rm -rf build
387
- run: yarn install --frozen-lockfile
402
- - run: yarn install --frozen-lockfile
403
- working-directory: compiler
388
- name: Restore archived build
389
uses: actions/download-artifact@v4
390
with:
@@ -423,13 +407,13 @@ jobs:
407
with:
408
node-version-file: '.nvmrc'
409
cache: yarn
426
- cache-dependency-path: 'fixtures/dom/yarn.lock'
410
+ cache-dependency-path: yarn.lock
411
- name: Restore cached node_modules
412
uses: actions/cache@v4
413
id: node_modules
414
with:
415
path: "**/node_modules"
432
- key: fixtures_dom-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('fixtures/dom/yarn.lock') }}
416
+ key: fixtures_dom-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
417
- name: Ensure clean build directory
418
run: rm -rf build
419
- run: yarn install --frozen-lockfile
@@ -463,7 +447,7 @@ jobs:
447
with:
448
node-version-file: '.nvmrc'
449
cache: yarn
466
- cache-dependency-path: '**/yarn.lock'
450
+ cache-dependency-path: yarn.lock
451
# Fixture copies some built packages from the workroot after install.
452
# That means dependencies of the built packages are not installed.
453
# We need to install dependencies of the workroot to fulfill all dependency constraints
@@ -472,12 +456,10 @@ jobs:
456
id: node_modules
457
with:
458
path: "**/node_modules"
475
- key: fixtures_flight-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
459
+ key: fixtures_flight-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
460
- name: Ensure clean build directory
461
run: rm -rf build
462
- run: yarn install --frozen-lockfile
479
- - run: yarn install --frozen-lockfile
480
- working-directory: compiler
463
- name: Restore archived build
464
uses: actions/download-artifact@v4
465
with:
@@ -530,18 +512,16 @@ jobs:
512
with:
513
node-version-file: '.nvmrc'
514
cache: yarn
533
- cache-dependency-path: '**/yarn.lock'
515
+ cache-dependency-path: yarn.lock
516
- name: Restore cached node_modules
517
uses: actions/cache@v4
518
id: node_modules
519
with:
520
path: "**/node_modules"
539
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
521
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
522
- name: Ensure clean build directory
523
run: rm -rf build
524
- run: yarn install --frozen-lockfile
543
- - run: yarn install --frozen-lockfile
544
- working-directory: compiler
525
- name: Restore archived build
526
uses: actions/download-artifact@v4
527
with:
@@ -583,18 +563,16 @@ jobs:
563
with:
564
node-version-file: '.nvmrc'
565
cache: yarn
586
- cache-dependency-path: '**/yarn.lock'
566
+ cache-dependency-path: yarn.lock
567
- name: Restore cached node_modules
568
uses: actions/cache@v4
569
id: node_modules
570
with:
571
path: "**/node_modules"
592
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
572
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
573
- name: Ensure clean build directory
574
run: rm -rf build
575
- run: yarn install --frozen-lockfile
596
- - run: yarn install --frozen-lockfile
597
- working-directory: compiler
576
- name: Restore archived build
577
uses: actions/download-artifact@v4
578
with:
@@ -622,13 +600,13 @@ jobs:
600
with:
601
node-version-file: '.nvmrc'
602
cache: yarn
625
- cache-dependency-path: '**/yarn.lock'
603
+ cache-dependency-path: yarn.lock
604
- name: Restore cached node_modules
605
uses: actions/cache@v4
606
id: node_modules
607
with:
608
path: "**/node_modules"
631
- key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
609
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
610
- name: Ensure clean build directory
611
run: rm -rf build
612
- run: yarn install --frozen-lockfile
@@ -648,8 +626,6 @@ jobs:
626
- name: Ensure clean build directory
627
run: rm -rf build
628
- run: yarn install --frozen-lockfile
651
- - run: yarn install --frozen-lockfile
652
- working-directory: compiler
629
- name: Restore archived build for PR
630
uses: actions/download-artifact@v4
631
with:
.github/workflows/runtime_eslint_plugin_e2e.yml
+3
-5
@@ -35,18 +35,16 @@ jobs:
35
with:
36
node-version-file: '.nvmrc'
37
cache: yarn
38
- cache-dependency-path: '**/yarn.lock'
38
+ cache-dependency-path: yarn.lock
39
- name: Restore cached node_modules
40
uses: actions/cache@v4
41
id: node_modules
42
with:
43
- path: "**/node_modules"
44
- key: runtime-eslint_e2e-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
43
+ path: "node_modules"
44
+ key: runtime-eslint_e2e-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
45
- name: Ensure clean build directory
46
run: rm -rf build
47
- run: yarn install --frozen-lockfile
48
- - run: yarn install --frozen-lockfile
49
- working-directory: compiler
48
- name: Build plugin
49
working-directory: fixtures/eslint-v${{ matrix.eslint_major }}
50
run: node build.mjs
.github/workflows/runtime_prereleases.yml
+2
-2
@@ -34,13 +34,13 @@ jobs:
34
with:
35
node-version-file: '.nvmrc'
36
cache: yarn
37
- cache-dependency-path: '**/yarn.lock'
37
+ cache-dependency-path: yarn.lock
38
- name: Restore cached node_modules
39
uses: actions/cache@v4
40
id: node_modules
41
with:
42
path: "**/node_modules"
43
- key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
43
+ key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
44
- name: Ensure clean build directory
45
run: rm -rf build
46
- run: yarn install --frozen-lockfile
.github/workflows/runtime_releases_from_npm_manual.yml
+2
-2
@@ -66,13 +66,13 @@ jobs:
66
with:
67
node-version-file: '.nvmrc'
68
cache: yarn
69
- cache-dependency-path: '**/yarn.lock'
69
+ cache-dependency-path: yarn.lock
70
- name: Restore cached node_modules
71
uses: actions/cache@v4
72
id: node_modules
73
with:
74
path: "**/node_modules"
75
- key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
75
+ key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
76
- name: Ensure clean build directory
77
run: rm -rf build
78
- run: yarn install --frozen-lockfile
.github/workflows/shared_lint.yml
+4
-4
@@ -24,7 +24,7 @@ jobs:
24
with:
25
node-version-file: '.nvmrc'
26
cache: yarn
27
- cache-dependency-path: '**/yarn.lock'
27
+ cache-dependency-path: yarn.lock
28
- name: Restore cached node_modules
29
uses: actions/cache@v4
30
with:
@@ -44,7 +44,7 @@ jobs:
44
with:
45
node-version-file: '.nvmrc'
46
cache: yarn
47
- cache-dependency-path: '**/yarn.lock'
47
+ cache-dependency-path: yarn.lock
48
- name: Restore cached node_modules
49
uses: actions/cache@v4
50
with:
@@ -64,7 +64,7 @@ jobs:
64
with:
65
node-version-file: '.nvmrc'
66
cache: yarn
67
- cache-dependency-path: '**/yarn.lock'
67
+ cache-dependency-path: yarn.lock
68
- name: Restore cached node_modules
69
uses: actions/cache@v4
70
with:
@@ -84,7 +84,7 @@ jobs:
84
with:
85
node-version-file: '.nvmrc'
86
cache: yarn
87
- cache-dependency-path: '**/yarn.lock'
87
+ cache-dependency-path: yarn.lock
88
- name: Restore cached node_modules
89
uses: actions/cache@v4
90
with:
package.json
+1
-1
@@ -118,7 +118,7 @@
118
"testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"
119
},
120
"scripts": {
121
- "prebuild": "./scripts/react-compiler/link-compiler.sh",
121
+ "prebuild": "yarn --cwd compiler install --frozen-lockfile && ./scripts/react-compiler/link-compiler.sh",
122
"build": "node ./scripts/rollup/build-all-release-channels.js",
123
"build-for-devtools": "cross-env RELEASE_CHANNEL=experimental yarn build react/index,react/jsx,react/compiler-runtime,react-dom/index,react-dom/client,react-dom/unstable_testing,react-dom/test-utils,react-is,react-debug-tools,scheduler,react-test-renderer,react-refresh,react-art --type=NODE",
124
"build-for-devtools-dev": "yarn build-for-devtools --type=NODE_DEV",
scripts/react-compiler/build-compiler.sh
+1
@@ -11,4 +11,5 @@ if [[ "$REACT_CLASS_EQUIVALENCE_TEST" == "true" ]]; then
11
fi
12
13
echo "Building babel-plugin-react-compiler..."
14
+yarn --cwd compiler install --frozen-lockfile
15
yarn --cwd compiler workspace babel-plugin-react-compiler build --dts