Skip to content

Commit 8789464

Browse files
committed
Merge branch 'main' into feat/devtools/displayname-overrides-built-in-badges
2 parents 7817fdc + 033efe7 commit 8789464

File tree

712 files changed

+37970
-9095
lines changed

Some content is hidden

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

712 files changed

+37970
-9095
lines changed

.circleci/config.yml

+40-76
Original file line numberDiff line numberDiff line change
@@ -91,61 +91,22 @@ jobs:
9191
- *restore_node_modules
9292
- run: node ./scripts/tasks/flow-ci
9393

94-
RELEASE_CHANNEL_stable_yarn_build:
94+
scrape_warning_messages:
9595
docker: *docker
9696
environment: *environment
97-
parallelism: *TEST_PARALLELISM
98-
steps:
99-
- checkout
100-
- run: yarn workspaces info | head -n -1 > workspace_info.txt
101-
- *restore_node_modules
102-
- run:
103-
environment:
104-
RELEASE_CHANNEL: stable
105-
command: |
106-
./scripts/circleci/add_build_info_json.sh
107-
./scripts/circleci/update_package_versions.sh
108-
yarn build
109-
- run: echo "stable" >> build/RELEASE_CHANNEL
110-
- persist_to_workspace:
111-
root: build
112-
paths:
113-
- RELEASE_CHANNEL
114-
- facebook-www
115-
- facebook-react-native
116-
- facebook-relay
117-
- node_modules
118-
- react-native
119-
- dist
120-
- sizes/*.json
12197

122-
yarn_build:
123-
docker: *docker
124-
environment: *environment
125-
parallelism: 20
12698
steps:
12799
- checkout
128100
- run: yarn workspaces info | head -n -1 > workspace_info.txt
129101
- *restore_node_modules
130102
- run:
131-
environment:
132-
RELEASE_CHANNEL: experimental
133103
command: |
134-
./scripts/circleci/add_build_info_json.sh
135-
./scripts/circleci/update_package_versions.sh
136-
yarn build
137-
- run: echo "experimental" >> build/RELEASE_CHANNEL
104+
mkdir -p ./build
105+
node ./scripts/print-warnings/print-warnings.js > build/WARNINGS
138106
- persist_to_workspace:
139-
root: build
107+
root: .
140108
paths:
141-
- RELEASE_CHANNEL
142-
- facebook-www
143-
- facebook-react-native
144-
- facebook-relay
145-
- node_modules
146-
- react-native
147-
- dist
148-
- sizes/*.json
109+
- build
149110

150111
yarn_build_combined:
151112
docker: *docker
@@ -159,7 +120,7 @@ jobs:
159120
- persist_to_workspace:
160121
root: .
161122
paths:
162-
- build2
123+
- build
163124

164125
get_base_build:
165126
docker: *docker
@@ -174,7 +135,15 @@ jobs:
174135
git fetch origin main
175136
cd ./scripts/release && yarn && cd ../../
176137
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main)
177-
mv ./build2 ./base-build
138+
mv ./build ./base-build
139+
- run:
140+
# TODO: The `download-experimental-build` script copies the npm
141+
# packages into the `node_modules` directory. This is a historical
142+
# quirk of how the release script works. Let's pretend they
143+
# don't exist.
144+
name: Delete extraneous files
145+
command: rm -rf ./base-build/node_modules
146+
178147
- persist_to_workspace:
179148
root: .
180149
paths:
@@ -189,11 +158,15 @@ jobs:
189158
at: .
190159
- run: yarn workspaces info | head -n -1 > workspace_info.txt
191160
- *restore_node_modules
192-
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
161+
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
193162
# Compress build directory into a single tarball for easy download
194-
- run: tar -zcvf ./build2.tgz ./build2
163+
- run: tar -zcvf ./build.tgz ./build
164+
# TODO: Migrate scripts to use `build` directory instead of `build2`
165+
- run: cp ./build.tgz ./build2.tgz
195166
- store_artifacts:
196167
path: ./build2.tgz
168+
- store_artifacts:
169+
path: ./build.tgz
197170

198171
sizebot:
199172
docker: *docker
@@ -202,7 +175,7 @@ jobs:
202175
- checkout
203176
- attach_workspace:
204177
at: .
205-
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
178+
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
206179
- run: yarn workspaces info | head -n -1 > workspace_info.txt
207180
- *restore_node_modules
208181
- run:
@@ -213,9 +186,9 @@ jobs:
213186
environment: *environment
214187
steps:
215188
- checkout
216-
- attach_workspace: *attach_workspace
189+
- attach_workspace:
190+
at: .
217191
- run: yarn workspaces info | head -n -1 > workspace_info.txt
218-
- *restore_yarn_cache
219192
- *restore_node_modules
220193
- run:
221194
name: Install Packages
@@ -274,7 +247,8 @@ jobs:
274247
environment: *environment
275248
steps:
276249
- checkout
277-
- attach_workspace: *attach_workspace
250+
- attach_workspace:
251+
at: .
278252
- run: yarn workspaces info | head -n -1 > workspace_info.txt
279253
- *restore_node_modules
280254
- run:
@@ -342,30 +316,6 @@ jobs:
342316
343317
workflows:
344318
version: 2
345-
stable:
346-
unless: << pipeline.parameters.prerelease_commit_sha >>
347-
jobs:
348-
- setup
349-
- yarn_lint:
350-
requires:
351-
- setup
352-
- RELEASE_CHANNEL_stable_yarn_build:
353-
requires:
354-
- setup
355-
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
356-
requires:
357-
- RELEASE_CHANNEL_stable_yarn_build
358-
359-
experimental:
360-
unless: << pipeline.parameters.prerelease_commit_sha >>
361-
jobs:
362-
- setup
363-
- yarn_build:
364-
requires:
365-
- setup
366-
- build_devtools_and_process_artifacts:
367-
requires:
368-
- yarn_build
369319

370320
# New workflow that will replace "stable" and "experimental"
371321
build_and_test:
@@ -380,6 +330,9 @@ workflows:
380330
- sync_reconciler_forks:
381331
requires:
382332
- setup
333+
- yarn_lint:
334+
requires:
335+
- setup
383336
- yarn_test:
384337
requires:
385338
- setup
@@ -408,8 +361,12 @@ workflows:
408361
- yarn_build_combined:
409362
requires:
410363
- setup
364+
- scrape_warning_messages:
365+
requires:
366+
- setup
411367
- process_artifacts_combined:
412368
requires:
369+
- scrape_warning_messages
413370
- yarn_build_combined
414371
- yarn_test_build:
415372
requires:
@@ -457,6 +414,13 @@ workflows:
457414
- yarn_lint_build:
458415
requires:
459416
- yarn_build_combined
417+
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
418+
requires:
419+
- yarn_build_combined
420+
- build_devtools_and_process_artifacts:
421+
requires:
422+
- yarn_build_combined
423+
460424
fuzz_tests:
461425
unless: << pipeline.parameters.prerelease_commit_sha >>
462426
triggers:

.codesandbox/ci.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"packages": ["packages/react", "packages/react-dom", "packages/scheduler"],
3-
"buildCommand": "build --type=NODE react/index,react-dom/index,react-dom/server,react-dom/test-utils,scheduler/index,react/jsx-runtime,react/jsx-dev-runtime",
4-
"node": "12",
3+
"buildCommand": "download-build-in-codesandbox-ci",
4+
"node": "14",
55
"publishDirectory": {
6-
"react": "build/node_modules/react",
7-
"react-dom": "build/node_modules/react-dom",
8-
"scheduler": "build/node_modules/scheduler"
6+
"react": "build/oss-experimental/react",
7+
"react-dom": "build/oss-experimental/react-dom",
8+
"scheduler": "build/oss-experimental/scheduler"
99
},
1010
"sandboxes": ["new"],
1111
"silent": true

.eslintignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ packages/react-art/npm/lib
66

77
# Build products
88
build/
9-
# TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
10-
# with old build job. Remove once we migrate rest of build/test pipeline.
11-
build2/
129
coverage/
1310
fixtures/
1411
scripts/bench/benchmarks/**/*.js
@@ -20,10 +17,10 @@ packages/react-devtools-core/dist
2017
packages/react-devtools-extensions/chrome/build
2118
packages/react-devtools-extensions/firefox/build
2219
packages/react-devtools-extensions/shared/build
23-
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
24-
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
2520
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
2621
packages/react-devtools-inline/dist
22+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
23+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
2724
packages/react-devtools-shell/dist
2825
packages/react-devtools-scheduling-profiler/dist
2926
packages/react-devtools-scheduling-profiler/static

.eslintrc.js

+26
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ module.exports = {
108108
// CUSTOM RULES
109109
// the second argument of warning/invariant should be a literal string
110110
'react-internal/no-primitive-constructors': ERROR,
111+
'react-internal/safe-string-coercion': [
112+
ERROR,
113+
{isProductionUserAppCode: true},
114+
],
111115
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
112116
'react-internal/invariant-args': ERROR,
113117
'react-internal/warning-args': ERROR,
@@ -168,10 +172,17 @@ module.exports = {
168172
'packages/*/npm/**/*.js',
169173
'packages/dom-event-testing-library/**/*.js',
170174
'packages/react-devtools*/**/*.js',
175+
'dangerfile.js',
176+
'fixtures',
177+
'packages/react-dom/src/test-utils/*.js',
171178
],
172179
rules: {
173180
'react-internal/no-production-logging': OFF,
174181
'react-internal/warning-args': OFF,
182+
'react-internal/safe-string-coercion': [
183+
ERROR,
184+
{isProductionUserAppCode: false},
185+
],
175186

176187
// Disable accessibility checks
177188
'jsx-a11y/aria-role': OFF,
@@ -182,6 +193,21 @@ module.exports = {
182193
'jsx-a11y/tabindex-no-positive': OFF,
183194
},
184195
},
196+
{
197+
files: [
198+
'scripts/eslint-rules/*.js',
199+
'packages/eslint-plugin-react-hooks/src/*.js',
200+
],
201+
plugins: ['eslint-plugin'],
202+
rules: {
203+
'eslint-plugin/prefer-object-rule': ERROR,
204+
'eslint-plugin/require-meta-fixable': [
205+
ERROR,
206+
{catchNoFixerButFixableProperty: true},
207+
],
208+
'eslint-plugin/require-meta-has-suggestions': ERROR,
209+
},
210+
},
185211
{
186212
files: [
187213
'packages/react-native-renderer/**/*.js',

.github/PULL_REQUEST_TEMPLATE.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@
2020

2121
## Summary
2222

23-
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
23+
<!--
24+
Explain the **motivation** for making this change. What existing problem does the pull request solve?
25+
-->
2426

25-
## Test Plan
27+
## How did you test this change?
2628

27-
<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->
29+
<!--
30+
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
31+
How exactly did you verify that your PR solves the issue you wanted to solve?
32+
If you leave this empty, your PR will very likely be closed.
33+
-->

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ scripts/flow/*/.flowconfig
88
_SpecRunner.html
99
__benchmarks__
1010
build/
11-
build2/
1211
remote-repo/
1312
coverage/
1413
.module-cache
@@ -36,4 +35,4 @@ packages/react-devtools-extensions/shared/build
3635
packages/react-devtools-extensions/.tempUserDataDir
3736
packages/react-devtools-inline/dist
3837
packages/react-devtools-shell/dist
39-
packages/react-devtools-scheduling-profiler/dist
38+
packages/react-devtools-scheduling-profiler/dist

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.17.0
1+
v14.17.6

.prettierignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ packages/react-devtools-core/dist
22
packages/react-devtools-extensions/chrome/build
33
packages/react-devtools-extensions/firefox/build
44
packages/react-devtools-extensions/shared/build
5-
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
6-
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
75
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
86
packages/react-devtools-inline/dist
7+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
8+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
99
packages/react-devtools-shell/dist
1010
packages/react-devtools-scheduling-profiler/dist
1111
packages/react-devtools-scheduling-profiler/static

ReactVersions.js

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const experimentalPackages = [
4747
'react-fs',
4848
'react-pg',
4949
'react-server-dom-webpack',
50+
'use-sync-external-store',
5051
];
5152

5253
module.exports = {

0 commit comments

Comments
 (0)