Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from facebook:main #107

Open
wants to merge 67 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
ae3190c
React DevTools 6.1.0 -> 6.1.1 (#32326)
hoxyq Feb 7, 2025
44c3d3d
fix[react-devtools-standalone]: define missing globals (#32327)
hoxyq Feb 7, 2025
8759c5c
Ship enableFabricCompleteRootInCommitPhase (#32318)
jackpope Feb 7, 2025
76e44c2
[compiler] Improve error messages for unhandled terminal and instruct…
inottn Feb 7, 2025
989b0cc
[compiler] Add simple walltime measurement (#32331)
poteto Feb 7, 2025
bc78de3
[ci] Use 'opened' event for discord notifications (#32332)
poteto Feb 7, 2025
569c3b2
[ci] Combine sizebot jobs (#32333)
poteto Feb 7, 2025
7588b6b
[ci] Disallow PRs against builds branch (#32335)
poteto Feb 7, 2025
062fb31
[ci] Fix typo (#32337)
poteto Feb 7, 2025
594ea53
Remove useActionState Hook export from experimental react-server cond…
sebmarkbage Feb 9, 2025
93b5836
Trigger Discord notification when draft PR is set to "ready for revie…
unstubbable Feb 9, 2025
3dd2c62
[react-native] fix divergence in synced code (#32348)
poteto Feb 10, 2025
cd90a4d
[react-native] Suppress Flow nonstrict-import check in ReactNativeTyp…
poteto Feb 10, 2025
0a7dc1b
[devtools] Introduce REACT_DEVTOOLS_PORT for the standalone react-dev…
brendo Feb 11, 2025
899e3d1
[crud] Narrow resource type (#32203)
poteto Feb 11, 2025
0461c0d
[crud] Rename useResourceEffect flag (#32204)
poteto Feb 11, 2025
2c5fd26
[crud] Merge useResourceEffect into useEffect (#32205)
poteto Feb 11, 2025
a69b80d
[crud] Remove useResourceEffect (#32206)
poteto Feb 11, 2025
192555b
Added dev-only warning for null/undefined create in use*Effect (#32355)
JoshuaKGoldberg Feb 11, 2025
f83903b
[RN] Set up test to create public instances lazily in Fabric (#32363)
rubennorte Feb 12, 2025
d814852
[compiler] Upgrade esbuild (#32368)
poteto Feb 12, 2025
5a78dd7
[ci] Also notify compiler ready for review PRs (#32371)
poteto Feb 12, 2025
e0131f1
fix(devtools): Handle nullish values passed to `formatConsoleArgument…
franky47 Feb 13, 2025
cbbe866
fix value formatting of proxies of class instances (#30880)
LoganDark Feb 13, 2025
c6a7e18
Ensure `captureOwnerStack` returns `null` when no stack is available …
eps1lon Feb 13, 2025
ed8b68d
Stop exporting dev-only methods in OSS production builds (#32200)
eps1lon Feb 13, 2025
32b0cad
Enable owner stacks in Canary builds (#32053)
eps1lon Feb 13, 2025
a53da6a
Add useSwipeTransition Hook Behind Experimental Flag (#32373)
sebmarkbage Feb 13, 2025
e670e72
Change TouchedViewDataAtPoint type in ReactNativeTypes to use support…
coado Feb 14, 2025
0d9834c
build: add support to the rollup build for building typescript packag…
michaelfaith Feb 16, 2025
037b25c
test(eslint): create eslint test fixtures (#32396)
michaelfaith Feb 16, 2025
5adf402
feat(eslint-plugin-react-hooks): convert to typescript and package ty…
michaelfaith Feb 16, 2025
be91130
chore: remove `devEngines` declaration in root package (#32398)
michaelfaith Feb 16, 2025
eb1f77d
ci: add workflow for running the eslint plugin e2e tests (#32397)
michaelfaith Feb 16, 2025
4632e36
refactor(eslint-plugin-react-hooks): change array type and improve co…
michaelfaith Feb 17, 2025
8a7b487
[flags] enable owner stacks everywhere (#32376)
rickhanlonii Feb 18, 2025
d99f8bb
[compiler] Delete LoweredFunction.dependencies and hoisted instructio…
mofeiZ Feb 18, 2025
a92acdb
[compiler] Remove redundant InferMutableContextVariables (#32097)
mofeiZ Feb 18, 2025
498514c
[compiler] Clean up deadcode: ReactiveFunctionValue (#32098)
mofeiZ Feb 18, 2025
19cc5af
[compiler] Clean up deadcode: DeriveMinimalDeps (non-hir fork) (#32104)
mofeiZ Feb 18, 2025
a9575dc
[compiler] Represent array accesses with PropertyLoad (#32287)
mofeiZ Feb 18, 2025
86b1913
[compiler][be] Clean up bug test fixtures; evaluate more fixtures (#3…
mofeiZ Feb 18, 2025
a84862d
[eslint] Target ES5 (#32420)
poteto Feb 18, 2025
fcb4e0f
[compiler] remove invariant to account for backedges (#32417)
mofeiZ Feb 19, 2025
5f31228
[compiler][playground] Upgrade to Next 15.2.0-canary.64 (#32428)
mofeiZ Feb 20, 2025
885532c
Revert "Ship enableFabricCompleteRootInCommitPhase (#32318)" (#32434)
jackpope Feb 20, 2025
70f1d76
[flow] Eliminate usage of global React types in ReactNativeTypes.js (…
SamChou19815 Feb 20, 2025
88479c6
Rerender useSwipeTransition when direction changes (#32379)
sebmarkbage Feb 20, 2025
662957c
Allow passing range option to useSwipeTransition (#32412)
sebmarkbage Feb 21, 2025
27ba5e8
Add Example of a SwipeRecognizer (#32422)
sebmarkbage Feb 21, 2025
9b042f9
[Fizz] Responsive images should not be preloaded with link headers (#…
gnoff Feb 21, 2025
ad03c48
use-sync-external-store: Add `exports` field to `package.json` (#25231)
eps1lon Feb 24, 2025
9dd378f
[RN] Move definition of public instances to ReactNativePrivateInterfa…
rubennorte Feb 24, 2025
2567726
[flags] remove enableRemoveConsolePatches (#32425)
rickhanlonii Feb 24, 2025
22e39ea
Include component name in "async/await is not supported" error messag…
eps1lon Feb 25, 2025
dd9974b
[forgive] Scaffold workspaces (#31917)
poteto Feb 25, 2025
58def9f
[forgive] Add build scripts (#31927)
poteto Feb 25, 2025
d42a90c
[forgive] Init (#31918)
poteto Feb 25, 2025
2e4db33
Use valid CSS selectors in useId format (#32001)
sebmarkbage Feb 25, 2025
403d4fb
Move ViewTransitions helpers to ReactFiberCommitViewTransitions (#32462)
sebmarkbage Feb 25, 2025
92e65ca
[forgive] Add basic codelens provider (#32476)
poteto Feb 25, 2025
ebc22ef
[forgive][ez] Ignore test file (#32477)
poteto Feb 26, 2025
2df9622
[release] Update publishing scripts to make publishing allowlisted pa…
poteto Feb 27, 2025
227e841
[ci] Add workflow to publish releases (#32487)
poteto Feb 27, 2025
4c9392b
[ci] Prepare publish workflow (#32488)
poteto Feb 27, 2025
5eb20b3
[ci] Fix --dry not being passed correctly (#32489)
poteto Feb 27, 2025
3607f48
Add Commit Scaffolding for Gestures (#32451)
sebmarkbage Feb 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 22 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,7 @@ module.exports = {
},
},
{
files: [
'scripts/eslint-rules/*.js',
'packages/eslint-plugin-react-hooks/src/*.js',
],
files: ['scripts/eslint-rules/*.js'],
plugins: ['eslint-plugin'],
rules: {
'eslint-plugin/prefer-object-rule': ERROR,
Expand Down Expand Up @@ -517,6 +514,26 @@ module.exports = {
__IS_INTERNAL_VERSION__: 'readonly',
},
},
{
files: ['packages/eslint-plugin-react-hooks/src/**/*'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin'],
rules: {
'@typescript-eslint/no-explicit-any': OFF,
'@typescript-eslint/no-non-null-assertion': OFF,
'@typescript-eslint/array-type': [ERROR, {default: 'generic'}],

'es/no-optional-chaining': OFF,

'eslint-plugin/prefer-object-rule': ERROR,
'eslint-plugin/require-meta-fixable': [
ERROR,
{catchNoFixerButFixableProperty: true},
],
'eslint-plugin/require-meta-has-suggestions': ERROR,
},
},
],

env: {
Expand Down Expand Up @@ -597,6 +614,7 @@ module.exports = {
KeyframeAnimationOptions: 'readonly',
GetAnimationsOptions: 'readonly',
Animatable: 'readonly',
ScrollTimeline: 'readonly',

spyOnDev: 'readonly',
spyOnDevAndProd: 'readonly',
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compiler_discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: (Compiler) Discord Notify

on:
pull_request_target:
types: [labeled]
types: [opened, ready_for_review]
paths:
- compiler/**
- .github/workflows/compiler_**.yml
Expand All @@ -14,7 +14,7 @@ jobs:
actor: ${{ github.event.pull_request.user.login }}

notify:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' && github.event.label.name == 'React Core Team' }}
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/compiler_typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,7 @@ jobs:
path: "**/node_modules"
key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: xvfb-run -a yarn workspace ${{ matrix.workspace_name }} test
if: runner.os == 'Linux' && matrix.workspace_name == 'react-forgive'
- run: yarn workspace ${{ matrix.workspace_name }} test
if: runner.os != 'Linux' && matrix.workspace_name != 'react-forgive'
47 changes: 7 additions & 40 deletions .github/workflows/runtime_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,10 @@ jobs:
RELEASE_CHANNEL: experimental

# ----- SIZEBOT -----
download_base_build_for_sizebot:
if: ${{ github.event_name == 'pull_request' && github.ref_name != 'main' }}
name: Download base build for sizebot
sizebot:
if: ${{ github.event_name == 'pull_request' && github.ref_name != 'main' && github.event.pull_request.base.ref == 'main' }}
name: Run sizebot
needs: [build_and_lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -603,50 +604,23 @@ jobs:
id: node_modules
with:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Ensure clean build directory
run: rm -rf build
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
working-directory: scripts/release
- name: Download artifacts for base revision
run: |
git fetch origin main
GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build.js --commit=$(git rev-parse origin/main)
GH_TOKEN=${{ github.token }} scripts/release/download-experimental-build.js --commit=$(git rev-parse ${{ github.event.pull_request.base.sha }})
mv ./build ./base-build
# 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
run: rm -rf ./base-build/node_modules
- name: Display structure of base-build
- name: Display structure of base-build from origin/main
run: ls -R base-build
- name: Archive base-build
uses: actions/upload-artifact@v4
with:
name: base-build
path: base-build

sizebot:
name: Run sizebot
needs: [build_and_lint, download_base_build_for_sizebot]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
cache-dependency-path: yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
id: node_modules
with:
path: "**/node_modules"
key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Ensure clean build directory
run: rm -rf build
- run: yarn install --frozen-lockfile
Expand All @@ -662,13 +636,6 @@ jobs:
node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
- name: Display structure of build for PR
run: ls -R build
- name: Restore archived base-build from origin/main
uses: actions/download-artifact@v4
with:
name: base-build
path: base-build
- name: Display structure of base-build from origin/main
run: ls -R base-build
- run: echo ${{ github.sha }} >> build/COMMIT_SHA
- run: node ./scripts/tasks/danger
- name: Archive sizebot results
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/runtime_discord_notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: (Runtime) Discord Notify

on:
pull_request_target:
types: [labeled]
types: [opened, ready_for_review]
paths-ignore:
- compiler/**
- .github/workflows/compiler_**.yml
Expand All @@ -14,7 +14,7 @@ jobs:
actor: ${{ github.event.pull_request.user.login }}

notify:
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' && github.event.label.name == 'React Core Team' }}
if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
needs: check_maintainer
runs-on: ubuntu-latest
steps:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/runtime_eslint_plugin_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: (Runtime) ESLint Plugin E2E

on:
push:
branches: [main]
pull_request:
paths-ignore:
- compiler/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

env:
TZ: /usr/share/zoneinfo/America/Los_Angeles

jobs:
# ----- TESTS -----
test:
name: ESLint v${{ matrix.eslint_major }}
runs-on: ubuntu-latest
strategy:
matrix:
eslint_major:
- "6"
- "7"
- "8"
- "9"
continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
cache-dependency-path: yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
id: node_modules
with:
path: "node_modules"
key: runtime-eslint_e2e-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Ensure clean build directory
run: rm -rf build
- run: yarn install --frozen-lockfile
- name: Build plugin
working-directory: fixtures/eslint-v${{ matrix.eslint_major }}
run: node build.mjs
- name: Install fixture dependencies
working-directory: ./fixtures/eslint-v${{ matrix.eslint_major }}
run: yarn --frozen-lockfile
- name: Run lint test
working-directory: ./fixtures/eslint-v${{ matrix.eslint_major }}
run: yarn lint
119 changes: 119 additions & 0 deletions .github/workflows/runtime_releases_from_npm_manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: (Runtime) Publish Releases from NPM Manual

on:
workflow_dispatch:
inputs:
version_to_promote:
required: true
description: Current npm version (non-experimental) to promote
type: string
version_to_publish:
required: true
description: Version to publish for the specified packages
type: string
only_packages:
description: Packages to publish (space separated)
type: string
skip_packages:
description: Packages to NOT publish (space separated)
type: string
tags:
description: NPM tags (space separated)
type: string
default: untagged
dry:
required: true
description: Dry run instead of publish?
type: boolean
default: true
force_notify:
description: Force a Discord notification?
type: boolean
default: false

env:
TZ: /usr/share/zoneinfo/America/Los_Angeles
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
GH_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
notify:
if: ${{ inputs.force_notify || inputs.dry == false || inputs.dry == 'false' }}
runs-on: ubuntu-latest
steps:
- name: Discord Webhook Action
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
embed-author-name: ${{ github.event.sender.login }}
embed-author-url: ${{ github.event.sender.html_url }}
embed-author-icon-url: ${{ github.event.sender.avatar_url }}
embed-title: "⚠️ Publishing release from NPM${{ inputs.dry && ' (dry run)' }}"
embed-description: |
```json
${{ toJson(inputs) }}
```
embed-url: https://github.com/facebook/react/actions/runs/${{ github.run_id }}

publish:
name: Publish releases
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
cache-dependency-path: yarn.lock
- name: Restore cached node_modules
uses: actions/cache@v4
id: node_modules
with:
path: "**/node_modules"
key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
- name: Ensure clean build directory
run: rm -rf build
- run: yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
working-directory: scripts/release
- run: cp ./scripts/release/ci-npmrc ~/.npmrc
- if: '${{ inputs.only_packages }}'
name: 'Prepare ${{ inputs.only_packages }} from NPM'
run: |
scripts/release/prepare-release-from-npm.js \
--ci \
--skipTests \
--version=${{ inputs.version_to_promote }} \
--publishVersion=${{ inputs.version_to_publish }} \
--onlyPackages=${{ inputs.only_packages }}
- if: '${{ inputs.skip_packages }}'
name: 'Prepare all packages EXCEPT ${{ inputs.skip_packages }} from NPM'
run: |
scripts/release/prepare-release-from-npm.js \
--ci \
--skipTests \
--version=${{ inputs.version_to_promote }} \
--publishVersion=${{ inputs.version_to_publish }} \
--skipPackages=${{ inputs.skip_packages }}
- name: Check prepared files
run: ls -R build/node_modules
- if: '${{ inputs.only_packages }}'
name: 'Publish ${{ inputs.only_packages }}'
run: |
scripts/release/publish.js \
--ci \
--tags=${{ inputs.tags }} \
--publishVersion=${{ inputs.version_to_publish }} \
--onlyPackages=${{ inputs.only_packages }} ${{ (inputs.dry && '') || '\'}}
${{ inputs.dry && '--dry'}}
- if: '${{ inputs.skip_packages }}'
name: 'Publish all packages EXCEPT ${{ inputs.skip_packages }}'
run: |
scripts/release/publish.js \
--ci \
--tags=${{ inputs.tags }} \
--publishVersion=${{ inputs.version_to_publish }} \
--skipPackages=${{ inputs.skip_packages }} ${{ (inputs.dry && '') || '\'}}
${{ inputs.dry && '--dry'}}
37 changes: 37 additions & 0 deletions .github/workflows/shared_close_direct_sync_branch_prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: (Shared) Close Direct Sync Branch PRs

on:
pull_request:
branches:
- 'builds/facebook-**'

env:
TZ: /usr/share/zoneinfo/America/Los_Angeles
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1

jobs:
close_pr:
runs-on: ubuntu-latest
steps:
- name: Close PR
uses: actions/github-script@v7
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullNumber = ${{ github.event.number }};

await github.rest.pulls.createReview({
owner,
repo,
pull_number: pullNumber,
body: 'Do not land changes to `${{ github.event.pull_request.base.ref }}`. Please re-open your PR targeting `main` instead.',
event: 'REQUEST_CHANGES'
});
await github.rest.pulls.update({
owner,
repo,
pull_number: pullNumber,
state: 'closed'
});
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ packages/react-devtools-fusebox/dist
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-timeline/dist

Loading