Skip to content

Commit

Permalink
Merge branch 'main' into feat/devtools/displayname-overrides-built-in…
Browse files Browse the repository at this point in the history
…-badges
  • Loading branch information
eps1lon committed Sep 29, 2021
2 parents 7817fdc + 033efe7 commit 8789464
Show file tree
Hide file tree
Showing 712 changed files with 37,970 additions and 9,095 deletions.
116 changes: 40 additions & 76 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,61 +91,22 @@ jobs:
- *restore_node_modules
- run: node ./scripts/tasks/flow-ci

RELEASE_CHANNEL_stable_yarn_build:
scrape_warning_messages:
docker: *docker
environment: *environment
parallelism: *TEST_PARALLELISM
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
environment:
RELEASE_CHANNEL: stable
command: |
./scripts/circleci/add_build_info_json.sh
./scripts/circleci/update_package_versions.sh
yarn build
- run: echo "stable" >> build/RELEASE_CHANNEL
- persist_to_workspace:
root: build
paths:
- RELEASE_CHANNEL
- facebook-www
- facebook-react-native
- facebook-relay
- node_modules
- react-native
- dist
- sizes/*.json

yarn_build:
docker: *docker
environment: *environment
parallelism: 20
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
environment:
RELEASE_CHANNEL: experimental
command: |
./scripts/circleci/add_build_info_json.sh
./scripts/circleci/update_package_versions.sh
yarn build
- run: echo "experimental" >> build/RELEASE_CHANNEL
mkdir -p ./build
node ./scripts/print-warnings/print-warnings.js > build/WARNINGS
- persist_to_workspace:
root: build
root: .
paths:
- RELEASE_CHANNEL
- facebook-www
- facebook-react-native
- facebook-relay
- node_modules
- react-native
- dist
- sizes/*.json
- build

yarn_build_combined:
docker: *docker
Expand All @@ -159,7 +120,7 @@ jobs:
- persist_to_workspace:
root: .
paths:
- build2
- build

get_base_build:
docker: *docker
Expand All @@ -174,7 +135,15 @@ jobs:
git fetch origin main
cd ./scripts/release && yarn && cd ../../
scripts/release/download-experimental-build.js --commit=$(git merge-base HEAD origin/main)
mv ./build2 ./base-build
mv ./build ./base-build
- run:
# TODO: The `download-experimental-build` script copies the npm
# packages into the `node_modules` directory. This is a historical
# quirk of how the release script works. Let's pretend they
# don't exist.
name: Delete extraneous files
command: rm -rf ./base-build/node_modules

- persist_to_workspace:
root: .
paths:
Expand All @@ -189,11 +158,15 @@ jobs:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
# Compress build directory into a single tarball for easy download
- run: tar -zcvf ./build2.tgz ./build2
- run: tar -zcvf ./build.tgz ./build
# TODO: Migrate scripts to use `build` directory instead of `build2`
- run: cp ./build.tgz ./build2.tgz
- store_artifacts:
path: ./build2.tgz
- store_artifacts:
path: ./build.tgz

sizebot:
docker: *docker
Expand All @@ -202,7 +175,7 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: echo "<< pipeline.git.revision >>" >> build2/COMMIT_SHA
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
Expand All @@ -213,9 +186,9 @@ jobs:
environment: *environment
steps:
- checkout
- attach_workspace: *attach_workspace
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_yarn_cache
- *restore_node_modules
- run:
name: Install Packages
Expand Down Expand Up @@ -274,7 +247,8 @@ jobs:
environment: *environment
steps:
- checkout
- attach_workspace: *attach_workspace
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
Expand Down Expand Up @@ -342,30 +316,6 @@ jobs:
workflows:
version: 2
stable:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- setup
- yarn_lint:
requires:
- setup
- RELEASE_CHANNEL_stable_yarn_build:
requires:
- setup
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
requires:
- RELEASE_CHANNEL_stable_yarn_build

experimental:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- setup
- yarn_build:
requires:
- setup
- build_devtools_and_process_artifacts:
requires:
- yarn_build

# New workflow that will replace "stable" and "experimental"
build_and_test:
Expand All @@ -380,6 +330,9 @@ workflows:
- sync_reconciler_forks:
requires:
- setup
- yarn_lint:
requires:
- setup
- yarn_test:
requires:
- setup
Expand Down Expand Up @@ -408,8 +361,12 @@ workflows:
- yarn_build_combined:
requires:
- setup
- scrape_warning_messages:
requires:
- setup
- process_artifacts_combined:
requires:
- scrape_warning_messages
- yarn_build_combined
- yarn_test_build:
requires:
Expand Down Expand Up @@ -457,6 +414,13 @@ workflows:
- yarn_lint_build:
requires:
- yarn_build_combined
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
requires:
- yarn_build_combined
- build_devtools_and_process_artifacts:
requires:
- yarn_build_combined

fuzz_tests:
unless: << pipeline.parameters.prerelease_commit_sha >>
triggers:
Expand Down
10 changes: 5 additions & 5 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"packages": ["packages/react", "packages/react-dom", "packages/scheduler"],
"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",
"node": "12",
"buildCommand": "download-build-in-codesandbox-ci",
"node": "14",
"publishDirectory": {
"react": "build/node_modules/react",
"react-dom": "build/node_modules/react-dom",
"scheduler": "build/node_modules/scheduler"
"react": "build/oss-experimental/react",
"react-dom": "build/oss-experimental/react-dom",
"scheduler": "build/oss-experimental/scheduler"
},
"sandboxes": ["new"],
"silent": true
Expand Down
7 changes: 2 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ packages/react-art/npm/lib

# Build products
build/
# TODO: Currently storing artifacts as `./build2` so that it doesn't conflict
# with old build job. Remove once we migrate rest of build/test pipeline.
build2/
coverage/
fixtures/
scripts/bench/benchmarks/**/*.js
Expand All @@ -20,10 +17,10 @@ packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
packages/react-devtools-inline/dist
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ module.exports = {
// CUSTOM RULES
// the second argument of warning/invariant should be a literal string
'react-internal/no-primitive-constructors': ERROR,
'react-internal/safe-string-coercion': [
ERROR,
{isProductionUserAppCode: true},
],
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
'react-internal/invariant-args': ERROR,
'react-internal/warning-args': ERROR,
Expand Down Expand Up @@ -168,10 +172,17 @@ module.exports = {
'packages/*/npm/**/*.js',
'packages/dom-event-testing-library/**/*.js',
'packages/react-devtools*/**/*.js',
'dangerfile.js',
'fixtures',
'packages/react-dom/src/test-utils/*.js',
],
rules: {
'react-internal/no-production-logging': OFF,
'react-internal/warning-args': OFF,
'react-internal/safe-string-coercion': [
ERROR,
{isProductionUserAppCode: false},
],

// Disable accessibility checks
'jsx-a11y/aria-role': OFF,
Expand All @@ -182,6 +193,21 @@ module.exports = {
'jsx-a11y/tabindex-no-positive': OFF,
},
},
{
files: [
'scripts/eslint-rules/*.js',
'packages/eslint-plugin-react-hooks/src/*.js',
],
plugins: ['eslint-plugin'],
rules: {
'eslint-plugin/prefer-object-rule': ERROR,
'eslint-plugin/require-meta-fixable': [
ERROR,
{catchNoFixerButFixableProperty: true},
],
'eslint-plugin/require-meta-has-suggestions': ERROR,
},
},
{
files: [
'packages/react-native-renderer/**/*.js',
Expand Down
12 changes: 9 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@

## Summary

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

## Test Plan
## How did you test this change?

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. -->
<!--
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
How exactly did you verify that your PR solves the issue you wanted to solve?
If you leave this empty, your PR will very likely be closed.
-->
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ scripts/flow/*/.flowconfig
_SpecRunner.html
__benchmarks__
build/
build2/
remote-repo/
coverage/
.module-cache
Expand Down Expand Up @@ -36,4 +35,4 @@ packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/dist
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.17.0
v14.17.6
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/src/__tests__/__source__/__compiled__/
packages/react-devtools-extensions/src/__tests__/__source__/__untransformed__/
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
packages/react-devtools-inline/dist
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
1 change: 1 addition & 0 deletions ReactVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const experimentalPackages = [
'react-fs',
'react-pg',
'react-server-dom-webpack',
'use-sync-external-store',
];

module.exports = {
Expand Down
Loading

0 comments on commit 8789464

Please sign in to comment.