Skip to content

Commit cb3754f

Browse files
committed
Merge branch 'main' into test/exhaustive-deps-generic-args
2 parents 9e9ac23 + 033efe7 commit cb3754f

File tree

769 files changed

+43618
-9660
lines changed

Some content is hidden

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

769 files changed

+43618
-9660
lines changed

.circleci/config.yml

Lines changed: 44 additions & 128 deletions
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
@@ -227,48 +200,6 @@ jobs:
227200
- store_artifacts:
228201
path: ./build/devtools.tgz
229202

230-
build_devtools_scheduling_profiler:
231-
docker: *docker
232-
environment: *environment
233-
steps:
234-
- checkout
235-
- attach_workspace: *attach_workspace
236-
- run: yarn workspaces info | head -n -1 > workspace_info.txt
237-
- *restore_yarn_cache
238-
- *restore_node_modules
239-
- run:
240-
name: Install Packages
241-
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
242-
- run:
243-
name: Build and archive
244-
command: |
245-
mkdir -p build/devtools
246-
cd packages/react-devtools-scheduling-profiler
247-
yarn build
248-
cd dist
249-
tar -zcvf ../../../build/devtools-scheduling-profiler.tgz .
250-
- store_artifacts:
251-
path: ./build/devtools-scheduling-profiler.tgz
252-
- persist_to_workspace:
253-
root: packages/react-devtools-scheduling-profiler
254-
paths:
255-
- dist
256-
257-
deploy_devtools_scheduling_profiler:
258-
docker: *docker
259-
environment: *environment
260-
steps:
261-
- checkout
262-
- attach_workspace:
263-
at: packages/react-devtools-scheduling-profiler
264-
- run: yarn workspaces info | head -n -1 > workspace_info.txt
265-
- *restore_node_modules
266-
- run:
267-
name: Deploy
268-
command: |
269-
cd packages/react-devtools-scheduling-profiler
270-
yarn vercel deploy dist --prod --confirm --token $SCHEDULING_PROFILER_DEPLOY_VERCEL_TOKEN
271-
272203
yarn_lint_build:
273204
docker: *docker
274205
environment: *environment
@@ -306,14 +237,18 @@ jobs:
306237
at: .
307238
- run: yarn workspaces info | head -n -1 > workspace_info.txt
308239
- *restore_node_modules
240+
- run:
241+
name: Install nested packages from Yarn cache
242+
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
309243
- run: yarn test --build <<parameters.args>> --ci
310244

311245
RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
312246
docker: *docker
313247
environment: *environment
314248
steps:
315249
- checkout
316-
- attach_workspace: *attach_workspace
250+
- attach_workspace:
251+
at: .
317252
- run: yarn workspaces info | head -n -1 > workspace_info.txt
318253
- *restore_node_modules
319254
- run:
@@ -381,40 +316,6 @@ jobs:
381316
382317
workflows:
383318
version: 2
384-
stable:
385-
unless: << pipeline.parameters.prerelease_commit_sha >>
386-
jobs:
387-
- setup
388-
- yarn_lint:
389-
requires:
390-
- setup
391-
- RELEASE_CHANNEL_stable_yarn_build:
392-
requires:
393-
- setup
394-
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
395-
requires:
396-
- RELEASE_CHANNEL_stable_yarn_build
397-
398-
experimental:
399-
unless: << pipeline.parameters.prerelease_commit_sha >>
400-
jobs:
401-
- setup
402-
- yarn_build:
403-
requires:
404-
- setup
405-
- build_devtools_and_process_artifacts:
406-
requires:
407-
- yarn_build
408-
- build_devtools_scheduling_profiler:
409-
requires:
410-
- yarn_build
411-
- deploy_devtools_scheduling_profiler:
412-
requires:
413-
- build_devtools_scheduling_profiler
414-
filters:
415-
branches:
416-
only:
417-
- main
418319

419320
# New workflow that will replace "stable" and "experimental"
420321
build_and_test:
@@ -429,6 +330,9 @@ workflows:
429330
- sync_reconciler_forks:
430331
requires:
431332
- setup
333+
- yarn_lint:
334+
requires:
335+
- setup
432336
- yarn_test:
433337
requires:
434338
- setup
@@ -453,11 +357,16 @@ workflows:
453357

454358
# TODO: Test more persistent configurations?
455359
- '-r=stable --env=development --persistent'
360+
- '-r=experimental --env=development --persistent'
456361
- yarn_build_combined:
457362
requires:
458363
- setup
364+
- scrape_warning_messages:
365+
requires:
366+
- setup
459367
- process_artifacts_combined:
460368
requires:
369+
- scrape_warning_messages
461370
- yarn_build_combined
462371
- yarn_test_build:
463372
requires:
@@ -505,6 +414,13 @@ workflows:
505414
- yarn_lint_build:
506415
requires:
507416
- 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+
508424
fuzz_tests:
509425
unless: << pipeline.parameters.prerelease_commit_sha >>
510426
triggers:

.codesandbox/ci.json

Lines changed: 5 additions & 5 deletions
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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ packages/react-devtools-core/dist
1717
packages/react-devtools-extensions/chrome/build
1818
packages/react-devtools-extensions/firefox/build
1919
packages/react-devtools-extensions/shared/build
20+
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
2021
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__/
2124
packages/react-devtools-shell/dist
2225
packages/react-devtools-scheduling-profiler/dist
23-
packages/react-devtools-scheduling-profiler/static
26+
packages/react-devtools-scheduling-profiler/static

.eslintrc.js

Lines changed: 26 additions & 0 deletions
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

Lines changed: 9 additions & 3 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v12.17.0
1+
v14.17.6

0 commit comments

Comments
 (0)