Commit Graph

12270 Commits

Author SHA1 Message Date
Mateo Guzmán c62d9527b4 Reland: Migrate PromiseImpl to Kotlin (#51273)
Summary:
Reland of https://github.com/facebook/react-native/pull/51241, which had to be reverted due to a crash.

Migrate com.facebook.react.bridge.PromiseImpl to Kotlin.

In this diff, nothing has changed yet as from the original PR. Awaiting for next steps to apply new changes https://github.com/facebook/react-native/pull/51241#issuecomment-2873363651

## Changelog:

[INTERNAL] - Migrate com.facebook.react.bridge.PromiseImpl to Kotlin

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

Test Plan:
Tested on IGVR here:
https://www.internalfb.com/intern/px/p/7j3zC

Reviewed By: mdvacca, cortinico

Differential Revision: D74645262

Pulled By: javache

fbshipit-source-id: 9d9a439a2e5867a3c7a114cd34277cd59fec864c
2025-05-27 05:53:23 -07:00
Nicola Corti c059ae1b77 Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets (#51619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51619

RNTester Android is currently instacrashing in OSS due to 3rd-party packages not having the `RN_SERIALIZABLE_STATE` definition.
That's because the `INTERFACE` definition is not properly propagated on the prefab boundaries.

This was happening for `react-native-popup-menu-android` and `react-native-test-library` and will also happen for Codegen libraries.

This fixes it. 3p developers with custom CMake files will also have to use the `target_compile_reactnative_options` functions to make sure the compilation flag are properly populated.

Changelog:
[Android] [Breaking] - Correctly propagate RN_SERIALIZABLE_STATE to 3rd party CMake targets. Users with custom CMake and C++ code should update to use `target_compile_reactnative_options` inside their CMakeLists.txt files. See the 0.81 release notes for more information.

Reviewed By: cipolleschi

Differential Revision: D75441245

fbshipit-source-id: 3855fdf11cbe7f4b01f68e0dde68b63b3240ad35
2025-05-27 05:33:16 -07:00
Rubén Norte 017b2d0186 Clean up compatibility code for MutationObserver (#51309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51309

Changelog: [internal]

Clean up old compatibility code for when NativeMutationObserver.unobserveAll isn't available.

Reviewed By: lenaic

Differential Revision: D74313204

fbshipit-source-id: ef057884236563cc9592c9954d4e3edd24df74eb
2025-05-27 05:05:26 -07:00
Samuel Susla c59a532950 mark methods as const in nodes (#51617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51617

changelog: [internal]

mark more methods as const and noexcept.

Reviewed By: mdvacca

Differential Revision: D75218535

fbshipit-source-id: 7ba5f2144e2db2fd1befbe28d807abd669188339
2025-05-27 04:25:24 -07:00
Samuel Susla 8e8267de1b remove unused getter method from NativeAnimatedNodesManagerProvider (#51616)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51616

changelog: [internal]

doesn't seem to be used by anything. let's delete it.

Reviewed By: javache

Differential Revision: D75218695

fbshipit-source-id: eeb3a826f06456be8de6941fa95d6ffc7917dcf8
2025-05-27 04:25:24 -07:00
Samuel Susla d7f94af5cb rename getters and mark them as const+noexcept in ValueAnimatedNode (#51615)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51615

changelog: [internal]

rename methods to reflect that they are getters and mark them as noexcept const

Reviewed By: rshest

Differential Revision: D75217535

fbshipit-source-id: c7d77060d0f54f8043a7552eec7e2b231cb5b7bf
2025-05-27 04:25:24 -07:00
Rubén Norte 77c860898e Fix missing willPerformAsynchronously parameter in calls to MountingCoordinator::pullTransaction (#51618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51618

Changelog: [internal]

This sets the argument to `pullTransaction` to `true` in the cases where the call is done from the JS thread and the transactions are mounted asynchronously in the UI thread (basically platforms using the push model for mounting coordinator).

It was missing on an experiment for Android (compatibility mode for Props 2.0)

Reviewed By: lenaic

Differential Revision: D75439105

fbshipit-source-id: a106a3a674e44b0cf2603782302343f60ee5450e
2025-05-27 04:17:13 -07:00
Riccardo Cipolleschi 69826e1f11 Fix nightlies by backing out "[RN][iOS] Decouple Hermes from JSI nd simplify dependencies" (#51620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51620

The spirit of "Decouple Hermes from JSI nd simplify dependencies" is good, but the problem is that when we ships prebuilds of hermes-engine, it tries to load `libjsi.dylib` and that library is not available.

{F1978594163}

I'll have to investigate more how to properly decouple Hermes prebuilds and how to pass jsi to Hermes and react-native. We might have to decouple it further and have a separate job that builds jsi and feed it to hermes.

This problem will go away with SwiftPM, though, so probably not worth solving this.

## Changelog:
[Internal] - Fix nightlies with a backout

Reviewed By: cortinico

Differential Revision: D75442056

fbshipit-source-id: f1085be8247c0974854254c6bd631ca258488beb
2025-05-27 03:10:40 -07:00
Dawid Małecki 9cdd0db138 Remove JSEventLoopWatchdog from react-native package (#51614)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51614

`JSEventLoopWatchdog` is not used in react-native package. This diff moves it to rn-tester which previously deep imported it from react-native (which we want to avoid).

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75410548

fbshipit-source-id: d4996742578e3b068e7acad9479394388b1907ac
2025-05-27 03:10:14 -07:00
Dawid Małecki b34e56259a Remove TextAncestor import from rn-tester TextExample (#51603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51603

In `rn-tester` TextAncestor was used to create a inlineView wrapper:

```js
function InlineView(props) {
  return (
    <TextAncestor.Provider value={false}>
      <View {...props} />
    </TextAncestor.Provider>
  );
}
```

however, it is already done in View.js and TextAncestor shouldn't be used outside of react-native package:

```js
 if (hasTextAncestor) {
    return <TextAncestor value={false}>{actualView}</TextAncestor>;
  }
  return actualView;
```

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75408231

fbshipit-source-id: 7f12278296dcfe56246f6b7065f5a094e4099f7a
2025-05-27 01:21:17 -07:00
Jakub Piasecki 9be5ac1010 Update types of Animated FlatList and SectionList (#51602)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51602

Changelog: [GENERAL][FIXED] - Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types.

Current definitions for animated list components cast away their generic definitions, preventing the types to be inferred from usage. This diff addresses that.

Reviewed By: huntie

Differential Revision: D75407762

fbshipit-source-id: c86f20298ded707971c05a78d025a63e82fe2a64
2025-05-26 23:55:12 -07:00
Samuel Susla 6c053006b8 remove superclass enable_shared_from_this from AnimationDriver (#51611)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51611

changelog: [internal]

AnimationDriver does not use enable_shared_from_this, let's remove it. Also mark a few methods as noexcept and const.

This helps with C++ binary size.

Reviewed By: rshest

Differential Revision: D75172851

fbshipit-source-id: d6552cd577371a51c3fa3b394b451d7ed2b61e44
2025-05-26 15:03:56 -07:00
Samuel Susla 5bbf7e60a9 remove uiManagerBinding_ member variable from NativeAnimatedNodesManagerProvider (#51610)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51610

changelog: [internal]

No need to store uiManagerBinding in a shared_ptr. Let's just get it, pass it to classes that need it and not store it.

This helps with C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75174567

fbshipit-source-id: 1d4e5a9f89ba2f2d2eb733eac9d103ee97550d0f
2025-05-26 15:03:56 -07:00
Samuel Susla 0c0d24080f Make NativeAnimatedNodesManagerProvider not virtual (#51609)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51609

changelog: [internal]

NativeAnimatedNodesManagerProvider is not subclassed. Let's remove virtual methods and make it a final class.

Reviewed By: lenaic

Differential Revision: D75169108

fbshipit-source-id: 32121cf372ba94c8a7b86c61fd96efd75560f789
2025-05-26 15:03:56 -07:00
Nick Lefever a314e34d6e Move Android ScrollView props to HostPlatformScrollViewProps (#51517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51517

The Props 2.0 implementation for ScrollView added two missing props which were Android specific.

This diff moves these to a separate HostPlatformScrollViewProps class so that other platforms wouldn't include them

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D75183132

fbshipit-source-id: 44d0e0aa974e69f8584ad6bd681fad100c3493d8
2025-05-26 10:54:35 -07:00
Samuel Susla 1da4abd273 use folly::dynamic without std::optional (#51605)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51605

changelog: [internal]

folly::dynamic can be constructed with nullptr and it creates a null folly::dynamic. Let's use that to indicate missing value instead of std::optional to lower C++ binary size.

Reviewed By: rshest

Differential Revision: D75174590

fbshipit-source-id: f2dfef00975686f6ac4c14b42539e700e967075b
2025-05-26 09:29:00 -07:00
Samuel Susla 53b232fd5f remove enable_shared_from_this from AnimatedModule (#51606)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51606

changelog: [internal]

When native module is destroyed, ui queue is also torn down.

this helps with C++ binary size a little bit

Reviewed By: rshest

Differential Revision: D75149437

fbshipit-source-id: 1df061db26b4fb5026114e00bbc6846bf38d83a9
2025-05-26 09:29:00 -07:00
Samuel Susla c653eea19d remove unimplemented methods (#51607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51607

changelog: [internal]

remove methods that are not implemented yet.

Reviewed By: rshest

Differential Revision: D75148726

fbshipit-source-id: c01002050dc9c71df559e6f89b72aeee46e3a2f6
2025-05-26 09:29:00 -07:00
Dawid Małecki 8a0cfec815 Remove infoLog invocations from react-native and rn-tester (#51600)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51600

The `infoLog` is a `console.log` wrapper to separate ad-hoc console debug logging, however console logs are already used in some files in rn-tester (ex. RNTesterAppShared.js). The same applies to files in react-native package.

Changelog:
[General][Changed] - Removed `infoLog` from react-native package

Reviewed By: huntie

Differential Revision: D75402930

fbshipit-source-id: 1a14a9122552130415f058d3647d715225321ab8
2025-05-26 08:19:05 -07:00
Nicola Corti 827a6851d0 Gradle to 8.14.1 (#51597)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51597

Bumping Gradle patch version to address this problem:
https://github.com/facebook/react-native/pull/50960#issuecomment-2906368364

Changelog:
[Android] [Changed] - Gradle to 8.14.1

Reviewed By: fabriziocucci

Differential Revision: D75401634

fbshipit-source-id: 07726f4d882a5f447cbaea11c4d159ef85fd7636
2025-05-26 07:04:40 -07:00
Ritesh Shukla d06909142a Typo correction in RCTFollyConvert.h (#51592)
Summary:
Just a minor typo correction

## Changelog:
[IOS][CHANGED] Minor typo correction in RCTFollyConvert

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D75389160

Pulled By: cipolleschi

fbshipit-source-id: 03764c82fa74c2b1b604db0d9dc4b0e1e364ac4a
2025-05-26 06:26:00 -07:00
Riccardo Cipolleschi 95304f7ac7 Decouple Hermes from JSI nd simplify dependencies (#51591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51591

This change decouples Hermes from JSI and simplify the dependency graph.

Prior to this change, Hermes was building and providing JSI to React Native.
Hermes and React Native shares the same version of JSI, so that's was not a problem, but this choice added an unnecessary dependency on hermes-engine for some pods. For example, `React-utils` was depending on hermes, although it only needs JSI.

## Changelog:
[Internal] - Decouple hermes-engine from jsi

Reviewed By: cortinico

Differential Revision: D75374285

fbshipit-source-id: 3af6846032e81b6461420dd4f4a9c34b741f31ae
2025-05-26 06:24:15 -07:00
Alex Hunt c93036ce7d Annotate deprecated APIs (#51599)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51599

Adds `deprecated` to 2x API exports via `index.js.flow`. This will flag these APIs appropriately to the developer under TypeScript.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75403796

fbshipit-source-id: 670c4bd0c262a58413e7703f09d6db2927d51408
2025-05-26 05:51:00 -07:00
Rob Hogan 8ad43da3be Update Metro imports to use package root exports (#51261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51261

Cleanup to use the new public type / API exports from `metro` landed in Metro 0.82.3, which is RN's minimum as of D74181990 / [PR](https://github.com/facebook/react-native/pull/51122), in preference to deep imports.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74141939

fbshipit-source-id: 9405f88a85e248abe8a92be1dd5a5f1ea6ceeb87
2025-05-26 04:54:26 -07:00
Alex Hunt 0e37db80f9 Delete accidentally committed helloworld test in Flow (#51598)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51598

Accidentally staged as part of D75060846. `App.test.tsx` remains.

Fixes CI.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D75402566

fbshipit-source-id: 6f698cfcd4f342591f81c308b2353e7637842e7d
2025-05-26 04:08:23 -07:00
Rob Hogan a3447d6b8b community-cli-plugin: Refactor CLI build command to use Metro.runBuild (#51124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51124

Metro 0.82.3's `runBuild` API now supports retrieving assets and passing through `unstable_transformProfile`, and fine control of output paths via `bundleOut`/`sourcemapOut`, so we can use it directly in the implementation of `community-cli-plugin`'s `bundle` command with no loss of function or API change.

This simplifies the implementation by re-using Metro's, and removes use of Metro internal APIs.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D74151840

fbshipit-source-id: 3dcadaf8d38e7e77d21bacdf29e5d40467139d88
2025-05-26 03:45:58 -07:00
Dawid Małecki 7af8c01f46 Disable deep import warning on rn-tester package (#51565)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51565

This diff silence deep import warnings globally for rn-tester package.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D75291027

fbshipit-source-id: 7b4b2fe46a5c992a420b21f09a72f17944c54f6d
2025-05-26 02:53:24 -07:00
Samuel Susla bf974e8de1 remove enable_shared_from_this from NativeAnimatedNodesManager (#51589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51589

changelog: [internal]

With D75140890, there is a guarantee that `startOnRenderCallback_` won't be called after the owning class is destroyed.

There shouldn't be any events flowing through Fabric when the RN instance is torn down. Passing this to eventEmitterListener_ should be safe.

This helps with C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75148616

fbshipit-source-id: 5110736c2ddcff738fce395bd0b9844d44e8dcb2
2025-05-25 04:20:59 -07:00
Samuel Susla 44ebf31f3b remove use of shared_ptr from AnimatedNode (#51588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51588

changelog: [internal]

AnimatedNode never outlive NativeAnimatedNodesManager. We can safely use raw pointer here instead of shared_ptr.

This improves a C++ binary size a little bit.

Reviewed By: rshest

Differential Revision: D75148487

fbshipit-source-id: 4c2f6dc6e4de670be37dd3b65dc3a8d63d546150
2025-05-25 04:20:59 -07:00
Samuel Susla 1db4874bb3 Use unique_ptr instead of shared_ptr in activeAnimations_ (#51587)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51587

changelog: [internal]

use unique_ptr instead of shared_ptr to manage memory of activeAnimations_.

Active animations are only owned by NativeAnimatedNodesManager and their ownership isn't shared with any other class.

This saves a little bit of C++ binary size.

Reviewed By: rshest

Differential Revision: D75142643

fbshipit-source-id: c09753b68e70e95fedcb7b2b8fb19a0fd7010059
2025-05-25 04:20:59 -07:00
Samuel Susla 1e31392211 remove use of shared_ptr from NativeAnimatedNodesManager::animatedNodes_ and NodesQueueItem (#51586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51586

changelog: [internal]

using shared_ptr here is not necessary because AnimatedNodes are not shared between multiple entities, they are only owned by NativeAnimatedNodesManager.

This saves a little bit C++ binary size.

Reviewed By: rshest

Differential Revision: D75148952

fbshipit-source-id: 18b8231061cda970ad96842ee6ca3135c2ec5d68
2025-05-24 16:05:01 -07:00
Samuel Susla afb543683c introduce a way to inspect shadow node revision in Fantom (#51566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51566

changelog: [internal]

Expose [revision](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/core/ShadowNode.h#L229) of shadow node in Fantom tests. This makes it possible to write tests verifying that shadow nodes are only cloned when they should.

Even though excessive cloning does not usually lead to bugs, it may lead to performance problems.

Also introduce a test showing a performance problem where changing height of "Sibling" view from 1 to 2 will lead to component `D` being cloned by Yoga. Component D is not affected by the size change of Sibling and the clone is unnecessary.

```jsx
<ScrollView>
  <View id="Sibling" style={{ height: 1 }} />
  <View id="A">
    <View id="B">
      <View id="C">
        <View id="D" ref={ref} />
      </View>
    </View>
  </View>
</ScrollView>
```

Reviewed By: rshest

Differential Revision: D75287261

fbshipit-source-id: ea5acb2f5d7ba6e1e5bf895d8f82a16471122ec5
2025-05-24 15:44:11 -07:00
Pieter De Baets ca5f4d1721 Disable enableModuleArgumentNSNullConversionIOS by default (#51576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51576

This is causing some internal test failures for now, so disabling the behaviour to prevent further rollout.

Changelog: [iOS][Removed] Disable fix for #51103 until more testing can be done.

Differential Revision: D75320842

fbshipit-source-id: 39c115afd11e5b1aca6cdc1fc18ec7e83eb10382
2025-05-23 16:05:44 -07:00
Soe Lynn b6292d2646 Remove static from the local scoped variable for getConstants - part 2 (#51573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51573

Changelog: [Internal]

Remove unnecessary `static` in a local scoped variable.

Reviewed By: RSNara

Differential Revision: D75306776

fbshipit-source-id: 52decae228c65ea993bd5fde0be66ab094c8fcf1
2025-05-23 12:02:11 -07:00
Vitali Zaidman e04ab60784 Update debugger-frontend from 7e19a54...343405b
Summary:
Changelog: [Internal] - Update `react-native/debugger-frontend` from 7e19a54...343405b

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/7e19a540aa1b4a2000ba94ba767a1d9dac5947e9...343405ba784fca9290486cbce57e7f2ca953dc14).

Reviewed By: huntie

Differential Revision: D75298472

fbshipit-source-id: 13fd990669eaa37b96f770193640417de3cddd08
2025-05-23 11:51:42 -07:00
Vitali Zaidman e757c09b96 fixed typo in UNREGISTERED_DEVICE error (#51561)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51561

Changelog: [Internal] fix typo in InspectorProxy

Reviewed By: huntie

Differential Revision: D75217049

fbshipit-source-id: 2473ddf4a120175305b195ed78704e734554b423
2025-05-23 11:51:42 -07:00
Rob Hogan fa79fd8f96 Bump Metro to 0.82.4 (#51567)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51567

Bump Metro minimum from 0.82.3 to 0.82.4

Release notes: https://github.com/facebook/metro/releases/tag/v0.82.4

Changelog: [General][Changed] Bump Metro to ^0.82.4

Reviewed By: vzaidman

Differential Revision: D75294674

fbshipit-source-id: 750e83db2fb5cd9a6bf4b1971cb701ac23dfa961
2025-05-23 10:53:17 -07:00
Joe Vilches d87790846b Fixup focusability logic of PreparedLayoutTextView (#51508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51508

For now, we are opting to not auto-focus `PreparedLayoutTextViews` if they have links. The reason being this would not work well with Text nested in a View which is also accessible. If that Text had links, and was set to focusable, then TalkBack would individually focus that Text, which users may not want.

So this diff removes that link detection, and fixes up accessibility in general. Since this isn't a TextView, we need to explicitly set the `text` on the `AccessibilityNodeInfo` object in the delegate so TalkBack know what to annouce.

In the future we aim to bring back auto-focusing with links, but only if a screen reader is not on, so that keyboard users can benefit from this.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D75103779

fbshipit-source-id: 05e17f4eb8d5d79ed1d84458f6d5fc6d1571e382
2025-05-23 10:42:37 -07:00
Samuel Susla 0f73a7ac28 Mark methods in NativeAnimatedNodesManager as noexcept (#51557)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51557

changelog: [internal]

use noexcept in NativeAnimatedNodesManager whenever feasible to lower C++ binary size.

Reviewed By: rshest

Differential Revision: D75149555

fbshipit-source-id: 03838c048d78bcfd9ad563c71a9a7a1f3c5cd2e3
2025-05-23 08:46:39 -07:00
Samuel Susla e657862709 Do not throw error in PropsAnimatedNode (#51563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51563

changelog: [internal]

Throwing errors in C++ is expensive and slow. Let's replace it with logging.

This is to reduce binary size of C++ Animated.

Reviewed By: mdvacca

Differential Revision: D75140875

fbshipit-source-id: 32909572141d8e1b51b60f317716f783aa760265
2025-05-23 07:10:56 -07:00
Pieter De Baets ae4eac1eb6 RCTTurboModule nits (#51499)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51499

Small nits as follow-up to D74208525

 Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D75141440

fbshipit-source-id: 466ee3573c4afe88878f306d902c5aa82df2a3f3
2025-05-23 06:39:41 -07:00
zhongwuzw 4a4fd1cb8b Turbo module: Fixes dictionary stripped out when value is null (#51103)
Summary:
Fixes https://github.com/facebook/react-native/issues/51083. Turbo stripped out the dictionary when the value is null. The old architecture transforms null to NSNull. The null seems useful in cases like #51803 for removing the storage of the key. cipolleschi can you please help to review?

## Changelog:

[IOS] [FIXED] - Turbo module: Fixes dictionary stripped out when value is null

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

Test Plan: Repro please see https://github.com/facebook/react-native/issues/51083.

Reviewed By: rshest

Differential Revision: D74208525

Pulled By: javache

fbshipit-source-id: 53d630c265fba15d25309a3e1deb19dca24f298c
2025-05-23 06:39:41 -07:00
Samuel Susla 6ff500d694 Stop render callback on destruction to prevent crash (#51558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51558

changelog: [internal]

we must call stopRenderCallbackIfNeeded to prevent UI tick from being called when
`NativeAnimatedNodesManager` is deallocated.

Reviewed By: mdvacca

Differential Revision: D75140890

fbshipit-source-id: 9ad32956a877f9ee8256790ba32cb5982a5b0c2f
2025-05-23 05:51:26 -07:00
Ruslan Lesiutin a633d93f7f Define sampling methods implementations for Hermes fallback target delegate (#51519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51519

# Changelog: [Internal]

Hermes Sampling Profiler doesn't require debugger to be enabled - we can use it in fallback Hermes Runtime target delegate. That's probably the last thing to make Hermes really run in `opt` mode.

When Hermes Target is compiled with no Debugger support, we can still define implementation for sampling profiler methods and call them on Hermes Runtime.

Reviewed By: huntie

Differential Revision: D75188276

fbshipit-source-id: e3e0dccd09e0870264e8abc65f96052735d63ad8
2025-05-23 05:33:38 -07:00
Alex Hunt 38acb4c074 Remove flow libdefs from npm package (#51556)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51556

Excludes `packages/react-native/flow/` from being published to npm.

**As far as I know**, we already axed open source Flow support with a similar change in D46313482 (Jun 2023).

Changelog:
[General][Breaking] - The `react-native` package no longer ships with the `flow` directory

Reviewed By: cipolleschi

Differential Revision: D75060845

fbshipit-source-id: 3cb81820499383bf095abc97a9ab7e9061c870d6
2025-05-23 04:29:05 -07:00
Rubén Norte a573049c0a Improve support for multi-config benchmarks (#51559)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51559

Changelog: [internal]

Improves the support for multi-config benchmarks in Fantom by printing the Fantom configuration summary in the header of the table with the benchmark results for each variant.

Reviewed By: rshest

Differential Revision: D75281972

fbshipit-source-id: 80caf2e668a30ea1454cb932e91dac91192323bf
2025-05-23 04:24:44 -07:00
Rubén Norte 0ff4566ac7 Enable multi-config in IntersectionObserver-itest (#51541)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51541

Changelog: [internal]

Now that we have support for tests with multiple configurations in Fantom, we can configure the test for IntersectionObserver to run with all the flag configurations that affect its behavior, and make sure it doesn't break for anyone while we're rolling out the changes.

Reviewed By: rshest

Differential Revision: D75231300

fbshipit-source-id: e7addf51cffad8c94bb3bf34e99272ee1dd9da2a
2025-05-23 04:24:44 -07:00
Rubén Norte 936666d3b4 Migrate ReactFabricPublicInstance tests to a single multi-config test (#51543)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51543

Changelog: [internal]

For `ReactFabricPublicInstance-itest` we used a specific pattern to be able to run the same test with different feature flags (having multiple entrypoints with the configuration and a single implementation file). We can simplify this now that we have support for multiple configurations per test file in Fantom.

Reviewed By: rshest

Differential Revision: D75231301

fbshipit-source-id: ffd047b23217c06b1b15ba07da8b5c191cc652e7
2025-05-23 04:24:44 -07:00
Rubén Norte cc9be3048a Add support multi-config test runs (#51542)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51542

Changelog: [internal]

This adds support for Fantom to run specific test suites with different combinations of options/flags, using wildcards as values.

See the new documentation for this feature in this diff for more details.

Reviewed By: rshest

Differential Revision: D75231299

fbshipit-source-id: 0e953e6de68f004944ee29206af49770c8b7dd9b
2025-05-23 04:24:44 -07:00
Rubén Norte 9d58eb5719 Display Fantom test configuration in test output (#51528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51528

Changelog: [internal]

This adds some logic to the Fantom runner to display the test configuration with the test results.

Reviewed By: lenaic

Differential Revision: D75063176

fbshipit-source-id: 8371e90247c1a0c24f29a13ead25fa5dbf98ec10
2025-05-23 04:24:44 -07:00