Skip to content

Commit 312e06f

Browse files
authored
Merge branch 'main' into karlhorky-patch-1
2 parents a87572e + 71b3a03 commit 312e06f

File tree

1,183 files changed

+55687
-14958
lines changed

Some content is hidden

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

1,183 files changed

+55687
-14958
lines changed

.codesandbox/ci.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"packages": ["packages/react", "packages/react-dom", "packages/react-server-dom-webpack", "packages/scheduler"],
33
"buildCommand": "download-build-in-codesandbox-ci",
4-
"node": "18",
4+
"node": "20",
55
"publishDirectory": {
66
"react": "build/oss-experimental/react",
77
"react-dom": "build/oss-experimental/react-dom",

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
2828
packages/react-devtools-shell/dist
2929
packages/react-devtools-timeline/dist
3030
packages/react-devtools-timeline/static
31+
32+
# Imported third-party Flow types
33+
flow-typed/

.eslintrc.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ module.exports = {
468468
files: ['packages/react-server-dom-webpack/**/*.js'],
469469
globals: {
470470
__webpack_chunk_load__: 'readonly',
471+
__webpack_get_script_filename__: 'readonly',
471472
__webpack_require__: 'readonly',
472473
},
473474
},
@@ -516,6 +517,14 @@ module.exports = {
516517
__IS_INTERNAL_VERSION__: 'readonly',
517518
},
518519
},
520+
{
521+
files: ['packages/react-devtools-*/**/*.js'],
522+
excludedFiles: '**/__tests__/**/*.js',
523+
plugins: ['eslint-plugin-react-hooks-published'],
524+
rules: {
525+
'react-hooks-published/rules-of-hooks': ERROR,
526+
},
527+
},
519528
{
520529
files: ['packages/eslint-plugin-react-hooks/src/**/*'],
521530
extends: ['plugin:@typescript-eslint/recommended'],
@@ -546,13 +555,10 @@ module.exports = {
546555
},
547556

548557
globals: {
549-
$Call: 'readonly',
550-
$ElementType: 'readonly',
551558
$Flow$ModuleRef: 'readonly',
552559
$FlowFixMe: 'readonly',
553560
$Keys: 'readonly',
554561
$NonMaybeType: 'readonly',
555-
$PropertyType: 'readonly',
556562
$ReadOnly: 'readonly',
557563
$ReadOnlyArray: 'readonly',
558564
$ArrayBufferView: 'readonly',
@@ -567,6 +573,7 @@ module.exports = {
567573
BigInt: 'readonly',
568574
BigInt64Array: 'readonly',
569575
BigUint64Array: 'readonly',
576+
CacheType: 'readonly',
570577
Class: 'readonly',
571578
ClientRect: 'readonly',
572579
CopyInspectedElementPath: 'readonly',
@@ -578,16 +585,19 @@ module.exports = {
578585
$AsyncIterator: 'readonly',
579586
Iterator: 'readonly',
580587
AsyncIterator: 'readonly',
588+
IntervalID: 'readonly',
581589
IteratorResult: 'readonly',
582590
JSONValue: 'readonly',
583591
JSResourceReference: 'readonly',
592+
mixin$Animatable: 'readonly',
584593
MouseEventHandler: 'readonly',
585594
NavigateEvent: 'readonly',
595+
PerformanceMeasureOptions: 'readonly',
586596
PropagationPhases: 'readonly',
587597
PropertyDescriptor: 'readonly',
588-
React$AbstractComponent: 'readonly',
598+
PropertyDescriptorMap: 'readonly',
599+
Proxy$traps: 'readonly',
589600
React$Component: 'readonly',
590-
React$ComponentType: 'readonly',
591601
React$Config: 'readonly',
592602
React$Context: 'readonly',
593603
React$Element: 'readonly',
@@ -619,7 +629,6 @@ module.exports = {
619629
PropertyIndexedKeyframes: 'readonly',
620630
KeyframeAnimationOptions: 'readonly',
621631
GetAnimationsOptions: 'readonly',
622-
Animatable: 'readonly',
623632
ScrollTimeline: 'readonly',
624633
EventListenerOptionsOrUseCapture: 'readonly',
625634
FocusOptions: 'readonly',

.github/workflows/compiler_playground.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757
key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
5858
- run: npx playwright install --with-deps chromium
5959
if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
60-
- run: npx playwright install-deps
61-
if: steps.cache_playwright_browsers.outputs.cache-hit == 'true'
6260
- run: CI=true yarn test
6361
- run: ls -R test-results
6462
if: '!cancelled()'

.github/workflows/compiler_prereleases.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
tag_version:
2020
required: false
2121
type: string
22+
dry_run:
23+
required: false
24+
type: boolean
2225
secrets:
2326
NPM_TOKEN:
2427
required: true
@@ -55,7 +58,13 @@ jobs:
5558
key: compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/yarn.lock') }}
5659
- run: yarn install --frozen-lockfile
5760
if: steps.node_modules.outputs.cache-hit != 'true'
58-
- name: Publish packages to npm
61+
- if: inputs.dry_run == true
62+
name: Publish packages to npm (dry run)
63+
run: |
64+
cp ./scripts/release/ci-npmrc ~/.npmrc
65+
scripts/release/publish.js --frfr --debug --ci --versionName=${{ inputs.version_name }} --tag=${{ inputs.dist_tag }} ${{ inputs.tag_version && format('--tagVersion={0}', inputs.tag_version) || '' }}
66+
- if: inputs.dry_run != true
67+
name: Publish packages to npm
5968
run: |
6069
cp ./scripts/release/ci-npmrc ~/.npmrc
6170
scripts/release/publish.js --frfr --ci --versionName=${{ inputs.version_name }} --tag=${{ inputs.dist_tag }} ${{ inputs.tag_version && format('--tagVersion={0}', inputs.tag_version) || '' }}

.github/workflows/compiler_prereleases_manual.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
tag_version:
1818
required: false
1919
type: string
20+
dry_run:
21+
required: false
22+
type: boolean
2023

2124
permissions: {}
2225

@@ -33,5 +36,6 @@ jobs:
3336
dist_tag: ${{ inputs.dist_tag }}
3437
version_name: ${{ inputs.version_name }}
3538
tag_version: ${{ inputs.tag_version }}
39+
dry_run: ${{ inputs.dry_run }}
3640
secrets:
3741
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
@@ -19,5 +19,6 @@ jobs:
1919
release_channel: experimental
2020
dist_tag: experimental
2121
version_name: '0.0.0'
22+
dry_run: false
2223
secrets:
2324
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: (DevTools) Discord Notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, ready_for_review]
6+
paths:
7+
- packages/react-devtools**
8+
- .github/workflows/devtools_**.yml
9+
10+
permissions: {}
11+
12+
jobs:
13+
check_access:
14+
if: ${{ github.event.pull_request.draft == false }}
15+
runs-on: ubuntu-latest
16+
outputs:
17+
is_member_or_collaborator: ${{ steps.check_is_member_or_collaborator.outputs.is_member_or_collaborator }}
18+
steps:
19+
- run: echo ${{ github.event.pull_request.author_association }}
20+
- name: Check is member or collaborator
21+
id: check_is_member_or_collaborator
22+
if: ${{ github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'COLLABORATOR' }}
23+
run: echo "is_member_or_collaborator=true" >> "$GITHUB_OUTPUT"
24+
25+
check_maintainer:
26+
if: ${{ needs.check_access.outputs.is_member_or_collaborator == 'true' || needs.check_access.outputs.is_member_or_collaborator == true }}
27+
needs: [check_access]
28+
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
29+
permissions:
30+
# Used by check_maintainer
31+
contents: read
32+
with:
33+
actor: ${{ github.event.pull_request.user.login }}
34+
35+
notify:
36+
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
37+
needs: check_maintainer
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Discord Webhook Action
41+
uses: tsickert/discord-webhook@86dc739f3f165f16dadc5666051c367efa1692f4
42+
with:
43+
webhook-url: ${{ secrets.DEVTOOLS_DISCORD_WEBHOOK_URL }}
44+
embed-author-name: ${{ github.event.pull_request.user.login }}
45+
embed-author-url: ${{ github.event.pull_request.user.html_url }}
46+
embed-author-icon-url: ${{ github.event.pull_request.user.avatar_url }}
47+
embed-title: '#${{ github.event.number }} (+${{github.event.pull_request.additions}} -${{github.event.pull_request.deletions}}): ${{ github.event.pull_request.title }}'
48+
embed-description: ${{ github.event.pull_request.body }}
49+
embed-url: ${{ github.event.pull_request.html_url }}

.github/workflows/devtools_regression_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
uses: actions/upload-artifact@v4
9393
with:
9494
name: react-devtools
95-
path: build/devtools.tgz
95+
path: build/devtools
9696
if-no-files-found: error
9797
# Simplifies getting the extension for local testing
9898
- name: Archive chrome extension
@@ -201,5 +201,5 @@ jobs:
201201
- uses: actions/upload-artifact@v4
202202
with:
203203
name: screenshots
204-
path: ./tmp/screenshots
204+
path: ./tmp/playwright-artifacts
205205
if-no-files-found: warn

.github/workflows/runtime_build_and_test.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
if: steps.node_modules.outputs.cache-hit != 'true'
195195
- run: |
196196
yarn generate-inline-fizz-runtime
197-
git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false)
197+
git diff --exit-code || (echo "There was a change to the Fizz runtime. Run \`yarn generate-inline-fizz-runtime\` and check in the result." && false)
198198
199199
# ----- FEATURE FLAGS -----
200200
flags:
@@ -316,7 +316,7 @@ jobs:
316316
if: steps.node_modules.outputs.cache-hit != 'true'
317317
- run: ./scripts/react-compiler/build-compiler.sh && ./scripts/react-compiler/link-compiler.sh
318318
- run: yarn workspace eslint-plugin-react-hooks test
319-
319+
320320
# ----- BUILD -----
321321
build_and_lint:
322322
name: yarn build and lint
@@ -567,7 +567,7 @@ jobs:
567567
- name: Search build artifacts for unminified errors
568568
run: |
569569
yarn extract-errors
570-
git diff --quiet || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
570+
git diff --exit-code || (echo "Found unminified errors. Either update the error codes map or disable error minification for the affected build, if appropriate." && false)
571571
572572
check_release_dependencies:
573573
name: Check release dependencies
@@ -766,6 +766,11 @@ jobs:
766766
name: react-devtools-${{ matrix.browser }}-extension
767767
path: build/devtools/${{ matrix.browser }}-extension.zip
768768
if-no-files-found: error
769+
- name: Archive ${{ matrix.browser }} metadata
770+
uses: actions/upload-artifact@v4
771+
with:
772+
name: react-devtools-${{ matrix.browser }}-metadata
773+
path: build/devtools/webpack-stats.*.json
769774

770775
merge_devtools_artifacts:
771776
name: Merge DevTools artifacts
@@ -776,7 +781,7 @@ jobs:
776781
uses: actions/upload-artifact/merge@v4
777782
with:
778783
name: react-devtools
779-
pattern: react-devtools-*-extension
784+
pattern: react-devtools-*
780785

781786
run_devtools_e2e_tests:
782787
name: Run DevTools e2e tests
@@ -811,12 +816,27 @@ jobs:
811816
pattern: _build_*
812817
path: build
813818
merge-multiple: true
814-
- run: |
815-
npx playwright install
816-
sudo npx playwright install-deps
819+
- name: Check Playwright version
820+
id: playwright_version
821+
run: echo "playwright_version=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//' | head -1)" >> "$GITHUB_OUTPUT"
822+
- name: Cache Playwright Browsers for version ${{ steps.playwright_version.outputs.playwright_version }}
823+
id: cache_playwright_browsers
824+
uses: actions/cache@v4
825+
with:
826+
path: ~/.cache/ms-playwright
827+
key: playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
828+
- name: Playwright install deps
829+
if: steps.cache_playwright_browsers.outputs.cache-hit != 'true'
830+
run: npx playwright install --with-deps chromium
817831
- run: ./scripts/ci/run_devtools_e2e_tests.js
818832
env:
819833
RELEASE_CHANNEL: experimental
834+
- name: Archive Playwright report
835+
uses: actions/upload-artifact@v4
836+
with:
837+
name: devtools-playwright-artifacts
838+
path: tmp/playwright-artifacts
839+
if-no-files-found: warn
820840

821841
# ----- SIZEBOT -----
822842
sizebot:

0 commit comments

Comments
 (0)