Skip to content

Commit 263b12f

Browse files
authored
Merge branch 'main' into persistent-update3
2 parents b18abbb + fac78af commit 263b12f

File tree

1,903 files changed

+13021
-12733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,903 files changed

+13021
-12733
lines changed

.circleci/config.yml

Lines changed: 4 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,6 @@ parameters:
4848
default: ''
4949

5050
jobs:
51-
scrape_warning_messages:
52-
docker: *docker
53-
environment: *environment
54-
55-
steps:
56-
- checkout
57-
- setup_node_modules
58-
- run:
59-
command: |
60-
mkdir -p ./build/__test_utils__
61-
node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
62-
- persist_to_workspace:
63-
root: .
64-
paths:
65-
- build
66-
6751
yarn_build:
6852
docker: *docker
6953
environment: *environment
@@ -97,33 +81,6 @@ jobs:
9781
paths:
9882
- build
9983

100-
download_base_build_for_sizebot:
101-
docker: *docker
102-
environment: *environment
103-
steps:
104-
- checkout
105-
- setup_node_modules
106-
- run:
107-
name: Download artifacts for base revision
108-
command: |
109-
git fetch origin main
110-
cd ./scripts/release && yarn && cd ../../
111-
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main) --allowBrokenCI
112-
mv ./build ./base-build
113-
114-
- run:
115-
# TODO: The `download-experimental-build` script copies the npm
116-
# packages into the `node_modules` directory. This is a historical
117-
# quirk of how the release script works. Let's pretend they
118-
# don't exist.
119-
name: Delete extraneous files
120-
command: rm -rf ./base-build/node_modules
121-
122-
- persist_to_workspace:
123-
root: .
124-
paths:
125-
- base-build
126-
12784
process_artifacts_combined:
12885
docker: *docker
12986
environment: *environment
@@ -133,7 +90,10 @@ jobs:
13390
at: .
13491
- setup_node_modules
13592
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
136-
# Compress build directory into a single tarball for easy download
93+
- run: |
94+
mkdir -p ./build/__test_utils__
95+
node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
96+
# Compress build directory into a single tarball for easy download
13797
- run: tar -zcvf ./build.tgz ./build
13898
# TODO: Migrate scripts to use `build` directory instead of `build2`
13999
- run: cp ./build.tgz ./build2.tgz
@@ -142,20 +102,6 @@ jobs:
142102
- store_artifacts:
143103
path: ./build.tgz
144104

145-
sizebot:
146-
docker: *docker
147-
environment: *environment
148-
steps:
149-
- checkout
150-
- attach_workspace:
151-
at: .
152-
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
153-
- setup_node_modules
154-
- run:
155-
command: node ./scripts/tasks/danger
156-
- store_artifacts:
157-
path: sizebot-message.md
158-
159105
build_devtools_and_process_artifacts:
160106
docker: *docker
161107
environment: *environment
@@ -271,28 +217,8 @@ workflows:
271217
branches:
272218
ignore:
273219
- builds/facebook-www
274-
- scrape_warning_messages:
275-
filters:
276-
branches:
277-
ignore:
278-
- builds/facebook-www
279220
- process_artifacts_combined:
280221
requires:
281-
- scrape_warning_messages
282-
- yarn_build
283-
- download_base_build_for_sizebot:
284-
filters:
285-
branches:
286-
ignore:
287-
- main
288-
- builds/facebook-www
289-
- sizebot:
290-
filters:
291-
branches:
292-
ignore:
293-
- main
294-
requires:
295-
- download_base_build_for_sizebot
296222
- yarn_build
297223

298224
devtools_regression_tests:

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
c998bb1ed4b3285398c9c7797135d3f060243c6a
2+
fd2b3e13d330a4559f5aa21462e1cb2cbbcf144b

.github/workflows/runtime_build_and_test.yml

Lines changed: 96 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,8 @@ jobs:
180180
- name: Archive build
181181
uses: actions/upload-artifact@v4
182182
with:
183-
name: build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
184-
path: |
185-
build
183+
name: _build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
184+
path: build
186185

187186
test_build:
188187
name: yarn test-build
@@ -242,6 +241,7 @@ jobs:
242241
- name: Restore archived build
243242
uses: actions/download-artifact@v4
244243
with:
244+
pattern: _build_*
245245
path: build
246246
merge-multiple: true
247247
- name: Display structure of build
@@ -269,6 +269,7 @@ jobs:
269269
- name: Restore archived build
270270
uses: actions/download-artifact@v4
271271
with:
272+
pattern: _build_*
272273
path: build
273274
merge-multiple: true
274275
- name: Display structure of build
@@ -285,7 +286,7 @@ jobs:
285286
- name: Archive build artifacts
286287
uses: actions/upload-artifact@v4
287288
with:
288-
name: combined_artifacts_${{ github.sha }}
289+
name: artifacts_combined
289290
path: |
290291
./build.tgz
291292
./build2.tgz
@@ -311,6 +312,7 @@ jobs:
311312
- name: Restore archived build
312313
uses: actions/download-artifact@v4
313314
with:
315+
pattern: _build_*
314316
path: build
315317
merge-multiple: true
316318
- name: Display structure of build
@@ -341,6 +343,7 @@ jobs:
341343
- name: Restore archived build
342344
uses: actions/download-artifact@v4
343345
with:
346+
pattern: _build_*
344347
path: build
345348
merge-multiple: true
346349
- name: Display structure of build
@@ -370,6 +373,7 @@ jobs:
370373
- name: Restore archived build
371374
uses: actions/download-artifact@v4
372375
with:
376+
pattern: _build_*
373377
path: build
374378
merge-multiple: true
375379
- name: Display structure of build
@@ -407,6 +411,7 @@ jobs:
407411
- name: Restore archived build
408412
uses: actions/download-artifact@v4
409413
with:
414+
pattern: _build_*
410415
path: build
411416
merge-multiple: true
412417
- name: Display structure of build
@@ -462,6 +467,7 @@ jobs:
462467
- name: Restore archived build
463468
uses: actions/download-artifact@v4
464469
with:
470+
pattern: _build_*
465471
path: build
466472
merge-multiple: true
467473
- run: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
@@ -507,6 +513,7 @@ jobs:
507513
- name: Restore archived build
508514
uses: actions/download-artifact@v4
509515
with:
516+
pattern: _build_*
510517
path: build
511518
merge-multiple: true
512519
- run: |
@@ -515,3 +522,88 @@ jobs:
515522
- run: ./scripts/circleci/run_devtools_e2e_tests.js
516523
env:
517524
RELEASE_CHANNEL: experimental
525+
526+
# ----- SIZEBOT -----
527+
download_base_build_for_sizebot:
528+
if: ${{ github.event_name == 'pull_request' && github.ref_name != 'main' }}
529+
name: Download base build for sizebot
530+
runs-on: ubuntu-latest
531+
steps:
532+
- uses: actions/checkout@v4
533+
- uses: actions/setup-node@v4
534+
with:
535+
node-version: 18.20.1
536+
cache: yarn
537+
cache-dependency-path: yarn.lock
538+
- name: Restore cached node_modules
539+
uses: actions/cache@v4
540+
id: node_modules
541+
with:
542+
path: "**/node_modules"
543+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
544+
- run: yarn install --frozen-lockfile
545+
- run: yarn install --frozen-lockfile
546+
working-directory: scripts/release
547+
- name: Download artifacts for base revision
548+
run: |
549+
git fetch origin main
550+
GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build-ghaction.js --commit=$(git rev-parse origin/main)
551+
mv ./build ./base-build
552+
# TODO: The `download-experimental-build` script copies the npm
553+
# packages into the `node_modules` directory. This is a historical
554+
# quirk of how the release script works. Let's pretend they
555+
# don't exist.
556+
- name: Delete extraneous files
557+
run: rm -rf ./base-build/node_modules
558+
- name: Display structure of base-build
559+
run: ls -R base-build
560+
- name: Archive base-build
561+
uses: actions/upload-artifact@v4
562+
with:
563+
name: base-build
564+
path: base-build
565+
566+
sizebot:
567+
name: Run sizebot
568+
needs: [build_and_lint, download_base_build_for_sizebot]
569+
runs-on: ubuntu-latest
570+
steps:
571+
- uses: actions/checkout@v4
572+
- uses: actions/setup-node@v4
573+
with:
574+
node-version: 18.20.1
575+
cache: yarn
576+
cache-dependency-path: yarn.lock
577+
- name: Restore cached node_modules
578+
uses: actions/cache@v4
579+
id: node_modules
580+
with:
581+
path: "**/node_modules"
582+
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
583+
- run: yarn install --frozen-lockfile
584+
- name: Restore archived build for PR
585+
uses: actions/download-artifact@v4
586+
with:
587+
pattern: _build_*
588+
path: build
589+
merge-multiple: true
590+
- name: Scrape warning messages
591+
run: |
592+
mkdir -p ./build/__test_utils__
593+
node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
594+
- name: Display structure of build for PR
595+
run: ls -R build
596+
- name: Restore archived base-build from origin/main
597+
uses: actions/download-artifact@v4
598+
with:
599+
name: base-build
600+
path: base-build
601+
- name: Display structure of base-build from origin/main
602+
run: ls -R base-build
603+
- run: echo ${{ github.sha }} >> build/COMMIT_SHA
604+
- run: node ./scripts/tasks/danger
605+
- name: Archive sizebot results
606+
uses: actions/upload-artifact@v4
607+
with:
608+
name: sizebot-message
609+
path: sizebot-message.md

.prettierrc.js

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
'use strict';
22

3-
const {
4-
compilerPaths,
5-
esNextPaths,
6-
typescriptPaths,
7-
} = require('./scripts/shared/pathsByLanguageVersion');
3+
const {esNextPaths} = require('./scripts/shared/pathsByLanguageVersion');
84

95
module.exports = {
106
bracketSpacing: false,
@@ -28,25 +24,11 @@ module.exports = {
2824
},
2925
},
3026
{
31-
files: typescriptPaths,
27+
files: ['*.ts', '*.tsx'],
3228
options: {
3329
trailingComma: 'all',
3430
parser: 'typescript',
3531
},
3632
},
37-
{
38-
files: compilerPaths,
39-
options: {
40-
requirePragma: false,
41-
parser: 'babel-ts',
42-
semi: true,
43-
singleQuote: false,
44-
trailingComma: 'es5',
45-
bracketSpacing: true,
46-
bracketSameLine: false,
47-
printWidth: 80,
48-
arrowParens: 'always',
49-
},
50-
},
5133
],
5234
};

compiler/apps/playground/__tests__/e2e/page.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import { expect, test } from "@playwright/test";
9-
import { encodeStore, type Store } from "../../lib/stores";
8+
import {expect, test} from '@playwright/test';
9+
import {encodeStore, type Store} from '../../lib/stores';
1010

1111
const STORE: Store = {
1212
source: `export default function TestComponent({ x }) {
@@ -17,33 +17,33 @@ const STORE: Store = {
1717
const HASH = encodeStore(STORE);
1818

1919
function concat(data: Array<string>): string {
20-
return data.join("");
20+
return data.join('');
2121
}
2222

23-
test("editor should compile successfully", async ({ page }) => {
24-
await page.goto(`/#${HASH}`, { waitUntil: "networkidle" });
23+
test('editor should compile successfully', async ({page}) => {
24+
await page.goto(`/#${HASH}`, {waitUntil: 'networkidle'});
2525
await page.screenshot({
2626
fullPage: true,
27-
path: "test-results/00-on-networkidle.png",
27+
path: 'test-results/00-on-networkidle.png',
2828
});
2929

3030
// User input from hash compiles
3131
await page.screenshot({
3232
fullPage: true,
33-
path: "test-results/01-show-js-before.png",
33+
path: 'test-results/01-show-js-before.png',
3434
});
3535
const userInput =
36-
(await page.locator(".monaco-editor").nth(2).allInnerTexts()) ?? [];
37-
expect(concat(userInput)).toMatchSnapshot("user-input.txt");
36+
(await page.locator('.monaco-editor').nth(2).allInnerTexts()) ?? [];
37+
expect(concat(userInput)).toMatchSnapshot('user-input.txt');
3838

3939
// Reset button works
40-
page.on("dialog", (dialog) => dialog.accept());
41-
await page.getByRole("button", { name: "Reset" }).click();
40+
page.on('dialog', dialog => dialog.accept());
41+
await page.getByRole('button', {name: 'Reset'}).click();
4242
await page.screenshot({
4343
fullPage: true,
44-
path: "test-results/02-show-js-after.png",
44+
path: 'test-results/02-show-js-after.png',
4545
});
4646
const defaultInput =
47-
(await page.locator(".monaco-editor").nth(2).allInnerTexts()) ?? [];
48-
expect(concat(defaultInput)).toMatchSnapshot("default-input.txt");
47+
(await page.locator('.monaco-editor').nth(2).allInnerTexts()) ?? [];
48+
expect(concat(defaultInput)).toMatchSnapshot('default-input.txt');
4949
});

0 commit comments

Comments
 (0)