Skip to content

Commit a15f204

Browse files
authored
Merge branch 'main' into fix-class-instance-proxies
2 parents 25a75da + f83903b commit a15f204

File tree

2,639 files changed

+91866
-262316
lines changed

Some content is hidden

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

2,639 files changed

+91866
-262316
lines changed

.editorconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ indent_size = 2
88
indent_style = space
99
insert_final_newline = true
1010
max_line_length = 80
11-
trim_trailing_whitespace = true
1211

1312
[*.md]
1413
max_line_length = 0
15-
trim_trailing_whitespace = false
1614

1715
[COMMIT_EDITMSG]
1816
max_line_length = 0

.eslintrc.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
'babel',
2424
'ft-flow',
2525
'jest',
26+
'es',
2627
'no-for-of-loops',
2728
'no-function-declare-after-return',
2829
'react',
@@ -47,7 +48,7 @@ module.exports = {
4748
'ft-flow/no-unused-expressions': ERROR,
4849
// 'ft-flow/no-weak-types': WARNING,
4950
// 'ft-flow/require-valid-file-annotation': ERROR,
50-
51+
'es/no-optional-chaining': ERROR,
5152
'no-cond-assign': OFF,
5253
'no-constant-condition': OFF,
5354
'no-control-regex': OFF,
@@ -302,7 +303,6 @@ module.exports = {
302303
ERROR,
303304
{isProductionUserAppCode: true},
304305
],
305-
'react-internal/no-to-warn-dev-within-to-throw': ERROR,
306306
'react-internal/warning-args': ERROR,
307307
'react-internal/no-production-logging': ERROR,
308308
},
@@ -329,6 +329,7 @@ module.exports = {
329329
'packages/react-server-dom-esm/**/*.js',
330330
'packages/react-server-dom-webpack/**/*.js',
331331
'packages/react-server-dom-turbopack/**/*.js',
332+
'packages/react-server-dom-parcel/**/*.js',
332333
'packages/react-server-dom-fb/**/*.js',
333334
'packages/react-test-renderer/**/*.js',
334335
'packages/react-debug-tools/**/*.js',
@@ -435,6 +436,7 @@ module.exports = {
435436
'packages/react-dom/src/test-utils/*.js',
436437
],
437438
rules: {
439+
'es/no-optional-chaining': OFF,
438440
'react-internal/no-production-logging': OFF,
439441
'react-internal/warning-args': OFF,
440442
'react-internal/safe-string-coercion': [
@@ -479,6 +481,12 @@ module.exports = {
479481
__turbopack_require__: 'readonly',
480482
},
481483
},
484+
{
485+
files: ['packages/react-server-dom-parcel/**/*.js'],
486+
globals: {
487+
parcelRequire: 'readonly',
488+
},
489+
},
482490
{
483491
files: ['packages/scheduler/**/*.js'],
484492
globals: {
@@ -488,16 +496,19 @@ module.exports = {
488496
{
489497
files: [
490498
'packages/react-devtools-extensions/**/*.js',
499+
'packages/react-devtools-shared/src/devtools/views/**/*.js',
491500
'packages/react-devtools-shared/src/hook.js',
492501
'packages/react-devtools-shared/src/backend/console.js',
493502
'packages/react-devtools-shared/src/backend/shared/DevToolsComponentStackFrame.js',
503+
'packages/react-devtools-shared/src/frontend/utils/withPermissionsCheck.js',
494504
],
495505
globals: {
496506
__IS_CHROME__: 'readonly',
497507
__IS_FIREFOX__: 'readonly',
498508
__IS_EDGE__: 'readonly',
499509
__IS_NATIVE__: 'readonly',
500510
__IS_INTERNAL_VERSION__: 'readonly',
511+
chrome: 'readonly',
501512
},
502513
},
503514
{
@@ -567,6 +578,7 @@ module.exports = {
567578
React$Node: 'readonly',
568579
React$Portal: 'readonly',
569580
React$Ref: 'readonly',
581+
React$RefSetter: 'readonly',
570582
ReadableStreamController: 'readonly',
571583
ReadableStreamReader: 'readonly',
572584
RequestInfo: 'readonly',
@@ -580,6 +592,11 @@ module.exports = {
580592
WheelEventHandler: 'readonly',
581593
FinalizationRegistry: 'readonly',
582594
Omit: 'readonly',
595+
Keyframe: 'readonly',
596+
PropertyIndexedKeyframes: 'readonly',
597+
KeyframeAnimationOptions: 'readonly',
598+
GetAnimationsOptions: 'readonly',
599+
Animatable: 'readonly',
583600

584601
spyOnDev: 'readonly',
585602
spyOnDevAndProd: 'readonly',

.github/ISSUE_TEMPLATE/compiler_bug_report.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ body:
5555
Please provide your React version in the app where this issue occurred.
5656
validations:
5757
required: true
58+
- type: input
59+
attributes:
60+
label: What version of React Compiler are you using?
61+
description: |
62+
Please provide the exact React Compiler version in the app where this issue occurred.
63+
validations:
64+
required: true

.github/dependabot.yml

Lines changed: 5 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,10 @@
11
version: 2
22
updates:
33
- package-ecosystem: "npm"
4-
directory: "/fixtures/art"
4+
directories:
5+
- "/fixtures/*"
56
schedule:
6-
interval: "weekly"
7-
open-pull-requests-limit: 0
8-
- package-ecosystem: "npm"
9-
directory: "/fixtures/attribute-behavior"
10-
schedule:
11-
interval: "weekly"
12-
open-pull-requests-limit: 0
13-
- package-ecosystem: "npm"
14-
directory: "/fixtures/concurrent"
15-
schedule:
16-
interval: "weekly"
17-
open-pull-requests-limit: 0
18-
- package-ecosystem: "npm"
19-
directory: "/fixtures/devtools"
20-
schedule:
21-
interval: "weekly"
22-
open-pull-requests-limit: 0
23-
- package-ecosystem: "npm"
24-
directory: "/fixtures/dom"
25-
schedule:
26-
interval: "weekly"
27-
open-pull-requests-limit: 0
28-
- package-ecosystem: "npm"
29-
directory: "/fixtures/eslint"
30-
schedule:
31-
interval: "weekly"
32-
open-pull-requests-limit: 0
33-
- package-ecosystem: "npm"
34-
directory: "/fixtures/expiration"
35-
schedule:
36-
interval: "weekly"
37-
open-pull-requests-limit: 0
38-
- package-ecosystem: "npm"
39-
directory: "/fixtures/fiber-debugger"
40-
schedule:
41-
interval: "weekly"
42-
open-pull-requests-limit: 0
43-
- package-ecosystem: "npm"
44-
directory: "/fixtures/fiber-triangle"
45-
schedule:
46-
interval: "weekly"
47-
open-pull-requests-limit: 0
48-
- package-ecosystem: "npm"
49-
directory: "/fixtures/fizz"
50-
schedule:
51-
interval: "weekly"
52-
open-pull-requests-limit: 0
53-
- package-ecosystem: "npm"
54-
directory: "/fixtures/fizz-ssr-browser"
55-
schedule:
56-
interval: "weekly"
57-
open-pull-requests-limit: 0
58-
- package-ecosystem: "npm"
59-
directory: "/fixtures/flight"
60-
schedule:
61-
interval: "weekly"
62-
open-pull-requests-limit: 0
63-
- package-ecosystem: "npm"
64-
directory: "/fixtures/flight-browser"
65-
schedule:
66-
interval: "weekly"
67-
open-pull-requests-limit: 0
68-
- package-ecosystem: "npm"
69-
directory: "/fixtures/flight-esm"
70-
schedule:
71-
interval: "weekly"
72-
open-pull-requests-limit: 0
73-
- package-ecosystem: "npm"
74-
directory: "/fixtures/legacy-jsx-runtimes"
75-
schedule:
76-
interval: "weekly"
77-
open-pull-requests-limit: 0
78-
- package-ecosystem: "npm"
79-
directory: "/fixtures/nesting"
80-
schedule:
81-
interval: "weekly"
82-
open-pull-requests-limit: 0
83-
- package-ecosystem: "npm"
84-
directory: "/fixtures/packaging"
85-
schedule:
86-
interval: "weekly"
87-
open-pull-requests-limit: 0
88-
- package-ecosystem: "npm"
89-
directory: "/fixtures/scheduler"
90-
schedule:
91-
interval: "weekly"
92-
open-pull-requests-limit: 0
93-
- package-ecosystem: "npm"
94-
directory: "/fixtures/ssr"
95-
schedule:
96-
interval: "weekly"
97-
open-pull-requests-limit: 0
98-
- package-ecosystem: "npm"
99-
directory: "/fixtures/ssr-2"
100-
schedule:
101-
interval: "weekly"
102-
open-pull-requests-limit: 0
103-
- package-ecosystem: "npm"
104-
directory: "/fixtures/stacks"
105-
schedule:
106-
interval: "weekly"
7+
interval: "monthly"
1078
open-pull-requests-limit: 0
9+
ignore:
10+
- dependency-name: "*"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: (Compiler) Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
paths:
7+
- compiler/**
8+
- .github/workflows/compiler_**.yml
9+
10+
jobs:
11+
check_maintainer:
12+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
13+
with:
14+
actor: ${{ github.event.pull_request.user.login }}
15+
16+
notify:
17+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
18+
needs: check_maintainer
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Discord Webhook Action
22+
uses: tsickert/[email protected]
23+
with:
24+
webhook-url: ${{ secrets.COMPILER_DISCORD_WEBHOOK_URL }}
25+
embed-author-name: ${{ github.event.pull_request.user.login }}
26+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
27+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
28+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
29+
embed-description: ${{ github.event.pull_request.body }}
30+
embed-url: ${{ github.event.pull_request.html_url }}

.github/workflows/compiler_playground.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ on:
66
pull_request:
77
paths:
88
- compiler/**
9-
- .github/workflows/compiler-playground.yml
9+
- .github/workflows/compiler_playground.yml
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }}
13+
cancel-in-progress: true
1014

1115
env:
1216
TZ: /usr/share/zoneinfo/America/Los_Angeles
@@ -15,7 +19,7 @@ env:
1519

1620
defaults:
1721
run:
18-
working-directory: compiler
22+
working-directory: compiler/apps/playground
1923

2024
jobs:
2125
playground:
@@ -27,13 +31,21 @@ jobs:
2731
with:
2832
node-version-file: '.nvmrc'
2933
cache: yarn
30-
cache-dependency-path: compiler/yarn.lock
34+
cache-dependency-path: compiler/**/yarn.lock
3135
- name: Restore cached node_modules
3236
uses: actions/cache@v4
3337
id: node_modules
3438
with:
3539
path: "**/node_modules"
36-
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
40+
key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
3741
- run: yarn install --frozen-lockfile
3842
- run: npx playwright install --with-deps chromium
39-
- run: yarn workspace playground test
43+
- run: CI=true yarn test
44+
- run: ls -R test-results
45+
if: '!cancelled()'
46+
- name: Archive test results
47+
if: '!cancelled()'
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: test-results
51+
path: compiler/apps/playground/test-results

.github/workflows/compiler_prereleases.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
dist_tag:
1414
required: true
1515
type: string
16+
version_name:
17+
required: true
18+
type: string
1619
secrets:
1720
NPM_TOKEN:
1821
required: true
@@ -44,9 +47,9 @@ jobs:
4447
id: node_modules
4548
with:
4649
path: "**/node_modules"
47-
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
50+
key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
4851
- run: yarn install --frozen-lockfile
4952
- name: Publish packages to npm
5053
run: |
5154
cp ./scripts/release/ci-npmrc ~/.npmrc
52-
scripts/release/publish.js --frfr --ci --tags ${{ inputs.dist_tag }}
55+
scripts/release/publish.js --frfr --ci --versionName=${{ inputs.version_name }} --tag ${{ inputs.dist_tag }}

.github/workflows/compiler_prereleases_manual.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ on:
55
inputs:
66
prerelease_commit_sha:
77
required: false
8+
release_channel:
9+
required: true
10+
type: string
11+
dist_tag:
12+
required: true
13+
type: string
14+
version_name:
15+
required: true
16+
type: string
817

918
env:
1019
TZ: /usr/share/zoneinfo/America/Los_Angeles
@@ -15,7 +24,8 @@ jobs:
1524
uses: facebook/react/.github/workflows/compiler_prereleases.yml@main
1625
with:
1726
commit_sha: ${{ inputs.prerelease_commit_sha || github.sha }}
18-
release_channel: experimental
19-
dist_tag: experimental
27+
release_channel: ${{ inputs.release_channel }}
28+
dist_tag: ${{ inputs.dist_tag }}
29+
version_name: ${{ inputs.version_name }}
2030
secrets:
2131
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/compiler_prereleases_nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ jobs:
1616
commit_sha: ${{ github.sha }}
1717
release_channel: experimental
1818
dist_tag: experimental
19+
version_name: '0.0.0'
1920
secrets:
2021
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: (Compiler) Publish Prereleases Weekly
2+
3+
on:
4+
schedule:
5+
# At 10 minutes past 9:00 on Mon
6+
- cron: 10 9 * * 1
7+
8+
env:
9+
TZ: /usr/share/zoneinfo/America/Los_Angeles
10+
11+
jobs:
12+
publish_prerelease_beta:
13+
name: Publish to beta channel
14+
uses: facebook/react/.github/workflows/compiler_prereleases.yml@main
15+
with:
16+
commit_sha: ${{ github.sha }}
17+
release_channel: beta
18+
dist_tag: beta
19+
version_name: '19.0.0'
20+
secrets:
21+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)