Compare commits

...
Author SHA1 Message Date
Devmate BotandFacebook GitHub Bot 36b394ce2b xplat/yoga/yoga/style/SmallValueBuffer.h
Reviewed By: mdvacca

Differential Revision: D84047441
2025-10-07 11:58:48 -07:00
Christoph Purrerandmeta-codesync[bot] 38f52a5bc8 Use correct base class for NativeReactNativeFeatureFlags (#54046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54046

Changelog: [Internal]

Per documentation the base class to extend from is the non `JSI` one:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules#3-write-the-native-code

Reviewed By: rubennorte

Differential Revision: D83815509

fbshipit-source-id: b05b80d2c6102bf27905411a299ec09e16bb8c25
2025-10-07 11:31:08 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 58afeeff1d Split macro for static module registration (#53992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53992

This change descouple the Static Module registration from the Disable Legacy arch macro

## Changelog:
[Internal] -

Reviewed By: RSNara

Differential Revision: D83554091

fbshipit-source-id: 515aecc00428281a95441954513ccf21ff180f6f
2025-10-07 10:54:32 -07:00
Christoph Purrerandmeta-codesync[bot] 44725b88be Fix race condition in ImageFetcher when registering/unregistering commitHooks (#53862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53862

Recently, we observed a `use-after-free race condition` where the ImageFetcher object was destroyed while it was still registered as a UIManagerCommitHook.

The crash occurred in `std::vector::size()` at line 635 when accessing corrupted memory.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D82846245

fbshipit-source-id: fe0d9156ec6bc004339ed987bb5937699ebdf23b
2025-10-07 10:22:29 -07:00
Moti Zilbermanandmeta-codesync[bot] 83fbb0b536 Track Network domain status in SessionState (#54068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54068

Changelog: [Internal]

Adds a `SessionState::isNetworkDomainEnabled` bit, managed in `HostAgent`, to align with other domains. Network support is still gated behind feature flags as before.

Reviewed By: hoxyq

Differential Revision: D83847357

fbshipit-source-id: 8f94c803d04256a7e41503f2a690e97b91e3ed5e
2025-10-07 02:52:48 -07:00
James Moranandmeta-codesync[bot] c24e67fb53 Removing all references of hz_tracing V2 from the codebase (#54062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54062

Renaming every V2 tracing macro so that it no longer has `_V2` suffixed. This diff completes the migration of the hz_tracing V1->V2 API.

This is a very large diff but is comprised of mostly mechanical changes. Most of these files were edited using `find` and `sed`, specifically:
`find . -type f \( -name "*.h" -o -name "*.cpp" \) -exec sed -i 's/HZT_\(.*\)_V2/HZT_\1/g' {} +`.

Since this is just a rename, no difference in functionality is expected.

Changelog: [Internal]

Differential Revision: D83808657

fbshipit-source-id: 64effdf701b1ff600185abfb737f9c0fa2250ddf
2025-10-06 22:15:27 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 8542682754 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt (#54071)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54071

Reviewed By: ianlevesque

Differential Revision: D83924405

fbshipit-source-id: a1bc441cb818ccde8038ea9a3a3ce20f4a4571db
2025-10-06 16:34:32 -07:00
Andrew Datsenkoandmeta-codesync[bot] 8ed0e1eba5 Add Platform Color example (#53908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53908

Changelog: [Internal]
Add an example to show how Platform Color can react to changes in appearance.
This currently works on iOS for all colors, but for Android we need to "reset" desired tree with `key`.

Reviewed By: zeyap

Differential Revision: D82751014

fbshipit-source-id: 3e4b2b3ddff8c003ca835d6f26dbf9f7e82d413d
2025-10-06 12:05:31 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 064fd59602 Fix CQS signal readability-redundant-smartptr-get in xplat/js/react-native-github/packages (#54065)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54065

Reviewed By: javache

Differential Revision: D83817146

fbshipit-source-id: 36bafe7d363d7978e2d74a98aee444af9f538de4
2025-10-06 10:43:45 -07:00
Gabriel Donadelandmeta-codesync[bot] 3f7f9d8fb8 Expose NativeComponentRegistry API to index.d.ts (#54043)
Summary:
Follow up of https://github.com/facebook/react-native/pull/52999 so that users can import `NativeComponentRegistry` from react-native when using typescript

On 0.82 when users try to import `NativeComponentRegistry` without using the Strict TypeScript API they get:
```
Module '"react-native"' has no exported member 'NativeComponentRegistry'.ts(2305)
```

## Changelog:

[GENERAL] [ADDED] - Expose NativeComponentRegistry API to index.d.ts

Pull Request resolved: https://github.com/facebook/react-native/pull/54043

Test Plan: CI should be green

Reviewed By: christophpurrer

Differential Revision: D83830024

Pulled By: huntie

fbshipit-source-id: e63258b30aed4b33b2881656df0ad88a4a7d670a
2025-10-06 09:42:28 -07:00
generatedunixname89002005287564andmeta-codesync[bot] b9baddfd5d Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] (#54003)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54003

Reviewed By: javache

Differential Revision: D83622358

fbshipit-source-id: e0b4bdd65d8af9ec0e25c28a2e02371d52154c2d
2025-10-06 08:00:57 -07:00
Christian Falchandmeta-codesync[bot] 068ec39aea fixed cp command to work with gnu coreutils (#54063)
Summary:
When using gnu coreutils, installation of ReactNativeDependenices on iOS fails at compile time with errors like in the following issue (in the Expo repo):

https://github.com/expo/expo/issues/38992

This is caused by a missing `.` in the end of the path name that the built-in MacOS cp command handles well, but that will create an extra Headers folder when using cp from gnu coreutils.

This commit fixes this by adding the missing `.`

## Changelog:

[IOS] [FIXED] - Fixed issue when using gnu coreutils cp command when using precompiled binaries causing compilation error

Pull Request resolved: https://github.com/facebook/react-native/pull/54063

Test Plan:
- Verify that you're running gnu coreutils (`cp --version`)
- Create new expo app `npx create-expo-app`
- Build on iOS - should error without this fix, should work with the fix.

Reviewed By: christophpurrer

Differential Revision: D83964083

Pulled By: javache

fbshipit-source-id: 46dc074ca9b7fc97fa5a37ef48d68a895e3310ff
2025-10-06 07:51:25 -07:00
Moti Zilbermanandmeta-codesync[bot] 5027375851 Lightly refactor DebuggerSessionObserverTest (#54055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54055

Changelog: [Internal]

TSIA

Reviewed By: robhogan

Differential Revision: D83841197

fbshipit-source-id: e263f4098e09d0789abc1c33ee7ca4dac44600b2
2025-10-06 03:52:38 -07:00
Christian Falchandmeta-codesync[bot] 07f40ec6b4 add support for symbolication of precompiled React.xcframework (#54033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54033

This commit adds support for symbolication of the XCFrameworks on request.

Symbol files are big and only needed if you need to debug React Native itself - f.ex. if you are a framework developer like Expo.

Symbolication can be performed by setting the `RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1` environment variable. This will cause the `ReactNativeCoreUtils` class to download symbol files and symbolicate the XFrameworks by doing the following:

- After downloading the requested React.XCFramework the symbols will also be downloaded and places in the artifacts folder.
- The XCFrameworks will be expanded and the folders in the symbol archive will be extracted into the XCFramework before it is zipped up again.

<img width="400" alt="image" src="https://github.com/user-attachments/assets/ec8dd2e1-c7f8-4d5f-a3b6-b8ffbb678c95" />

## Changelog:

[IOS] [FIXED] - Added support for symbolication of precompiled React.xcframework

Test Plan:
```
RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Remember to clean (remove the Pods directory) before turning on/off.

Reviewed By: christophpurrer

Differential Revision: D83753187

Pulled By: cipolleschi

fbshipit-source-id: f1522e1befdea99fb8c65695322ea3ed68e6caed
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] 12850c2962 add building blocks to symbolicate precompiled React.xcframework (#54032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54032

This commit adds building blocks to support the symbolication of the XCFrameworks on request.

Symbol files are big and only needed if you need to debug React Native itself - f.ex. if you are a framework developer like Expo.

This change introduces some helper function that are needed to handle the dSYMS:
- `processDSYMs` the main function that unzip the symbols and prepare the framework for them
- `remap_sourcemaps_for_symbols` a support function that creates a mapping symbol -> file so that the debug can interpret them properly
- `generate_plist_content` a support function that generates the plist with all the mappings

These functions are used in the next commit of the stack.

## Changelog:

[Internal] - Added building blocks to support symbolication

Test Plan:
These functions are used in the next commit.
We split the commit to simplify the review. See the Test plan of the next commit to test them.

Reviewed By: cortinico

Differential Revision: D83753189

Pulled By: cipolleschi

fbshipit-source-id: 5d8027f5393a4e5a11f1b736c9901d40e7c5139b
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] 0a71b43fbc Update the sourceproperty to avoid multiple downloads (#54031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54031

This commit updates the cocoapods source for RNDependencies so that the source for the package is the locally downloaded file so we don't download twice!

## Changelog:

[IOS] [FIXED] - Update the `source`property to avoid multiple downloads

Test Plan:
Run:
```
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Multiple times and observe that the dependencies are not downloaded multiple times.

Reviewed By: christophpurrer

Differential Revision: D83753188

Pulled By: cipolleschi

fbshipit-source-id: e3fedca921b0ff9ba10ec3e5a7ba18dfbdffc3ba
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] f0f8b95719 Improve logging functions (#53976)
Summary:
This change remove some unnecessary logs and improve the logging functions for the prebuilds

bypass-github-export-checks

## Changelog:

[IOS] [CHANGED] - Updated logging functions for prebuilds

Pull Request resolved: https://github.com/facebook/react-native/pull/53976

Test Plan:
Run:
```
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Reviewed By: christophpurrer

Differential Revision: D83481709

Pulled By: cipolleschi

fbshipit-source-id: bad358c6e6abfcb1568344e5161109dff7ee06ab
2025-10-04 10:21:21 -07:00
Gang Zhaoandmeta-codesync[bot] 36e1c0afed Remove old CDPHandler (#53983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53983

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83525759

fbshipit-source-id: 0a223a54339496e4e85ecb173b3c7e0012c4fba8
2025-10-03 10:29:45 -07:00
James Moranandmeta-codesync[bot] b3341d3541 Replace hz_tracing V1 macros with newer V2 variants (#54036)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54036

We are migrating away from the older V1 macros to the V2 macros, which have better code-stripped functionality and less business logic embedded in the API.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83760301

fbshipit-source-id: b6c9ea155ebe22d6d4ce023a1dbb2cfd52fb8394
2025-10-03 10:05:29 -07:00
Moti Zilbermanandmeta-codesync[bot] fc60030a34 Add basic test for NetworkReporter and CDP Network domain (#54049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54049

Changelog: [Internal]

Adds `JsiIntegrationTest`-based tests for the C++ layer responsible for handling the CDP `Network` domain. The tests use `NetworkReporter` to mimic the behaviour of a React Native platform that is generating network events.

NOTE: There are **significant problems** with the `NetworkReporter` / `NetworkHandler` singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating (and we'll be able to write stricter tests to cover the fixes).

Reviewed By: huntie

Differential Revision: D83746505

fbshipit-source-id: 7ee3c68e67f0d29587cbfafa98cf107d27065ffc
2025-10-03 06:10:29 -07:00
Moti Zilbermanandmeta-codesync[bot] c0e381db1c Reduce log spam from naggy mocks in tests (#54047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54047

TSIA

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83825727

fbshipit-source-id: a4a8ffc38571596985ae2687142dbc8a974be39c
2025-10-03 06:10:29 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 6db4a0171e xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp (#54054)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54054

Reviewed By: rshest

Differential Revision: D83735540

fbshipit-source-id: e4284fdb76344584a983cfd242c2463912f3a6bf
2025-10-03 04:35:31 -07:00
Nick Lefeverandmeta-codesync[bot] 88cf30a675 Add backgroundImage prop diffing to View (#54042)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54042

Update the View component props to diff the `backgroundImage` property and assign the value to `experimental_backgroundImage` which maps to the `backgroundImage` property on the Android `ReactViewManager`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788008

fbshipit-source-id: 5f9d93403af483c9494d2782aedad604cbb7cbbc
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] d9d3b3e08b Add toDynamic conversion for RadialGradient (#54041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54041

Implement toDynamic conversion of the RadialGradient following the parse logic as described here: https://www.internalfb.com/code/fbsource/[28de0c66daab]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/RadialGradient.kt?lines=33-129

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788007

fbshipit-source-id: 305e6f5011f16103a559132e61b6d4eae24cc137
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] c53541f3a1 Add toDynamic conversion for LinearGradient (#54040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54040

Implement toDynamic conversion of the LinearGradient following the parse logic as described here: https://www.internalfb.com/code/fbsource/[5fa7eb2b733a]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/LinearGradient.kt?lines=24-76

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788005

fbshipit-source-id: 9114451b12e31ad86abde54dbe2c8819a304e777
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] e88962bb1a Add toDynamic conversion for ValueUnit and ColorStop (#54039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54039

Adding toDynamic conversion to `ColorStop` and `ValueUnit` structs which are being used by the linear and radial gradient data structures.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788006

fbshipit-source-id: 1ec0300ac4f17b65b6896d4d2c131eb05a059a22
2025-10-02 22:00:56 -07:00
Eric Rozellandmeta-codesync[bot] 26502c6319 Do not scroll to child inside nested scroll view (#54044)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54044

In rare cases, there may be a vertical ScrollView nested inside another vertical ScrollView. In these cases, when the requestChildFocus method is called, we may attempt to bring the entire focused child into view. However, we really only want to bring the entire nested ScrollView into view.

## Changelog

[Android][Fixed] Focused scroll into view behaviors for nested vertical scroll views

Reviewed By: bvanderhoof

Differential Revision: D83804043

fbshipit-source-id: 8df8f637e7f908cc283f55c0d78ee03ed3bb9117
2025-10-02 21:20:53 -07:00
David Vaccaandmeta-codesync[bot] aab0d3397c Add a Log error to discourage usages of getJSModule(RCTEventEmitter) in new architecture (#54038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54038

This diff adds a Log error to discourage usages of getJSModule(RCTEventEmitter) in new architecture, recommending migration to new API

changelog: [Android][Changed] Add Log error to discourage usages of getJSModule(RCTEventEmitter) API

Reviewed By: shwanton

Differential Revision: D83523928

fbshipit-source-id: d967456087a59366a3bca9590cb4d6d1fdd5b60d
2025-10-02 14:04:02 -07:00
Sam Zhouandmeta-codesync[bot] 36a9b7eda7 Replace React.ElementProps in tests and examples (#54035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54035

`React.ElementConfig` is often the better choice. See https://flow.org/en/docs/react/types/#toc-react-elementprops

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D83749631

fbshipit-source-id: 81b21c1a0dced5bc578d3a5752c303b57b467f7b
2025-10-02 13:48:56 -07:00
Sam Zhouandmeta-codesync[bot] 041b4c3dd0 Replace React.ElementProps with React.ElementConfig in createAnimatedComponent.js (#54034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54034

`React.ElementConfig` is often the better choice. See https://flow.org/en/docs/react/types/#toc-react-elementprops

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D83750127

fbshipit-source-id: 788169d73cccc2ed7c9b250845ad7277fe79c47f
2025-10-02 13:47:40 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 481df76c24 Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [B] (#54028)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54028

Reviewed By: javache

Differential Revision: D83719979

fbshipit-source-id: 4d683f7f95b2dc8502653d22a9a1d9fd6ab03b81
2025-10-02 12:55:56 -07:00
Devan Buggayandmeta-codesync[bot] 8c90f81aab Improve DevMenu for Android 11 (#54023)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54023

Android 12 introduced a new AlertDialog that better fits a longer list of content.
Android 11 and earlier have an AlertDialog that has a very small list view, requiring users to scroll through to find what they need. This change also fixes Android 12+ enable/disable states on menu items, as it no longer uses `isEnabled` for styling.

Before:
{F1982416953}

After:
{F1982416486}

Android 12:
{F1982430956}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83688775

fbshipit-source-id: a96120142f648e849be670bde5897c884f1f5f52
2025-10-02 09:30:08 -07:00
Devan Buggayandmeta-codesync[bot] 6e8fab96fa Harden perf monitor to metro connection changes (#54022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54022

Perf monitor shows in a broken state if metro is started while the app is running. This change improves the tracing and monitor lifecycle around the metro connection events.

Before:
{F1982430185}

After:
{F1982430062}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83714223

fbshipit-source-id: 76826122924baa1a80c04dcc5ff18bc756a8e816
2025-10-02 09:30:08 -07:00
Vitali Zaidmanandmeta-codesync[bot] 6c874f25e2 Fix SoLoader race condition in InspectorNetworkRequestListener (#54029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54029

Changelog: [Android][Fixed] Fixed `SoLoader` race condition in `InspectorNetworkRequestListener`

When enabling `LoadNetworkResrouce` with flag `nativeSourceCodeFetching` in `InspectorInterfaces.h`, running the app, and opening the debugger, the app was crashing with
```
No implementation found for void com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(int, java.util.Map)
(
tried
  Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders
and
  Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders__ILjava_util_Map_2
) - is the library loaded, e.g. System.loadLibrary?
```

Reviewed By: huntie

Differential Revision: D83741114

fbshipit-source-id: b878fb4680e6a51f9403e8dea2872da85254e024
2025-10-02 07:36:10 -07:00
Devan Buggayandmeta-codesync[bot] 53dc68a31d Don't flash the performance monitor there's no metro connection (#54019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54019

Currently the performance monitor flickers on boot if there's no metro connection. This change checks first if we have a packager before enabling the monitor.

No metro connection:
{F1982423105}

Metro connection:
{F1982423112}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83701372

fbshipit-source-id: d099880d3ab509942a937a6bde11ebdde13450cd
2025-10-02 07:21:18 -07:00
Devan Buggayandmeta-codesync[bot] 84947fb0de Fix performance analyze path from DevMenu (#54018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54018

The DevMenu path for perf analyzing no-ops. This is due to incorrectly not inverting the bool result of `pauseAndAnalyzeBackgroundTrace()`. See https://www.internalfb.com/code/fbsource/%5Bfcebbc02e701%5D/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayManager.kt?lines=73-75.

{F1982418482}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83691623

fbshipit-source-id: a16e39b00c07b6846092cc29bc656a08a61d20bb
2025-10-02 07:21:18 -07:00
Rob Hoganandmeta-codesync[bot] 89f0a37800 Minor bump Metro to ^0.83.3 (#54010)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54010

Bump Metro minimum to 0.83.3

This release fixes a regression in loading config files that export promises.

Full changelog: https://github.com/facebook/metro/releases/tag/v0.83.3

Changelog:
[General][Changed] Metro bump to ^0.83.3

Reviewed By: vzaidman

Differential Revision: D83655569

fbshipit-source-id: 106a957620e4591ef3cce21d327886354913560b
2025-10-02 06:53:57 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 880b7e2c3a Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [B] (#54025)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54025

Reviewed By: rshest

Differential Revision: D83704348

fbshipit-source-id: 8f5e34aa1b344a30dfea26661ac7b71fa4b2ddb1
2025-10-02 06:50:35 -07:00
generatedunixname89002005287564andmeta-codesync[bot] bcf974838e Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [A] (#54027)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54027

Reviewed By: javache

Differential Revision: D83703007

fbshipit-source-id: 36f08f1b48f52750065a39ef322cc675aa828f9e
2025-10-02 06:41:54 -07:00
generatedunixname89002005287564andmeta-codesync[bot] fd95f824d0 Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [A] (#54026)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54026

Reviewed By: javache

Differential Revision: D83719624

fbshipit-source-id: 9e43d15dd4b44c9c7b3be711d62541135031d1f8
2025-10-02 06:24:14 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 47d1d2b256 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp (#54024)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54024

Reviewed By: rshest

Differential Revision: D83641704

fbshipit-source-id: 2d102bc1078a951aefee2097914477c6508cc988
2025-10-02 06:22:42 -07:00
Nick Lefeverandmeta-codesync[bot] 0e03adcc79 Add support for nextFocus props to View (#54021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54021

Adding missing `nextFocus*` props to the View props to enable correct Props 2.0 diffing.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D83714902

fbshipit-source-id: 9b47ba5ea3e177e72b77b1df4b6b6082848c77a4
2025-10-01 20:14:24 -07:00
David Vaccaandmeta-codesync[bot] 07fcdfebae Fix publish-updated-packages-test (#54017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54017

Fix test: publish-updated-packages-test
changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D83699726

fbshipit-source-id: 45f4713d18ed74a6b344f34ab9b3dd7760088fcc
2025-10-01 17:22:35 -07:00
Moti Zilbermanandmeta-codesync[bot] 7dc26f58ee Allow tests to run against all versions of Hermes (#54011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54011

Gets the `jsinspector-modern` (CDP backend) integration tests in React Native to pass when run against all relevant versions of Hermes: Legacy Hermes (`xplat/hermes`), Static Hermes stable (`xplat/shermes/stable`), and Static Hermes trunk (`xplat/static_h`).

This involves disabling the two types of failing test:

1. Tests that should be legitimately disabled because Static Hermes omits the legacy, pre-Fusebox debugger infra (see changes to `ReactInstanceIntegrationTest.cpp`)
2. Tests that should be passing but expose a current bug in Static Hermes (see changes to `JsiIntegrationTest.cpp`)

This provides a useful baseline for upcoming work in CDPDebugAPI (etc) across the different versions of Hermes.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83564896

fbshipit-source-id: c27f02266d63d58983c660ba0e4be5c44f02c9b6
2025-10-01 12:48:25 -07:00
David Vaccaandmeta-codesync[bot] 10c5c75de4 Delete Legacy Architecture class CoreModulesPackage (#53787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53787

CoreModulesPackage is part of legacy architecture and unused on new architecture, let's delete it

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D82235543

fbshipit-source-id: bd18a1e26929c1f4533175d7567c552e142fbebb
2025-10-01 10:55:17 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 8825ec7464 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83661214

fbshipit-source-id: f1de9dc96d30c46da986f52c6bdb623eeee469dc
2025-10-01 08:54:14 -07:00
Nicola CortiandFacebook GitHub Bot d9a582e949 Bump packages to 0.83.0-main (#54009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54009

Packages haven't been bumped on main ahead of 0.83. This takes care of it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, huntie

Differential Revision: D83580515

fbshipit-source-id: 7471e77f74e3fb3b4ee6538a49369b5df1393098
2025-10-01 07:13:33 -07:00
Bartłomiej BłoniarzandFacebook GitHub Bot e091759947 Animation Backend init (#53526)
Summary:
This diff adds AnimatedProps class that allows prop diffs to be passed to the backend. Currently it is implemented through subclassing, but the implementation details are subject to change. To simplify integration with animation frameworks AnimatedPropsBuilder class was created - frameworks can use it to prepare their diffs.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [ADDED] - AnimatedProps.h AnimatedPropsBuilder.h
[GENERAL] [CHANGED] - AnimationBackend initialisation and style updates

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/53526

Test Plan:
js1 fantom AnimatedBackend-itest.js
js1 fantom Animated-itest.js

Reviewed By: zeyap

Differential Revision: D81309558

Pulled By: bartlomiejbloniarz

fbshipit-source-id: 92476568b6498d7ee64203f70a17c3e578de7ac1
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 7ec470d49a Expose the backend via UIManager (#53995)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53995

### Summary

Exposes the animation backend via UIManager by introducing two new methods: `unstable_setAnimationBackend` and `unstable_getAnimationBackend`. The `NativeAnimatedNodesManagerProvider` is updated to initialize the animation backend using the `useSharedAnimatedBackend` feature flag.

## Changelog:

[GENERAL] [ADDED] - unstable_setAnimationBackend, unstable_getAnimationBackend in UIManager
[GENRAL] [CHANGED] - call unstable_setAnimationBackend in NativeAnimatedNodesManager

Reviewed By: zeyap

Differential Revision: D81137954

fbshipit-source-id: b9a45b1d1e694e28865c27181bcbd578c1b7b9a0
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 3f396616d2 Init the backend closer to the uiManager (#53996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53996

## Summary

This diff makes changes to the `NativeAnimatedNodesManager` and `AnimationBackend` to initialize the backend closer to the `UIManager`.

## Changelog:

[GENERAL] [CHANGED] - initialize the backend in NativeAnimatedNodesManagerProvider

Reviewed By: sammy-SC

Differential Revision: D81138133

fbshipit-source-id: 5be0c8d5f5e3593bcd8111bbd1d0e90502a53a0d
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 325c681cb1 boostrap shared animation backend (#53994)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53994

# Summary

This diff introduces the Shared Animation Backend - a class that can be used by animation frameworks to schedule and run animation updates.

## Changelog:

[GENERAL] [ADDED] - AnimationBackend-itest.js AnimationBackend BUCK/CmakeLists
[GENERAL] [ADDED] - useSharedAnimationBackend feature flag
[GENERAL] [CHANGED] - make AnimatedNodesManager use the backend behind the flag

Reviewed By: zeyap, sammy-SC

Differential Revision: D80809364

fbshipit-source-id: dbfe273362410cdf2f9fc37d78adac7faf4cd118
2025-10-01 04:15:11 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 33bc2716e4 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#54002)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54002

Reviewed By: javache

Differential Revision: D83622069

fbshipit-source-id: 70b1393dc71ea80d9910682ce86ffd7dd8cd04d5
2025-10-01 04:10:58 -07:00
Dawid MaleckiandFacebook GitHub Bot 29d5aa582f iOS: Add new configuration for RCTDevMenu (#53505)
Summary:
Following the [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/925), this PR adds new `RCTDevMenu` configuration  and extends `RCTReactNativeFactory` API for passing it to the particular `RCTHost`.  The `RCTDevMenuConfiguration` includes:

- isDevMenuEnabled,
- isShakeGestureEnabled,
- areKeyboardShortcutsEnabled

## Changelog:

[IOS][ADDED] - Add new configuration for `RCTDevMenu`

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/53505

Test Plan:
Tested with different configurations on `RCTDevMenuConfiguration`:

<details>
<summary>Click to view code</summary>

```objc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.reactNativeFactory = [[RCTReactNativeFactory alloc] initWithDelegate:self];
#if USE_OSS_CODEGEN
  self.dependencyProvider = [RCTAppDependencyProvider new];
#endif

  RCTDevMenuConfiguration *devMenuConfiguration = [[RCTDevMenuConfiguration alloc] initWithDevMenuEnabled:true shakeGestureEnabled:false keyboardShortcutsEnabled:false];

  [self.reactNativeFactory setDevMenuConfiguration:devMenuConfiguration];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

  [self.reactNativeFactory startReactNativeWithModuleName:@"RNTesterApp"
                                                 inWindow:self.window
                                        initialProperties:[self prepareInitialProps]
                                            launchOptions:launchOptions];

  [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];

  return YES;
}
```

</details>

Run helloworld:

<img src="https://github.com/user-attachments/assets/16c35176-6fbe-498c-96fd-a0fe988a5e3c" alt="hello-world-screenshot" width="300">

Reviewed By: cipolleschi

Differential Revision: D81684275

Pulled By: coado

fbshipit-source-id: 500e170c93df25949de433970442d20c442be7f2
2025-10-01 02:42:54 -07:00
React Native BotandFacebook GitHub Bot 3766e58b9a Add changelog for v0.82.0-rc.5 (#53993)
Summary:
Add Changelog for 0.82.0-rc.5

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.5

Pull Request resolved: https://github.com/facebook/react-native/pull/53993

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83564973

Pulled By: vzaidman

fbshipit-source-id: 411da5ee9f1be6e9a8891c12a5e5e2e09c5c15f6
2025-10-01 00:35:58 -07:00
Chi TsaiandFacebook GitHub Bot 6031905711 Fix JSI isArray method to match JS Array.isArray (#53998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53998

As the previous few diffs, JSI `isArray` API should follow
`Array.isArray` from the JS spec.

The current implementation does not consider Proxy objects, only Array
exotic objects.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D83391784

fbshipit-source-id: 6db8e5a48458a1aa57006fb0747f62ec78efa675
2025-09-30 20:17:12 -07:00
Fernando GorodscyandFacebook GitHub Bot 990ca0d100 Add support for .ktx images (#53991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53991

As part of D83474751 to migrate Store from arvr to xplat we discovered that ktx images are not setup correctly in xplat. Adding support for it in flow and jest

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D83562581

fbshipit-source-id: 8c7205417dc24ca2d48a2e2fa1ca7dea40504c18
2025-09-30 18:36:11 -07:00
Jakub PiaseckiandFacebook GitHub Bot e02e7b1a29 Request layout on configuration change only when the font scale has changed (#53984)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53984

Changelog: [ANDROID][CHANGED] - Request layout on configuration change only when the font scale has changed

Wraps call to `requestLayout` in a condition to only run layout when the font scale has changed to prevent it from executing in response to other configuration changes.

Reviewed By: Abbondanzo

Differential Revision: D83546632

fbshipit-source-id: 41a5199dd2ef72b8f6257637c1d35d4a790ea006
2025-09-30 08:40:09 -07:00
Pieter De BaetsandFacebook GitHub Bot af904e563e Unbreak Fb4aReactPackageTest (#53988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53988

These broke during Kotlin conversions etc as `context.getSystemService` is nullable.

Changelog: [Internal]

Reviewed By: lenaic, rshest

Differential Revision: D83503457

fbshipit-source-id: f4d2a09d60c38e6e5ae2b01d61fa73459b0f7f4d
2025-09-30 05:03:42 -07:00
Nick LefeverandFacebook GitHub Bot a073080810 Fix serialization for vector of primitive type (#53982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53982

This diffs adds specific `toDynamic` conversions for props defined as arrays holding primitive types. This fixes the serialization of `std::vector<Float>` that was failing to correctly convert to a `folly::dynamic` type when using Props 2.0.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D83520605

fbshipit-source-id: 80a6ce2b3a265601f945ff3b76840c04e46aacdc
2025-09-29 18:17:49 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 5a4ed2d955 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [B] [B] (#53970)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53970

Reviewed By: rshest

Differential Revision: D83404453

fbshipit-source-id: 852d553b9c70a00c8493f8f0ad2d55df0a6093ea
2025-09-29 16:52:55 -07:00
Chris LewisandFacebook GitHub Bot 0a3bcc97ec Back out "Genalize focus/blur behavior in JS" (#53979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53979

This reverts a previous change that modified how focus behavior is handled in JavaScript. That change caused hierarchy rows to no longer be focusable, either manually or programmatically as they were before, which in turn broke arrow key navigation in entity lists. Reverting the change restores the expected focus behavior and re-enables proper arrow key functionality within entity lists.

Changelog: [Internal]

Differential Revision: D83390685

fbshipit-source-id: 165567eceedce5d0a2e664a9ef3070d5a2bf9b67
2025-09-29 16:09:05 -07:00
Pieter De BaetsandFacebook GitHub Bot a81e94a40c Fix useNativeTransformHelper behaviour when frame size is 0 (#53978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53978

Inconsistency between the previous and old version of `processTransform` - if frameSize is 0, the transform was being ignored, which is not correct when considering a fixed transform origin and a rotation animation for example. Instead, always apply the transform origin if it's set.

Changelog: [Android][Fixed] Fixed representation of transforms when view is originally zero-sized

Reviewed By: mdvacca

Differential Revision: D83469083

fbshipit-source-id: e9ae1500f64c700708edb00b2d5871e3f224fb07
2025-09-29 15:37:24 -07:00
generatedunixname89002005287564andFacebook GitHub Bot fa465c6da9 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [A] [B] (#53972)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53972

Reviewed By: rshest

Differential Revision: D83405113

fbshipit-source-id: 5e7b3c37e08d49991fd112180625953a0edca047
2025-09-29 12:36:44 -07:00
Devan BuggayandFacebook GitHub Bot 0b14a19ea6 Migrate ReactRoot to Kotlin (#53238)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53238

Changelog:
[Android][Changed] - Migrated ReactRoot to Kotlin

Reviewed By: cortinico

Differential Revision: D80074359

fbshipit-source-id: 273f5bfc2826f59f2bb1521b8dbd95c48e5eb0c4
2025-09-29 12:28:02 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3774f75705 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#53969)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53969

Reviewed By: rshest

Differential Revision: D83350635

fbshipit-source-id: 48ec748e3ffadd9985daa40895ffbbd1dd40e946
2025-09-29 10:34:02 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 279835dc14 Daily arc lint --take KTFMT (#53974)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53974

Reviewed By: VladimirMakaev

Differential Revision: D83454863

fbshipit-source-id: 6742bac1207743f3fc58c48d1261de00bcfacf85
2025-09-29 10:05:01 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3fb6c12ec8 Fix CQS signal readability-const-return-type in xplat/js/react-native-github/packages (#53940)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53940

Reviewed By: javache

Differential Revision: D83238455

fbshipit-source-id: ea3d3180f37151b3bba432d55324f2d854f29bc4
2025-09-29 08:16:45 -07:00
generatedunixname89002005287564andFacebook GitHub Bot fe043446e8 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#53971)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53971

Reviewed By: rshest

Differential Revision: D83395511

fbshipit-source-id: 832901c112d6ebf0b58280bf12a50f7845251c5c
2025-09-29 06:30:14 -07:00
generatedunixname89002005232357andFacebook GitHub Bot c47205990d Revert D82781491 (#53968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53968

This diff reverts D82781491
(The context such as a Sandcastle job, Task, SEV, etc. was not provided.)

Depends on D82781491

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D83442434

fbshipit-source-id: bd570564ee22d57bd7a3ca7f6990230de3e5ac4e
2025-09-28 22:09:03 -07:00
Nick LefeverandFacebook GitHub Bot 2f40224faf Add support for global view culling outset ratio setting (#53845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53845

Adding a feature flag controlling the outset ratio set on the culling context frame. This feature flag value will add an outset on the width and height calculated by multiplying these with the provided ratio value. This will offset each side of the frame, maintaining the center of the frame at the same location.

This outset ratio helps mitigate async scroll blanking and focus handling on host platforms.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D82684027

fbshipit-source-id: 3d1aaf680c5896fd4bb992b272b650ab2c097905
2025-09-28 15:13:07 -07:00
Fernando GorodscyandFacebook GitHub Bot fb09b37646 Move files from arvr/js/apps/Store to xplat/js/RKJSModules/public/HzStoreVR
Summary:
# What

Moving Store from `arvr/js` to `xplat/js`.
This will enable Store to use xplat modern infra. Being on arvr/js legacy infra has created many problems [over the years](https://fb.workplace.com/groups/storecore/posts/2344707442611890/?comment_id=2345657702516864). Examples:

**2025**: https://fb.workplace.com/groups/storecore/permalink/2344707442611890/
**2024**: https://fb.workplace.com/groups/oculusjs/permalink/3366314690341563/
**2023**: https://fb.workplace.com/groups/xplatreact.engineering/permalink/730125568732098/

# How
## Previous Diff
* Remove usage of the legacy `react-router-3`. We don't want to carry this as a dependency to xplat/js.

## This Diff
This diff is the combination of several diffs (created to facilitate reviewing):

1. - D82581768 - Just move files from arvr/js/apps/Store to xplat/js/RKJSModules/public/HzStoreVR (Except for the index file and some mockUtils)
2. - D82581767 - Setup getConfig.js to generate a single BUCK for HzStoreVR and remove circular dependencies
3. - D82581769 - Fix location/import of assets
4. - D82581766 - Fix relay imports that were not using Haste
5. - D82664586 - Remove usage of old url module
6. - D83156829 - Fix buck: run js1 build buckfiles and build_and_run.sh
7. - D82844768 - Make arvr/js tests run with xplat Store
8. - D83005059 - Fix Flow errors
9. - D83259512 - Delete duplicated test files to make flow happy
10. - D83005098 - Fix Relay config for new Store VR location in xplat
11. - D83005073 - Enable React Forget on new HzStoreVR directory
12. - D83345573 - Fix arc lint -a
13. - D83403188 - Fix relay prefetch queries

## Next diffs
* Migrate tests to xplat jest config (renaming from *-rntest.js to *-test.js)
* Migrate other source code like arvr/js/libraries/store

## Open Source PR
For the change to RN open source .flowconfig to add .ktx image support: https://github.com/facebook/react-native/pull/53964
Changelog: [Internal]

Reviewed By: Tom910, mullender

Differential Revision: D82781491

fbshipit-source-id: 5ce6433916e5b144965e8906005e2e26fdcfcc95
2025-09-27 17:13:39 -07:00
Sam ZhouandFacebook GitHub Bot 488b31d29a Deploy 0.287.0 to xplat (#53965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53965

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D83415742

fbshipit-source-id: ff6faa673a70cb8dc958ef2ad46245c720f3df9a
2025-09-27 14:01:43 -07:00
David VaccaandFacebook GitHub Bot 99b7cb77a7 Delete ReactRawTextShadowNode from codebase (#53949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53949

ReactRawTextShadowNode is part of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D83188351

fbshipit-source-id: 19514d8e5d96d2d2fb4fb4b25d422282894c8c18
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 969e14271c Delete ReactRawTextManager from codebase (#53947)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53947

ReactRawTextManager is legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83187075

fbshipit-source-id: 4e4f7feb3178b3f95a71ff805ec7d784f2811285
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 8386a9e4f1 Delete ReactVirtualTextShadowNode (#53948)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53948

ReactVirtualTextShadowNode is par of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83187955

fbshipit-source-id: d8bd0aa9cece68c7b4a4d5674ce97a8ef43a7fc5
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 163d553ba2 Delete NoSuchNativeViewException (#53946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53946

NoSuchNativeViewException is legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83186872

fbshipit-source-id: cbd3b2f537673745e634d0bfc8717fc93f1c0c5f
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 589bf35cd1 Delete ReactVirtualTextViewManager from codebase (#53945)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53945

ReactVirtualTextViewManager is an internal legacy architecture class that's unused, we are deleting it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83186611

fbshipit-source-id: 323c77077ab91ffec35af8e4c12da4bdf13fa233
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot dd6c23fb61 Delete YogaNodePool (#53944)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53944

YogaNodePool is an internal API used only by LegacyArchitecture of React Native Android, which is unused

This diff deletes YogaNodePool from the codebase

changelog: [internal] internal

Reviewed By: alanleedev, cortinico

Differential Revision: D83184441

fbshipit-source-id: 7c358985d9f19b38c28cca7fb0acf9322e97d87c
2025-09-26 14:07:25 -07:00
Devan BuggayandFacebook GitHub Bot 218d2f6fdc PerfMonitor - Add show/hide to dev menu (#53958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53958

Adds a dev menu option to enable/disable the overlay, in case devs want to screenshot/record without disabling it at buildtime.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83293591

fbshipit-source-id: 3564b83a279db296d1cd22a8e8a83876cc705dbd
2025-09-26 12:28:25 -07:00
Devan BuggayandFacebook GitHub Bot 456e01bf3f PerfMonitor - Fix enable/disable states (#53957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53957

There are cases where the overlay can get enabled multiple times, creating more than one view. This change no-ops enabling if the overlay is already enabled and just uses enable/disable for showing/hiding the view.
{F1982272836}

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D83275253

fbshipit-source-id: 4b468171a582e134071875f718c66d1659d67782
2025-09-26 12:28:25 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8bc133c6c1 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages (#53962)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53962

Reviewed By: javache

Differential Revision: D83330024

fbshipit-source-id: f35898ba42dc06909b927d5c4b5477e7d8c8e966
2025-09-26 10:50:27 -07:00
SimpleCreationsandFacebook GitHub Bot f7ea40bc28 Fix TypeScript types of positions in GradientValue (#53942)
Summary:
The original type of the `positions` property was mistakenly declared as a 2-dimensional array, which is not accepted in runtime. In reality, a flat string array is expected as per [linear gradient examples](https://github.com/facebook/react-native/blob/18ba21149ae46d3fa97fe0dcbe165999009d2a6e/packages/rn-tester/js/examples/LinearGradient/LinearGradientExample.js#L230).

## Changelog:

[General] [Fixed] - TypeScript types of `positions` in `GradientValue`

Pull Request resolved: https://github.com/facebook/react-native/pull/53942

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83342637

Pulled By: javache

fbshipit-source-id: 556618dd43861b3d3f1728c089f790815f2f011b
2025-09-26 10:13:27 -07:00
Nurtau ToganbayandFacebook GitHub Bot ad5949ffd6 Fix TaskDispatchThread (#53961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53961

Changelog: [Internal]

Fixed a bug in TaskDispatchThread. To understand bug, let me show an example. The task is scheduled to run after several seconds. It reaches loopCv_.wait_until() and waits there. There are 2 bad scenario:
1. wait_until spuriously wakes up and async task runs even before its scheduled time
2. new task is added with runSync(). New task gets added to the queue and loopCv_ is notified. Async task will run before its scheduled time and even worse queue_.pop() will remove sync task. Therefore runSync will be blocked for forever.

To fix this bug, we need to add `continue` after wait_until().

Also I added new test to prevent this bug in future.

Reviewed By: rshest

Differential Revision: D83345047

fbshipit-source-id: 37962613a123a123c0e110426ae782effe5a81c1
2025-09-26 08:54:24 -07:00
Rob HoganandFacebook GitHub Bot 2d2011c7ae Invalidate transform cache on update of/local changes to @react-native/babel-preset (#53867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53867

`react-native/metro-babel-transformer` implements `getCacheKey` for Metro, but does not vary the cache key on changes to `react-native/babel-preset`, one of its dependencies, leading to false positive cache hits (changes not being reflected).

This is particularly a problem in development, although it potentially also leads to issues in the unusual case that `react-native/babel-preset` is updated via npm, but no other package is.

This adds a `getCacheKey` to `react-native/babel-preset` and incorporates it into `react-native/metro-babel-transformer`'s `getCacheKey`. It's based on `package.json#version` in production and a hash of package contents in development (`version.endsWith('-main')`).

Changelog:
[General][Fixed] Invalidate transform cache when `react-native/babel-preset` is updated

Reviewed By: huntie

Differential Revision: D82893894

fbshipit-source-id: 9bbc034eaf68ee0e5b3078fb2fe8f30caa7f11c9
2025-09-26 08:13:44 -07:00
Pieter De BaetsandFacebook GitHub Bot 29b74061e4 Inline lazy fields in core data types (#53959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53959

These data-types are super common in React Native, and the anonymous inner classes add significantly to the GC workload we see. For ReadableMap this means we can save 6 additional object allocations for each LazySynchronizedImpl and the lambda that's passed in to it. On synthetic benchmarks this seems to improve core operations around ~10%.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83245864

fbshipit-source-id: 69b314a1f52a32375b5e1f591555f50bfbc31843
2025-09-26 07:20:06 -07:00
Jakub PiaseckiandFacebook GitHub Bot 4f2755bda5 Update the version of Hermes V1 (#53930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53930

Changelog: [GENERAL][CHANGED] - Update version of Hermes V1 used for React Native

Reviewed By: cortinico

Differential Revision: D83234930

fbshipit-source-id: 7cbad6c4b4fe6d7c8fe3ac25bea30bb25100ee18
2025-09-26 01:33:12 -07:00
Nivaldo BondançaandFacebook GitHub Bot 64d34080af Update ktfmt component on FBS:master (#53956)
Summary:
X-link: https://github.com/facebookexternal/meta-ar-mr-tooling/pull/200

Pull Request resolved: https://github.com/facebook/react-native/pull/53956

Reviewed By: jselbo

Differential Revision: D82570814

fbshipit-source-id: 6eeade55734548d057c5eae77a9188172473a819
2025-09-26 01:00:36 -07:00
Eric RozellandFacebook GitHub Bot b9dcc1b670 Flip the order of component descriptor registration (#53953)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53953

For TurboModule registration, we register custom / app-specific TurboModules before core TurboModules to ensure that app-specific module overrides are preferred over core / default behaviors.

This provides a similar behavior for Fabric component descriptor registration.

## Changelog

[Internal]

Reviewed By: alanleedev

Differential Revision: D83273376

fbshipit-source-id: fd0fb5f10d2bc29839ae554f0e3cfc18d7957848
2025-09-25 19:56:41 -07:00
Eric RozellandFacebook GitHub Bot 49b0045669 Unseal ScrollViewProps (#53952)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53952

In React Native Android, you can technically override core components like ScrollView to add additional props and behaviors, but doing so in the new architecture requires ensuring that these props are tracked in the C++ props object.

This change unseals ScrollViewProps so they can be overridden in (rather rare and generally unsupported) cases where you need to customize ScrollView behaviors for a specific app.

## Changelog

[Internal]

Reviewed By: Abbondanzo

Differential Revision: D83268457

fbshipit-source-id: d1d895e9f060dcf94bf82538a33bf5f2fbb135d7
2025-09-25 19:56:41 -07:00
Ramanpreet NaraandFacebook GitHub Bot 2b5938c900 Remove legacy validation warning infra (#53792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53792

This validation infra served us well, but it's no longer needed.

All the legacy architecture classes have been identified and deprecated. And in the next major release, we will simply remove them.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D82470292

fbshipit-source-id: 44b58e63b7aca4fa22ac6b891275417bf1add8d1
2025-09-25 17:58:52 -07:00
Ramanpreet NaraandFacebook GitHub Bot d3890080c8 Consolidate all c macros (#53823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53823

Let's just use the same flag to compile out everything. I don't think we'll need the utility of separate flags.

Reviewed By: fkgozali

Differential Revision: D82476933

fbshipit-source-id: 1b5fbfad7d54e0af7db5459772b3e7a8472c1eb1
2025-09-25 16:59:07 -07:00
Luna WeiandFacebook GitHub Bot 62fd6895e3 fbsource//xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/viewexperimental:viewexperimentalAndroid (#53782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53782

Changelog: [Internal] - Remove unnecessary ?. in VirtualViewExperimental

Reviewed By: yungsters

Differential Revision: D82426042

fbshipit-source-id: 2ba012b421b1d5000892e085a3277506829e7be2
2025-09-25 15:21:30 -07:00
Nurtau ToganbayandFacebook GitHub Bot 7b8590f860 Correctly join thread in TaskDispatchThread (#53943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53943

Changelog: [Internal]

Thread join should happen only during TaskDispatchThread dtor, otherwise if quit is called on the same thread (thread_), then thread_ will get detached, which can lead to use of already deleted fields (queue_, running_) of TaskDispatchThread.

But we also need to make sure that on quit() call, loop is getting stopped, otherwise in loop, already running task will use already deleted fields of captured object. If quit() is called as task on thread_, then there is no need to wait for future because loop will organically end since running_ is false.

Reviewed By: rshest

Differential Revision: D83044012

fbshipit-source-id: a2da97a89093c47c64b693e3c9e5d6f7297c038e
2025-09-25 14:21:07 -07:00
Alex HuntandFacebook GitHub Bot 4e595b7c7d Update debugger-frontend from 8b84a77...8cce390 (#53941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53941

Changelog: [Internal] - Update `react-native/debugger-frontend` from 8b84a77...8cce390

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/8b84a77b2c82c670886ef064dfc92d6bce83e579...8cce39003f66f66a8fb4c0e581a2b5046cf9c1d1).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8cce39003](https://github.com/facebook/react-native-devtools-frontend/commit/8cce39003) | Alex Hunt (hello@alexhunt.dev) | 2025-09-25T15:05:50+01:00 | [Update Welcome panel assets and styling (#208)](https://github.com/facebook/react-native-devtools-frontend/commit/8cce39003) |
| [7724ccb99](https://github.com/facebook/react-native-devtools-frontend/commit/7724ccb99) | Alex Hunt (hello@alexhunt.dev) | 2025-09-25T08:46:01+01:00 | [Disable Perf Insights subpanel, collapse sidebar by default (#209)](https://github.com/facebook/react-native-devtools-frontend/commit/7724ccb99) |
| [538c309a3](https://github.com/facebook/react-native-devtools-frontend/commit/538c309a3) | Vitali Zaidman (vzaidman@gmail.com) | 2025-09-18T12:20:22+01:00 | [track when all startup resources are loaded (#205)](https://github.com/facebook/react-native-devtools-frontend/commit/538c309a3) |

Reviewed By: hoxyq

Differential Revision: D83248877

fbshipit-source-id: e5d7fb009a89bd97c8aac5f0a09b5733b8249651
2025-09-25 11:32:17 -07:00
riteshshukla04andFacebook GitHub Bot ed24a4d05b fix-types in Refresh control (#53907)
Summary:
Fixes https://github.com/facebook/react-native/issues/53893
The size should be of type string (large or default) . Typescript says number

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL][FIXED] Fixed Types in Refresh control

Pull Request resolved: https://github.com/facebook/react-native/pull/53907

Test Plan: N/A

Reviewed By: javache

Differential Revision: D83161286

Pulled By: arushikesarwani94

fbshipit-source-id: 4e557bc3780f297551b913c5c763c369cf3e374c
2025-09-25 11:15:16 -07:00
Vitali ZaidmanandFacebook GitHub Bot 92cae27cb2 only remove the Fast Refresh "Refreshing..." toast when all bundles being loaded finished loading. (#53937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53937

Changelog: [General][Fixed] only remove the Fast Refresh "Refreshing..." toast when all bundles being loaded finished loading.

Reviewed By: huntie

Differential Revision: D83246895

fbshipit-source-id: f02fac9fe16b307ae4b36f09bc88f5261c590b15
2025-09-25 11:07:38 -07:00
Pieter De BaetsandFacebook GitHub Bot 490b05d0d8 Extract SynchronousMountItem (#53936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53936

Align with other mount items and make it easier to identify in memory traces.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83241794

fbshipit-source-id: 9df1523e265e560c15f93bad8cd91a651bc5a4e2
2025-09-25 10:04:48 -07:00
Pieter De BaetsandFacebook GitHub Bot 09441d8691 Fix ReactViewManager subclasses triggering view recycling (#53933)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53933

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83238077

fbshipit-source-id: d3dc4f96b9934fcbcd9a80354f976d5eb0bc9f0c
2025-09-25 10:04:48 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 5735bb5955 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83233752

fbshipit-source-id: 4f87b05e552d728314d3c7be1d28267d58b8f19c
2025-09-25 06:17:47 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 6e9a46ab81 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm (#53931)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53931

Reviewed By: javache

Differential Revision: D83144241

fbshipit-source-id: 115f085974ca6cc13c1412ab59881e4f819b594b
2025-09-25 04:49:34 -07:00
Moti ZilbermanandFacebook GitHub Bot f599e2a613 Fix custom prebuilt binary handling in unstable_prepareDebuggerShell (#53927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53927

Changelog: [Internal]

Fixes a bug that broke `unstable_prepareDebuggerShell` (and therefore the RNDT shell) in OSS.

Reviewed By: vzaidman

Differential Revision: D83178777

fbshipit-source-id: cfd93b14e2a94e36d8a3ee9f4605036a4279ef8c
2025-09-25 02:29:11 -07:00
Alex HuntandFacebook GitHub Bot b577679746 Update DevTools windowKey to a sha256 hash (#53923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53923

Motivated by feedback on D83070252. This prevents us from including decodable information about debug targets in these values.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83139401

fbshipit-source-id: 01b01d23e4dfb06e400729b8cedf1fe2e098b209
2025-09-25 01:22:58 -07:00
Alex HuntandFacebook GitHub Bot 88f05b219c Fix build for debugger-shell (#53924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53924

Fix failing `yarn build` runs following D83070252.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83161092

fbshipit-source-id: 3e9e984699750add82794281a387eac0534da60d
2025-09-25 01:22:58 -07:00
Sam ZhouandFacebook GitHub Bot dc3736893d Deploy 0.286.0 to xplat (#53929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53929

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D83192932

fbshipit-source-id: 0457464a1ae1907a6906a26faa3ff319f01f9356
2025-09-24 18:25:10 -07:00
Vitali ZaidmanandFacebook GitHub Bot 3a954caf4f don't require projectRoot in devMiddleware (#53921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53921

Changelog: [Internal] `devMiddleware` removed the unused option `projectRoot`

This option was used only in a dead branch of the code inside `InspectorProxy`.

The scenario where it appeared was enabling resolving script sources (`Debugger.getScriptSource`) starting with `file://` which were coming from the file system. However, we don't seem to ever point scripts at the filesystem this way.

Reviewed By: huntie

Differential Revision: D82739662

fbshipit-source-id: 9a130eaa83cb94ae0e36a5a1102c56ff8a36cffc
2025-09-24 12:47:24 -07:00
Calix TangandFacebook GitHub Bot 2dfb36e3c6 Simplify VirtualViewContainer hysteresis window logic (#53914)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53914

Pulls hysteresis window computation out of for loop. Simplify the remaining code.

Changelog: [Internal] - Same as general summary.

Reviewed By: lunaleaps

Differential Revision: D83005735

fbshipit-source-id: 824863c649406a750d44b31ac92878505ab61596
2025-09-24 10:05:34 -07:00
Christoph PurrerandFacebook GitHub Bot 10b45b6200 Add Unit Tests (#53913)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53913

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83091947

fbshipit-source-id: 63baf543b180070591d4779b1203909359aec132
2025-09-24 08:56:01 -07:00
Alex HuntandFacebook GitHub Bot 430765b071 Update SafeAreaViewExample to lazily require deprecated API (#53922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53922

Minor change motivated by restoring a clean JS console on startup for RNTester.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D83145673

fbshipit-source-id: be64b057b842f4922328f5bc62dc001d016fd0b7
2025-09-24 06:05:26 -07:00
generatedunixname537391475639613andFacebook GitHub Bot ed6aa0f25a xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp (#53919)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53919

Reviewed By: javache

Differential Revision: D83044510

fbshipit-source-id: df05c27f5863b6eac6c37ebe75343b30e515be7a
2025-09-24 05:15:26 -07:00
Alex HuntandFacebook GitHub Bot 8027067322 Implement saved window positioning per target (#53910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53910

NOTE: Resubmission of D82236159 — The `electron-store` dependency is now replaced with a local implementation.

As titled. A long awaited quality of life improvement that we can now deliver with our desktop shell.

Window arrangements are saved per [`windowKey`](https://github.com/facebook/react-native/blob/da7bf9c54567aae62ff355b79e66f511cb382065/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js#L193), mapping to each previously opened debugger target.

**Limitations**

- Does not save/restore macOS fullscreen app state.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83070252

fbshipit-source-id: a77f106b6db31571313acd0270b87703e4de049d
2025-09-24 04:59:43 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot eb9e94256e Fix potential attempt to execute a task after shut down in TaskDispatchThread (#53900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53900

# Changelog:
[Internal] -

There is a crash reported, which looks like it may be potentially caused by some scenarios when we are trying to execute a scheduled task after the TaskDispatchThread instance had been quit.

This adds a missing extra check in the corresponding code to avoid such scenarios.

Reviewed By: christophpurrer, lenaic

Differential Revision: D83050169

fbshipit-source-id: 0ee0fa5848b070c2dc3dd92dbad4e6d5996734b3
2025-09-24 04:27:30 -07:00
Kacper KafaraandFacebook GitHub Bot dc4a6d2c7e Add invalidation callback for non-recycled component instances on iOS (#53708)
Summary:
Since the view recycling is optional on iOS [since 0.74](https://github.com/facebook/react-native/commit/613a5a75977d84333df7cbd5701e01a7ab5a3385) when a view (with disabled view recycling) is unmounted / destroyed there is no lifecycle callback for a component view to notify it of such event. Currently we (`react-native-screens`) are forced to scan mutation list of every mounting transaction in every of ours container components. Components with view recycling turned on, get `prepareForRecycle` callback on Fabric & on old architecture, there was `invalidate` message sent (`RCTInvalidating` protocol). It would be nice & useful to have something like this for components with view recycling disabled, or enabled but not recycled due to pool being full.

In particular in `react-native-screens` we need an information that the component is being destroyed to release retained resources (view controllers & others).

I have concern regarding naming of this method, as it could collide / be mistaken with `invalidate` method of `RCTInvalidating` protocol, but naming is hard & I don't see a name that fits better 😄 Open for suggestions!

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [ADDED] - Add invalidation callback for non-recycled component instances

Pull Request resolved: https://github.com/facebook/react-native/pull/53708

Test Plan:
Apply this patch to `RNTMyNativeViewComponentView.mm`:

```objective-c

 diff --git a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
index 2eb7bff28e..8464da603b 100644
 --- a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
+++ b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
@@ -123,6 +123,16 @@ using namespace facebook::react;
   [_view removeOverlays];
 }

+- (void)invalidate
+{
+  NSLog(@"RCTComponentViewProtocol invalidate called");
+}
+
++ (BOOL)shouldBeRecycled
+{
+  return NO;
+}
+
 - (void)fireLagacyStyleEvent
 {
   RNTMyNativeViewEventEmitter::OnLegacyStyleEvent value = {"Legacy Style Event Fired."};

```

& render `MyNativeView` in any of the RNTester screens / examples. Unmount the view & observe the log in XCode.

https://github.com/user-attachments/assets/be3f67bb-73e0-4af2-9ca1-f2eb9f3347bb

(called twice, because there are two components rendered at a time)

Reviewed By: javache

Differential Revision: D83139361

Pulled By: cipolleschi

fbshipit-source-id: 17ef964648ac44b583503b6b00fc5dd457887061
2025-09-24 04:26:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot 417e068220 Relayout surfaces on font scale change (#53770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53770

Changelog: [ANDROID][FIXED] - Request layout on attached surfaces when font scale changes

Reviewed By: rshest

Differential Revision: D82422608

fbshipit-source-id: c087054a709f8d31a298cd8d83363fac1e23d03a
2025-09-24 04:16:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dc132a4fd4 Crash the app when Legacy Arch is enabled (#53911)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53911

This change mimics what we implemented on Android to crash the app.

This is in general never going t be triggered. It will be triggered only if users are actually going through the old way to initialize React Native, i.e. by using the RCTRootView class which creates thebridge, or if they are creating the bridge themselves.

## Changelog:
[iOS][Added] - Crash the app if they force the legacy architecture.

Reviewed By: RSNara, cortinico

Differential Revision: D83066377

fbshipit-source-id: 0907effceb9a3655ec8d6bde8e0986f50f1ab663
2025-09-24 02:45:46 -07:00
Moti ZilbermanandFacebook GitHub Bot 18ba21149a Run prebuilt standalone shell directly from fbsource on laptops (#53878)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53878

Changelog: [Internal]

Adds the `prebuiltBinaryPath` option to `unstable_spawnDebuggerShellWithArgs` and `unstable_prepareDebuggerShell`, for advanced integrations that need to change how the React Native DevTools prebuilt binary is distributed.

Reviewed By: huntie

Differential Revision: D82956699

fbshipit-source-id: 30f9c461c7d8f22a553f278bbe42b86742c98da7
2025-09-24 00:22:32 -07:00
Calix TangandFacebook GitHub Bot 53f89bacd4 VirtualView v2 support in HorizontalScrollView native component (Android) (#53890)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53890

Changelog: [Internal] -  Adds support for VirtualView v2 in Android HorizontalScrollView native component by implementing VirtualViewContainer interface. Only on Android because iOS equivalent native components are already set up to support virtualview v2 on horizontal scrollviews.

## Changes in Detail

Adds necessary changes to Android `HorizontalScrollView` native component to support the experimental version of VirtualView.

Reviewed By: lunaleaps

Differential Revision: D82783403

fbshipit-source-id: 1e55eb054ab098af5ca8dd526b27c574025943c4
2025-09-23 16:06:40 -07:00
Devan BuggayandFacebook GitHub Bot 14dc03e2bd Genalize focus/blur behavior in JS (#53829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53829

Forwards along focus and blur calls to their respective native commands, leaving the TextInput path intact for now.

There are a few ways places to implement this, all with different trade offs. I decided to leave TextInputState.js intact and instead only go down the original path if the focused/blurred element is a TextInput by using the registered inputs in TextInputState. This revealed a subtle issue where the TextInputs aren't registered in time for the ref callback, meaning you can't focus them there if you rely on the registered list.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D82676628

fbshipit-source-id: d39c92dfc99ec4b5e100203bb43c8a4f9c80a649
2025-09-23 14:37:56 -07:00
Andrew DatsenkoandFacebook GitHub Bot 22002bb70c Allow to disable coverage via flag & disable it for benchmarks (#53912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53912

Changelog: [Internal]
Add new fantom flag `fantom_disable_coverage` to be used in tests that are sensitive to things like memory allocation.
Also disable coverage for any benchmark test.

Reviewed By: arushikesarwani94

Differential Revision: D83070065

fbshipit-source-id: a885e79e3d0c88cfb7adef30cb60ab46a617edac
2025-09-23 13:40:31 -07:00
Devan BuggayandFacebook GitHub Bot b00d3be572 Make perf overlay more transparent (#53904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53904

Adds more transparency to the background of the perf overlay, we got some feedback about it visually obscuring elements behind it.

{F1982191377}

{F1982191388}

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83037721

fbshipit-source-id: e70c799ea7942c6aea886e9a3580e324c4238048
2025-09-23 12:53:43 -07:00
Devan BuggayandFacebook GitHub Bot 4acb3d3e7c Remove "Background" from perf overlay title (#53903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53903

Removes unnecessary "background" from title, narrowing the width of the overlay.
{F1982191268}

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83036209

fbshipit-source-id: 0a11f38e544e3d667a9a1fb957e351716f625f3e
2025-09-23 12:53:43 -07:00
Alex HuntandFacebook GitHub Bot f4b6131850 Harden lifecycle handling for Perf Monitor (#53905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53905

Updates `PerfMonitorOverlayManager` so that it is minimally and correctly integrated in the `DevSupportManagerBase` reload cycle — attempting to fix a bug where the background profiling state on startup / subsequent packager connections would be out of sync.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83058519

fbshipit-source-id: 9a9bb32d3215ccf722aa39ca0ca943449f7ae62e
2025-09-23 11:47:50 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b9e6e349f5 Fix CQS signal readability-avoid-const-params-in-decls in xplat/js/react-native-github/packages [B] (#53902)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53902

Reviewed By: javache

Differential Revision: D83033554

fbshipit-source-id: 85b48fb7051e3f58ee00cd6a160086701c66d7a2
2025-09-23 08:40:16 -07:00
React Native BotandFacebook GitHub Bot 1c2b9f9206 Add changelog for v0.82.0-rc.4 (#53886)
Summary:
Add Changelog for 0.82.0-rc.4

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.4

Pull Request resolved: https://github.com/facebook/react-native/pull/53886

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D82993264

Pulled By: vzaidman

fbshipit-source-id: e1aba15613d5e62fcd503e15c878697adc088816
2025-09-23 05:00:38 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 1c5fb903fd Fix CQS signal readability-avoid-const-params-in-decls in xplat/js/react-native-github/packages [A] (#53897)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53897

Reviewed By: javache

Differential Revision: D83033417

fbshipit-source-id: 4aa2bfd49433a1f9c741241dcffe714b5091506b
2025-09-23 04:18:47 -07:00
Vitali ZaidmanandFacebook GitHub Bot 6936bd9f6b Dismiss DevLoadingView toast on touch (#53885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53885

Changelog: [General][Added] DevServer banners can now be closed on tap. On iOS, don't close them after 15s anymore.

Banners, on iOS, but not Android, are currently closed after 15s since {D47478373} where it was introduced to deal with the banner telling users they need to connect to Metro stuck forever.

Instead of closing it after 15 seconds, allow the users on both Android and iOS to close it via a touch.

Reviewed By: huntie

Differential Revision: D82727997

fbshipit-source-id: 5aa2af78a4dbcd95b69423d52421900d4ab35244
2025-09-23 02:06:18 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 8c2f9e47fa Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D83031681

fbshipit-source-id: 0290d423b758ce42cd9a9c8cccc0f2cf16ad992b
2025-09-23 01:46:27 -07:00
Gabriel DonadelandFacebook GitHub Bot ee811a82ec Add changelog for v0.81.4 (#53720)
Summary:
Add Changelog for 0.81.4

## Changelog:
[Internal] - Add Changelog for 0.81.4

Pull Request resolved: https://github.com/facebook/react-native/pull/53720

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83013088

Pulled By: arushikesarwani94

fbshipit-source-id: 3693bf6582543465102cea5dbd7dd17dffe0a272
2025-09-23 01:19:46 -07:00
Marco WangandFacebook GitHub Bot 2e55154665 Deploy 0.285.0 to xplat (#53895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53895

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D83000230

fbshipit-source-id: 7c070358623e9b68043bb8666f5c9dfc632ff2fb
2025-09-22 22:42:28 -07:00
Sam ZhouandFacebook GitHub Bot 5c369aa34c Add annotations to fix future natural inference errors in xplat/js: 6/n (#53894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53894

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D83000736

fbshipit-source-id: 3ba5c59d9b2f7b967c0dccd24a73056430153bdc
2025-09-22 21:55:34 -07:00
Arushi KesarwaniandFacebook GitHub Bot 2065c31800 Updating ReactAndroid.api to unblock stable (#53891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53891

D82726743 missed updating the ReactAndroid.api which was blocking fbandroid/stable:

https://www.internalfb.com/sandcastle/workflow/797137134054937206

Hence ran `buck2 run //xplat/js/scripts/rn-api:generate-rn-api-metadata` to update

Changelog: [Android][Fixed] - Fixed ReactAndroid.api

Reviewed By: mdvacca, sumkit, jorge-cab

Differential Revision: D83001140

fbshipit-source-id: 85e4f2005a28a3c98999198284133e4af1eaed89
2025-09-22 18:32:51 -07:00
David VaccaandFacebook GitHub Bot 5684546251 Delete LayoutAnimation (#53785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53785

LayoutAnimation is part of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82235542

fbshipit-source-id: c0e2f08bcdffb9c5e102df7cca799f3a25296afe
2025-09-22 17:45:08 -07:00
David VaccaandFacebook GitHub Bot f09f4a779e Remove code from public LayoutAnimationController class (#53784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53784

LayoutAnimation is part of legacy architecture, I'm deleting the code used from its non supported public APIs

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D82235545

fbshipit-source-id: 9665c57b68eba9d958d3f8b9dd4224558cc8e9f6
2025-09-22 17:45:08 -07:00
David VaccaandFacebook GitHub Bot ec5bc3b285 Delete LayoutAnimation tests (#53783)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53783

LayoutAnimation is part of legacy architecture, I'm deleting unused tests

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D82254268

fbshipit-source-id: df53215f126e37d8422ece46552596c31b11f61b
2025-09-22 17:45:08 -07:00
Christoph PurrerandFacebook GitHub Bot 46c75c1043 Add ImagePrefetching feature flag for JNI calls (#53865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53865

This adds an additional feature flag to enable/disable image prefetch requests via JNI batching

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82871006

fbshipit-source-id: 6cd2577f26e6d4c906e7be2f62a397177691538f
2025-09-22 17:04:55 -07:00
Vitali ZaidmanandFacebook GitHub Bot e3bf881ae6 remove connection hints from being logged for the user (#53884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53884

Changelog: [Internal]

Now that there's a clear display for when HMR is disconnected, we don't want to show messages regardless devices connection and disconnection to the DevServer because they are too partial.

Reviewed By: huntie

Differential Revision: D82727105

fbshipit-source-id: 32dd077f85d2044f89ae2d8d60a37c0ec6cccbbf
2025-09-22 15:55:25 -07:00
Sam ZhouandFacebook GitHub Bot e4368154a5 Turn on react.ref_as_prop=experimental.store_ref_in_props
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82932016

fbshipit-source-id: a391bdc06eef60d3054b8440c4ccfbaf62bc931a
2025-09-22 14:46:56 -07:00
Vitali ZaidmanandFacebook GitHub Bot 4148746941 add disconnection message (#53883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53883

Changelog: [General][Added] - new banner added to indicate that Fast Refresh has lost connection, and that the app needs to be restarted to reconnect

When HMR were getting disconnected, we were not giving any indication for the user.

This lead to situations were the connection is re-established, but HMR is still disconnected, which is unexpected for users.

Instead, raise a banner hinting the user to reload the app to reconnect.

Reviewed By: huntie

Differential Revision: D82726853

fbshipit-source-id: d5f264547b2af89e9dc2a9046d063efe1145d690
2025-09-22 13:25:42 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 34f7137cdc xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.cpp (#53874)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53874

Reviewed By: rshest

Differential Revision: D82804676

fbshipit-source-id: 90a426cfeb4fe264d523dafe56d2d83f1ed3da11
2025-09-22 12:35:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot 4d45e5987c Align Android with iOS in displaying HMR "refreshing" in color (#53846)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53846

Changelog: [Android][Added] - hot reload banner is now displayed in blue background like on iOS

iOS has a colorful "Refreshing..." banner:
 {F1982086204}

While android doesn't respect the color HMR asks it to set up for the banner:
 {F1982086218}

Reviewed By: cortinico

Differential Revision: D82726743

fbshipit-source-id: 4042851f5a8fd7d4f238f25e2d83f77144742de9
2025-09-22 11:41:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 2e4da10b52 fix coverage patterns (#53881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53881

Changelog: [Internal]
To make sure that coverage is insertect correctly when run in different metro setup where patterns do not match perfectly, we need to add glob prefix

Reviewed By: sammy-SC

Differential Revision: D82968565

fbshipit-source-id: c2676ef4c774411938039fc5b98a3b953f6ec916
2025-09-22 10:48:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b10faf6c02 Create the orchestration function to coordinate the creation of the hard links (#53642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53642

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778457

fbshipit-source-id: b4ab8c902d6d7e6ca4b89ccbab75c1b5d84ce00a
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c6395eccd4 add function hard links for headers from ReactCodegen (#53640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53640

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function to create hard links to Codegen Headers so that other libraries can access them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778450

fbshipit-source-id: e9f62f1c81ce8a635cc880007f495de342342a25
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 515c735347 Add function to create hard links for headers of the third-party dependencies (#53638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53638

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ThirdPartyDependencies that React native and libraries might need to access.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778459

fbshipit-source-id: b8f9f207a0fbe2265e2861bf508516946905b472
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6807231120 Create function to create hardlink to header required to build React Native Core (#53635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53635

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we did two things:
1. we move the helper functions to a headers-utils.js file (and the tests to the `headers-utils-test.js` file)
2. we added a function that coordinates the creation of the header links *and added tests for it)

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778464

fbshipit-source-id: fd8eb5a7af55db0a08c4d299c5470058d5424768
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot fc4a692b8e Create utility function to create the right folder structure for headers in the ReactCommon folder (#53631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53631

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ReactCommon folder that has a complex structure and complex mapping requirements

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778470

fbshipit-source-id: e0f4001048fcde0e988fc3a05b53efb1de70460b
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 8db93abf12 Create utility function to create the right folder structure for headers in the ReactApple folder (#53629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53629

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function to properly create the header structure for the headers in ReactApple that requires a special case.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778471

fbshipit-source-id: 095d901dce139cf8221251f952f474be943a5ab3
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7cd3328b21 Create script to create hard links for headers from a source path to a destination path (#53620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53620

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links between a source folder and a destination folder.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778469

fbshipit-source-id: 3954bc219f32ea53744393a83f3179beeaca95b3
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 072b105f52 Add function to extract headers from a folder (#53737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53737

This change add a utility function to extract headers (both .h and .hpp) from a folder. It also allow to exclude some specific folders (e.g.: `tests`, non supported platforms, ...)

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82205692

fbshipit-source-id: 4fa6dee2ae4790c583beb96a959b0c3045c7b50a
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c1827fcd04 Add simple function to handle symlinks (#53736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53736

This change adds a simple function that manages symlinks. This is used through the stack of changes to avoid code repetition.

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82202860

fbshipit-source-id: 0baa348c84f966a2e1eeb85b008f8e653bffe96c
2025-09-22 10:14:58 -07:00
Nicola CortiandFacebook GitHub Bot 0915833f7c Follow-up from previous transform matrix fix (#53876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53876

This is just a couple of small nits after D82836192

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D82953710

fbshipit-source-id: 1a98c54a110ee1a72225de331bfe2efa4e4225c0
2025-09-22 09:48:59 -07:00
Pieter De BaetsandFacebook GitHub Bot 57a1820c85 Remove unused RCTHermesInstance field (#53858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53858

We only use static methods from `HermesInstance`

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82816061

fbshipit-source-id: 515dad2e8d6e0a6f6ac26f93d5a86aedf875f93e
2025-09-22 08:47:33 -07:00
Nick LefeverandFacebook GitHub Bot e1a6c38cc1 Fix overflow with Props 2.0 in horizonal scroll view (#53872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53872

This diff fixes the mismatch between the overflow initial value between the horizontal scroll view component initialization and the React core props instance initial value by applying the same correction as for the vertical scroll view component.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919365

fbshipit-source-id: 70e40f56ffa3ea87fa74035c885608f633890610
2025-09-22 04:19:36 -07:00
Nick LefeverandFacebook GitHub Bot e314f6161a Fix scrollview overflow prop not set with Props 2.0 (#53871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53871

The props defined in `YogaStylableProps` define the overflow to be set to `Overflow::Visible` by default.

The scroll view initialized the overflow setting to `Overflow.SCROLL`. This meant that Props 2.0 would only set the overflow prop if it was different from Visible, leading to the scroll view not being configured correctly when asking for the overflow to be visible.

This diff assigns the correct initial value to the scrollview overflow setting only when enabling Props 2.0 to avoid any unexpected behavior changes when not using Props 2.0.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919286

fbshipit-source-id: d5368500cc4504164d6fdf7cf60042a9d5792853
2025-09-22 04:19:36 -07:00
Nicola CortiandFacebook GitHub Bot ce243df972 Correctly implement transform: matrix with 2d matrices (#53860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53860

Fixes https://github.com/facebook/react-native/issues/53639

I've realized that our docs and validation logic states that we do support
3x3 matrixes (for 2d transforms). However they're not properly processed
as the values are just copied into a 4x4 matrix.

This can be verified by applying the 3x3 identity matrix on any transform.

I'm fixing it by correctly populating the 4x4 matrix getting the values from the 3x3 matrix in input.

Changelog:
[General] [Fixed] - 9-element (2d) transform matrix are not correctly working

Reviewed By: christophpurrer

Differential Revision: D82836192

fbshipit-source-id: 12029b37ffd8375fff48ea7f9386b849dfe96a62
2025-09-22 03:28:31 -07:00
David VaccaandFacebook GitHub Bot 23b2b99c4b Fix incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method (#53863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53863

In this diff I'm fixing an incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82841006

fbshipit-source-id: 6f50f2475255d7b841d9224bc8808119dcc68aec
2025-09-22 02:34:59 -07:00
Sam ZhouandFacebook GitHub Bot 5ef054921c Turn on react.ref_as_prop=experimental.store_ref_in_props_but_remove_ref_in_react_element_config in fbsource (#53870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53870

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82913848

fbshipit-source-id: c23f564404143535622fab3133d092d1fb566711
2025-09-21 14:04:21 -07:00
Sam ZhouandFacebook GitHub Bot 71b7dd8519 Prepare createAnimatedComponent API for flow's upcoming better react 19 ref-as-prop support (#53869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53869

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, it should preserve the existing type behavior, since in the TS version, the ref prop will be excluded anyways: https://github.com/facebook/react-native/blob/a4d43290c82e8ad93f03b304a78cdf0eaf41fba1/packages/react-native/ReactNativeApi.d.ts#L1434

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82916014

fbshipit-source-id: 2e62aab493dcf6f8f5e382c0739060c88e6f7ed5
2025-09-21 10:49:53 -07:00
Sam ZhouandFacebook GitHub Bot 5b544c7cd8 Simplify some RN types (#53868)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53868

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, this diff simply inlines what these `React.ElementRef` evaluates into.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82915646

fbshipit-source-id: 64179eac7dde91381361fb9f1053d58100d864c3
2025-09-21 10:49:53 -07:00
Alex HuntandFacebook GitHub Bot a4d43290c8 Tweak Dev Menu appearance for iOS 26 (#53844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53844

Small UI tweaks that help when scanning more visually spread out alert actions on iOS 26.

- Use bold (iOS 26 style) alert title.
- Differentiate "Cancel" actions with red system style.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82731784

fbshipit-source-id: 0a0215fc75a4832e742e22328d5e21eee3808972
2025-09-20 03:23:31 -07:00
Nikita LutsenkoandFacebook GitHub Bot 7fb90c3f1b jsi | Remove unnecessary semicolons. (#53864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53864

Changelog: [Internal] Removed unnecessary semicolons, improving code quality.

Reviewed By: cortinico

Differential Revision: D82828986

fbshipit-source-id: aaafc332a1dc5944cb136bf6dd105d68c1c99e8d
2025-09-20 03:15:57 -07:00
Christoph PurrerandFacebook GitHub Bot 362ed179a8 Fix race condition between experimental_prefetchResources and surface stop (#53861)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53861

Changelog: [Internal]

The issue is a race condition in the React Native Fabric mounting system where `experimental_prefetchResources` is called on a `SurfaceMountingManager` after the surface has been stopped.

1.) `experimental_prefetchResources` is called
2.) Concurrently, `stopSurface()` *can be* called, which sets `mThemedReactContext = null`
3.) `experimental_prefetchResources` then tries to access `mThemedReactContext` via `Assertions.assertNotNull(mThemedReactContext)`
4.) Since `mThemedReactContext` is now `null`, the assertion fails and throws an AssertionError

The fix involves adding a guard to check if the surface is stopped before accessing `mThemedReactContext`

Follows existing patterns used by other methods in the same class

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java#L201-L213

Reviewed By: lenaic

Differential Revision: D82842572

fbshipit-source-id: 723bad24a075efa219766b0e148080dd42d59fba
2025-09-19 17:27:14 -07:00
Pieter De BaetsandFacebook GitHub Bot fcbe4d1677 Split off MessageQueueThread header to separate target (#53857)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53857

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82625359

fbshipit-source-id: 7650dcd424299a21388c7bcf6c33c89b9f09171d
2025-09-19 14:02:47 -07:00
Christoph PurrerandFacebook GitHub Bot 390c9d30dc Update ## v0.82.0-rc.0 (#53847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53847

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82753924

fbshipit-source-id: a5a2036ccd74cc7f7dd463d82e96f156a4e309e2
2025-09-19 13:46:17 -07:00
Kræn HansenandFacebook GitHub Bot 0198c92c71 Export @react-native/typescript-config/strict shorthand (#53564)
Summary:
Extending a tsconfig seems simpler than adding `compilerOptions` with `customConditions`.

### Before

```jsonc
{
  "extends": "react-native/typescript-config",
  "compilerOptions": {
    // ...
    "customConditions": ["react-native-strict-api", "react-native"]
  }
}
```

### After

```jsonc
{
  "extends": "react-native/typescript-config/strict"
  // ...
}
```

## Changelog:

[GENERAL] [ADDED] - Add `react-native/typescript-config/strict` export enabling the `react-native-strict-api` custom condition.

Pull Request resolved: https://github.com/facebook/react-native/pull/53564

Test Plan:
### `package.json`

```
{
  "name": "react-native-ts-test",
  "private": true,
  "version": "0.1.0",
  "scripts": {
    "build": "tsc --noEmit"
  },
  "devDependencies": {
    "react-native/typescript-config": "^0.81.1",
    "typescript": "^5.9.2",
    "jest": "^30.1.2"
  },
  "dependencies": {
    "react-native": "^0.81.1"
  }
}
```

### `tsconfig.json`

```
{
  "extends": "react-native/typescript-config/strict",
  "include": ["src/index.ts"]
}
```

### `src/index.ts`

```
import { View } from "react-native";
```

Run `npx resolution-explorer` and select "react-native from src/index.ts to node_modules/react-native/types_generated/index.d.ts" to verify the types are resolved correctly.

```
Explicitly specified module resolution kind: 'Bundler'.
Resolving in CJS mode with conditions 'import', 'types', 'react-native-strict-api'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/src/package.json' does not exist.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/package.json'.
Loading module 'react-native' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
Directory '/Users/kraen.hansen/Repositories/react-native-ts-test/src/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/package.json'.
Entering conditional exports.
Matched 'exports' condition 'react-native-strict-api'.
Using 'exports' subpath '.' with target './types_generated/index.d.ts'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' exists - use it as a name resolution result.
'package.json' has a 'peerDependencies' field.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native'.
Failed to find peerDependency 'types/react'.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react/package.json'.
Found peerDependency 'react' with '19.1.1' version.
Resolved under condition 'react-native-strict-api'.
Exiting conditional exports.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts'.
======== Module name 'react-native' was successfully resolved to
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' with Package ID
'react-native/types_generated/index.d.ts@0.81.1+react@19.1.1'. ========
```

Reviewed By: robhogan

Differential Revision: D82791201

Pulled By: philIip

fbshipit-source-id: f58d3b8fcf3d7f18dd29eef18a3c8c0cb57d1d78
2025-09-19 13:28:31 -07:00
SimekandFacebook GitHub Bot 34cd61f0d5 fix C++ in-code docs comments to silence warnings (#53835)
Summary:
Address invalid C++ in-code docs comments to silence few warnings. Ref:
* https://www.doxygen.nl/manual/commands.html#cmdtparam

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[INTERNAL][FIXED] - Address invalid C++ in-code docs comments to silence the warnings.

Pull Request resolved: https://github.com/facebook/react-native/pull/53835

Test Plan: Building RNTester app locally does not output the warnings related to in-code docs comments.

Reviewed By: cortinico

Differential Revision: D82791099

Pulled By: philIip

fbshipit-source-id: 2f93bfd4cd303471b2c52fcdf74871e5dee8c06a
2025-09-19 13:12:23 -07:00
David VaccaandFacebook GitHub Bot e349009cb8 Refactor ReactNativeNewArchitectureFeatureFlagsDefaults to remove legacy architecture configuration (#53791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53791

I'm removing parameter to configure new architecture in ReactNativeNewArchitectureFeatureFlagsDefaults because the new architecture is enabled by default everywhere.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241552

fbshipit-source-id: 9c5cee4befc914d95b84b01325485923e17ff6da
2025-09-19 13:01:08 -07:00
David VaccaandFacebook GitHub Bot f847496749 Refactor ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android to enable new arch (#53790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53790

New architecture should we enabled by default everywhere, Stable releases should use new arch now

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241551

fbshipit-source-id: 2a1bf14f2f1da6e441a58b083ca5a55618eec256
2025-09-19 13:01:08 -07:00
Sam ZhouandFacebook GitHub Bot 2590cd739a Deploy 0.284.0 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82786580

fbshipit-source-id: 8caa7802025004fce6cb5067c191b681087cb979
2025-09-19 07:33:42 -07:00
Sam ZhouandFacebook GitHub Bot 7ba64ca0f1 Pre-suppress errors for improved typing of Array.{includes,indexOf,lastIndexOf} in xplat
Summary:
In Flow 0.284, we will have a stricter version of `Array<T>.includes`. Instead of accepting `mixed`, we will only accept `T` to help catch logical errors. We did the same for `Array.indexOf` and `Array.lastIndexOf` as well.

This diff pre-suppresses newly discovered errors in part of the codebase.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82784398

fbshipit-source-id: 6cb11809844f964e0604d33b9f7a3989074cd1cc
2025-09-19 07:17:14 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0e77015a85 Fix unkown name for Timestamps on Timings track (#53854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53854

# Changelog: [Internal]

This fixes the unkown names message for TimeStamps on Timings track

Reviewed By: rubennorte

Differential Revision: D82812849

fbshipit-source-id: 91101998b4b7befa08bf0e45cae494765d5f2b6d
2025-09-19 06:53:23 -07:00
Ruslan LesiutinandFacebook GitHub Bot 1b5e8e63b6 Manually preserve ordering for Scheduler and Components tracks (#53853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53853

# Changelog: [Internal]

Chrome DevTools orders tracks based on the timestamp of the first entry.

For React on Web we emit a few entries to establish the ordering:
https://github.com/facebook/react/blob/6eda534718d09a26d58d65c0a376e05d7e2a3358/packages/react-reconciler/src/ReactFiberPerformanceTrack.js#L57-L96

We are doing the same thing here, but in C++.

Reviewed By: rubennorte

Differential Revision: D82811889

fbshipit-source-id: cfc4060de05a3d74e240f019dbeaa910fa93eb0b
2025-09-19 06:53:23 -07:00
Tim YungandFacebook GitHub Bot 03d9f34a82 RN: Deprecate InteractionManager (#53832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53832

Deprecates `InteractionManager` by adding a warning when it is imported.

Changelog:
[General][Changed] - InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`.

Reviewed By: javache

Differential Revision: D82704809

fbshipit-source-id: 99474cd7949abfe323c366b9ab8d8fc195578395
2025-09-19 05:10:47 -07:00
Tim YungandFacebook GitHub Bot 4a1388268d RN: Remove References to InteractionManager (#53830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53830

Now that `InteractionManager` is deprecated (and no-ops), this removes all remaining references to it — in `Animated` and `PanResponder` — from the React Native repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D82690242

fbshipit-source-id: d101d47d1f8640f70e2d199492d4345b63663251
2025-09-19 05:10:47 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot b821bc3aba Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D82813624

fbshipit-source-id: 51fe7a84af2d4f2da7027e1649ec038517f9d561
2025-09-19 04:53:33 -07:00
Moti ZilbermanandFacebook GitHub Bot e16b6470e4 Backout D82236159: [RN][debugger-shell] Implement saved window positioning per target (#53816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53816

Changelog: [Internal]

D82236159 introduced the first `node_modules` dependency in the Electron part of `react-native/debugger-shell`. This is not currently handled correctly by the build script, so this resulted in an instacrashing binary.

I'm temporarily backing out D82236159 until we have a proper fix for the build script.

Reviewed By: robhogan

Differential Revision: D82632937

fbshipit-source-id: 6c7c182e2a7c89e6ea2761096dcc426dbf2ae5cb
2025-09-19 02:38:00 -07:00
Alex HuntandFacebook GitHub Bot cb7453fb9f Improve Network trace event field coverage (#53840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53840

After this diff, successful network events are displayed as fully hydrated timespans in the Performance panel network track, with all metadata needed to usefully populate the UI.

**Changes**

Adds:
- `"ResourceFinish"`: `encodedDataLength`, `decodedBodyLength`
- `"ResourceReceiveResponse"`: Populates `data.timing` members, which enables *"Request sent and waiting"* to be rendered correctly in the timeline.

Removes:

- `"ResourceWillSendRequest"` events — very rarely emitted by Chrome and are extraneous for our use case.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82636798

fbshipit-source-id: a4b0f0671b97aaadc279ac56d39fee0c95d4ddc7
2025-09-18 14:41:16 -07:00
nishan (o^▽^o)andFacebook GitHub Bot c8e5f9766b fix(iOS): boxShadow + overflow hidden combination affecting pointer event box-none and scale transform. (#52413)
Summary:
This issue is only reproducible with combination of `overflow: hidden` and `boxShadow` i.e. when a [container view](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L799) is added to the hierarchy.

### Case 1:

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)", overflow: "hidden" }}
  onPress={() => {
    alert("Tapped");
  }}
/>
```

Here the view has `box-none` but it will still trigger the press event because this [line](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L658) returns the `_containerView` as `hitView` and this condition gets [fullfilled](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L676) (since it is not self). To fix this issue we should iterate on `self.currentContainerView.subviews`.

### Case 2:

Transform scale clipping child view.

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, overflow: "hidden",
    transform: [
      { scale: 0.5 },
    ],
    boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)",
  }}
  onPress={() => {
    alert("parent view");
  }}
>
  <Pressable
    style={{
      position: "absolute",
      bottom: 0,
      right: 0,
      backgroundColor: "blue",
      height: 50,
      width: 100,
    }}
    onPress={() => {
      alert("child view");
    }}
  >
    <Text>Press me</Text>
  </Pressable>
</Pressable>;
```

The above style hides the child view on iOS whereas it is visible on android.

| iOS | Android |
   |---|---|
   | <img src="https://github.com/user-attachments/assets/14713ec9-1ae7-4425-9348-946d507188e8" width="200px" /> | <img src="https://github.com/user-attachments/assets/0f6e2368-037d-4b03-8a85-8a08f1578ff6" width="200px" /> |

This happens because `containerView` uses `self.frame` property which gets mutated due to scale transform. So containerView becomes `actualSize * scale * scale` instead of `actualSize * scale` and ends up clipping child views because of overflow hidden. Please checkout the layout hierarchy in the below screenshot. To fix it we need to use `self.bounds` instead of `self.frame` when setting the frame for container.

<img src="https://github.com/user-attachments/assets/9ce41756-f41f-4782-bfc9-b0c281f314b7" width="300px" />

## Changelog:

[IOS] [FIXED] - boxShadow + overflow hidden combination interfering with pointerEvents and transform scale.

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/52413

Test Plan:
Test above example snippets and pointer events examples in RNTester.

cc - joevilches

Reviewed By: cortinico, jorge-cab

Differential Revision: D77872110

Pulled By: joevilches

fbshipit-source-id: e9693c79b47379531510607921ffaa6d6cc5c17b
2025-09-18 14:06:00 -07:00
Nicola CortiandFacebook GitHub Bot 1c5e0ffd9f Do not reset the native artifacts version to 1000.0.0 on release branches (#53817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53817

What is currently happening, is that the various commits on the release branches like `0.82-stable` are resetting the version of native artifacts to `1000.0.0-<SHA>`.

The reason is that during the `test-all` workflow, we pass the `dry-run` as release type.
That's to prevent the various tools from calling `npm publish` and so on.

The problem is that on the releases branches, the version was already set at branch cut time.
Therefore, we see the version 1000.0.0 reappearing during Android E2E test in the emulator. Similary this is also affecting iOS prebuilds so I'm attempting to fix it here.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82553599

fbshipit-source-id: 31a52e7df036e700663b3d3dd677973a7a210a30
2025-09-18 10:53:25 -07:00
Alex HuntandFacebook GitHub Bot 5b8827939d Support additional PerformanceResourceTiming fields (#53815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53815

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D82561777

fbshipit-source-id: f387c4bca2112111e736433af90ada16efd14e8b
2025-09-18 09:57:25 -07:00
Andrew DatsenkoandFacebook GitHub Bot e97ef8f1fb Fix dotslash issue in OD (#53842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53842

Changelog: [Internal]
There is a conflict between dotslash in node_modules and in OD it does not invoke buck2

Reviewed By: javache

Differential Revision: D82724326

fbshipit-source-id: c90cab58818e0245f8763b729c7e5432735eb05e
2025-09-18 07:39:22 -07:00
Nick LefeverandFacebook GitHub Bot e6390703e7 Fix scroll view FPS listener reset on init (#53838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53838

The FPS listener is being assigned to all scroll view instances by the scroll view manager. This listener should not be reset when the view is being recycled and should stay assigned at all times.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D82720151

fbshipit-source-id: a2a37bad93efaa6e435725adf16c9ad1b4207ba0
2025-09-18 05:35:09 -07:00
generatedunixname537391475639613andFacebook GitHub Bot aacb9898f2 xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils/TemplateStringLiteral.h (#53836)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53836

Reviewed By: rshest

Differential Revision: D82428779

fbshipit-source-id: 2716784a85c4885fe438348666b4772c2da3c400
2025-09-18 04:56:38 -07:00
Nicola CortiandFacebook GitHub Bot 460394e4b8 Turn on enableSwiftUIBasedFilters in the experimental channel (#53794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53794

Basically what the title says. This is needed by Expo for experimetation.

Changelog:
[Internal] [Changed] -

Reviewed By: joevilches

Differential Revision: D82530292

fbshipit-source-id: 82ce8b1e8fc8d954cc04ec456ad80f769aedafe7
2025-09-18 04:34:47 -07:00
Nicola CortiandFacebook GitHub Bot 968ec9e093 Unpin version from react-native-android in run_fantom_tests (#53795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53795

I've published another docker image that should now work and unblock `run_fantom_tests`
so we don't need to pin the version to `v18.0` anymore:
https://github.com/react-native-community/docker-android

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82532516

fbshipit-source-id: 980c2feb053f9d096e70f37bb690e18cc8b87dc0
2025-09-18 04:12:50 -07:00
Alex HuntandFacebook GitHub Bot 6ef351b3ce Move trace event handling into NetworkReporter (#53776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53776

Refactor and improve how we emit CDP trace events for network requests.

Key changes:
- Split up `PerformanceTracer` methods into discrete trace events.
- Move event calls out of `PerformanceEntryReporter` (upwards) into `NetworkReporter`. This now:
    - Aligns better with the matching source `NetworkReporter` events.
    - Removes metadata pieces from `PerformanceEntryReporter` that weren't part of the Web `PerformanceResourceTiming` API.
- Populate additional fields on `ResourceReceiveResponse`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82433225

fbshipit-source-id: 4fce219f0c86a7257b8df250ef9f2b4ec8bd8de3
2025-09-18 03:01:22 -07:00
Jakub PiaseckiandFacebook GitHub Bot 674fb77d93 Update coordinates for remote artifacts of Hermes V1 (#53822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53822

Changelog: [GENERAL][FIXED] - Fixed coordinates for Hermes V1 artifacts

Reviewed By: cortinico

Differential Revision: D82639319

fbshipit-source-id: becfab3248f2314af97549eb94feb27b19f5d1af
2025-09-18 01:26:08 -07:00
Devan BuggayandFacebook GitHub Bot 14458d8699 Add focus/blur commands to View (#53828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53828

Adds focus and blur commands to Android views.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82644681

fbshipit-source-id: 96fa6370e177c91742d285b0b158b77447d105f6
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 2945fa6e0e Hook up focus/blur events (#53827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53827

Hook up focus/blur events to view.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146291

fbshipit-source-id: 3cb90d22c00d067099c4c6fac734f27030d87639
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 07b5802ee5 focus/blur event emission (#53826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53826

Wires up focus/blur events to the base event emitter, gated by enabledImperativeFocus feature flag.

https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146275

fbshipit-source-id: 4b7bb1336f74bb0de2d7ecf0737dd63067bd558f
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 3e5838086f Add focus/blur commands to View (#53825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53825

Adds focus/blur commands to View on iOS.
https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146249

fbshipit-source-id: 582f448f4d7525560ef74a23c0762e86d74550d4
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 596dece4c0 enableImperativeFocus feature flag (#53824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53824

Creates a new feature flag to control focus/blur commands and event emissions for arbitrary views https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D82146210

fbshipit-source-id: 59f3e6c8740b0c006f8930541205aa15192a9f59
2025-09-18 00:36:55 -07:00
Sam ZhouandFacebook GitHub Bot 4d2e38edd9 Deploy 0.283.0 to xplat (#53820)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53820

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82636194

fbshipit-source-id: 620016043bed481e43d0d4216280517c2890bfd7
2025-09-17 09:29:52 -07:00
React Native BotandFacebook GitHub Bot 926af3bc36 Add changelog for v0.82.0-rc.3 (#53813)
Summary:
Add Changelog for 0.82.0-rc.3

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.3

Pull Request resolved: https://github.com/facebook/react-native/pull/53813

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D82628336

Pulled By: vzaidman

fbshipit-source-id: 2ade8a48981a70e571e7a8db0e15af0c722f82ba
2025-09-17 06:03:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot de4e01bcc6 add the nodejs type for process.memoryUsage.rss() (#53805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53805

Changelog: [Internal]

https://nodejs.org/docs/latest-v24.x/api/process.html#processmemoryusagerss

Reviewed By: huntie

Differential Revision: D82550739

fbshipit-source-id: 11026fb82608e004b10426776592f22e67eb0720
2025-09-17 01:24:59 -07:00
Marco WangandFacebook GitHub Bot 7d73d39535 Deploy 0.282.0 to xplat (#53810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53810

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D82597378

fbshipit-source-id: 40d601956d9f69ec8d68a2c324bb3449ee27c931
2025-09-16 23:32:23 -07:00
Eric RozellandFacebook GitHub Bot eba38b831c Fix DefaultNewArchitectureEntryPoint config validation (#53807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53807

We need to read the values off feature flags before checking them.

## Changelog
[Internal]

Reviewed By: javache

Differential Revision: D82572898

fbshipit-source-id: 09fbc09570c78b41d9c25fb03c5557e390da7cae
2025-09-16 20:20:14 -07:00
David VaccaandFacebook GitHub Bot 18cb4edfa7 Ensure legacy architecture can't be initialized in Android (#53806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53806

The Legacy architecture of React Native is not supported anymore, let's ensure nobody can initialize it anymore

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82465004

fbshipit-source-id: 099764fb59d906b11cf6ad0cc6208f56df029d19
2025-09-16 17:33:14 -07:00
Sam ZhouandFacebook GitHub Bot dadd7cdaf7 Make ref prop optional in xplat: 1/n (#53801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53801

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82507711

fbshipit-source-id: 27c8004c0475765705a01c0b6afb274dab443a38
2025-09-16 09:10:22 -07:00
Tom ScallonandFacebook GitHub Bot 4308185b64 Allow EventEmitters to be reported as optional (#53804)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53804

## Changelog:

[General] [Fixed] - Allow `EventEmitter`s to be optional (for push safety)

Reviewed By: javache

Differential Revision: D82509571

fbshipit-source-id: 801a22b10b2709968009527130cfa890d30a4f3a
2025-09-16 08:59:12 -07:00
Nicola CortiandFacebook GitHub Bot d0d08e4554 Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint (#53780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53780

This is a commit we're going to pick in 0.82 as we want to make sure users cannot invoke `load()`
from `DefaultNewArchitectureEntryPoint` with flags that are not true,true,true.

Changelog:
[Android] [Changed] - Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint

Reviewed By: mdvacca

Differential Revision: D82456975

fbshipit-source-id: 749996a3491913cfe400173608218077c3ffbc10
2025-09-16 07:30:55 -07:00
Nicola CortiandFacebook GitHub Bot 4858a0f469 Mark ReactTextInlineImageShadowNode as @LegacyArchitecture (#53735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53735

This class should have been marked as LegacyArchitecture back then but was forgotten.
I'm doing it now.

Changelog:
[Internal] -

Reviewed By: javache

Differential Revision: D82219780

fbshipit-source-id: 5119b7469733d5d2d4b16e976b09231ad5f71f5f
2025-09-16 07:23:51 -07:00
Vitali ZaidmanandFacebook GitHub Bot f93506fb23 Fix typo in CHANGELOG.md (#53796)
Summary:
Fix typo in CHANGELOG.md

Changelog: [INTERNAL]

Pull Request resolved: https://github.com/facebook/react-native/pull/53796

Test Plan: Fix typo in CHANGELOG.md

Reviewed By: fabriziocucci

Differential Revision: D82535096

Pulled By: vzaidman

fbshipit-source-id: fe93adf86ff48f0095312edbfce7b3ae6984198a
2025-09-16 06:49:03 -07:00
Moti ZilbermanandFacebook GitHub Bot f4aef39563 Revert D82459089: Update React Native DevTools binaries
Differential Revision:
D82459089

Original commit changeset: 3ccf7a1f07da

Original Phabricator Diff: D82459089

fbshipit-source-id: 9ab8827bfb534e5236c37a8a47206f891741a8e0
2025-09-16 05:33:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot af7fc1b424 Update debugger-frontend from 5a792db...8b84a77 (#53789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53789

Changelog: [Internal] - Update `react-native/debugger-frontend` from 5a792db...8b84a77

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/5a792db1225adda206313e9bf751198a1ca7851a...8b84a77b2c82c670886ef064dfc92d6bce83e579).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8b84a77b2](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T17:28:39+01:00 | [fix: avoid race conditions when fetching background trace (#206)](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) |
| [95bd36ce9](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T14:45:07+01:00 | [feat: use application display name for trace title (#207)](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) |

Reviewed By: huntie

Differential Revision: D82464061

fbshipit-source-id: c33db7a535a148f8316730009580aef00afe04f1
2025-09-16 05:18:00 -07:00
Zeya PengandFacebook GitHub Bot 8d03e63265 Revert D82461457: Clean up batchingControlledByJS in NativeAnimated kotlin
Differential Revision:
D82461457

Original commit changeset: a1208720b83e

Original Phabricator Diff: D82461457

fbshipit-source-id: 99416873f66c45ccf61614d3e356e6a777bbad6b
2025-09-16 03:39:45 -07:00
659 changed files with 11173 additions and 6560 deletions
+2 -2
View File
@@ -69,7 +69,7 @@ munge_underscores=true
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
module.system.haste.module_ref_prefix=m#
@@ -98,4 +98,4 @@ untyped-import
untyped-type-import
[version]
^0.281.0
^0.287.0
+3
View File
@@ -17,6 +17,9 @@ runs:
- name: Install node dependencies
uses: ./.github/actions/yarn-install
- name: Set React Native Version
# We don't want to set the version for stable branches, because this has been
# already set from the 'create release' commits on the release branch.
if: ${{ !endsWith(github.ref_name, '-stable') }}
shell: bash
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
- name: Setup gradle
+1 -2
View File
@@ -383,8 +383,7 @@ jobs:
runs-on: 8-core-ubuntu
needs: [set_release_type]
container:
# Version is pinned to v18.0 to unblock `run_fantom_tests` - see https://github.com/react-native-community/docker-android/pull/242#issuecomment-3280029122
image: reactnativecommunity/react-native-android:v18.0
image: reactnativecommunity/react-native-android:latest
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
+1
View File
@@ -133,6 +133,7 @@ vendor/
# Swift Package build folder
/packages/react-native/.build
/packages/react-native/.swiftpm
/packages/react-native/React/includes/
# @react-native/codegen
/packages/react-native/React/FBReactNativeSpec/
+51 -2
View File
@@ -1,5 +1,53 @@
# Changelog
## v0.82.0-rc.5
### Breaking
- **InteractionManager:** InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`. ([03d9f34a82](https://github.com/facebook/react-native/commit/03d9f34a8252456d389d9f9a3bd04b99a2828c16) by [@yungsters](https://github.com/yungsters))
### Added
#### iOS specific
- **New Architecture:** Crash the app if they force the legacy architecture. ([dc132a4fd4](https://github.com/facebook/react-native/commit/dc132a4fd4ca8dc28dc7dbb2406ac67dac1a0ee7) by [@cipolleschi](https://github.com/cipolleschi))
- **Fabric:** Add invalidation callback for non-recycled component instances ([dc4a6d2c7e](https://github.com/facebook/react-native/commit/dc4a6d2c7e2ed421b61929896f60b1a864a60d97) by [@kkafar](https://github.com/kkafar))
## v0.82.0-rc.4
### Fixed
- **Hermes V1:** Fixed coordinates for Hermes V1 artifacts ([674fb77d93](https://github.com/facebook/react-native/commit/674fb77d93dfe67a5fe90449dc71b195b1851e13) by [@j-piasecki](https://github.com/j-piasecki))
#### iOS specific
- **Switch:** Fix Switch layout to work with iOS26 ([91d427fe52](https://github.com/facebook/react-native/commit/91d427fe52a307f9aa8579912ef956d61808dad2) by [@cipolleschi](https://github.com/cipolleschi))
## v0.82.0-rc.3
### Added
- **Hermes V1:** Added a dependency on hermes-compiler ([0caf8e70d5](https://github.com/facebook/react-native/commit/0caf8e70d53f611a73ad9b55879dfe0a5f036371) by [@j-piasecki](https://github.com/j-piasecki))
### Fixed
#### Android specific
- **Hermes V1:** Changed the coordinates of hermes artifacts when using Hermes V1 ([d0fb33822d](https://github.com/facebook/react-native/commit/d0fb33822de38183895c8b3421f46966909beaf3) by [@j-piasecki](https://github.com/j-piasecki))
#### iOS specific
- **Codegen:** Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
## v0.81.4
### Fixed
#### iOS specific
- Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
- Reapplied "Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source" ([bb73315a3f](https://github.com/facebook/react-native/commit/bb73315a3fd8cd203c4ddb3ffa10bfec307c7e92) by [@kitten](https://github.com/kitten))
## v0.81.3
### Fixed
@@ -66,6 +114,7 @@
- **Error Handling:** Unhandled promises are now handled by ExceptionsManager.handleException, instead of being swallowed as Logbox Warnings. ([c4082c9ce2](https://github.com/facebook/react-native/commit/c4082c9ce208a324c2d011823ca2ba432411aafc) by [@krystofwoldrich](https://github.com/krystofwoldrich))
- **`shouldEmitW3CPointerEvents`:** Migrate `shouldPressibilityUseW3CPointerEventsForHover` to common private feature flags and remove `shouldEmitW3CPointerEvents` flag. ([fb4587780e](https://github.com/facebook/react-native/commit/fb4587780e8d6111139d73598a9a26ff392dee28) by [@coado](https://github.com/coado))
- **TurboModuleUtils:** Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray ([ead669ade3](https://github.com/facebook/react-native/commit/ead669ade31ee703c407f96c0ce98d8f2991bdc8) by [@christophpurrer](https://github.com/christophpurrer))
- **TurboModules:** Delete old location of CallbackWrapper.h / LongLivedObject.h by ([cb94e71](https://github.com/facebook/react-native/commit/cb94e71845259ae7fa823eb4d21cde74fccd7435) [@christophpurrer](https://github.com/christophpurrer))
#### Android specific
@@ -80,7 +129,7 @@
### Added
- **Animated:** `Animated.CompositeAnomation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
- **Animated:** `Animated.CompositeAnimation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
- **Animated:** Allow calling createAnimatedNode without batching ([d9d9a49e18](https://github.com/facebook/react-native/commit/d9d9a49e18f3c51caa18cf7da0a1fcd62f1ecf18) by [@zeyap](https://github.com/zeyap))
- **Animated:** Allow filter usage with native animated driver. ([138d0eb01d](https://github.com/facebook/react-native/commit/138d0eb01dbe597261459a37d364d1780c3ef228) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **API:** Expose NativeComponentRegistry API as JavaScript root export ([f936780cd5](https://github.com/facebook/react-native/commit/f936780cd5c0c17797f9d2bbc8f5cee81c2eefce) by [@zhongwuzw](https://github.com/zhongwuzw))
@@ -117,7 +166,7 @@
- **AGP:** AGP to 8.12.0 ([742ef3d661](https://github.com/facebook/react-native/commit/742ef3d6615c8c1202e9f683e6127ac97d7a9e23) by [@cortinico](https://github.com/cortinico))
- **DevSupportManager:** DevSupport `openDebugger()` methods now accept a `panel: String?` param. Frameworks directly implementing `DevSupportManager` will need to adjust call signatures. ([9dba7112cf](https://github.com/facebook/react-native/commit/9dba7112cfd09b02300869a77dba3dca16f49a28) by [@huntie](https://github.com/huntie))
- **Kotlin:**Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([8ccfff9a46](https://github.com/facebook/react-native/commit/8ccfff9a46f317fd78f478c8b3f180441535d1ca) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated com.facebook.react.bridge.Arguments to Kotlin. ([2534aeaddb](https://github.com/facebook/react-native/commit/2534aeaddb0490b69dfaba6b8d316616c7e10a9c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaConfig` to Kotlin ([4d5caef76b](https://github.com/facebook/react-native/commit/4d5caef76b83eb7e983364ecc81abb6027e5f98e) by [@mateoguzmana](https://github.com/mateoguzmana))
+1 -1
View File
@@ -128,7 +128,7 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
That's fine for local development, but you should not commit this change.
********************************************************************************
"""
"""
.trimIndent()
)
allprojects {
+19 -16
View File
@@ -3057,30 +3057,30 @@ type util$InspectOptions = {
};
declare type util$ParseArgsOption =
| {|
| $ReadOnly<{|
type: 'boolean',
multiple?: false,
short?: string,
default?: boolean,
|}
| {|
|}>
| $ReadOnly<{|
type: 'boolean',
multiple: true,
short?: string,
default?: Array<boolean>,
|}
| {|
|}>
| $ReadOnly<{|
type: 'string',
multiple?: false,
short?: string,
default?: string,
|}
| {|
|}>
| $ReadOnly<{|
type: 'string',
multiple: true,
short?: string,
default?: Array<string>,
|};
|}>;
type util$ParseArgsOptionToValue<TOption> = TOption['type'] extends 'boolean'
? TOption['multiple'] extends true
@@ -3137,7 +3137,7 @@ declare module 'util' {
declare function stripVTControlCharacters(str: string): string;
declare function parseArgs<
TOptions: {[string]: util$ParseArgsOption} = {||},
TOptions: {+[string]: util$ParseArgsOption} = {||},
>(config: {|
args?: Array<string>,
options?: TOptions,
@@ -3995,13 +3995,16 @@ declare class Process extends events$EventEmitter {
initgroups?: (user: number | string, extra_group: number | string) => void;
kill(pid: number, signal?: string | number): void;
mainModule: Object;
memoryUsage(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
memoryUsage: {
(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
},
rss: () => number,
};
nextTick: <T>(cb: (...T) => mixed, ...T) => void;
pid: number;
-41
View File
@@ -1,41 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
declare module 'electron-store' {
declare export type Schema = any;
declare export type Options = {
+name?: string,
defaults?: Object,
schema?: any,
migrations?: any,
beforeEachMigration?: any,
clearInvalidConfig?: boolean,
serialize?: any,
deserialize?: any,
accessPropertiesByDotNotation?: boolean,
watch?: boolean,
encryptionKey?: string | Buffer | $ReadOnlyArray<number>,
...
};
declare class ElectronStore {
constructor(options?: Options): this;
get(key: string): any;
get(key: string, defaultValue: any): any;
set(key: string, value: any): void;
set(object: Object): void;
has(key: string): boolean;
delete(key: string): void;
clear(): void;
}
declare module.exports: Class<ElectronStore>;
}
+5 -5
View File
@@ -58,8 +58,8 @@
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
"@octokit/rest": "^22.0.0",
"@react-native/metro-babel-transformer": "0.82.0-main",
"@react-native/metro-config": "0.82.0-main",
"@react-native/metro-babel-transformer": "0.83.0-main",
"@react-native/metro-config": "0.83.0-main",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.0",
"@typescript-eslint/parser": "^8.36.0",
@@ -86,7 +86,7 @@
"eslint-plugin-relay": "^1.8.3",
"fb-dotslash": "0.5.8",
"flow-api-translator": "0.32.0",
"flow-bin": "^0.281.0",
"flow-bin": "^0.287.0",
"glob": "^7.1.1",
"hermes-eslint": "0.32.0",
"hermes-transform": "0.32.0",
@@ -101,8 +101,8 @@
"markdownlint-cli2": "^0.17.2",
"markdownlint-rule-relative-links": "^3.0.0",
"memfs": "^4.38.2",
"metro-babel-register": "^0.83.1",
"metro-transform-plugins": "^0.83.1",
"metro-babel-register": "^0.83.3",
"metro-transform-plugins": "^0.83.3",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.82.0-main"
"@react-native/codegen": "0.83.0-main"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,16 +22,16 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.82.0-main",
"@react-native/dev-middleware": "0.83.0-main",
"debug": "^4.4.0",
"invariant": "^2.2.4",
"metro": "^0.83.1",
"metro-config": "^0.83.1",
"metro-core": "^0.83.1",
"metro": "^0.83.3",
"metro-config": "^0.83.3",
"metro-core": "^0.83.3",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.83.1"
"metro-resolver": "^0.83.3"
},
"peerDependencies": {
"@react-native-community/cli": "*",
@@ -119,7 +119,6 @@ async function runServer(
watchFolders,
});
const {middleware, websocketEndpoints} = createDevMiddleware({
projectRoot,
serverBaseUrl: devServerUrl,
logger: createDevMiddlewareLogger(terminalReporter),
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<0b54f75686e4893a5444839bf621a317>>
Git revision: 5a792db1225adda206313e9bf751198a1ca7851a
@generated SignedSource<<e0cc45c5c3854d0d3013f1c735e804b8>>
Git revision: 8cce39003f66f66a8fb4c0e581a2b5046cf9c1d1
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -983,7 +983,7 @@ import*as e from"../../../services/trace_bounds/trace_bounds.js";import*as t fro
<p class="tooltip">${Ai(Oi.feedbackTooltip)}</p>
</div>
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0),this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab("insights")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0);const e=!S.Runtime.experiments.isEnabled("react-native-specific-ui");e&&this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab(e?"insights":"annotations")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
<div class="timeline-summary">
<div class="summary-range">${en(Zi.rangeSS,{PH1:t.TimeUtilities.millisToString(this.#on),PH2:t.TimeUtilities.millisToString(this.#an)})}</div>
<div class="category-summary">
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
@@ -1,71 +1,71 @@
#!/usr/bin/env dotslash
// @generated SignedSource<<9df662721aea6e3774a8677e2a6065e4>>
// @generated SignedSource<<8b06371489dc8b79c23cbf095568c91a>>
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 116056584,
"size": 116051181,
"hash": "sha256",
"digest": "fac3912f10e3c373c874be6c4696f11e05cbaa754c116db6ea72189afae5efe6",
"digest": "a6060e1291f9ee7e9feecd511012c041ed2a65c6df6f8ab5aca4d96adbbc9921",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPdlYV_w4y_wxd5Rs8c_F-soLMbY1zwXJjD-JM4TkOtOELyxZGyreTb6dTehp_X6e3qVFZUT05ETRs0MbvqYr4mqdb6dkG9DqNQEVv3TBoHwl7TYSygtHJEs3gXTAtMLYEKW9xXODJlVF-9II7fdTdHU7x7Pyf6NR6S3nv7sKUVD-zKpxF50L2TwUQ"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOD3-UmqD25MctpnB7Ogj0A8nHDs-SgFnMNFfStIxOajFAFSN93zuoWsLD3ylc3wVuX6-L-ndcMftTd7tlR1ZZWYy4a7g78w4N1UTzIT_z9vdOXpYGe7fZrHXiBHJu0QexD0b54OcdDSEFhh0-7puUTGPnIg3pHhThiU6bf_5AqvGIEYA5FGjih3zY"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 115929093,
"size": 115927343,
"hash": "sha256",
"digest": "06bbaeb62ae2e0081d184eba42b9f15be0d0b3f4901142b08a8a1430ff83e722",
"digest": "354f6550617d0c6b4bb4478ad085d4efe3671ba9a1b78d90d9bfc003a523cb6d",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPENbrxrg0RF_TiyxSY_YVYqC1UfRKj_bMfKb3qHUsIhBlya8n3FkbfJqTXTNdqL4riFRulXS5ecXZprtvk_9kao-zY59r3kiTRwobzF0jnjM507_9UOnEHWzG5ZJYzQyOtS3kQmT0HwZabVj9qw38OB9mk-MPVCZIPZay2PRnIThBzpKDoOOP9"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMVMfCfSykWSI8mB5koUEUtx819xGQGW3Tm1DBpEmjWA_g8C4PoPPDCIPpgJmB5nUKrv081_dtayoArCncyFJVs0ofbxGn0EkaEW2vW3OJ2J0XMH58v5cTLED3dT8TmWwAg6aYUTr0ch8DfVXRxsibYUIWaxJUwOJ-urR-iQm7YPQUboLElaJbM"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 110891603,
"size": 110891048,
"hash": "sha256",
"digest": "eeb9cc1399c0c38c429848dbf622f1b46e88d7d97788dcdc4c30a9fcce37705c",
"digest": "df41cfce9bc977ef4fdc66c3c892c0eedee5b07aa618550308157c51b8e75561",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN9bd7nbXi-uF_MooJEiUL2jJVifMqgQxZ236aqbSdiJe5Uzjud5ANf0LDAl8GDVVRShd6x4B-gsZ-qRowH0qJikoGatQIkBgyzp4i8ors52etGOIIwdAxdNIng5Vtp441j2_N__btkJqlHcMMbbqvO8fg9oeYTlhMpOx3MLLWXIlG7ix5IFUDiYChf"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOGfzOOV_mwg63orI4Hv0VQKQtE5Vk60eSl55gZDd0djjU-lmqddRZm_LxsWsek4xM7qIxqCbw6wGx7zqnrlmQGyfD98n0TBFh3uhVeYP_j3r2UkKci6tqjEqcLTHjFj3agjI6jDEe3fDpZtwKY4UMhXdVP4o1goYq13rG-IQAqIsAm04MnPFOYyp5X"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 117770388,
"size": 117777930,
"hash": "sha256",
"digest": "a65e446e526502b267cbe6800ae031e4e1b5b0aca21412152a66ffe1d3a29410",
"digest": "96805c51623a163b1d94b501e2e091f403b4c3575063bd7363f8e1550cda8dc5",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN29ukKLZS48QcCU-gms06YFnG-fxxDfrWTup-Z6KoIAP-QEu3sFzrpqeZz4g-jFsh3o-IIoHJsdbu4a2U7ROjPfWGguGJrPK8fdc3iV67Qw1_VAPU13dm0dI1DbSY50ah05wh43jdBG3LGCAYYJ-W8_mZMC3HqM2v-8KVd-DoPT4hOh1s9CCFgEQ"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQNbF-vba13QuctGdSckSWSApEqUne0w8vGceEm5u9VNYqHzwaZu6_T0n12Ml7aHuNgAgU0OOxJKUjcr2DVsNEsjcCYwMqCjZys8yF8NfM39OH1YePjHZCw5jinydbhGxhF1zbJ_zKmuOx1FhJtzCD3CUbLSea7fuhPh6ytLUIu3Ctx4aFQLFtbJZQ"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"windows-x86_64": {
"size": 125526370,
"size": 125533589,
"hash": "sha256",
"digest": "26b190c0f85249dee91999e020b8fe7ffd5c007458a2103ed3822558861dbe87",
"digest": "7f560e6d68b4b917c53ba0518a778a20e267cce55474ad972d345b2738746a52",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQO0mdIJx1eYiSDJNiAZ2soaeECILayWnvOeiey-fpS4ydDTreAMfwL4QZ5GZo4-AsGwOXCSdF3hBMM2ufnvw6BDFg5UEiTc4DALJu7o6YBBG4wlVZbI-2kkaXd7u8RhBQPjmhsdcX3sDmCGmSr3WK9EkTRKStE2lb6ilOn-969h4dYWekwUUCSX"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPZzccNNBkp1OKt_SPZ-iDoK5LDWyvZhFMgz4oTf9Ja9PlKU7i_5ydAVd714waJteCM1cdAidPN6PumBRs1uK12E9moytEskWXlMPbQObFpaTnkxLn6xp3N5EAKbAXvPfecX41Tz_7HRqh19_hW3XpwXF-VNsAdtn59ApMtX1fpN0peB1l4o57P"
}
],
"format": "tar.gz",
+1 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/debugger-shell",
"productName": "React Native DevTools",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
"keywords": [
"react-native",
@@ -35,7 +35,6 @@
},
"devDependencies": {
"electron": "37.2.6",
"electron-store": "^8.2.0",
"semver": "^7.1.3"
},
"files": [
@@ -8,13 +8,15 @@
* @format
*/
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {BrowserWindow, Menu, app, shell, ipcMain} = require('electron') as any;
const Store = require('electron-store');
import SettingsStore from './SettingsStore.js';
const path = require('path');
const util = require('util');
const appSettings = new Store();
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {BrowserWindow, Menu, app, shell, ipcMain} = require('electron') as any;
const appSettings = new SettingsStore();
const windowMetadata = new WeakMap<
typeof BrowserWindow,
$ReadOnly<{
@@ -0,0 +1,128 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
* @oncall react_native
*/
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {app} = require('electron') as any;
const fs = require('fs');
const path = require('path');
type Options = $ReadOnly<{
name?: string,
defaults?: Object,
}>;
/**
* A data persistence layer for storing application settings, modelled after
* [`electron-store`](https://www.npmjs.com/package/electron-store).
*
* Values are saved in a `config.json` file in `app.getPath('userData')`.
*
* Compatibility:
* - Maintains API and file format compatibility with `electron-store@8.2.0`.
* - Supports the Electron main process only.
*/
export default class SettingsStore {
#defaultValues: Object = {};
path: string;
constructor(options: Options = {}) {
options = {
name: 'config',
...options,
};
this.#defaultValues = {
...this.#defaultValues,
...options.defaults,
};
this.path = path.resolve(
app.getPath('userData'),
`${options.name ?? 'config'}.json`,
);
}
get(key: string, defaultValue?: any): any {
const store = this.store;
return store[key] !== undefined ? store[key] : defaultValue;
}
set(key: string, value: any): void {
const {store} = this;
if (typeof key === 'object') {
const object = key;
for (const [k, v] of Object.entries(object)) {
store[k] = v;
}
} else {
store[key] = value;
}
this.store = store;
}
has(key: string): boolean {
return key in this.store;
}
reset(...keys: Array<string>): void {
for (const key of keys) {
if (this.#defaultValues[key] != null) {
this.set(key, this.#defaultValues[key]);
}
}
}
delete(key: string): void {
const {store} = this;
delete store[key];
this.store = store;
}
clear(): void {
this.store = {};
for (const key of Object.keys(this.#defaultValues)) {
this.reset(key);
}
}
get store(): {[string]: mixed} {
try {
const data = fs.readFileSync(this.path, 'utf8');
const deserializedData = this._deserialize(data);
return {
...((deserializedData: any): {[string]: mixed}),
};
} catch (error) {
if (error?.code === 'ENOENT') {
this._ensureDirectory();
return {};
}
throw error;
}
}
set store(value: mixed): void {
this._ensureDirectory();
this._write(value);
}
_deserialize = (value: string): mixed => JSON.parse(value);
_serialize = (value: mixed): string =>
JSON.stringify(value, undefined, '\t') ?? '';
_ensureDirectory(): void {
fs.mkdirSync(path.dirname(this.path), {recursive: true});
}
_write(value: mixed): void {
const data = this._serialize(value);
fs.writeFileSync(this.path, data, {mode: 0o666});
}
}
@@ -25,7 +25,9 @@ app.setVersion(pkg.version + '-' + buildInfo.revision);
const {
values: {version = false},
} = util.parseArgs({
options: {version: {type: 'boolean'}},
options: {
version: {type: 'boolean'},
},
args: process.argv.slice(app.isPackaged ? 1 : 2),
strict: false,
});
+18 -5
View File
@@ -30,6 +30,7 @@ async function unstable_spawnDebuggerShellWithArgs(
{
mode = 'detached',
flavor = 'prebuilt',
prebuiltBinaryPath,
}: $ReadOnly<{
// In 'syncAndExit' mode, the current process will block until the spawned process exits, and then it will exit
// with the same exit code as the spawned process.
@@ -37,9 +38,13 @@ async function unstable_spawnDebuggerShellWithArgs(
// continue to run normally.
mode?: 'syncThenExit' | 'detached',
flavor?: DebuggerShellFlavor,
prebuiltBinaryPath?: string,
}> = {},
): Promise<void> {
const [binaryPath, baseArgs] = getShellBinaryAndArgs(flavor);
const [binaryPath, baseArgs] = getShellBinaryAndArgs(
flavor,
prebuiltBinaryPath,
);
return new Promise((resolve, reject) => {
const child = spawn(binaryPath, [...baseArgs, ...args], {
@@ -109,14 +114,13 @@ export type DebuggerShellPreparationResult = $ReadOnly<{
*/
async function unstable_prepareDebuggerShell(
flavor: DebuggerShellFlavor,
{prebuiltBinaryPath}: {prebuiltBinaryPath?: string} = {},
): Promise<DebuggerShellPreparationResult> {
const [binaryPath, baseArgs] = getShellBinaryAndArgs(flavor);
try {
switch (flavor) {
case 'prebuilt':
const prebuiltResult = await prepareDebuggerShellFromDotSlashFile(
DEVTOOLS_BINARY_DOTSLASH_FILE,
prebuiltBinaryPath ?? DEVTOOLS_BINARY_DOTSLASH_FILE,
);
if (prebuiltResult.code !== 'success') {
return prebuiltResult;
@@ -128,6 +132,11 @@ async function unstable_prepareDebuggerShell(
flavor as empty;
throw new Error(`Unknown flavor: ${flavor}`);
}
const [binaryPath, baseArgs] = getShellBinaryAndArgs(
flavor,
prebuiltBinaryPath,
);
const {code, stderr} = await spawnAndGetStderr(binaryPath, [
...baseArgs,
'--version',
@@ -149,10 +158,14 @@ async function unstable_prepareDebuggerShell(
function getShellBinaryAndArgs(
flavor: DebuggerShellFlavor,
prebuiltBinaryPath: ?string,
): [string, Array<string>] {
switch (flavor) {
case 'prebuilt':
return [require('fb-dotslash'), [DEVTOOLS_BINARY_DOTSLASH_FILE]];
return [
require('fb-dotslash'),
[prebuiltBinaryPath ?? DEVTOOLS_BINARY_DOTSLASH_FILE],
];
case 'dev':
return [
// NOTE: Internally at Meta, this is aliased to a workspace that is
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,8 +23,8 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.82.0-main",
"@react-native/debugger-shell": "0.82.0-main",
"@react-native/debugger-frontend": "0.83.0-main",
"@react-native/debugger-shell": "0.83.0-main",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -39,7 +39,7 @@
"node": ">= 20.19.4"
},
"devDependencies": {
"@react-native/debugger-shell": "0.82.0-main",
"@react-native/debugger-shell": "0.83.0-main",
"selfsigned": "^2.4.1",
"undici": "^5.29.0",
"wait-for-expect": "^3.0.2"
@@ -21,10 +21,6 @@ import {
withServerForEachTest,
} from './ServerUtils';
import {createHash} from 'crypto';
import fs from 'fs';
import path from 'path';
const fsPromise = fs.promises;
// WebSocket is unreliable when using fake timers.
jest.useRealTimers();
@@ -47,7 +43,6 @@ describe.each(['HTTP', 'HTTPS'])(
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: __dirname,
secure: protocol === 'HTTPS',
});
@@ -472,14 +467,7 @@ describe.each(['HTTP', 'HTTPS'])(
}
});
test('reads source from disk', async () => {
// Should be just 'foo\n', but the newline can get mangled by the OS
// and/or SCM, so let's read the source of truth from disk.
const fileRealContents = await fsPromise.readFile(
path.join(__dirname, '__fixtures__', 'mock-source-file.txt'),
'utf8',
);
test('throws when attempting to pass a filesystem url', async () => {
const {device, debugger_} = await createAndConnectTarget(
serverRef,
autoCleanup.signal,
@@ -490,6 +478,7 @@ describe.each(['HTTP', 'HTTPS'])(
vm: 'bar-vm',
},
);
try {
await sendFromTargetToDebugger(device, debugger_, 'page1', {
method: 'Debugger.scriptParsed',
@@ -500,7 +489,7 @@ describe.each(['HTTP', 'HTTPS'])(
endLine: 0,
startColumn: 0,
endColumn: 0,
hash: createHash('sha256').update(fileRealContents).digest('hex'),
hash: createHash('sha256').update('').digest('hex'),
},
});
const response = await debugger_.sendAndGetResponse({
@@ -511,8 +500,15 @@ describe.each(['HTTP', 'HTTPS'])(
},
});
expect(response.result).toEqual(
expect.objectContaining({scriptSource: fileRealContents}),
expect.objectContaining({
error: {
message: expect.stringContaining(
'Can\'t parse requested URL "__fixtures__/mock-source-file.txt"',
),
},
}),
);
// The device does not receive the getScriptSource request, since it
// is handled by the proxy.
expect(device.wrappedEventParsed).not.toBeCalledWith({
@@ -33,7 +33,6 @@ describe.each(['HTTP', 'HTTPS'])(
protocol => {
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
secure: protocol === 'HTTPS',
});
const autoCleanup = withAbortSignalForEachTest();
@@ -39,7 +39,6 @@ describe('inspector proxy device message middleware', () => {
const createCustomMessageHandler = jest.fn().mockImplementation(() => null);
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: createCustomMessageHandler,
});
@@ -83,7 +82,6 @@ describe('inspector proxy device message middleware', () => {
const createCustomMessageHandler = jest.fn().mockImplementation(() => null);
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: createCustomMessageHandler,
});
const {serverBaseUrl, serverBaseWsUrl} = serverRefUrls(server);
@@ -169,7 +167,6 @@ describe('inspector proxy device message middleware', () => {
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: createCustomMessageHandler,
});
@@ -231,7 +228,6 @@ describe('inspector proxy device message middleware', () => {
const handleDeviceMessage = jest.fn();
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: () => ({
handleDeviceMessage,
handleDebuggerMessage() {},
@@ -264,7 +260,6 @@ describe('inspector proxy device message middleware', () => {
const handleDeviceMessage = jest.fn();
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: () => ({
handleDeviceMessage,
handleDebuggerMessage() {},
@@ -304,7 +299,6 @@ describe('inspector proxy device message middleware', () => {
const handleDebuggerMessage = jest.fn();
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: () => ({
handleDeviceMessage() {},
handleDebuggerMessage,
@@ -341,7 +335,6 @@ describe('inspector proxy device message middleware', () => {
const handleDebuggerMessage = jest.fn();
const {server} = await createServer({
logger: undefined,
projectRoot: '',
unstable_customInspectorMessageHandler: () => ({
handleDeviceMessage() {},
handleDebuggerMessage,
@@ -37,7 +37,6 @@ const PAGE_DEFAULTS = {
describe('inspector-proxy device socket handoff', () => {
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
});
const autoCleanup = withAbortSignalForEachTest();
afterEach(() => {
@@ -27,7 +27,6 @@ jest.useFakeTimers();
describe('inspector proxy HTTP API', () => {
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
});
const autoCleanup = withAbortSignalForEachTest();
afterEach(() => {
@@ -261,7 +260,6 @@ describe('inspector proxy HTTP API', () => {
describe('HTTP vs HTTPS', () => {
const secureServerRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
secure: true,
});
@@ -25,7 +25,6 @@ jest.setTimeout(10000);
describe('inspector proxy React Native reloads', () => {
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
});
const autoCleanup = withAbortSignalForEachTest();
afterEach(() => {
@@ -34,7 +34,6 @@ describe('enableStandaloneFuseboxShell experiment', () => {
};
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
unstable_browserLauncher: BrowserLauncherWithFuseboxShell,
unstable_experiments: {
enableStandaloneFuseboxShell: true,
@@ -17,7 +17,6 @@ jest.setTimeout(10000);
describe('embedder script', () => {
const serverRef = withServerForEachTest({
logger: undefined,
projectRoot: '',
});
test('is always served', async () => {
@@ -24,8 +24,6 @@ import path from 'path';
import serveStaticMiddleware from 'serve-static';
type Options = $ReadOnly<{
projectRoot: string,
/**
* The base URL to the dev server, as reachable from the machine on which
* dev-middleware is hosted. Typically `http://localhost:${metroPort}`.
@@ -78,7 +76,6 @@ type DevMiddlewareAPI = $ReadOnly<{
}>;
export default function createDevMiddleware({
projectRoot,
serverBaseUrl,
logger,
// $FlowFixMe[incompatible-type]
@@ -96,7 +93,6 @@ export default function createDevMiddleware({
);
const inspectorProxy = new InspectorProxy(
projectRoot,
serverBaseUrl,
eventReporter,
experiments,
@@ -28,9 +28,7 @@ import type {
import CdpDebugLogging from './CdpDebugLogging';
import DeviceEventReporter from './DeviceEventReporter';
import * as fs from 'fs';
import invariant from 'invariant';
import * as path from 'path';
import WS from 'ws';
const debug = require('debug')('Metro:InspectorProxy');
@@ -75,7 +73,6 @@ export type DeviceOptions = $ReadOnly<{
name: string,
app: string,
socket: WS,
projectRoot: string,
eventReporter: ?EventReporter,
createMessageMiddleware: ?CreateCustomMessageHandlerFn,
deviceRelativeBaseUrl: URL,
@@ -120,9 +117,6 @@ export default class Device {
// Mapping built from scriptParsed events and used to fetch file content in `Debugger.getScriptSource`.
#scriptIdToSourcePathMapping: Map<string, string> = new Map();
// Root of the project used for relative to absolute source path conversion.
#projectRoot: string;
#deviceEventReporter: ?DeviceEventReporter;
#pagesPollingIntervalId: ReturnType<typeof setInterval>;
@@ -151,7 +145,6 @@ export default class Device {
name,
app,
socket,
projectRoot,
eventReporter,
createMessageMiddleware,
serverRelativeBaseUrl,
@@ -163,7 +156,6 @@ export default class Device {
this.#name = name;
this.#app = app;
this.#deviceSocket = socket;
this.#projectRoot = projectRoot;
this.#serverRelativeBaseUrl = serverRelativeBaseUrl;
this.#deviceRelativeBaseUrl = deviceRelativeBaseUrl;
this.#deviceEventReporter = eventReporter
@@ -880,7 +872,7 @@ export default class Device {
return this.#processDebuggerSetBreakpointByUrl(req, debuggerInfo);
case 'Debugger.getScriptSource':
// Sends response to debugger via side-effect
this.#processDebuggerGetScriptSource(req, socket);
void this.#processDebuggerGetScriptSource(req, socket);
return null;
case 'Network.loadNetworkResource':
// If we're rewriting URLs (to frontend-relative), we don't want to
@@ -965,10 +957,10 @@ export default class Device {
return processedReq;
}
#processDebuggerGetScriptSource(
async #processDebuggerGetScriptSource(
req: CDPRequest<'Debugger.getScriptSource'>,
socket: WS,
): void {
): Promise<void> {
const sendSuccessResponse = (scriptSource: string) => {
const result: {
scriptSource: string,
@@ -1005,33 +997,23 @@ export default class Device {
const pathToSource = this.#scriptIdToSourcePathMapping.get(
req.params.scriptId,
);
if (pathToSource != null) {
const httpURL = this.#tryParseHTTPURL(pathToSource);
if (httpURL) {
// URL is server-relatve, so we should be able to fetch it from here.
this.#fetchText(httpURL).then(
text => sendSuccessResponse(text),
err =>
sendErrorResponse(
`Failed to fetch source url ${pathToSource}: ${err.message}`,
),
try {
const httpURL =
pathToSource == null ? null : this.#tryParseHTTPURL(pathToSource);
if (!httpURL) {
throw new Error(
`Can't parse requested URL ${pathToSource === undefined ? 'undefined' : JSON.stringify(pathToSource)}`,
);
} else {
let file;
try {
file = fs.readFileSync(
path.resolve(this.#projectRoot, pathToSource),
'utf8',
);
} catch (err) {
sendErrorResponse(
`Failed to fetch source file ${pathToSource}: ${err.message}`,
);
}
if (file != null) {
sendSuccessResponse(file);
}
}
const text = await this.#fetchText(httpURL);
sendSuccessResponse(text);
} catch (err) {
sendErrorResponse(
`Failed to fetch source url ${pathToSource === undefined ? 'undefined' : JSON.stringify(pathToSource)} for scriptId ${req.params.scriptId}: ${err.message}`,
);
}
}
@@ -75,9 +75,6 @@ export interface InspectorProxyQueries {
* Main Inspector Proxy class that connects JavaScript VM inside Android/iOS apps and JS debugger.
*/
export default class InspectorProxy implements InspectorProxyQueries {
// Root of the project used for relative to absolute source path conversion.
#projectRoot: string;
// The base URL to the dev server from the dev-middleware host.
#serverBaseUrl: URL;
@@ -101,7 +98,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
#eventLoopPerfTracker: EventLoopPerfTracker;
constructor(
projectRoot: string,
serverBaseUrl: string,
eventReporter: ?EventReporter,
experiments: Experiments,
@@ -109,7 +105,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
customMessageHandler: ?CreateCustomMessageHandlerFn,
trackEventLoopPerf?: boolean = false,
) {
this.#projectRoot = projectRoot;
this.#serverBaseUrl = new URL(serverBaseUrl);
this.#devices = new Map();
this.#eventReporter = eventReporter;
@@ -355,7 +350,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
name: deviceName,
app: appName,
socket,
projectRoot: this.#projectRoot,
eventReporter: this.#eventReporter,
createMessageMiddleware: this.#customMessageHandler,
deviceRelativeBaseUrl,
@@ -372,12 +366,6 @@ export default class InspectorProxy implements InspectorProxyQueries {
this.#devices.set(deviceId, newDevice);
this.#logger?.info(
"Connection established to app='%s' on device='%s'.",
appName,
deviceName,
);
debug(
"Got new device connection: name='%s', app=%s, device=%s, via=%s",
deviceName,
@@ -450,7 +438,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
);
socket.on('close', (code: number, reason: string) => {
this.#logger?.info(
debug(
"Connection closed to device='%s' for app='%s' with code='%s' and reason='%s'.",
deviceName,
appName,
@@ -526,7 +514,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
throw new Error(INTERNAL_ERROR_MESSAGES.UNREGISTERED_DEVICE);
}
this.#logger?.info(
debug(
"Connection established to DevTools for app='%s' on device='%s'.",
device.getApp() || 'unknown',
device.getName() || 'unknown',
@@ -594,7 +582,7 @@ export default class InspectorProxy implements InspectorProxyQueries {
});
socket.on('close', (code: number, reason: string) => {
this.#logger?.info(
debug(
"Connection closed to DevTools for app='%s' on device='%s' with code='%s' and reason='%s'.",
device.getApp() || 'unknown',
device.getName() || 'unknown',
@@ -21,6 +21,7 @@ import type {NextHandleFunction} from 'connect';
import type {IncomingMessage, ServerResponse} from 'http';
import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl';
import {createHash} from 'crypto';
import url from 'url';
const LEGACY_SYNTHETIC_PAGE_TITLE =
@@ -190,11 +191,15 @@ export default function openDebuggerMiddleware({
}
}
if (shouldUseStandaloneFuseboxShell) {
const windowKey = [
serverBaseUrl,
target.webSocketDebuggerUrl,
target.appId,
].join('-');
const windowKey = createHash('sha256')
.update(
[
serverBaseUrl,
target.webSocketDebuggerUrl,
target.appId,
].join('-'),
)
.digest('hex');
if (!browserLauncher.unstable_showFuseboxShell) {
throw new Error(
'Fusebox shell is not supported by the current browser launcher',
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.82.0-main",
"@react-native/eslint-plugin": "0.83.0-main",
"@typescript-eslint/eslint-plugin": "^8.36.0",
"@typescript-eslint/parser": "^8.36.0",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.82.0-main",
"@react-native/codegen": "0.83.0-main",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -67,18 +67,18 @@ class ReactRootProjectPlugin : Plugin<Project> {
) {
project.logger.error(
"""
********************************************************************************
********************************************************************************
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
supported anymore since React Native 0.82.
You can remove the line from your `gradle.properties` file.
The application will run with the New Architecture enabled by default.
WARNING: Setting `newArchEnabled=false` in your `gradle.properties` file is not
supported anymore since React Native 0.82.
********************************************************************************
You can remove the line from your `gradle.properties` file.
"""
The application will run with the New Architecture enabled by default.
********************************************************************************
"""
.trimIndent()
)
}
@@ -168,13 +168,13 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
# or link against a old prefab target (this is needed for React Native 0.76 on).
set(REACTNATIVE_MERGED_SO true)
{{ libraryIncludes }}
set(AUTOLINKED_LIBRARIES
{{ libraryModules }}
)
@@ -191,28 +191,28 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
* once the code is regenerated.
*
*/
#include "autolinking.h"
{{ autolinkingCppIncludes }}
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
{{ autolinkingCppTurboModuleJavaProviders }}
return nullptr;
}
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
{{ autolinkingCppTurboModuleCxxProviders }}
return nullptr;
}
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
{{ autolinkingCppComponentDescriptors }}
return;
}
} // namespace react
} // namespace facebook
"""
@@ -228,22 +228,22 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
* once the code is regenerated.
*
*/
#pragma once
#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/JavaTurboModule.h>
#include <ReactCommon/TurboModule.h>
#include <jsi/jsi.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params);
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker);
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry);
} // namespace react
} // namespace facebook
"""
@@ -65,19 +65,19 @@ abstract class GenerateEntryPointTask : DefaultTask() {
val generatedFileContentsTemplate =
"""
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
import com.facebook.react.views.view.WindowUtilKt;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
import java.io.IOException;
/**
* This class is the entry point for loading React Native using the configuration
* that the users specifies in their .gradle files.
@@ -102,7 +102,7 @@ abstract class GenerateEntryPointTask : DefaultTask() {
}
}
}
"""
"""
.trimIndent()
}
}
@@ -137,61 +137,61 @@ abstract class GeneratePackageListTask : DefaultTask() {
val generatedFileContentsTemplate =
"""
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainPackageConfig;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.ArrayList;
{{ packageImports }}
@SuppressWarnings("deprecation")
public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
private MainPackageConfig mConfig;
public PackageList(ReactNativeHost reactNativeHost) {
this(reactNativeHost, null);
}
public PackageList(Application application) {
this(application, null);
}
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
this.reactNativeHost = reactNativeHost;
mConfig = config;
}
public PackageList(Application application, MainPackageConfig config) {
this.reactNativeHost = null;
this.application = application;
mConfig = config;
}
private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
}
private Resources getResources() {
return this.getApplication().getResources();
}
private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}
private Context getApplicationContext() {
return this.getApplication().getApplicationContext();
}
public ArrayList<ReactPackage> getPackages() {
return new ArrayList<>(Arrays.<ReactPackage>asList(
new MainReactPackage(mConfig){{ packageClassInstances }}
@@ -21,24 +21,24 @@ internal object BackwardCompatUtils {
if (reactMap.isNotEmpty()) {
project.logger.error(
"""
********************************************************************************
ERROR: Using old project.ext.react configuration.
We identified that your project is using a old configuration block as:
project.ext.react = [
// ...
]
You should migrate to the new configuration:
react {
// ...
}
You can find documentation inside `android/app/build.gradle` on how to use it.
********************************************************************************
"""
********************************************************************************
ERROR: Using old project.ext.react configuration.
We identified that your project is using a old configuration block as:
project.ext.react = [
// ...
]
You should migrate to the new configuration:
react {
// ...
}
You can find documentation inside `android/app/build.gradle` on how to use it.
********************************************************************************
"""
.trimIndent()
)
}
@@ -191,6 +191,14 @@ internal object DependencyUtils {
"The hermes-android dependency was modified to use the correct Maven group.",
)
)
} else if (hermesV1Enabled) {
dependencySubstitution.add(
Triple(
"com.facebook.react:hermes-android",
hermesVersionString,
"The hermes-android dependency was modified to use Hermes V1.",
)
)
}
return dependencySubstitution
}
@@ -105,11 +105,11 @@ private fun detectCliFile(reactNativeRoot: File, preconfiguredCliFile: File?): F
error(
"""
Couldn't determine CLI location!
Couldn't determine CLI location!
Please set `react { cliFile = file(...) }` inside your
build.gradle to the path of the react-native cli.js file.
This file typically resides in `node_modules/react-native/cli.js`
Please set `react { cliFile = file(...) }` inside your
build.gradle to the path of the react-native cli.js file.
This file typically resides in `node_modules/react-native/cli.js`
"""
.trimIndent()
)
@@ -242,7 +242,7 @@ internal fun readPackageJsonFile(
return packageJson?.let { JsonUtils.fromPackageJson(it) }
}
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/%OS-BIN%/"
private const val HERMES_COMPILER_NPM_DIR = "node_modules/hermes-compiler/hermesc/%OS-BIN%/"
private const val HERMESC_IN_REACT_NATIVE_DIR = "node_modules/react-native/sdks/hermesc/%OS-BIN%/"
private const val HERMESC_BUILT_FROM_SOURCE_DIR =
"node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/bin/"
@@ -120,20 +120,20 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
assertThat(output)
.isEqualTo(
"""
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
# or link against a old prefab target (this is needed for React Native 0.76 on).
set(REACTNATIVE_MERGED_SO true)
set(AUTOLINKED_LIBRARIES
)
"""
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
# or link against a old prefab target (this is needed for React Native 0.76 on).
set(REACTNATIVE_MERGED_SO true)
set(AUTOLINKED_LIBRARIES
)
"""
.trimIndent()
)
}
@@ -147,24 +147,24 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
assertThat(output)
.isEqualTo(
"""
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
# or link against a old prefab target (this is needed for React Native 0.76 on).
set(REACTNATIVE_MERGED_SO true)
add_subdirectory("./a/directory/" aPackage_autolinked_build)
add_subdirectory("./another/directory/with\ spaces/" anotherPackage_autolinked_build)
add_subdirectory("./another/directory/cxx/" anotherPackage_cxxmodule_autolinked_build)
set(AUTOLINKED_LIBRARIES
react_codegen_aPackage
react_codegen_anotherPackage
another_cxxModule
)
"""
# This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_VERBOSE_MAKEFILE on)
# We set REACTNATIVE_MERGED_SO so libraries/apps can selectively decide to depend on either libreactnative.so
# or link against a old prefab target (this is needed for React Native 0.76 on).
set(REACTNATIVE_MERGED_SO true)
add_subdirectory("./a/directory/" aPackage_autolinked_build)
add_subdirectory("./another/directory/with\ spaces/" anotherPackage_autolinked_build)
add_subdirectory("./another/directory/cxx/" anotherPackage_cxxmodule_autolinked_build)
set(AUTOLINKED_LIBRARIES
react_codegen_aPackage
react_codegen_anotherPackage
another_cxxModule
)
"""
.trimIndent()
)
}
@@ -178,38 +178,38 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
assertThat(output)
.isEqualTo(
"""
/**
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
*/
/**
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
*/
#include "autolinking.h"
#include "autolinking.h"
namespace facebook {
namespace react {
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
return nullptr;
}
return nullptr;
}
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
return nullptr;
}
return nullptr;
}
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
return;
}
return;
}
} // namespace react
} // namespace facebook
"""
} // namespace react
} // namespace facebook
"""
.trimIndent()
)
}
@@ -223,50 +223,50 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
assertThat(output)
.isEqualTo(
"""
/**
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
*/
/**
* This code was generated by [React Native](https://www.npmjs.com/package/@react-native/gradle-plugin).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
* once the code is regenerated.
*
*/
#include "autolinking.h"
#include <aPackage.h>
#include <anotherPackage.h>
#include <react/renderer/components/anotherPackage/ComponentDescriptors.h>
#include <AnotherCxxModule.h>
#include "autolinking.h"
#include <aPackage.h>
#include <anotherPackage.h>
#include <react/renderer/components/anotherPackage/ComponentDescriptors.h>
#include <AnotherCxxModule.h>
namespace facebook {
namespace react {
namespace facebook {
namespace react {
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
auto module_aPackage = aPackage_ModuleProvider(moduleName, params);
if (module_aPackage != nullptr) {
return module_aPackage;
}
auto module_anotherPackage = anotherPackage_ModuleProvider(moduleName, params);
if (module_anotherPackage != nullptr) {
return module_anotherPackage;
}
return nullptr;
}
std::shared_ptr<TurboModule> autolinking_ModuleProvider(const std::string moduleName, const JavaTurboModule::InitParams &params) {
auto module_aPackage = aPackage_ModuleProvider(moduleName, params);
if (module_aPackage != nullptr) {
return module_aPackage;
}
auto module_anotherPackage = anotherPackage_ModuleProvider(moduleName, params);
if (module_anotherPackage != nullptr) {
return module_anotherPackage;
}
return nullptr;
}
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
if (moduleName == AnotherCxxModule::kModuleName) {
return std::make_shared<AnotherCxxModule>(jsInvoker);
}
return nullptr;
}
std::shared_ptr<TurboModule> autolinking_cxxModuleProvider(const std::string moduleName, const std::shared_ptr<CallInvoker>& jsInvoker) {
if (moduleName == AnotherCxxModule::kModuleName) {
return std::make_shared<AnotherCxxModule>(jsInvoker);
}
return nullptr;
}
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
providerRegistry->add(concreteComponentDescriptorProvider<AnotherPackageComponentDescriptor>());
return;
}
void autolinking_registerProviders(std::shared_ptr<ComponentDescriptorProviderRegistry const> providerRegistry) {
providerRegistry->add(concreteComponentDescriptorProvider<AnotherPackageComponentDescriptor>());
return;
}
} // namespace react
} // namespace facebook
"""
} // namespace react
} // namespace facebook
"""
.trimIndent()
)
}
@@ -138,16 +138,16 @@ class GenerateCodegenArtifactsTaskTest {
// language=JSON
writeText(
"""
{
"name": "@a/library",
"codegenConfig": {
"name": "an-awesome-library",
"android": {
"javaPackageName": "com.awesome.package"
}
}
}
"""
{
"name": "@a/library",
"codegenConfig": {
"name": "an-awesome-library",
"android": {
"javaPackageName": "com.awesome.package"
}
}
}
"""
.trimIndent()
)
}
@@ -172,12 +172,12 @@ class GenerateCodegenArtifactsTaskTest {
// language=JSON
writeText(
"""
{
"name": "@a/library",
"codegenConfig": {
}
}
"""
{
"name": "@a/library",
"codegenConfig": {
}
}
"""
.trimIndent()
)
}
@@ -47,45 +47,45 @@ class GenerateEntryPointTaskTest {
assertThat(result)
.isEqualTo(
"""
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
import com.facebook.react.views.view.WindowUtilKt;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
import java.io.IOException;
/**
* This class is the entry point for loading React Native using the configuration
* that the users specifies in their .gradle files.
*
* The `loadReactNative(this)` method invocation should be called inside the
* application onCreate otherwise the app won't load correctly.
*/
public class ReactNativeApplicationEntryPoint {
public static void loadReactNative(Context context) {
try {
SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE);
} catch (IOException error) {
throw new RuntimeException(error);
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
import com.facebook.react.views.view.WindowUtilKt;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
import java.io.IOException;
/**
* This class is the entry point for loading React Native using the configuration
* that the users specifies in their .gradle files.
*
* The `loadReactNative(this)` method invocation should be called inside the
* application onCreate otherwise the app won't load correctly.
*/
public class ReactNativeApplicationEntryPoint {
public static void loadReactNative(Context context) {
try {
SoLoader.init(context, OpenSourceMergedSoMapping.INSTANCE);
} catch (IOException error) {
throw new RuntimeException(error);
}
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
DefaultNewArchitectureEntryPoint.load();
}
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
}
}
}
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
DefaultNewArchitectureEntryPoint.load();
}
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
}
}
}
"""
"""
.trimIndent()
)
}
@@ -59,11 +59,11 @@ class GeneratePackageListTaskTest {
assertThat(result)
.isEqualTo(
"""
// @react-native/a-package
import com.facebook.react.aPackage;
// @react-native/another-package
import com.facebook.react.anotherPackage;
"""
// @react-native/a-package
import com.facebook.react.aPackage;
// @react-native/another-package
import com.facebook.react.anotherPackage;
"""
.trimIndent()
)
}
@@ -85,10 +85,10 @@ class GeneratePackageListTaskTest {
assertThat(result)
.isEqualTo(
"""
,
new APackage(),
new AnotherPackage()
"""
,
new APackage(),
new AnotherPackage()
"""
.trimIndent()
)
}
@@ -234,69 +234,69 @@ class GeneratePackageListTaskTest {
assertThat(result)
.isEqualTo(
"""
package com.facebook.react;
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainPackageConfig;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.ArrayList;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainPackageConfig;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.ArrayList;
@SuppressWarnings("deprecation")
public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
private MainPackageConfig mConfig;
@SuppressWarnings("deprecation")
public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
private MainPackageConfig mConfig;
public PackageList(ReactNativeHost reactNativeHost) {
this(reactNativeHost, null);
}
public PackageList(ReactNativeHost reactNativeHost) {
this(reactNativeHost, null);
}
public PackageList(Application application) {
this(application, null);
}
public PackageList(Application application) {
this(application, null);
}
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
this.reactNativeHost = reactNativeHost;
mConfig = config;
}
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
this.reactNativeHost = reactNativeHost;
mConfig = config;
}
public PackageList(Application application, MainPackageConfig config) {
this.reactNativeHost = null;
this.application = application;
mConfig = config;
}
public PackageList(Application application, MainPackageConfig config) {
this.reactNativeHost = null;
this.application = application;
mConfig = config;
}
private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
}
private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
}
private Resources getResources() {
return this.getApplication().getResources();
}
private Resources getResources() {
return this.getApplication().getResources();
}
private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}
private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}
private Context getApplicationContext() {
return this.getApplication().getApplicationContext();
}
private Context getApplicationContext() {
return this.getApplication().getApplicationContext();
}
public ArrayList<ReactPackage> getPackages() {
return new ArrayList<>(Arrays.<ReactPackage>asList(
new MainReactPackage(mConfig)
));
}
}
"""
public ArrayList<ReactPackage> getPackages() {
return new ArrayList<>(Arrays.<ReactPackage>asList(
new MainReactPackage(mConfig)
));
}
}
"""
.trimIndent()
)
}
@@ -312,74 +312,74 @@ class GeneratePackageListTaskTest {
assertThat(result)
.isEqualTo(
"""
package com.facebook.react;
package com.facebook.react;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainPackageConfig;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.ArrayList;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainPackageConfig;
import com.facebook.react.shell.MainReactPackage;
import java.util.Arrays;
import java.util.ArrayList;
// @react-native/a-package
import com.facebook.react.aPackage;
// @react-native/another-package
import com.facebook.react.anotherPackage;
@SuppressWarnings("deprecation")
public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
private MainPackageConfig mConfig;
// @react-native/a-package
import com.facebook.react.aPackage;
// @react-native/another-package
import com.facebook.react.anotherPackage;
public PackageList(ReactNativeHost reactNativeHost) {
this(reactNativeHost, null);
}
@SuppressWarnings("deprecation")
public class PackageList {
private Application application;
private ReactNativeHost reactNativeHost;
private MainPackageConfig mConfig;
public PackageList(Application application) {
this(application, null);
}
public PackageList(ReactNativeHost reactNativeHost) {
this(reactNativeHost, null);
}
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
this.reactNativeHost = reactNativeHost;
mConfig = config;
}
public PackageList(Application application) {
this(application, null);
}
public PackageList(Application application, MainPackageConfig config) {
this.reactNativeHost = null;
this.application = application;
mConfig = config;
}
public PackageList(ReactNativeHost reactNativeHost, MainPackageConfig config) {
this.reactNativeHost = reactNativeHost;
mConfig = config;
}
private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
}
public PackageList(Application application, MainPackageConfig config) {
this.reactNativeHost = null;
this.application = application;
mConfig = config;
}
private Resources getResources() {
return this.getApplication().getResources();
}
private ReactNativeHost getReactNativeHost() {
return this.reactNativeHost;
}
private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}
private Resources getResources() {
return this.getApplication().getResources();
}
private Context getApplicationContext() {
return this.getApplication().getApplicationContext();
}
private Application getApplication() {
if (this.reactNativeHost == null) return this.application;
return this.reactNativeHost.getApplication();
}
public ArrayList<ReactPackage> getPackages() {
return new ArrayList<>(Arrays.<ReactPackage>asList(
new MainReactPackage(mConfig),
new APackage(),
new AnotherPackage()
));
}
}
"""
private Context getApplicationContext() {
return this.getApplication().getApplicationContext();
}
public ArrayList<ReactPackage> getPackages() {
return new ArrayList<>(Arrays.<ReactPackage>asList(
new MainReactPackage(mConfig),
new APackage(),
new AnotherPackage()
));
}
}
"""
.trimIndent()
)
}
@@ -34,9 +34,9 @@ class AgpConfiguratorUtilsTest {
writeText(
// language=xml
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
"""
.trimIndent()
)
}
@@ -53,9 +53,9 @@ class AgpConfiguratorUtilsTest {
writeText(
// language=xml
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.react" >
</manifest>
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.react" >
</manifest>
"""
.trimIndent()
)
}
@@ -549,9 +549,9 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
VERSION_NAME=1000.0.0
ANOTHER_PROPERTY=true
"""
VERSION_NAME=1000.0.0
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -560,9 +560,9 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
HERMES_V1_VERSION_NAME=1000.0.0
ANOTHER_PROPERTY=true
"""
HERMES_V1_VERSION_NAME=1000.0.0
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -583,11 +583,11 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
VERSION_NAME=0.0.0-20221101-2019-cfe811ab1
HERMES_VERSION_NAME=0.12.0-commitly-20221101-2019-cfe811ab1
HERMES_V1_VERSION_NAME=250829098.0.0-stable
ANOTHER_PROPERTY=true
"""
VERSION_NAME=0.0.0-20221101-2019-cfe811ab1
HERMES_VERSION_NAME=0.12.0-commitly-20221101-2019-cfe811ab1
HERMES_V1_VERSION_NAME=250829098.0.0-stable
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -596,9 +596,9 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
HERMES_V1_VERSION_NAME=250829098.0.0-stable
ANOTHER_PROPERTY=true
"""
HERMES_V1_VERSION_NAME=250829098.0.0-stable
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -619,8 +619,8 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
ANOTHER_PROPERTY=true
"""
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -629,8 +629,8 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
ANOTHER_PROPERTY=true
"""
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -650,9 +650,9 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
VERSION_NAME=
ANOTHER_PROPERTY=true
"""
VERSION_NAME=
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -661,9 +661,9 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -683,10 +683,10 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
react.internal.publishingGroup=io.github.test
react.internal.hermesPublishingGroup=io.github.test
ANOTHER_PROPERTY=true
"""
react.internal.publishingGroup=io.github.test
react.internal.hermesPublishingGroup=io.github.test
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -695,9 +695,9 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -716,8 +716,8 @@ class DependencyUtilsTest {
tempFolder.newFile("gradle.properties").apply {
writeText(
"""
ANOTHER_PROPERTY=true
"""
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -726,9 +726,9 @@ class DependencyUtilsTest {
tempFolder.newFile("version.properties").apply {
writeText(
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
HERMES_V1_VERSION_NAME=
ANOTHER_PROPERTY=true
"""
.trimIndent()
)
}
@@ -165,8 +165,8 @@ class PathUtilsTest {
@Test
@WithOs(OS.MAC)
fun detectOSAwareHermesCommand_withHermesV1Enabled() {
tempFolder.newFolder("node_modules/hermes-compiler/osx-bin/")
val expected = tempFolder.newFile("node_modules/hermes-compiler/osx-bin/hermesc")
tempFolder.newFolder("node_modules/hermes-compiler/hermesc/osx-bin/")
val expected = tempFolder.newFile("node_modules/hermes-compiler/hermesc/osx-bin/hermesc")
assertThat(detectOSAwareHermesCommand(tempFolder.root, "", hermesV1Enabled = true))
.isEqualTo(expected.toString())
@@ -320,11 +320,11 @@ class PathUtilsTest {
writeText(
// language=json
"""
{
"name": "a-library",
"codegenConfig": {}
}
"""
{
"name": "a-library",
"codegenConfig": {}
}
"""
.trimIndent()
)
}
@@ -150,11 +150,11 @@ class ProjectUtilsTest {
writeText(
// language=json
"""
{
"name": "a-library",
"codegenConfig": {}
}
"""
{
"name": "a-library",
"codegenConfig": {}
}
"""
.trimIndent()
)
}
@@ -170,10 +170,10 @@ class ProjectUtilsTest {
writeText(
// language=json
"""
{
"name": "a-library"
}
"""
{
"name": "a-library"
}
"""
.trimIndent()
)
}
@@ -238,30 +238,30 @@ class ReactSettingsExtensionTest {
File(generatedFolder, "autolinking.json").apply {
writeText(
"""
{
"root": "/",
"reactNativePath": "/node_modules/react-native",
"reactNativeVersion": "0.75",
"dependencies": {},
"healthChecks": [],
"platforms": {
"ios": {},
"android": {}
},
"assets": [],
"project": {
"ios": {},
"android": {
"sourceDir": "/",
"appName": "app",
"packageName": "com.TestApp",
"applicationId": "com.TestApp",
"mainActivity": ".MainActivity",
"assets": []
}
}
}
"""
{
"root": "/",
"reactNativePath": "/node_modules/react-native",
"reactNativeVersion": "0.75",
"dependencies": {},
"healthChecks": [],
"platforms": {
"ios": {},
"android": {}
},
"assets": [],
"project": {
"ios": {},
"android": {
"sourceDir": "/",
"appName": "app",
"packageName": "com.TestApp",
"applicationId": "com.TestApp",
"mainActivity": ".MainActivity",
"assets": []
}
}
}
"""
.trimIndent()
)
}
@@ -309,13 +309,13 @@ class ReactSettingsExtensionTest {
File(generatedFolder, "autolinking.json").apply {
writeText(
"""
{
"project": {
"ios": {},
"android": {}
}
}
"""
{
"project": {
"ios": {},
"android": {}
}
}
"""
.trimIndent()
)
}
@@ -197,10 +197,10 @@ class JsonUtilsTest {
val validJson =
createJsonFile(
"""
> AwesomeProject@0.0.1 npx
> rnc-cli config
{
"reactNativeVersion": "1000.0.0",
"project": {
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,9 +26,9 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.82.0-main",
"@react-native/metro-babel-transformer": "0.82.0-main",
"metro-config": "^0.83.1",
"metro-runtime": "^0.83.1"
"@react-native/js-polyfills": "0.83.0-main",
"@react-native/metro-babel-transformer": "0.83.0-main",
"metro-config": "^0.83.3",
"metro-runtime": "^0.83.3"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/new-app-screen",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "NewAppScreen component for React Native",
"keywords": [
"react-native"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Babel preset for React Native applications",
"repository": {
"type": "git",
@@ -66,7 +66,7 @@
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@babel/template": "^7.25.0",
"@react-native/babel-plugin-codegen": "0.82.0-main",
"@react-native/babel-plugin-codegen": "0.83.0-main",
"babel-plugin-syntax-hermes-parser": "0.32.0",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
+30
View File
@@ -10,11 +10,41 @@
'use strict';
const {version: packageVersion} = require('../package.json');
const main = require('./configs/main');
module.exports = function (babel, options) {
return main(options);
};
let cacheKey;
module.exports.getCacheKey = () => {
if (cacheKey != null) {
// Memoize
return cacheKey;
}
if (!packageVersion.endsWith('-main')) {
// Assume the integrity of package contents for published npm releases.
cacheKey = packageVersion;
return cacheKey;
}
// For anyone working with a `-main` version, contents may vary over time
// even though the version does not. Hash the relevant contents of this
// package. Lazy-load dependencies we only need on this slow path.
const {createHash} = require('crypto');
const {readFileSync} = require('fs');
const key = createHash('md5');
[
readFileSync(__filename),
readFileSync(require.resolve('./configs/main.js')),
readFileSync(require.resolve('./configs/hmr.js')),
readFileSync(require.resolve('./configs/lazy-imports.js')),
readFileSync(require.resolve('./passthrough-syntax-plugins.js')),
readFileSync(require.resolve('./plugin-warn-on-deep-imports.js')),
].forEach(part => key.update(part));
cacheKey = key.digest('hex');
return cacheKey;
};
module.exports.getPreset = main.getPreset;
module.exports.passthroughSyntaxPlugins = require('./passthrough-syntax-plugins');
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Babel transformer for React Native applications.",
"repository": {
"type": "git",
@@ -27,7 +27,7 @@
],
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.82.0-main",
"@react-native/babel-preset": "0.83.0-main",
"hermes-parser": "0.32.0",
"nullthrows": "^1.1.1"
},
+2 -1
View File
@@ -23,13 +23,14 @@ import type {
*/
const {parseSync, transformFromAstSync} = require('@babel/core');
const {getCacheKey: getPresetCacheKey} = require('@react-native/babel-preset');
const makeHMRConfig = require('@react-native/babel-preset/src/configs/hmr');
const crypto = require('crypto');
const fs = require('fs');
const nullthrows = require('nullthrows');
const path = require('path');
const cacheKeyParts = [fs.readFileSync(__filename)];
const cacheKeyParts = [getPresetCacheKey(), fs.readFileSync(__filename)];
// TS detection conditions copied from @react-native/babel-preset
function isTypeScriptSource(fileName /*: string */) {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -47,7 +47,7 @@ function combineSchemas(
}
return merged;
},
{modules: {}},
{modules: {} /*:: as SchemaType['modules'] */},
);
return {
@@ -540,7 +540,7 @@ function buildEventEmitterSchema(
return {
name: eventemitterName,
optional: false,
optional: Boolean(property.optional),
typeAnnotation: {
type: 'EventEmitterTypeAnnotation',
typeAnnotation: eventTypeAnnotation,
@@ -1,6 +1,6 @@
{
"name": "@react-native/compatibility-check",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
"license": "MIT",
"repository": {
@@ -29,7 +29,7 @@
"dist"
],
"dependencies": {
"@react-native/codegen": "0.82.0-main"
"@react-native/codegen": "0.83.0-main"
},
"devDependencies": {
"flow-remove-types": "^2.237.2",
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -21,7 +21,7 @@
},
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.82.0-main"
"@react-native/codegen": "0.83.0-main"
},
"peerDependencies": {
"@types/react": "^19.1.0",
@@ -873,56 +873,6 @@ describe('Animated', () => {
});
});
describe('Animated Interactions', () => {
let Animated; // eslint-disable-line no-shadow
let InteractionManager;
beforeEach(() => {
jest.mock('../../Interaction/InteractionManager');
Animated = require('../Animated').default;
InteractionManager =
require('../../Interaction/InteractionManager').default;
});
afterEach(() => {
jest.unmock('../../Interaction/InteractionManager');
});
it('registers an interaction by default', () => {
// $FlowFixMe[prop-missing]
InteractionManager.createInteractionHandle.mockReturnValue(777);
const value = new Animated.Value(0);
const callback = jest.fn();
Animated.timing(value, {
toValue: 100,
duration: 100,
useNativeDriver: false,
}).start(callback);
jest.runAllTimers();
expect(InteractionManager.createInteractionHandle).toBeCalled();
expect(InteractionManager.clearInteractionHandle).toBeCalledWith(777);
expect(callback).toBeCalledWith({finished: true});
});
it('does not register an interaction when specified', () => {
const value = new Animated.Value(0);
const callback = jest.fn();
Animated.timing(value, {
toValue: 100,
duration: 100,
isInteraction: false,
useNativeDriver: false,
}).start(callback);
jest.runAllTimers();
expect(InteractionManager.createInteractionHandle).not.toBeCalled();
expect(InteractionManager.clearInteractionHandle).not.toBeCalled();
expect(callback).toBeCalledWith({finished: true});
});
});
describe('Animated Tracking', () => {
it('should track values', () => {
const value1 = new Animated.Value(0);
@@ -0,0 +1,75 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @fantom_flags useSharedAnimatedBackend:true
* @flow strict-local
* @format
*/
import '@react-native/fantom/src/setUpDefaultReactNativeEnvironment';
import type {HostInstance} from 'react-native';
import ensureInstance from '../../../src/private/__tests__/utilities/ensureInstance';
import * as Fantom from '@react-native/fantom';
import {createRef} from 'react';
import {Animated, useAnimatedValue} from 'react-native';
import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement';
test('animated opacity', () => {
let _opacity;
let _opacityAnimation;
const viewRef = createRef<HostInstance>();
function MyApp() {
const opacity = useAnimatedValue(1);
_opacity = opacity;
return (
<Animated.View
ref={viewRef}
style={[
{
width: 100,
height: 100,
opacity: opacity,
},
]}
/>
);
}
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<MyApp />);
});
const viewElement = ensureInstance(viewRef.current, ReactNativeElement);
expect(viewElement.getBoundingClientRect().x).toBe(0);
Fantom.runTask(() => {
_opacityAnimation = Animated.timing(_opacity, {
toValue: 0,
duration: 30,
useNativeDriver: true,
}).start();
});
Fantom.unstable_produceFramesForDuration(30);
expect(Fantom.unstable_getDirectManipulationProps(viewElement).opacity).toBe(
0,
);
// TODO: this shouldn't be neccessary since animation should be stopped after duration
Fantom.runTask(() => {
_opacityAnimation?.stop();
});
expect(root.getRenderedOutput({props: ['opacity']}).toJSX()).toEqual(
<rn-view opacity="0" />,
);
});
@@ -14,8 +14,10 @@ import FlatList, {type FlatListProps} from '../../Lists/FlatList';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
// $FlowExpectedError[unclear-type]
export default (createAnimatedComponent(FlatList): component<ItemT = any>(
export default createAnimatedComponent(FlatList) as $FlowFixMe as component<
// $FlowExpectedError[unclear-type]
ItemT = any,
>(
ref?: React.RefSetter<FlatList<ItemT>>,
...props: AnimatedProps<FlatListProps<ItemT>>
));
);
@@ -14,9 +14,10 @@ import Image from '../../Image/Image';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(
(Image: $FlowFixMe),
): AnimatedComponentType<
export default (createAnimatedComponent<
$FlowFixMe,
React.ElementRef<typeof Image>,
>((Image: $FlowFixMe)): AnimatedComponentType<
React.ElementConfig<typeof Image>,
React.ElementRef<typeof Image>,
>);
@@ -15,7 +15,7 @@ import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
// $FlowFixMe[incompatible-type]
export default (createAnimatedComponent(SectionList): component<
export default createAnimatedComponent(SectionList) as $FlowFixMe as component<
// $FlowExpectedError[unclear-type]
ItemT = any,
// $FlowExpectedError[unclear-type]
@@ -23,4 +23,4 @@ export default (createAnimatedComponent(SectionList): component<
>(
ref?: React.RefSetter<SectionList<ItemT, SectionT>>,
...props: AnimatedProps<SectionListProps<ItemT, SectionT>>
));
);
@@ -14,6 +14,10 @@ import Text, {type TextProps} from '../../Text/Text';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(
(Text: $FlowFixMe),
): AnimatedComponentType<TextProps, React.ElementRef<typeof Text>>);
export default (createAnimatedComponent<
$FlowFixMe,
React.ElementRef<typeof Text>,
>((Text: $FlowFixMe)): AnimatedComponentType<
TextProps,
React.ElementRef<typeof Text>,
>);
@@ -15,7 +15,8 @@ import View from '../../Components/View/View';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(View): AnimatedComponentType<
// $FlowFixMe[incompatible-type]
export default createAnimatedComponent(View) as AnimatedComponentType<
ViewProps,
React.ElementRef<typeof View>,
>);
>;
@@ -63,17 +63,29 @@ type PassThroughProps = $ReadOnly<{
passthroughAnimatedPropExplicitValues?: ViewProps | null,
}>;
export type AnimatedProps<Props: {...}> = {
[K in keyof Props]: K extends NonAnimatedProps
? Props[K]
: WithAnimatedValue<Props[K]>,
} & PassThroughProps;
type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
O,
Exclude<$Keys<O>, K>,
>;
export type AnimatedBaseProps<Props: {...}> = {
[K in keyof Props]: K extends NonAnimatedProps
? Props[K]
: WithAnimatedValue<Props[K]>,
};
export type AnimatedProps<Props: {...}> = LooseOmit<
{
[K in keyof Props]: K extends NonAnimatedProps
? Props[K]
: WithAnimatedValue<Props[K]>,
},
'ref',
> &
PassThroughProps;
export type AnimatedBaseProps<Props: {...}> = LooseOmit<
{
[K in keyof Props]: K extends NonAnimatedProps
? Props[K]
: WithAnimatedValue<Props[K]>,
},
'ref',
>;
export type AnimatedComponentType<Props: {...}, +Instance = mixed> = component(
ref?: React.RefSetter<Instance>,
@@ -85,7 +97,7 @@ export default function createAnimatedComponent<
>(
Component: TInstance,
): AnimatedComponentType<
$ReadOnly<React.ElementProps<TInstance>>,
$ReadOnly<React.ElementConfig<TInstance>>,
React.ElementRef<TInstance>,
> {
return unstable_createAnimatedComponentWithAllowlist(Component, null);
@@ -18,7 +18,6 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
import type AnimatedTracking from './AnimatedTracking';
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
import InteractionManager from '../../Interaction/InteractionManager';
import AnimatedInterpolation from './AnimatedInterpolation';
import AnimatedWithChildren from './AnimatedWithChildren';
@@ -312,10 +311,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
* See https://reactnative.dev/docs/animatedvalue#animate
*/
animate(animation: Animation, callback: ?EndCallback): void {
let handle = null;
if (animation.__isInteraction) {
handle = InteractionManager.createInteractionHandle();
}
const previousAnimation = this._animation;
this._animation && this._animation.stop();
this._animation = animation;
@@ -328,9 +323,6 @@ export default class AnimatedValue extends AnimatedWithChildren {
},
result => {
this._animation = null;
if (handle !== null) {
InteractionManager.clearInteractionHandle(handle);
}
callback && callback(result);
},
previousAnimation,
@@ -24,6 +24,7 @@
@class RCTBridge;
@protocol RCTComponentViewProtocol;
@class RCTSurfacePresenterBridgeAdapter;
@class RCTDevMenuConfiguration;
NS_ASSUME_NONNULL_BEGIN
@@ -116,6 +117,8 @@ typedef NS_ENUM(NSInteger, RCTReleaseLevel) { Canary, Experimental, Stable };
@property (nonatomic, weak) id<RCTReactNativeFactoryDelegate> delegate;
@property (nonatomic, nullable) RCTDevMenuConfiguration *devMenuConfiguration;
@end
NS_ASSUME_NONNULL_END
@@ -7,6 +7,7 @@
#import "RCTReactNativeFactory.h"
#import <React/RCTColorSpaceUtils.h>
#import <React/RCTDevMenu.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
@@ -82,7 +83,8 @@ using namespace facebook::react;
{
UIView *rootView = [self.rootViewFactory viewWithModuleName:moduleName
initialProperties:initialProperties
launchOptions:launchOptions];
launchOptions:launchOptions
devMenuConfiguration:self.devMenuConfiguration];
UIViewController *rootViewController = [_delegate createRootViewController];
[_delegate setRootView:rootView toRootViewController:rootViewController];
window.rootViewController = rootViewController;
@@ -18,6 +18,7 @@
@class RCTHost;
@class RCTRootView;
@class RCTSurfacePresenterBridgeAdapter;
@class RCTDevMenuConfiguration;
NS_ASSUME_NONNULL_BEGIN
@@ -201,7 +202,13 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
* @parameter: moduleName - the name of the app, used by Metro to resolve the module.
* @parameter: initialProperties - a set of initial properties.
* @parameter: launchOptions - a dictionary with a set of options.
* @parameter: devMenuConfiguration - a configuration for enabling/disabling dev menu.
*/
- (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName
initialProperties:(NSDictionary *__nullable)initialProperties
launchOptions:(NSDictionary *__nullable)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *__nullable)devMenuConfiguration;
- (UIView *_Nonnull)viewWithModuleName:(NSString *)moduleName
initialProperties:(NSDictionary *__nullable)initialProperties
launchOptions:(NSDictionary *__nullable)launchOptions;
@@ -219,11 +226,16 @@ typedef void (^RCTLoadSourceForBridgeBlock)(RCTBridge *bridge, RCTSourceLoadBloc
* Use it to speed up later viewWithModuleName: calls.
*
* @parameter: launchOptions - a dictionary with a set of options.
* @parameter: devMenuConfiguration - a configuration for enabling/disabling dev menu.
*/
- (void)initializeReactHostWithLaunchOptions:(NSDictionary *__nullable)launchOptions;
- (void)initializeReactHostWithLaunchOptions:(NSDictionary *__nullable)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration;
- (RCTHost *)createReactHost:(NSDictionary *__nullable)launchOptions;
- (RCTHost *)createReactHost:(NSDictionary *__nullable)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *__nullable)devMenuConfiguration;
@end
NS_ASSUME_NONNULL_END
@@ -7,6 +7,7 @@
#import "RCTRootViewFactory.h"
#import <React/RCTCxxBridgeDelegate.h>
#import <React/RCTDevMenu.h>
#import <React/RCTLog.h>
#import <React/RCTRootView.h>
#import <React/RCTSurfacePresenterBridgeAdapter.h>
@@ -133,29 +134,47 @@
- (UIView *)viewWithModuleName:(NSString *)moduleName initialProperties:(NSDictionary *)initialProperties
{
return [self viewWithModuleName:moduleName initialProperties:initialProperties launchOptions:nil];
return [self viewWithModuleName:moduleName
initialProperties:initialProperties
launchOptions:nil
devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
}
- (UIView *)viewWithModuleName:(NSString *)moduleName
{
return [self viewWithModuleName:moduleName initialProperties:nil launchOptions:nil];
return [self viewWithModuleName:moduleName
initialProperties:nil
launchOptions:nil
devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
}
- (void)initializeReactHostWithLaunchOptions:(NSDictionary *)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
{
// Enable TurboModule interop by default in Bridgeless mode
RCTEnableTurboModuleInterop(YES);
RCTEnableTurboModuleInteropBridgeProxy(YES);
[self createReactHostIfNeeded:launchOptions];
[self createReactHostIfNeeded:launchOptions devMenuConfiguration:devMenuConfiguration];
return;
}
- (UIView *)viewWithModuleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initialProperties
launchOptions:(NSDictionary *)launchOptions
{
return [self viewWithModuleName:moduleName
initialProperties:initialProperties
launchOptions:launchOptions
devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
}
- (UIView *)viewWithModuleName:(NSString *)moduleName
initialProperties:(NSDictionary *)initProps
launchOptions:(NSDictionary *)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
{
[self initializeReactHostWithLaunchOptions:launchOptions];
[self initializeReactHostWithLaunchOptions:launchOptions devMenuConfiguration:devMenuConfiguration];
RCTFabricSurface *surface = [self.reactHost createSurfaceWithModuleName:moduleName
initialProperties:initProps ? initProps : @{}];
@@ -226,14 +245,21 @@
#pragma mark - New Arch Utilities
- (void)createReactHostIfNeeded:(NSDictionary *)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
{
if (self.reactHost) {
return;
}
self.reactHost = [self createReactHost:launchOptions];
self.reactHost = [self createReactHost:launchOptions devMenuConfiguration:devMenuConfiguration];
}
- (RCTHost *)createReactHost:(NSDictionary *)launchOptions
{
return [self createReactHost:launchOptions devMenuConfiguration:[RCTDevMenuConfiguration defaultConfiguration]];
}
- (RCTHost *)createReactHost:(NSDictionary *)launchOptions
devMenuConfiguration:(RCTDevMenuConfiguration *)devMenuConfiguration
{
__weak __typeof(self) weakSelf = self;
RCTHost *reactHost =
@@ -243,7 +269,8 @@
jsEngineProvider:^std::shared_ptr<facebook::react::JSRuntimeFactory>() {
return [weakSelf createJSRuntimeFactory];
}
launchOptions:launchOptions];
launchOptions:launchOptions
devMenuConfiguration:devMenuConfiguration];
[reactHost setBundleURLProvider:^NSURL *() {
return [weakSelf bundleURL];
}];
@@ -49,7 +49,7 @@ export interface RefreshControlPropsAndroid extends ViewProps {
/**
* Size of the refresh indicator, see RefreshControl.SIZE.
*/
size?: number | undefined;
size?: 'default' | 'large' | undefined;
}
export interface RefreshControlProps
@@ -1690,6 +1690,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
return (
<StickyHeaderComponent
key={key}
/* $FlowFixMe[incompatible-type] */
ref={ref => this._setStickyHeaderRef(key, ref)}
nextHeaderLayoutY={this._headerLayoutYs.get(
this._getKeyForIndex(nextIndex, children),
@@ -44,7 +44,7 @@ interface Instance extends React.ElementRef<typeof Animated.View> {
}
const ScrollViewStickyHeader: component(
ref: React.RefSetter<Instance>,
ref?: React.RefSetter<Instance>,
...props: ScrollViewStickyHeaderProps
) = function ScrollViewStickyHeader({
ref: forwardedRef,
@@ -282,7 +282,7 @@ const ScrollViewStickyHeader: component(
const passthroughAnimatedPropExplicitValues =
isFabric && translateY != null
? {
style: {transform: [{translateY: translateY}]},
style: {transform: [{translateY}]},
}
: null;
@@ -303,20 +303,20 @@ const ScrollViewStickyHeader: component(
passthroughAnimatedPropExplicitValues
}>
{cloneElement(child, {
style: styles.fill, // We transfer the child style to the wrapper.
onLayout: undefined, // we call this manually through our this._onLayout
style: styles.fill, // We transfer the child style to the wrapper.
})}
</Animated.View>
);
};
const styles = StyleSheet.create({
header: {
zIndex: 10,
},
fill: {
flex: 1,
},
header: {
zIndex: 10,
},
});
export default ScrollViewStickyHeader;
@@ -47,15 +47,14 @@ class TouchableBounce extends React.Component<
_createPressabilityConfig(): PressabilityConfig {
return {
android_disableSound: this.props.touchSoundDisabled,
cancelable: !this.props.rejectResponderTermination,
disabled: this.props.disabled,
hitSlop: this.props.hitSlop,
delayLongPress: this.props.delayLongPress,
delayPressIn: this.props.delayPressIn,
delayPressOut: this.props.delayPressOut,
disabled: this.props.disabled,
hitSlop: this.props.hitSlop,
minPressDuration: 0,
pressRectOffset: this.props.pressRetentionOffset,
android_disableSound: this.props.touchSoundDisabled,
onBlur: event => {
if (Platform.isTV) {
this._bounceTo(1, 0.4, 0);
@@ -113,6 +112,7 @@ class TouchableBounce extends React.Component<
this.props.onPressOut(event);
}
},
pressRectOffset: this.props.pressRetentionOffset,
};
}
@@ -123,10 +123,10 @@ class TouchableBounce extends React.Component<
callback?: ?() => void,
) {
Animated.spring(this.state.scale, {
toValue,
velocity,
bounciness,
toValue,
useNativeDriver: true,
velocity,
}).start(callback);
}
@@ -230,6 +230,6 @@ export default (function TouchableBounceWrapper({
}) {
return <TouchableBounce {...props} hostRef={hostRef} />;
} as component(
ref: React.RefSetter<mixed>,
ref?: React.RefSetter<mixed>,
...props: $ReadOnly<Omit<TouchableBounceProps, 'hostRef'>>
));
@@ -21,12 +21,14 @@ const ViewNativeComponent: HostComponent<Props> =
}));
interface NativeCommands {
+focus: () => void;
+blur: () => void;
+hotspotUpdate: (viewRef: HostInstance, x: number, y: number) => void;
+setPressed: (viewRef: HostInstance, pressed: boolean) => void;
}
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate', 'setPressed'],
supportedCommands: ['focus', 'blur', 'hotspotUpdate', 'setPressed'],
});
/**
+21 -21
View File
@@ -39,6 +39,24 @@ function DebuggingOverlay({
useImperativeHandle(
ref,
() => ({
clearElementsHighlight() {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.clearElementsHighlights(nativeComponentRef.current);
}
},
highlightElements(elements) {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.highlightElements(nativeComponentRef.current, elements);
}
},
highlightTraceUpdates(updates) {
if (!isNativeComponentReady) {
return;
@@ -55,24 +73,6 @@ function DebuggingOverlay({
);
}
},
highlightElements(elements) {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.highlightElements(nativeComponentRef.current, elements);
}
},
clearElementsHighlight() {
if (!isNativeComponentReady) {
return;
}
if (nativeComponentRef.current != null) {
Commands.clearElementsHighlights(nativeComponentRef.current);
}
},
}),
[],
);
@@ -95,14 +95,14 @@ function DebuggingOverlay({
const styles = StyleSheet.create({
overlay: {
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
position: 'absolute',
right: 0,
top: 0,
},
});
export default DebuggingOverlay as component(
ref: React.RefSetter<DebuggingOverlayHandle>,
ref?: React.RefSetter<DebuggingOverlayHandle>,
);
+3 -6
View File
@@ -8,11 +8,8 @@
* @format
*/
import type {
AbstractImageAndroid,
AbstractImageIOS,
ImageType as ImageComponent,
} from './ImageTypes.flow';
import type {HostInstance} from '../..';
import type {AbstractImageAndroid, AbstractImageIOS} from './ImageTypes.flow';
import useMergeRefs from '../Utilities/useMergeRefs';
import * as React from 'react';
@@ -33,7 +30,7 @@ export function unstable_getImageComponentDecorator(): ?ImageComponentDecorator
return injectedImageComponentDecorator;
}
type ImageInstance = React.ElementRef<ImageComponent>;
type ImageInstance = HostInstance;
type ImageAttachedCallback = (
imageInstance: ImageInstance,
@@ -8,12 +8,11 @@
* @format
*/
import type {HostInstance} from '../..';
import type {RootTag} from '../Types/RootTagTypes';
import type {ResolvedAssetSource} from './AssetSourceResolver';
import type {ImageProps as ImagePropsType} from './ImageProps';
import type {ImageSource} from './ImageSource';
import typeof ImageViewNativeComponent from './ImageViewNativeComponent';
import typeof TextInlineImageNativeComponent from './TextInlineImageNativeComponent';
import * as React from 'react';
@@ -67,17 +66,14 @@ type ImageComponentStaticsAndroid = $ReadOnly<{
}>;
export type AbstractImageAndroid = component(
ref?: React.RefSetter<
| React.ElementRef<TextInlineImageNativeComponent>
| React.ElementRef<ImageViewNativeComponent>,
>,
ref?: React.RefSetter<HostInstance>,
...props: ImagePropsType
);
export type ImageAndroid = AbstractImageAndroid & ImageComponentStaticsAndroid;
export type AbstractImageIOS = component(
ref?: React.RefSetter<React.ElementRef<ImageViewNativeComponent>>,
ref?: React.RefSetter<HostInstance>,
...props: ImagePropsType
);

Some files were not shown because too many files have changed in this diff Show More