Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 827cbea417a4058ce544184adff2ee2014625309
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 85acf2d19527df568136ba08be97aa766d427ff2
Choose a head ref
Loading
Showing 677 changed files with 17,511 additions and 7,150 deletions.
112 changes: 2 additions & 110 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -74,38 +74,6 @@ parameters:
default: ''

jobs:
yarn_lint:
docker: *docker
environment: *environment

steps:
- checkout
- setup_node_modules
- run: node ./scripts/prettier/index
- run: node ./scripts/tasks/eslint
- run: ./scripts/circleci/check_license.sh
- run: ./scripts/circleci/test_print_warnings.sh

yarn_flow:
docker: *docker
environment: *environment
parallelism: 5

steps:
- checkout
- setup_node_modules
- run: node ./scripts/tasks/flow-ci


yarn_flags:
docker: *docker
environment: *environment

steps:
- checkout
- setup_node_modules
- run: yarn flags

scrape_warning_messages:
docker: *docker
environment: *environment
@@ -313,7 +281,7 @@ jobs:
at: .
- setup_node_modules
- run: ./scripts/circleci/download_devtools_regression_build.js << parameters.version >> --replaceBuild
- run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion << parameters.version >> --ci
- run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion << parameters.version >> --ci=circleci

run_devtools_e2e_tests_for_versions:
docker: *docker
@@ -377,31 +345,6 @@ jobs:
yarn extract-errors
git diff --quiet || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
check_generated_fizz_runtime:
docker: *docker
environment: *environment
steps:
- checkout
- attach_workspace: *attach_workspace
- setup_node_modules
- run:
name: Confirm generated inline Fizz runtime is up to date
command: |
yarn generate-inline-fizz-runtime
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
yarn_test:
docker: *docker
environment: *environment
parallelism: *TEST_PARALLELISM
parameters:
args:
type: string
steps:
- checkout
- setup_node_modules
- run: yarn test <<parameters.args>> --ci

yarn_test_build:
docker: *docker
environment: *environment
@@ -414,7 +357,7 @@ jobs:
- attach_workspace:
at: .
- setup_node_modules
- run: yarn test --build <<parameters.args>> --ci
- run: yarn test --build <<parameters.args>> --ci=circleci

RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
docker: *docker
@@ -464,57 +407,6 @@ workflows:
build_and_test:
unless: << pipeline.parameters.prerelease_commit_sha >>
jobs:
- yarn_flags:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_flow:
filters:
branches:
ignore:
- builds/facebook-www
- check_generated_fizz_runtime:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_lint:
filters:
branches:
ignore:
- builds/facebook-www
- yarn_test:
filters:
branches:
ignore:
- builds/facebook-www
matrix:
parameters:
args:
# Intentionally passing these as strings instead of creating a
# separate parameter per CLI argument, since it's easier to
# control/see which combinations we want to run.
- "-r=stable --env=development"
- "-r=stable --env=production"
- "-r=experimental --env=development"
- "-r=experimental --env=production"
- "-r=www-classic --env=development --variant=false"
- "-r=www-classic --env=production --variant=false"
- "-r=www-classic --env=development --variant=true"
- "-r=www-classic --env=production --variant=true"
- "-r=www-modern --env=development --variant=false"
- "-r=www-modern --env=production --variant=false"
- "-r=www-modern --env=development --variant=true"
- "-r=www-modern --env=production --variant=true"
- "-r=xplat --env=development --variant=false"
- "-r=xplat --env=development --variant=true"
- "-r=xplat --env=production --variant=false"
- "-r=xplat --env=production --variant=true"

# TODO: Test more persistent configurations?
- '-r=stable --env=development --persistent'
- '-r=experimental --env=development --persistent'
- yarn_build:
filters:
branches:
57 changes: 49 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -12,11 +12,13 @@ const WARNING = 1;
const ERROR = 2;

module.exports = {
extends: ['prettier'],
extends: ['prettier', 'plugin:jest/recommended'],

// Stop ESLint from looking for a configuration file in parent folders
root: true,

reportUnusedDisableDirectives: true,

plugins: [
'babel',
'ft-flow',
@@ -245,7 +247,7 @@ module.exports = {
},
],
'no-shadow': ERROR,
'no-unused-vars': [ERROR, {args: 'none'}],
'no-unused-vars': [ERROR, {args: 'none', ignoreRestSiblings: true}],
'no-use-before-define': OFF,
'no-useless-concat': OFF,
quotes: [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true}],
@@ -376,16 +378,49 @@ module.exports = {
files: ['**/__tests__/*.js'],
rules: {
// https://github.com/jest-community/eslint-plugin-jest
'jest/no-focused-tests': ERROR,
'jest/valid-expect': ERROR,
'jest/valid-expect-in-promise': ERROR,
// Meh, who cares.
'jest/consistent-test-it': OFF,
// Meh, we have a lot of these, who cares.
'jest/no-alias-methods': OFF,
// We do conditions based on feature flags.
'jest/no-conditional-expect': OFF,
// We have our own assertion helpers.
'jest/expect-expect': OFF,
// Lame rule that fires in itRender helpers or in render methods.
'jest/no-standalone-expect': OFF,
},
},
{
// disable no focused tests for test setup helper files even if they are inside __tests__ directory
files: ['**/setupTests.js'],
// Rules specific to test setup helper files.
files: [
'**/setupTests.js',
'**/setupEnv.js',
'**/jest/TestFlags.js',
'**/dom-event-testing-library/testHelpers.js',
'**/utils/ReactDOMServerIntegrationTestUtils.js',
'**/babel/transform-react-version-pragma.js',
'**/babel/transform-test-gate-pragma.js',
],
rules: {
// Some helpers intentionally focus tests.
'jest/no-focused-tests': OFF,
// Test fn helpers don't use static text names.
'jest/valid-title': OFF,
// We have our own assertion helpers.
'jest/expect-expect': OFF,
// Some helpers intentionally disable tests.
'jest/no-disabled-tests': OFF,
// Helpers export text function helpers.
'jest/no-export': OFF,
// The examples in comments trigger false errors.
'jest/no-commented-out-tests': OFF,
},
},
{
files: ['**/jest/TestFlags.js'],
rules: {
// The examples in comments trigger false errors.
'jest/no-commented-out-tests': OFF,
},
},
{
@@ -451,7 +486,12 @@ module.exports = {
},
},
{
files: ['packages/react-devtools-extensions/**/*.js'],
files: [
'packages/react-devtools-extensions/**/*.js',
'packages/react-devtools-shared/src/hook.js',
'packages/react-devtools-shared/src/backend/console.js',
'packages/react-devtools-shared/src/backend/DevToolsComponentStackFrame.js',
],
globals: {
__IS_CHROME__: 'readonly',
__IS_FIREFOX__: 'readonly',
@@ -538,6 +578,7 @@ module.exports = {
TimeoutID: 'readonly',
WheelEventHandler: 'readonly',
FinalizationRegistry: 'readonly',
Omit: 'readonly',

spyOnDev: 'readonly',
spyOnDevAndProd: 'readonly',
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compiler Playground
name: (Compiler) Playground

on:
push:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (Rust)
name: (Compiler) Rust

on:
push:
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (TypeScript)
name: (Compiler) TypeScript

on:
push:
@@ -23,25 +23,6 @@ jobs:
- id: set-matrix
run: echo "matrix=$(find packages -mindepth 1 -maxdepth 1 -type d | sed 's!packages/!!g' | tr '\n' ',' | sed s/.$// | jq -Rsc '. / "," - [""]')" >> $GITHUB_OUTPUT

# Hardcoded to improve parallelism for babel-plugin-react-compiler
prettier:
name: Run prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: compiler/yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn prettier:ci

# Hardcoded to improve parallelism
lint:
name: Lint babel-plugin-react-compiler
2 changes: 1 addition & 1 deletion .github/workflows/devtools_check_repro.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DevTools Check for bug repro
name: (DevTools) Check for bug repro
on:
issues:
types: [opened, edited]
Loading