Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55729
This is added so that one can easily enables c++ AnimatedModule in open source.
If an app doesn't use `RCTAnimatedModuleProvider`(ios) or `AnimatedCxxReactPackage`(android), it can fallback to this default AnimatedModule when it has both c++animated and shared backend enabled
- shared backend removes the need to pass down start/stop callbacks to NativeAnimatedNodesManagerProvider, so we can cleanly initialize it as static default
- RCTAnimatedModuleProvider uses the version of AnimatedModule that still relies on a dedicated CADisplayLink for start/stop
- AnimatedCxxReactPackage also bundles internal ViewEventModule (for NativeViewEvents) that shares `NativeAnimatedNodesManagerProvider` with AnimatedModule, but NativeViewEvents is not needed for open source
- Alternatively we could also expose `NativeAnimatedNodesManagerProvider` via UIManager so other turbomodules can also use it. However I don't think it makes sense to double down on another animation API on UIManager given we have shared backend.
- This assumes DefaultTurboModules is always the fallback module provider. So it'll not override when app already uses RCTAnimatedModuleProvider or AnimatedCxxReactPackage
[General] [Added] - Add c++ AnimatedModule to DefaultTurboModules
Reviewed By: NickGerleman
Differential Revision: D94244698
fbshipit-source-id: 09e905eb4bad7d03cdf87d5b47352060b0e6212f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55794
Format the error messages coming from bundling to mainting the formatting and make these easier to read.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D94611951
fbshipit-source-id: cbb8b2d1ff517b5487d4b799b1e2e3476629f84c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55735
changelog: [internal]
Add support for profiling C++ code in Fantom tests using Linux `perf`.
When `FANTOM_PROFILE_CPP=1` is set, the fantom_tester binary is wrapped with `perf record` to capture sampling profiler data with DWARF call graphs.
Usage:
```
FANTOM_PROFILE_CPP=1 yarn fantom --benchmarks --testPathPattern="View-benchmark"
```
Output is saved to `.out/cpp-traces/perf-<timestamp>.data` and can be analyzed with:
```
perf report -i .out/cpp-traces/perf-<timestamp>.data
```
Reviewed By: rubennorte
Differential Revision: D92155573
fbshipit-source-id: bde3ffcd11468e4ad88bec4b547726bed7cbde41
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55728
Fixes unwanted side effect launches of the debugger shell in tests (likely introduced in D88161573!).
Also adds error guard on `DefaultAppLauncher` to ensure that the implementation is always mocked.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D94230761
fbshipit-source-id: 966f6f09c38aa55594091bd7d34a5c78dc6eee93
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55753
The warning "ASAN and TSAN modes cannot be used together" was incorrectly displayed when only ASAN was enabled. This happened because the condition checked only `enableASAN` instead of `enableASAN && enableTSAN`. Updated the conditional logic to properly check that both flags are enabled before showing the conflict warning.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D94393117
fbshipit-source-id: f7a96de11230710e8d54c17d4c89edb569ebaa07
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55736
changelog: [internal]
On macOS with EdenFS backed directories, Buck2's --out flag fails with "Operation not permitted" error.
This fix works around the issue by:
1. Building to a temp directory outside the repo (os.tmpdir())
2. Removing extended attributes with `xattr -rc` on macOS
Reviewed By: cipolleschi
Differential Revision: D92078500
fbshipit-source-id: 437734c068e4bf20a4f8e570e1184565810154d3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55725
changelog: [internal]
By default, `yarn fantom` now excludes benchmark tests (`*-benchmark-itest.js` files) to speed up regular test runs.
Benchmark tests are typically slower and used for performance analysis rather than correctness testing. Excluding them by default improves the developer experience for everyday test runs.
To run benchmark tests, use the new `--benchmarks` flag:
```
yarn fantom --benchmarks
```
Reviewed By: andrewdacenko
Differential Revision: D92150163
fbshipit-source-id: 4c40ef1ba542c4856221373d8239ba603e8f6620
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55713
changelog: [internal]
when running Fantom on Mac, I frequently see this error. This is DevTools standalone app crashing. Let's disable DevTools standalone app, it is not needed with tests anyway.
{F1985865132}
Reviewed By: huntie
Differential Revision: D94092247
fbshipit-source-id: 440e4482102b2f4152eb63c04023b01867250213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55566
In Animation Backend, we allow animation frameowrks to request a js-thread sync of the current animation state. It is used by c++ Animated, and is meant to serve as a way to push animation changes to react through RSNRU, after the animation finsishes. This way we ensure that subsequent rerenders of the component don't bring back the old style value.
This approach is currently broken when the animation performs any main-thread commits, as in this case the `runtimeShadowNodeReference_` is not copied to new node revisions, so the js-thread sync commit cannot use RSNRU properly. The bug was not visible, because we don't clean up the registry in that case, we only do it for react commits.
This PR fixes the issue for the case when `updateRuntimeShadowNodeReferencesOnCommitThread` is enabled, as this fixes the RSNRU propagation, so we can clean-up the registry. If the flag is disabled, we don't cleanup the registry, as we want the next react commit to make sure the animation state is not overwritten.
# Changelog
[General][Added] - test for the Animation Backend js sync
[General][Changed] - TesterAnimationChoreographer changes the thread_local RSNRU flag when running animation update, to better simulate the real application use-case
[General][Changed] - AnimationBackend now cleans-up the AnimatedPropsRegistry after the js sync when `updateRuntimeShadowNodeReferencesOnCommitThread` is enabled
Reviewed By: zeyap
Differential Revision: D93414839
fbshipit-source-id: 1c2566d117c2da563ae35e95cefc5ea08313fc7d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55614
- enableFragmentRefsInstanceHandles
- Enables a pointer on each element back to the FragmentInstances that control it. Needed to implement the common IntersectionObserver pattern of reusing IntersectionObservers across multiple callbacks. See more in https://github.com/facebook/react/pull/34935
- enableFragmentRefsTextNodes
- This should be a noop on RN as unlike dom, text nodes are considered host components and already handled. Text without a `<Text/>` wrapper throws an error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D93479122
fbshipit-source-id: 639369893c8aafc1d2bf0ffbdf4bf09fe6dca45c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55385
Now that all Danger.js checks have been migrated to native GitHub Actions in the `annotate-pr.yml` workflow, this removes the deprecated Danger infrastructure:
- Deletes `.github/workflows/danger-pr.yml` workflow
- Deletes `private/react-native-bots/dangerfile.js`
- Removes `danger` npm dependency from `react-native-bots/package.json`
The functionality previously provided by Danger.js is now handled by:
- **API diff detection**: `diff-js-api-changes` action
- **PR body validation**: `validatePRBody.js` script (summary, test plan, changelog checks)
- **Branch targeting**: `checkBranchTarget.js` script (validates target branch, adds "Pick Request" label)
- **PR commenting**: `post-pr-comment` action
This simplifies the CI pipeline by removing the third-party Danger dependency and consolidating PR annotation logic into maintainable GitHub Actions workflows.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D91695886
fbshipit-source-id: c88001ef75d16c4709c7972add141db0df3b5a30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55421
Deletes the largely unused `analyze_code`/`code-analysis-bot` script, which was part of our earlier CircleCI infra.
**Motivation**
- **Security**: Removes another use of a `GITHUB_TOKEN` env var being loaded into a script in our CI (similar to S603729).
- **Cleanup**: This script attempted to read various lint job results (including google-java-format, which is no longer present), and post a GitHub PR comment for >5 issues. In a GitHub Actions world, we don't really need this functionality.
**Other changes**
- The `yarn shellcheck` run from this script was load bearing, and is moved directly into the `lint` action.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D92407627
fbshipit-source-id: ef5664a273ad4aac721dbb53de73f2b96b47d75b
Summary:
Ruby 3.4 removed 'kconv' (which requires 'nkf') and 'base64' from the standard library. This commit adds them to the Gemfiles to fix 'pod install' failures on Ruby 3.4 environments.
## Changelog:
[iOS][Fixed] - Add `nkf` and `base64` as ruby dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/55346
Reviewed By: cortinico
Differential Revision: D92147798
Pulled By: cipolleschi
fbshipit-source-id: ac06369593df2b892d343f45d3c43795c079a461
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55206
To avoid timestamp representation bugs with different platforms passing the timestamp as a simple double, we now use `std::chrono::duration<double, std::milli>` to represent timestamps.
# Changelog
[General] [Added] - `AnimationTimestamp` to `UIManagerAnimationBackend`
[General] [Changed] - updated `AnimationBackend` usages to use `AnimationTimestamp`
Reviewed By: zeyap
Differential Revision: D90505538
fbshipit-source-id: 98761ac0060612e9ed9a57c9952656cae70c30f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55103
This diff decouples AnimationBackend from Animated. Now the backend is intialized in the Scheduler, from where it's passed to UIManager. Animation frontends (such as Animated) can then obtain a reference to the backend, and use it to schedule animation frame updates.
# Changelog
[General] [Changed] - Moved AnimationBackend initiailzation to `Scheduler`
[General] [Added] - `AnimationChoreographer` interface with an implementation for fantom tests
Reviewed By: zeyap
Differential Revision: D89663251
fbshipit-source-id: 428a83d78ef92a89095989fe3121c578cf8d3983
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55202
Changelog: [Internal]
After changing Hermes V1 to be the default engine, Fantom tests started failing. This was due to a combination of changes, one of them being the change of default value for `HERMES_ENABLE_DEBUGGER`. In case of legacy Hermes it was enabled by default, while for Hermes V1 it's disabled by default.
Fantom didn't explicitly set this flag, but the debug build of RN (which Fantom performs) requires it to be enabled. This diff explicitly sets this flag to true for Fantom builds.
Reviewed By: cipolleschi, cortinico
Differential Revision: D90849881
fbshipit-source-id: 17f8393872eacef26f927f50aaf364644d9b94d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55157
Changelog: [Internal]
At the moment, Fantom doesn't propagate the Hermes V1 opt-in to the React Native build, which causes the code that should be gated by compile-time flags to be compiled. Since Hermes V1 differs in some cases, the headers there are missing.
This diff adds the opt-in propagation, so the code can be correctly compiled out.
Reviewed By: cortinico
Differential Revision: D90674696
fbshipit-source-id: d2adb131af4588e745c023703a893d0ecaaaee01
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55114
Our official [docs](https://reactnative.dev/docs/set-up-your-environment#node--watchman) require:
> Node 20.19.4 or newer
Currently, our `package.json#engines` fields express this as `"node": ">= 20.19.4"`
This is a bit imprecise because of Node's overlapping release lines - e.g. v24.0.0 is actually older than v20.19.4 (2025-07-15), and the whole v21 line was already EOL before v20.19.4.
The release *date* is relevant because Node.js frequently backports the most important updates - notably, `require(esm)` is already stable in Node 20.19 but is not unflagged in v22 until v22.12.
This makes the `package.json#engines` requirement truer to the documented requirement, dropping some old minors and EOL majors that prevent us using features included in v20.19.
Notably, `require(esm)` is stable and unflagged on all versions supported from this diff.
- v21 and v23 are EOL, so are dropped.
- v22.13 pre-dates 20.19.4 and is the first to have unflagged silent `require(esm)`
- v24.3.0 pre-dates 20.19.4 and is the first to unflag TS-stripping
- Support v25 and newer.
Changelog:
[General][Breaking] Drop support for EOL Node.js lines and old minors.
Reviewed By: cortinico, huntie
Differential Revision: D90467358
fbshipit-source-id: a5fdfb1b93a9d6cffe78eb6811ff7420ab906f44
Summary:
Currently Fantom is completely ignoring the `REACT_NATIVE_DOWNLOADS_DIR` env variable that other scripts in the repo are instead honoring. This fixes it.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/55148
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D90594286
Pulled By: cortinico
fbshipit-source-id: 872a26fc15a2acbe3c0e26035407159c20a9a285
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55138
Some tests were failing locally on Mac, since //arvr/mode/mac-arm/opt doesn't correctly undefine REACT_NATIVE_DEBUG. Use `//xplat/mode/hermes/opt` as a short-cut since that directly defines rn_build_mode.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D90536112
fbshipit-source-id: 55aeb78970c9d210206a6d86cd3e57d55b0a6396
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54901
At present, we're only using a rough heuristic for whether a code change to `ReactNativeApi.d.ts` is a breaking change. Introduce `POTENTIALLY_BREAKING` result level and update Danger warnings box.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D89287801
fbshipit-source-id: aced7911ecde37a1ad2c355d56ef0f0edde88fd4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54865
Removes introduced in D88654826, replaced with a `git fetch` with `--depth`.
This should fix CI runs on `main` (where we believe the extra checkout is clobbering the `yarn-install` step), and improve execution time.
Also shorten action name.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D89044330
fbshipit-source-id: 690eb5c7db9490e5f160e933d64eae6ac21464c8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54581
Changelog: [Internal]
This helps us test with opt mode enabled as its the only one available for coverage.
Reviewed By: javache
Differential Revision: D87346884
fbshipit-source-id: 76dcb0848c3d4019739120339dd5b16dd25ef02d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54543
Changelog: [Internal]
We are switching to SH as default, so internally, we need to switch
DEFAULT_HERMES_VARIANT to use SH stable. To keep the tests working in
OSS, we add DEFAULT_OSS_HERMES_VARIANT to use legacy Hermes.
Reviewed By: cipolleschi
Differential Revision: D87082037
fbshipit-source-id: f2fa00d6922816881201d736aeb6591745127d4c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54322
Changelog: [internal]
This just cleans up the feature flag, which is set to `true` by default and it's been enabled in `stable` already.
Reviewed By: lunaleaps, yungsters
Differential Revision: D85782127
fbshipit-source-id: 0a6174708066cfe597b4c6dbc8bb33829c6155e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54252
## Changelog:
[Internal] [Added] - pass down isAsync arg to start/stopOnRenderCallback to indicate thread
make it more explicit where start/stopOnRenderCallback is invoked so we can handle it on each platform in a more thread safe way
Reviewed By: lenaic
Differential Revision: D85365058
fbshipit-source-id: 5f0ee1343547fe3466fcd23282e0f27e129a2e7d