Commit Graph
35812 Commits
Author SHA1 Message Date
David VaccaandFacebook GitHub Bot a90bc9a766 Mark SingleThreadAsserter as @LegacyArchitecture (#50307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50307

Mark SingleThreadAsserter as LegacyArchitecture

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D71820293

fbshipit-source-id: a974ee65b2659028d14f73504f73db2b3ae63f70
2025-03-28 21:36:54 -07:00
Panos VekrisandFacebook GitHub Bot 6d5dde6393 pre-suppress errors for natural_inference.local_primitive_literals=partial in fbsource (#50380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50380

Pre-suppresses errors in xplat/js and arvr/js for phase 1 of Natural Inference for Primitive Literals

See https://fb.workplace.com/groups/floweng/permalink/28092444257044156/

Reviewed By: gkz

Differential Revision: D72088386

fbshipit-source-id: 0827822199cb31a80afbca2a16f74aea4b6c4957
2025-03-28 20:35:51 -07:00
Alex Taylor (alta)andFacebook GitHub Bot 798c3dd842 Deploy 0.266.0 to xplat (#50373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50373

Changelog: [Internal]

Reviewed By: jbrown215, SamChou19815, panagosg7

Differential Revision: D72061660

fbshipit-source-id: a6862fe0e1f62992b76145006b3f8bc3ad788258
2025-03-28 13:07:06 -07:00
Nick GerlemanandFacebook GitHub Bot e861949ccd Make SafeReleaseJniRef more generic (#50376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50376

This makes a couple of tweaks to `SafeReleaseJniRef` to let it be used in more places:

1. Add a default ctor for null state
2. Bridge `get()` to return raw JNI ref, for use when calling Java functions directly (compared to current use case of hybrid objects)
3. Keep JNI environment attached to thread longer term, instead of repeated attach/detach, to allow use for higher frequency objects.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D71933838

fbshipit-source-id: 622cc70d2d7483475406314abcbcf92d3d2ff227
2025-03-28 12:32:20 -07:00
zhongwuzwandFacebook GitHub Bot 7441127040 Added slash of alpha support using rgb() (#50281)
Summary:
Fixes https://github.com/facebook/react-native/issues/50207

Added slash alpha support like `rgb(255 122 127 / 0.2);`, currently seems we don't support it.

## Changelog:

[GENERAL] [ADDED] - Added slash of alpha support using rgb()

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

Test Plan: `rgb(255 122 127 / 0.2)` can shows correctly.

Reviewed By: cipolleschi

Differential Revision: D72009174

Pulled By: NickGerleman

fbshipit-source-id: f53e550cfdc8f481785a1fb134cd0fab810f8f38
2025-03-28 11:46:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a29d5a2401 Automate the draft release creation (#50346)
Summary:
This PR automates the creation of Draft releases on Github that we have to do manually every time we create a new release.

## Changelog:
[Internal] - Automate the creation of draft releases on Github

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

Test Plan:
GHA - tested as a separate workflow: https://github.com/facebook/react-native/actions/runs/14132774202/job/39597050776?pr=50346

The drafted release is at: https://github.com/facebook/react-native/releases/tag/untagged-e78c788fe9c861ad28ff

Reviewed By: cortinico

Differential Revision: D72061067

Pulled By: cipolleschi

fbshipit-source-id: ddcdae701e272a59c18f58ba431d1eb3b8cd5b36
2025-03-28 10:57:31 -07:00
Ritesh ShuklaandFacebook GitHub Bot af1f1e4fe5 Implementation of URLSearchParams Methods (#50043)
Summary:
This PR addresses the following issues and enhances the functionality of `URLSearchParams`:

1. Extended Initialization Parameters: Previously, only `Record<string, string>` was supported while initialising  URLSearchParams. Now supports `string`, `Record<string, string>`, and `Array<[string, string]>` (aligning with web standards).

2. Added Implementation for `delete()`, `get()`, `getAll()`, `has()`, `sort()`, and `set()`.

3. Addition of Iteration Methods: Added  `keys()`, `values()`, `entries()`, and `forEach()`  methods.  Outputs are identical to web.

4. Bug Fix: Incorrect Initialization from URL. Previously, `URLSearchParams` was initialized with an empty value when accessed via `url.searchParams`, even if the `URL` contained search parameters.

## Changelog:
[General][Added] Implementation for URLSearchParams

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

Test Plan:
Can be tested by below code
```js
  const isHermes = () => !!global.HermesInternal;
  const params = new URLSearchParams("");
  console.log("Is Hermes Enabled:-",isHermes())
  console.log("Values:", Array.from(params.values())); //  ["value1", "value2"]
  console.log("Keys:", Array.from(params.keys())); //  ["key1", "key2"]
  console.log("Entries:", Array.from(params.entries())); //  [["key1", "value1"], ["key2", "value2"]]
  params.forEach((value, key) => {
      console.log(`${key}: ${value}`);
  });
  console.log("Has 'key1'", params.has("key1")); //  true
  console.log("Has 'key3'", params.has("key3")); //  false
  console.log("Get 'key1':", params.get("key1")); //  "value1"
  console.log("Get 'key3':", params.get("key3")); //  null
```

Tested on both hermes and JSC.

Hermes:-
![image](https://github.com/user-attachments/assets/9a467001-693a-4e38-b349-e8d92f961808)

JSC:-
![image](https://github.com/user-attachments/assets/e5f89375-ede4-4ea0-9c62-f98f63c67188)

Reviewed By: cipolleschi

Differential Revision: D71965101

Pulled By: huntie

fbshipit-source-id: c0a0f965ac1ff9577cdc8b3c11f0dd0ced538868
2025-03-28 10:18:59 -07:00
Vitali ZaidmanandFacebook GitHub Bot aadb1f1116 improve error reporting when a debugger for an unknown device is opened (#50330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330

Changelog: [Internal]

Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate

Reviewed By: hoxyq

Differential Revision: D71979796

fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
2025-03-28 09:16:49 -07:00
zhongwuzwandFacebook GitHub Bot 44810f7498 Reland: avoid race condition crash in [RCTDataRequestHandler invalidate (#50342)
Summary:
Reland https://github.com/facebook/react-native/commit/6bc5ddea3ea3ca20060ea0181630539931948085, the reason the previous commit has an issue is `weakOp` would always `nil` when captured in block :https://github.com/facebook/react-native/blob/6bc5ddea3ea3ca20060ea0181630539931948085/packages/react-native/Libraries/Network/RCTDataRequestHandler.mm#L52-L54

Now, we can create an `NSBlockOperation` and use `addExecutionBlock` instead. `weakOp` can be captured correctly.

## Changelog:

[IOS] [FIXED] - Reland: avoid race condition crash in [RCTDataRequestHandler invalidate

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D72047232

Pulled By: javache

fbshipit-source-id: c3a5a9fca909f7eac16d78b650c9ea9f5b8e64e4
2025-03-28 09:05:01 -07:00
Tim YungandFacebook GitHub Bot da1bf8d1d1 RN: Ship scheduleAnimatedCleanupInMicrotask (#50341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50341

Ships tge `scheduleAnimatedCleanupInMicrotask` feature flag, which changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).

Changelog:
[General][Changed] - When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase.

Reviewed By: javache

Differential Revision: D71942778

fbshipit-source-id: cbe636d5cff84dfeca2f21ead374609c536e91ad
2025-03-28 08:13:39 -07:00
Tim YungandFacebook GitHub Bot e704f8ac2f RN/Metro: Set reactRuntimeTarget on Hermes Parser (#50339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50339

Explicitly sets the default `reactRuntimeTarget` when invoking `require('hermes-parser').parse` so that it'll be easier to find these configurations when upgrading to `'19'`.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D72006705

fbshipit-source-id: 4994917152a2a4a767b871d4a36092c0c5391324
2025-03-28 08:02:09 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7f550e2c62 Bump Podfile.lock automatically (#50345)
Summary:
This workflow bumps the Podfile.lock automatically when a new release happens.
I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads.

## Changelog:
[Internal] - Bumps podfile.lock automatically

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

Test Plan:
GHA - tested as a separate workflow first, hardcoding the latest RC
https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345

The flow correctly fails as the Podfile.lock has already been bumped in the release branch.

Reviewed By: fabriziocucci

Differential Revision: D72050261

Pulled By: cipolleschi

fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
2025-03-28 07:00:12 -07:00
Ruslan LesiutinandFacebook GitHub Bot 6b72fd2dbf Send Profile in smaller chunk to prevent WebSocket disconnections on android (#50337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50337

# Changelog: [Internal]

This should not have any functional changes, it only prevents the WebSocket from being killed on Android, when we are sending Profile-related Trace Events.

For large traces, a single message could be more than 16MB, because we send a unique string url for every call frame.

Reviewed By: huntie

Differential Revision: D71993748

fbshipit-source-id: f0bfddfb0bb87631e72b573142abdf0d7d87ba48
2025-03-28 05:43:41 -07:00
Rubén NorteandFacebook GitHub Bot c6eb714035 Add basic documentation for MutationObserver (#50335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50335

Changelog: [internal]

This defines the internal technical documentation for the MutationObserver API, as an example of how to define docs using the new strategy and structure.

Reviewed By: javache

Differential Revision: D71890748

fbshipit-source-id: 3ef19c784dff7aea7a2e2d08302640d5eefacc30
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 435d58d215 Align feature flags documentation with new guidelines (#50334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50334

Changelog: [internal]

This updates the documentation for the feature flag system to adhere to the new documentation strategy and structure.

Reviewed By: javache, rshest

Differential Revision: D71889753

fbshipit-source-id: 7ff47cf613ac01012e7329485d2b97e997a97c07
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 6d415d6202 Define root README.md for technical docs (#50333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50333

Changelog: [internal]

This defines a placeholder for the main entrypoint for the React Native internal technical documentation.

Reviewed By: javache, mdvacca, rshest

Differential Revision: D71889755

fbshipit-source-id: 453518a0b7ec2cf433884a87446a7a622418d0b2
2025-03-28 05:28:44 -07:00
Rubén NorteandFacebook GitHub Bot 907185333a Define technical documentation guidance and template (#50332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50332

Changelog: [internal]

This defines a detailed strategy on how to approach internal technical documentation in React Native, including defining a template for subsystem documentation.

Reviewed By: javache, rshest

Differential Revision: D71889754

fbshipit-source-id: 5ce630b2e71f8c7b6aaf027a5833bcbdf0dfa5de
2025-03-28 05:28:44 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2c343d18a7 Generate the changelog automatically (#50323)
Summary:
This change implements the automatic generation of the Changelog in CI while doing a release.
The output is a PR opened by the react-native-bot that can be manipulated and imported by Meta engineers

## Changelog:
[Internal] - Generate the changelog automatically

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

Test Plan:
Tested as a separated workflow first:
<img width="1624" alt="Screenshot 2025-03-27 at 17 44 47" src="https://github.com/user-attachments/assets/b8877cdb-f63b-4d82-b340-54f612ac0cd4" />
this generated the PR:
https://github.com/facebook/react-native/pull/50328

I also added jest tests:
<img width="516" alt="Screenshot 2025-03-27 at 17 45 39" src="https://github.com/user-attachments/assets/7ebbc310-e41e-48fc-997e-21366c7306cf" />

Reviewed By: cortinico

Differential Revision: D71986909

Pulled By: cipolleschi

fbshipit-source-id: 10ffaf342bb0642a6992a107185b6704815b16e3
2025-03-28 04:25:06 -07:00
Pieter De BaetsandFacebook GitHub Bot 6dd5a838c3 Do not crash when event is emitted when ReactInstance is reloaded
Summary:
Regression introduced in D71735505 where I tried to ensure fabricEventEmitter was always non-null. Instead log a soft error when this happens, so we don't drop the event silently.

Changelog: [Android][Fixed] Fixed crash when event is emitted after instance is shutdown

Reviewed By: mdvacca

Differential Revision: D71967092

fbshipit-source-id: 990b6414b41a2709d70a6deae38f5aa043203a20
2025-03-28 04:17:20 -07:00
Dawid MałeckiandFacebook GitHub Bot 6877263003 Align Flow with TS types and export relevant modules (#50322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50322

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71973327

fbshipit-source-id: ef3a6ad4c0ba6d32bfd1e4cc2ac8e0afac51e9fe
2025-03-28 02:47:22 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot 1f8d824e67 Ignore unexisting nativeIDs on accessibilityOrder (#50325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50325

axOrderViews is an optimization I came up with so that we could find and queue all the views on a single tree traversal. It initializes the array with the size of the accessibilityOrder array and places each view where its nativeID is. If there is no view corresponding to the nativeID then that axOrderViews element will be null. So to fully ignore nativeIDs that don't correspond to any View we can just filter the nulls

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D71977739

fbshipit-source-id: a3f2138eebe06808ce413355df5d9beb2f4ff388
2025-03-27 16:02:55 -07:00
Tim YungandFacebook GitHub Bot 05fe502821 Animated: Manually Manage Connected viewTag (#50230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50230

Currently, `AnimatedProps` invokes `findNodeHandle` to both connect and disconnect the native `AnimatedNode` instances to corresponding `viewTag`s.

Not only is this slow and wasteful (because `findNodeHandle` requires traversing the fiber tree), but it prevents deferring disconnection to after the fiber tree has been unmounted.

Disconnecting after unmount is necessary when the `scheduleAnimatedCleanupInMicrotask` feature flag is enabled, which is necessary to avoid invoking animation completion callbacks in the commit phase that unmounts animated views.

I have verified that `disconnectAnimatedNodeFromView` is needed and handles being called after fibers are unmounted.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71745805

fbshipit-source-id: ce8c2c95d38c4d5adbb79bac3c07b0872211cf51
2025-03-27 15:41:39 -07:00
Sam ZhouandFacebook GitHub Bot 185c809afd Move jest libdef in react-native (#50329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50329

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71986203

fbshipit-source-id: 5ec9d9238da54277faef6af09fed3ff2c9a8ac3f
2025-03-27 14:21:17 -07:00
David VaccaandFacebook GitHub Bot 6f8a27d0c3 Fix AssertionError:com.facebook.react.views.text.ReactTextView.onLayout in legacy architecture (#50336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50336

This diff is fixin an assertion error being triggered in ReactTextView:

`
AssertionError:com.facebook.react.views.text.ReactTextView.onLayout
`

changelog: [internal] internal

Reviewed By: Abbondanzo

Differential Revision: D71990566

fbshipit-source-id: f94b27252ae62472544369ab285d72bc35ec8afc
2025-03-27 13:26:19 -07:00
Alex SteinandFacebook GitHub Bot 24ba7dfe6f Update TS docs for contentInsetAdjustmentBehavior (#50069)
Summary:
Update the TS docs to reflect the default value for `contentInsetAdjustmentBehavior`. The TS docs suggest it will be `automatic` however it's actually `never`.

The default behaviour is correctly specified in the JS docs: https://github.com/facebook/react-native/blob/850760ab6112d1f38a5a9014282ae5186ab814d6/packages/react-native/Libraries/Components/ScrollView/ScrollView.js#L306

It's also documented as the default in the native module: https://github.com/facebook/react-native/blob/main/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm#L34

## Changelog:

[General] [Fixed] - Fix TS docs for `contentInsetAdjustmentBehavior`

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

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

Reviewed By: NickGerleman

Differential Revision: D71491433

Pulled By: lunaleaps

fbshipit-source-id: 08b3f273824be570589095bf0640d7d0b7c93e7d
2025-03-27 12:25:44 -07:00
Joe VilchesandFacebook GitHub Bot d509bb5824 Add experimental prefix to accessibilityOrder (#50311)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50311

We are going to initially expose this with the `experimental_` prefix to indicate that it has not been battle tested yet.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71939365

fbshipit-source-id: e9481b6bd4f253fb97c11fc9d7bf3708ffe79635
2025-03-27 12:07:17 -07:00
Mateo GuzmánandFacebook GitHub Bot 402b93dd0c Internalize classes exposed for TextInputEventsTestCase (#50305)
Summary:
TextInputEventsTestCase is a test that no longer exists; it seems like in the past, some classes/methods were made public to allow this file to use them. We can clean this up by removing its reference from the codebase and internalizing what's not used in OSS.

Internalized classes:
- [ReactContentSizeChangedEvent](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.views.textinput.ReactContentSizeChangedEvent)
- [ReactTextChangedEvent](https://github.com/search?type=code&q=NOT+is%3Afork+NOT+org%3Afacebook+NOT+repo%3Areact-native-tvos%2Freact-native-tvos+NOT+repo%3Anuagoz%2Freact-native+NOT+repo%3A2lambda123%2Freact-native+NOT+repo%3Abeanchips%2Ffacebookreactnative+NOT+repo%3AfabOnReact%2Freact-native-notes+NOT+user%3Ahuntie+NOT+user%3Acortinico+NOT+repo%3AMaxdev18%2Fpowersync_app+NOT+repo%3Acarter-0%2Finstagram-decompiled+NOT+repo%3Am0mosenpai%2Finstadamn+NOT+repo%3AA-Star100%2FA-Star100-AUG2-2024+NOT+repo%3Alclnrd%2Fdetox-scrollview-reproductible+NOT+repo%3ADionisisChytiris%2FWorldWiseTrivia_Main+NOT+repo%3Apast3l%2Fhi2+NOT+repo%3AoneDotpy%2FCaribouQuest+NOT+repo%3Abejayoharen%2Fdailytodo+NOT+repo%3Amolangning%2Freversing-discord+NOT+repo%3AScottPrzy%2Freact-native+NOT+repo%3Agabrieldonadel%2Freact-native-visionos+NOT+repo%3AGabriel2308%2FTestes-Soft+NOT+repo%3Adawnzs03%2FflakyBuild+NOT+repo%3Acga2351%2Fcode+NOT+repo%3Astreeg%2Ftcc+NOT+repo%3Asoftware-mansion-labs%2Freact-native-swiftui+NOT+repo%3Apkcsecurity%2Fdecompiled-lightbulb+com.facebook.react.views.textinput.ReactTextChangedEvent)

Both classes above are used only in gutenberg aztec (archived repo)

Internalized methods:
- ReactEditText.maybeSetText (method only used within the class itself)

## Changelog:

[INTERNAL] - Internalize classes exposed for TextInputEventsTestCase

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

Test Plan:
```sh
yarn test-android
yarn android
```

Reviewed By: Abbondanzo

Differential Revision: D71964410

Pulled By: javache

fbshipit-source-id: fa6476ed12cc71a28498479f3c56eb143a51c6bc
2025-03-27 10:25:10 -07:00
Sam ZhouandFacebook GitHub Bot 11e532de4f Make JestMockFn's TArguments type parameter bound by $ReadOnlyArray<mixed> instead of $ReadOnlyArray<any> (#50326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50326

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D71978753

fbshipit-source-id: 52774ca29f6019b5a1382cc76f6c387ea36532e4
2025-03-27 10:23:12 -07:00
Pieter De BaetsandFacebook GitHub Bot 902f82656e Make NativeModuleSoLoader and FabricSoLoader internal (#50316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50316

This should only be used internally

Changelog: [Android][Removed] Remove FabricSoLoader from public API

Reviewed By: Abbondanzo

Differential Revision: D71965740

fbshipit-source-id: 41c2377a9efcaa21378b2ac49af0c1a544589371
2025-03-27 09:40:35 -07:00
Pieter De BaetsandFacebook GitHub Bot f477dbcfde Rename ReactBridge to BridgeSoLoader (#50315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50315

Make it clearer that the only purpose of this class is to manage the soloading of the core bridge so file.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D71965759

fbshipit-source-id: d333f3e768a2359b082d4df279548cbd4b58ec76
2025-03-27 09:40:35 -07:00
Sam ZhouandFacebook GitHub Bot d24db7b0ae Replace $PropertyType with indexed access type in ReactNativeTypes (#32733)
Summary: DiffTrain build for [b59f18601179bb06a2c32a76547fd4929aa1ce9c](https://github.com/facebook/react/commit/b59f18601179bb06a2c32a76547fd4929aa1ce9c)

Reviewed By: jackpope

Differential Revision: D71788054

fbshipit-source-id: 1b1263018e4d9f349c64a5dcc22a86c71da9d7ca
2025-03-27 09:25:15 -07:00
Mateo GuzmánandFacebook GitHub Bot 9ba47b8852 Migrate ReactCxxErrorHandler to Kotlin (#50300)
Summary:
Migrate com.facebook.react.bridge.ReactCxxErrorHandler to Kotlin.

## Changelog:

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

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: huntie

Differential Revision: D71964503

Pulled By: javache

fbshipit-source-id: f7cb2de8bdeae52680ef2fd72bd052d67e727a1a
2025-03-27 08:14:53 -07:00
Alex HuntandFacebook GitHub Bot 68741d74ee Delete react-native/android/ directory (#50319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50319

Originally removed in 0.71, leaving a README file as an FYI, which is now removed.

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D71968498

fbshipit-source-id: 81d380570df346f709a35727090c8e3b8b043183
2025-03-27 07:50:29 -07:00
Kudo ChienandFacebook GitHub Bot 7786805337 fix React-jsitooling build error for use_frameworks build (#50252)
Summary:
to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to `React_RCTAppDelegate`. Xcode will have `include of non-modular header inside framework module` error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers.

~this pr adds a workaround to import header from outside the module.~ updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header.

## Changelog:

[IOS] [FIXED] - `JSRuntimeFactoryCAPI.h` build error for  `use_frameworks` build

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

Test Plan:
to reproduce the build error, we can build `USE_FRAMEWORKS=static bundle exec pod install` from rn-tester. we also need to import `React_RCTAppDelegate` from objective-c files. in this case, we can add `import React_RCTAppDelegate;` in rn-tester's main.m

```diff
 --- a/packages/rn-tester/RNTester/main.m
+++ b/packages/rn-tester/RNTester/main.m
@@ -8,6 +8,9 @@
 #import <UIKit/UIKit.h>

 #import "AppDelegate.h"
+@import React_RCTAppDelegate;
+// This also triggers the error
+//#import <React_RCTAppDelegate/React-RCTAppDelegate-umbrella.h>

 int main(int argc, char *argv[])
 {
```

Reviewed By: fabriziocucci

Differential Revision: D71963188

Pulled By: cipolleschi

fbshipit-source-id: 5d566ae5aadb9efc032aacfe32862ea289134f87
2025-03-27 06:39:30 -07:00
Vitali ZaidmanandFacebook GitHub Bot 041014b8de track situations where devices are not reporting a valid debug page (#50314)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50314

Changelog:
[General][Internal] track situations where devices are not reporting a valid debug page

Reviewed By: robhogan

Differential Revision: D71898522

fbshipit-source-id: 5ab83472148c20bd3376915a80834c42b5fff26e
2025-03-27 05:14:12 -07:00
Vitali ZaidmanandFacebook GitHub Bot e52f251284 Add hints about why devices running in the background might not report debuggable pages (#50288)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50288

Add hints about why devices running in the background might not report debuggable pages:
- Taking them from background might be enough
- Force killing them to restart them properly might be needed on Android.

Changelog:
[General][Internal]

Reviewed By: huntie

Differential Revision: D71888615

fbshipit-source-id: dda54b15daa7eebd1bc28a4d327a9b3d006397a4
2025-03-27 05:14:12 -07:00
Dawid MałeckiandFacebook GitHub Bot fc1e73470a Use intersection of AnimatedProps and PassThroughProps to generate correct TS type (#50287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50287

Using keys intersection to iterate over Props and PassThroughProps is not legal in TS. The issue can be mitigated by using intersection of AnimatedProps and PassThroughProps.

Changelog:
[Internal]

Reviewed By: huntie

Differential Revision: D71898246

fbshipit-source-id: 8505989f60622654034e5a775b884945dd9388ca
2025-03-27 04:09:15 -07:00
Arushi KesarwaniandFacebook GitHub Bot 529c24ad92 Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flag (#50186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50186

When `useFabricInterop` is disabled, deleting component descriptors in Component Registry is failing since  https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294

Adding back the logic of Fallback component descriptor and error for the same.

**Changelog:**
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.

**Facebook:**
Upon deleting component descriptors in [CatalystRegistry](https://www.internalfb.com/code/fbsource/fbandroid/java/com/facebook/fbreact/fabric/components/jni/CatalystRegistry.cpp) D71426627 & [TwilightRegistry](https://www.internalfb.com/code/fbsource/fbandroid/java/com/oculus/twilight/crossapp/reactpackage/fabric/components/jni/TwilightRegistry.cpp) D71206103 the apps weren't erroring or causing crash as expected even upon disabling `useFabricInterop` and this was because D65192744 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in D52663244

Reviewed By: cipolleschi

Differential Revision: D71582553

fbshipit-source-id: 0e87a789e5f0f8acba1958f74f9552dba1fe95c0
2025-03-26 22:14:50 -07:00
Arushi KesarwaniandFacebook GitHub Bot aef1f9ba1d Enable useFabricInterop by default for internal apps (#50295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50295

Enabling `useFabricInterop` by default for internal apps since before D71582553 iOS wasn't using useFabricInterop in it's codebase and old architecture with Interop enabled is harmless.

This is to keep the current behaviour consistent.

Changelog: [Internal]

Reviewed By: philIip

Differential Revision: D71908601

fbshipit-source-id: 825338db486d8f64c44c2d4c28394d8b789c4195
2025-03-26 22:14:50 -07:00
Arushi KesarwaniandFacebook GitHub Bot 21c858ce3e Enable useFabricInterop for Stable in OSS (#50237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50237

Enabling `useFabricInterop` for Stable in OSS just as done in Android here:

https://github.com/facebook/react-native/blob/26ca802e8462e978282180e6cfd65e644d67bbc7/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt#L15

**Changelog:**
[iOS][Added]  Enabled `useFabricInterop` by default in OSS

Reviewed By: cipolleschi

Differential Revision: D71751048

fbshipit-source-id: 8d3bfb4fde04ba9262d07e349a27aea5cc8c8aaa
2025-03-26 22:14:50 -07:00
Joe VilchesandFacebook GitHub Bot 27b7512d85 Back out "Finish adding accessibilityOrder to ReactNative"
Summary:
This isn't ready yet, we shouldn't expose it.

Original commit changeset: 110ba4c42adc

Original Phabricator Diff: D71420768

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D71938547

fbshipit-source-id: 5026dcc11c151ad16386c1f11a702b46308a0e51
2025-03-26 21:45:27 -07:00
Michael LeeandFacebook GitHub Bot 0b1d0e84ee Add missing folly header (#50299)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50299

## Changelog
[General] [Fixed] – Add explicit `folly/dynamic.h` include where it is actually used

## Internal
This symbol is used in the file, so ensure we actually declare it. That way we do not need to depend on some other header to provide the symbol

Reviewed By: NickGerleman

Differential Revision: D71910330

fbshipit-source-id: 4fbb584cafc688bd58f6863370efc1ede3a4c5f1
2025-03-26 21:45:17 -07:00
Alex HuntandFacebook GitHub Bot 4f709afa6d Add type exports to index.js.flow (#50225)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50225

Updates `index.js.flow` to export (what should be) all public types for `react-native`, closely matching the resolved exported types of `types/index.d.ts` (current manual TS defs).

- Note that this first pass doesn't have to be exhaustive (not yet load bearing) — however, I've done a best-effort scan, which passes our current `__typetests__` fixtures.

**Approach: Explicit type imports in `index.js.flow`**

We have a number of options for how we organise and re-export values and types from the new index file — for now, we're opting for explicitly exporting each symbol here.

- While this clutters the index file somewhat, it also provides a single scannable source of truth — without introducing / altering each contributing module's type exports (we might want to do this eventually, but we're far from having strong organisation denoting the public API boundary). It's self-documenting that the index file contains all root exports by name.
- At the same time, we currently have some exceptions that use `export [type] *` to line up with TypeScript `namespace`s. We aim to review and update these within this release cycle, to enforce the above system.

Changelog: [Internal] - The `react-native` package now exports all public types in Flow (fbsource)

Reviewed By: rubennorte

Differential Revision: D71741575

fbshipit-source-id: 770e2b490e494ee195f4240358fec39f69145a94
2025-03-26 20:46:41 -07:00
Eric RozellandFacebook GitHub Bot c12fdc0fcf Back out "Allow listeners in EventEmitter" (#50298)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50298

Given EventDispatcher already synchronously calls EventListener, this convenience method for listening to events directly from EventEmitter was short-sighted. We will revisit how to handle JS vs. UI dispatched events for NativeAnimated purposes in future diffs. For now, this reverts https://github.com/facebook/react-native/pull/49998

This change is not being marked as breaking since the change that added this API has not yet been shipped to stable.

## Changelog

[General][Removed] - EventEmitter addListener and removeListener APIs

Reviewed By: zeyap

Differential Revision: D71909828

fbshipit-source-id: 9246de5c7a33368d182369a2d6eb57aa960b415b
2025-03-26 20:42:10 -07:00
Mateo GuzmánandFacebook GitHub Bot d49ec1d79c Migrate CxxModuleWrapperBase to Kotlin (#50251)
Summary:
Migrate com.facebook.react.bridge.CxxModuleWrapperBase to Kotlin.

## Changelog:

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

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

Test Plan:
```bash
yarn test-android
yarn android
```

Reviewed By: alanleedev

Differential Revision: D71830747

Pulled By: arushikesarwani94

fbshipit-source-id: 174dff86f6d1ad8228491c15e226986dad2edb1b
2025-03-26 20:35:13 -07:00
Tim YungandFacebook GitHub Bot 4a7946bef5 Animated: Pass Target into {dis,}connectAnimatedView (#50229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50229

Makes a few internal improvements to `AnimatedProps`:

- Change `__connectAnimatedView` and `__disconnectAnimatedView` to be private methods, so that we can confidently change their type signatures.
- Pass `#targetInstance` into those methods, so that the responsibility of verifying `#targetInstance`'s non-nullability is hoisted to the call sites.

There should be no observable runtime behavior change.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71740601

fbshipit-source-id: 6abc6faf63f3c3274fd2d92baf0958d2471d4a63
2025-03-26 20:05:28 -07:00
Tim YungandFacebook GitHub Bot c9ff9570ab Animated: Type #animatedView in AnimatedProps (#50228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50228

Properly annotate the type of `#animatedView` in `AnimatedProps` and rename it to `#targetInstance`.

Otherwise, no runtime behavior change.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D71739606

fbshipit-source-id: c97e4bd323ad9b1c08fd4976f13b6b20e8fe4793
2025-03-26 20:05:28 -07:00
Danny SuandFacebook GitHub Bot f3a5d1957a Don't throw again in JsErrorHandler
Summary:
JsErrorHandler throwing again masks what the real problem is.

Changelog: [Internal]

Reviewed By: tmikov

Differential Revision: D71920942

fbshipit-source-id: 1697f6f4c779d5c896df1be8e696a185f1c2c828
2025-03-26 19:35:02 -07:00
Nick GerlemanandFacebook GitHub Bot 177b8b4c40 Move CornerRadii resolution logic out of LengthPercentage (#50306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50306

`LengthPercentage` is a class representing a length, or a percentage of a reference length.

Having a function on it, specific to resolving asymetrical corner radius is the wrong organization. Let's move it to where it belongs.

Very technically breaking, but I would be shocked if anyone is using this API.

Changelog: [Internal]

Reviewed By: jorge-cab

Differential Revision: D71922893

fbshipit-source-id: 4660c861e21c1dffae15d3f463c135a494124e2a
2025-03-26 19:29:24 -07:00
Tim YungandFacebook GitHub Bot a8a4ab10d0 RN: Ship disableInteractionManager (#50233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50233

Ships the `disableInteractionManager` feature flag, which disables `InteractionManager` and replaces its scheduler with `setImmediate`.

Changelog:
[General][Changed] - InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it.

Reviewed By: javache

Differential Revision: D71766877

fbshipit-source-id: 36710fdf17c92f8cdee141e43a3c4d0bd9ef0e81
2025-03-26 17:59:40 -07:00