Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53484
Refactor to better organise network event reporting features.
- Introduce new `ReactCommon/react/networking` package, containing `NetworkReporter` class (outer-most interface with each platform).
- Move `ReactCommon/performance/timeline` dependency to this level, removing jsinspector→performance dependency.
- Simplifies the remaining `NetworkHandler` in `jsinspector-modern/network` — which now is only focused on CDP network reporting.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D81129562
fbshipit-source-id: 6c36045e872b0fd9510d0fa3e98acb0969e74d72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53617
In the RCTAppDelegate.h file there are a couple of headers that are not used and that can be either removed or moved to the .mm file.
This reduce the coupling between the AppDelegate library and React Core and allow us to reduce the size of the exported headers in the umbrella header.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D81769485
fbshipit-source-id: b811dde0331e8a668618e0c8eb250fd81bf48545
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53641
This extra quote is causing the build on the 0.82-stable to fail. The reason is that the Path for the `.hermesversion` file is composed wrongly so we attempt to build hermes from the `main` branch.
Changelog:
[Internal] [Changed] -
Created from CodeHub with https://fburl.com/edit-in-codehub
Reviewed By: j-piasecki, vzaidman
Differential Revision: D81925624
fbshipit-source-id: 700f9d44b6c7efdb845232dad8ca7c2e3136385d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53637
Changelog: [ANDROID][FIXED] - Check for the value of the HERMES_V1_ENABLED flag instead of whether it's defined
Reviewed By: cortinico
Differential Revision: D81920483
fbshipit-source-id: 550ae9fd27f666affe102b1c5c3f51bde7b5923e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53630
These JavaScript apis were a part of react native's legacy architecture. Let's deprecate them, so that we can eventually remove them in the future.
Changelog: [General][Deprecated] - Deprecate legacy javascript react native apis
Reviewed By: cortinico
Differential Revision: D81795732
fbshipit-source-id: 0a2bd142fa7e08c1f3daaa437ee127a2156e045b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53622
Reverting to avoid lossy conversion on hosts expecting signed int values for color conversion.
Changelog: [Internal]
Reviewed By: rozele, javache
Differential Revision: D81785268
fbshipit-source-id: 4a8d099e378fa55e76a58c2ab0356d88e344de2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53589
## Changelog:
[Android] [Changed] - [c++ animated] Course correct props at SurfaceMountingManager.updateProps()
Sometimes a React update will try to commit to the same view that native animated modified before via direct manipulation, and after the update host view will use the prop value currently in Fabric. In `AnimatedMountingOverrideDelegate` there's logic to course correct at ShadowTree mount, but if this update is from JS thread, it takes some time to reach mounting layer, at the same time UI thread can still be doing more direct animation updates, and once the corrected change gets there it's already stale.
In this diff I added mechanism to keep track of direct manipulation props (or "synchronous mount props" to match the naming of java function `synchronouslyUpdateView...`) and use it to correct what reaches host view. `SurfaceMountingManager.updateProps()` is called by both regular mount and direct manipulation and it's always called on UI thread, so it could be a good candidate to synchronize these 2 scenarios
Reviewed By: sammy-SC
Differential Revision: D81611823
fbshipit-source-id: 638a59bcd94b3d7e8bab68defd472b2b482dc92f
Summary:
## Changelog:
[Internal] -
Noticed that the default value for this one is inconsistent with all the other similar ones, which can cause confusion during setting up the experiment, fixing it.
Note that top level view recycling is still controlled via `enableViewRecycling`, which will also disable all the other ones when false (which it is by default).
bypass-github-export-checks
Reviewed By: lenaic
Differential Revision: D81766029
fbshipit-source-id: df4a260b9bde20d1c85b7786df00fa91298a27b7
Summary:
bypass-github-export-checks
OSS release infrastructure for the (experimental) React Native DevTools standalone shell.
Currently, binaries are built continuously on Meta infra and served from the Meta CDN using fbcdn.net URLs checked into a DotSlash file in the repo, e.g.:
https://github.com/facebook/react-native/blob/15373218ec572c0e43325845b80a849ad5174cc3/packages/debugger-shell/bin/react-native-devtools#L9-L18
For open source releases we want to primarily distribute the binaries as GitHub release assets, while keeping the Meta CDN URLs as a secondary option. This PR makes the necessary changes to the release workflows to support this:
* `workflows/create-release.yml` (modified): As part of the release commit, rewrite the DotSlash file to include the release asset URLs.
* **NOTE:** After this commit, **the new URLs don't work yet**, because they refer to a release that hasn't been published. Despite this, the DotSlash file remains valid and usable (because DotSlash will happily fall back to the Meta CDN URLs, which are still in the file).
* `workflows/create-draft-release.yml` (modified): After creating a draft release, fetch the binaries from the Meta CDN and reupload them to GitHub as release assets. This is based on the contents of the DotSlash file rewritten by `create-release.yml`.
* `workflows/validate-dotslash-artifacts.yml` (new): After the release is published, all URLs referenced by the DotSlash (both Meta CDN URL and GH release asset URLs) should be valid and refer to the same artifacts. This workflow checks that this is the case.
* If this workflow fails on a published release, the release may need to be burned or a hotfix release may be necessary - as the release will stop working correctly once the Meta CDN stops serving the assets.
* This workflow will also be running continuously on `main`. If it fails on a commit in `main`, there might be a connectivity issue between the GHA runner and the Meta CDN, or there might be an issue on the Meta side.
NOTE: These changes to the release pipeline are generic and reusable; if we later add another DotSlash-based tool whose binaries need to be mirrored as GitHub release assets, we just need to add it to the `FIRST_PARTY_DOTSLASH_FILES` array.
## Changelog:
[Internal] Mirror React Native DevTools binaries in GitHub Releases
Pull Request resolved: https://github.com/facebook/react-native/pull/52930
Test Plan:
### Step 0: Unit tests
I've added unit tests for `dotslash-utils`, `curl-utils`, and for the majority of the logic that makes up the new release scripts (`write-dotslash-release-assets-urls`, `upload-release-assets-for-dotslash`, `validate-dotslash-artifacts`).
### Step 1: Test release commit
Created a test branch and draft PR: https://github.com/facebook/react-native/pull/53147.
Locally created a release commit, simulating the create-release GH workflow:
```
node scripts/releases/create-release-commit.js --reactNativeVersion 0.82.0-20250903-0830 --no-dry-run
```
This updated the DotSlash file in the branch: https://github.com/facebook/react-native/pull/53147/commits/2deeb7e70376ee80b99f27bea4825789f22a89a3#diff-205a9ff6005e30be061eaa64b9cb50b15b0e909dd188e0866189e952655a3483
NOTE: I've also ensured that the `create-release-commit` script correctly updates the DotSlash file when running from a branch that already has a release commit - see screenshot:
<img width="1483" height="587" alt="image" src="https://github.com/user-attachments/assets/1ffd859b-e02b-483d-8067-9cc9116829a4" />
### Step 2: Test draft release
Enabled testing the create-draft-release GH workflow in the test branch using these temporary hacks:
* https://github.com/facebook/react-native/pull/53147/commits/81f334eac5147d4dbf5f6d7d627ddfa52cd197be
* https://github.com/facebook/react-native/pull/53147/commits/6d8851657629de7e0b710ed8f5dd7d0f7b9847cc
* https://github.com/facebook/react-native/pull/53147/commits/1428a8da8b9fb29c45fc33d79f311dd1fe273433
Workflow run: https://github.com/facebook/react-native/actions/runs/17426711373/job/49475327346
Draft release: https://github.com/facebook/react-native/releases/tag/untagged-c6a62a58e5baa37936e1
Draft release screenshot for posterity (since we'll likely delete the draft release after landing this):
<img width="1024" height="814" alt="image" src="https://github.com/user-attachments/assets/1900da15-48f6-4274-b29c-0ac2019d92c0" />
### Step 3: Test post-release validation script
For obvious reasons, I've avoided actually publishing the above draft release. But I have run the `validate-dotslash-artifacts` workflow on the *current* branch to ensure that the logic is correct: https://github.com/motiz88/react-native/actions/runs/17426885205/job/49475888486
Running `node scripts/releases/validate-dotslash-artifacts.js` in the release branch (without publishing the release first) fails, as expected:
<img width="1105" height="748" alt="image" src="https://github.com/user-attachments/assets/ed23a2e2-7a31-42eb-a324-f1d50eafe2fb" />
## Next steps
This PR is all the infra needed ahead of the 0.82 ~~branch cut~~ infra freeze to support the React Native DevTools standalone shell, at least on the GitHub side. ~~Some minor infra work remains on the Meta side, plus some product/logic changes to the React Native DevTools standalone shell that I'm intending to finish in time for 0.82 (for an experimental rollout).~~ EDIT: All the planned work has landed; the feature is code-complete on `main` as well as in `0.82-stable` (apart from this infra change).
As a one-off, once we've actually published 0.82.0-rc.1, we'll want to have a human look at the published artifacts and CI workflow logs to ensure everything is in order. (I'll make sure to communicate this to the 0.82 release crew.) Afterwards, the automation added in this PR should be sufficient.
Reviewed By: huntie
Differential Revision: D81578704
Pulled By: motiz88
fbshipit-source-id: 6a4a48c3713221a89dd5fc88851674c1ddc6bb10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53558
Changelog: [Internal]
Got confused regarding why "reconnect" does not actually trigger a reconnect. It turns out, it only triggers a reconnect if the URL has changed.
Reviewed By: cipolleschi, huntie
Differential Revision: D80629308
fbshipit-source-id: 098ef5e91f3748deb9bc707b79bc0395d2442ca4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53600
# Changelog:
[Internal] -
Adds the corresponding feature flag, similarly as it's done for other component types.
The flag is used in the next diff.
Reviewed By: mdvacca
Differential Revision: D81681404
fbshipit-source-id: f9f155379034695f5df6cc4f0d3787ff4c69df7f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53578
Changelog: [Internal]
Adds a new preprocessor directive which should be set when the new Hermes is being used. This directive will disable the legacy debugger which isn't supported by it.
Reviewed By: cipolleschi, cortinico
Differential Revision: D81035112
fbshipit-source-id: b30ae348b3419ec2d064dfe7f91c9d664a66f5cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53475
This is cleanup of IHermesExtra. Move the last method in IHermesExtra,
dumpOpcodeStats(), to jsi::Instrumentation, since other profile stats
dumping methods live in that interface as well.
Changelog: [Internal]
Reviewed By: tsaichien
Differential Revision: D81087047
fbshipit-source-id: e145aafea7459a161fca04ffc30f0838ee6c03c6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53473
This is a cleanup of IHermesExtra:
1. Move dumpSampledTraceToProfile() and debugJavasScript() to IHermes.
I'm still keeping the empty DebugFlags, since changing that requires
more changes. It's also possible that we may need it in the future.
2. Remove `dumpBasicBlockProfileTrace`. Use
writeBasicBlockProfileTraceToFile` if users need to dump the profile.
Changelog: [Internal]
Reviewed By: tsaichien
Differential Revision: D81075460
fbshipit-source-id: b81005e531809cfd870fd9bdb5c0e17864ed92fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53419
By default, this function returns nullptr. User can pass a preprocessor
definition "-DHERMES_SH_UNIT_FN=sh_export_<unit_name>" (where
<unit_name> is the name passed to shermesc when compiling the JS
input), so that this function returns the function pointer, which can
be passed to `evaluateSHUnit` for evaluation.
Changelog: [Internal]
Reviewed By: avp
Differential Revision: D80747463
fbshipit-source-id: a798a7a572679444fca111c34674fd7ced9311f3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53418
Expose these methods so that we can access from RN code. To minimize
the change, a few methods that depend on other headers or preprocessor
flags are wrapped into IHermesExtra in hermes/API/hermes.h.
Changelog: [Internal]
Reviewed By: tsaichien
Differential Revision: D80740969
fbshipit-source-id: 79565d851bc1b0833931f4fe7fb62d89d3d669ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53577
Simplify the API to keep all formatting inside of ReactHostStateTracker and remove the `bridgeless` part of the name. Bit more efficient binary-size wise.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D81445833
fbshipit-source-id: 5bc8bc9e3de326f23e95e01e889b4e2806438c06
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53588
# Changelog: [Internal]
Since the `name` was already moved for the begin event, there is nothing to be moved for `end` event. Instead, we will be creating a copy for the `begin` event.
This was actually affecting some entries on a timeline, like component triggers (yellow ones).
Reviewed By: vzaidman
Differential Revision: D81589847
fbshipit-source-id: 3b7d801d3429217ce279ed7de41c40c3838a5f37
Summary:
This PR fixes swipe dismissal to work each time the modal is shown. Previously modalInPresentation was set on the view controller which gets destroyed every time user dismisses the modal. This makes sure that modal in presentation is correctly preserved when showing multiple modals.
https://github.com/user-attachments/assets/c7f140e5-1c4f-4809-8453-148d4becc9eb
## Changelog:
[IOS] [FIXED] - modal swipe dismissal works only for the first time
Pull Request resolved: https://github.com/facebook/react-native/pull/53499
Test Plan:
1. Open RN Tester
2. Check allow swipe dismissal
3. Check closing it multiple times
Reviewed By: javache
Differential Revision: D81312918
Pulled By: cipolleschi
fbshipit-source-id: 4f7cc60762660e5d5310f4973fe8df340c1ba52b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53367
We are missing a dependency in the React-jsinspector podspec that prevents React Native from building with dynamic frameworks.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D80619664
fbshipit-source-id: 1c87ef4d3614ceea3a23196831479ecae0a5acc8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53570
Idle callbacks are implemented as a C++ module in the new architecture, this code should not be used.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D81485912
fbshipit-source-id: 18103bb96441880ff3de423aa6c03a176f6ff5de
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53569
Simplify construction to save a JNI call, slightly more efficient on binary size too (1KiB hah)
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D81445834
fbshipit-source-id: b0ec84d5e04d364e34eef4c3b712c62f878325cf
Summary:
Resolves https://github.com/facebook/react-native/issues/53501
This is a pretty major oversight of (presumably) the old autolinking refactor. The iOS autolinking's second stage, invoked in `use_react_native!` does not accept the `react-native-config` sub-command's `react-native-config` output. This is only invoked and used in the prior step, `use_native_modules`.
The second step instead invokes old code that does something _similar_ to the new autolinking in `scripts/generate-artifacts-executor`, and happens to align in most cases. (But it does "autolinking" from scratch). tl;dr: When the results don't match up, things go wrong.
Instead, we now write the autolinking (react native config) results to a file, then read the output back in the second step.
This doesn't affect Android/Gradle, which are implemented correctly.
## Changelog:
[IOS] [FIXED] - Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source
Pull Request resolved: https://github.com/facebook/react-native/pull/53503
Test Plan:
- See https://github.com/facebook/react-native/issues/53501 for failing repro
- Clone for working repro: https://github.com/byCedric/react-native-codegen-ios-autolinking/tree/fix-54503
- Note: Contains this PR's changes as a patch
- `bun install`
- `bun expo run:ios`
Reviewed By: cortinico
Differential Revision: D81490755
Pulled By: cipolleschi
fbshipit-source-id: eefe786a116404f4ed24bd7125dfb108a811f71e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53560
Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.
Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0
Reviewed By: fabriziocucci
Differential Revision: D81482789
fbshipit-source-id: 609b503755486e10060a0f321bd0a38bd71864a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53566
TLDR; we never advertised this and it's not in use. We have an updated incoming plan for exposing internal private code to Expo / other frameworks.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D81490655
fbshipit-source-id: f3d64582f5e6092e4928865d868ea26867ee7e47