Commit Graph
35155 Commits
Author SHA1 Message Date
Rob HoganandFacebook GitHub Bot 038409e649 community-cli-plugin: resolve cli-server-api via peer dependency on cli
Summary:
`react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`. 

`react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see https://github.com/facebook/react-native/issues/47309.

Rather than add an unnecessary dependency to the template (like [this](https://github.com/react-native-community/template/pull/105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable.

Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - https://github.com/react-native-community/cli/pull/2605.

Changelog:
[GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules.

Differential Revision: D69848688
2025-02-19 04:25:05 -08:00
Jakub PiaseckiandFacebook GitHub Bot bae8955000 Align press and scroll events with OSS (#49424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49424

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69655561

fbshipit-source-id: c36036a2abb43dd75c41582f2a27e7f9d3509044
2025-02-19 03:43:07 -08:00
Samuel SuslaandFacebook GitHub Bot 1705f96322 RCTNetworking does not require main thread setup (#49475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49475

changelog: [internal]

RCTNetworking does not need main thread setup, it doesn't access any main thread only resources.

Reviewed By: rshest

Differential Revision: D69744400

fbshipit-source-id: 25652c28d178a9e26fa0ede9b03fb87072094fb0
2025-02-19 03:37:26 -08:00
Samuel SuslaandFacebook GitHub Bot d69874fa31 reset transformation when crossing ScrollView in Fabric View Culling (#49500)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49500

changelog: [internal]

When crossing ScrollView boundary, cullingContext.transform must be reset to Transform.identity. Views are only culled within scroll view.

Reviewed By: NickGerleman

Differential Revision: D69787820

fbshipit-source-id: 5d502f764a2b1885ee4b49fc0c9ebb9d27de65dd
2025-02-19 03:20:02 -08:00
Nick GerlemanandFacebook GitHub Bot 4fa516987c Filter and Box Shadow Conversion Tests and Fixes (#49418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49418

This adds some missing validation for negative blurs which should be considered parse error. Unit tests added for the forked props parsing code to validate more generally.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69628917

fbshipit-source-id: 1451b53cfa673443f01d38bd0097c4e85c83db8b
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot 05856b4681 Wire up native filter parsing (#49505)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49505

I want to go home 😭.

This is not very pretty, while we are both keeping the old path, and trying to keep the props data types undisturbed for now, and support some of the stranger syntax we ended up supporting as inputs to filters.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69562718

fbshipit-source-id: db8ff2c240b66e93a52ce2ac98e4a9ff2e7aeb4b
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot b91565dc5d Add box shadow examples which use objects and PlatformColor (#49504)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49504

We didn't have these cases before.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69433955

fbshipit-source-id: 3915b63ec6972412f1882d796ae60035bb5192f3
2025-02-18 18:56:12 -08:00
Nick GerlemanandFacebook GitHub Bot 8a2602fd69 Reland 2: Wire up native box shadow parsing (#49503)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49503

Relanding this change, now checking for the existing of FeatureFlags native module before checking it, with the assumption when the native module is unavailable (legacy arch) we will never do native processing, or even use the SVC.

This aligns with the approach taken in `setupTimers` for the event loop, but is probably not the right long term solution for flags API.

This also inlines a couple fixes originally up the stack, of missing propagation of inline state, and missing the gating in ReactNativeStyleAttributes.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D69804412

fbshipit-source-id: 1f285994132cff75b6845b64cf26fceae37d4c92
2025-02-18 18:56:12 -08:00
Sam ZhouandFacebook GitHub Bot b53e86b4bd Deploy 0.261.2 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D69816782

fbshipit-source-id: c4d1e7bff3333fe8075816542d0b316408363f86
2025-02-18 18:11:49 -08:00
David VaccaandFacebook GitHub Bot 3442b3885a Implement getDelegateMethod on ReactPopupMenuManager (#49507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49507

Implement getDelegateMethod on ReactPopupMenuManager

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D69807880

fbshipit-source-id: b0168454b24a1af4e99a46e8c70ebb70162c19d0
2025-02-18 16:43:13 -08:00
Joe VilchesandFacebook GitHub Bot a3b29e1441 Fix inset shadows when blur < spread (#49448)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49448

I noticed that when inset shadows have a smaller blur radius than spread its wrong and there is a gap between the edge of the box and the shadow. I think the outer rect is just defined incorrectly and we should be adjusting the paddingBox as opposed to the innerRect. The innerRect is just the padding box insetted by the spread, so that is why we see gaps if blur < spread

Changelog: [Android][Fixed] - Fix inset boxShadow when blur < spread

Reviewed By: jorge-cab

Differential Revision: D69688508

fbshipit-source-id: 911258edd9a8403c70992800c3e1a5ea044e1f3b
2025-02-18 13:11:53 -08:00
Samuel SuslaandFacebook GitHub Bot 7f6fe61299 migrate RCTSafeArea away from RCTUnsafeExecuteOnMainQueueSync (#49440)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49440

changelog: [internal]

move away from RCTUnsafeExecuteOnMainQueueSync in RCTSafeArea.

Reviewed By: javache, lenaic

Differential Revision: D69662510

fbshipit-source-id: c68e42d6787b1a60ecba46d774ada40163de83fe
2025-02-18 10:05:42 -08:00
Pieter De BaetsandFacebook GitHub Bot 1954f166c9 Consolidate mode files in xplat/mode/react-native (#49463)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49463

We've started accumulating mode-files in many different directories, group them all under xplat/mode/react-native for consistency

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D69658995

fbshipit-source-id: 70c842d24886b9b0ef8432d105ca64cac68078db
2025-02-18 09:40:15 -08:00
Dawid MałeckiandFacebook GitHub Bot 8beae3ba52 Align types of the Libraries/PushNotificationIOS between Flow and TS (#49266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49266

Changelog:
[Internal] - Aligned types of the PushNotificationIOS between Flow and TS

Reviewed By: huntie

Differential Revision: D69309391

fbshipit-source-id: 1e99f6aa6805c25db7ede6c65305b309590ebd6a
2025-02-18 09:03:55 -08:00
Nicola CortiandFacebook GitHub Bot e41887e62f Add support for Gradle Configuration caching (#49484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49484

This is the last diff to add support for Gradle Configuration caching.
The last missing part here was the execution of the `config` command during Gradle configuration time.
Using Java processes API is not supported as the correct way to do external commands that are CC-friendly
is through the `.providers.exec` API which I'm using here.

Closes https://github.com/facebook/react-native/issues/45154

Changelog:
[Android] [Added] - Add support for Gradle Configuration caching

Reviewed By: cipolleschi

Differential Revision: D69753889

fbshipit-source-id: af1e844b38444659a908abce4029d43ad899c03d
2025-02-18 08:26:34 -08:00
Nicola CortiandFacebook GitHub Bot db679f7a20 Remove unused Gradle task packageReactNdkLibsForBuck (#49493)
Summary:
This task is unused, so we can safely remove it here.

## Changelog:

[INTERNAL] - Remove unused Gradle task `packageReactNdkLibsForBuck`

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D69781945

Pulled By: cortinico

fbshipit-source-id: cd6487faf1d169f44590a26c18a9f35eef803617
2025-02-18 08:23:59 -08:00
Jakub PiaseckiandFacebook GitHub Bot ce84922236 Convert DevMenu to use exports syntax (#49491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49491

Changelog: [General][Breaking] Deep imports to modules inside `Libraries/DevMenu` using `require` may need to be appended with `.default`

Reviewed By: cortinico

Differential Revision: D69778671

fbshipit-source-id: 19362fbb003e53609881fc19e8d2cb96677b3006
2025-02-18 08:18:58 -08:00
Mateo GuzmánandFacebook GitHub Bot 7f1edbdcb5 Migrate ReactClippingViewGroup to Kotlin (#49413)
Summary:
Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

## Changelog:

[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin

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

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

Reviewed By: rshest

Differential Revision: D69750532

Pulled By: cortinico

fbshipit-source-id: 50ec87a71b3bd523e1a9518b8bd683a027a4b422
2025-02-18 07:57:24 -08:00
Iwo PlazaandFacebook GitHub Bot e4e03bd909 Trace the import path that leads to an untranslatable file (#49480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49480

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69752685

fbshipit-source-id: 94f70eeaec35c864c15b463f3afce929765f2c40
2025-02-18 07:37:57 -08:00
Jakub PiaseckiandFacebook GitHub Bot ebbb241bf8 Align layout event names with OSS (#49423)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49423

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69655570

fbshipit-source-id: bd9b3dbc70b93c5be49e6a2b1b0487d11bf5b3f1
2025-02-18 07:26:13 -08:00
Samuel SuslaandFacebook GitHub Bot b586f35292 ship fix for view commands race everywhere (#49465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49465

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69744911

fbshipit-source-id: 27e24bb8f16ed4dd3f72bb9125332d208f39ad67
2025-02-18 05:22:17 -08:00
Zhi ZhouandFacebook GitHub Bot 789ed7d5ad fix: iOS app crash caused by the request operation canceling (#48350)
Summary:
Currently we observed many iOS app crashes caused by the `[RCTFileRequestHanlder invalidate]` method, just as the below screenshot.
<img width="1008" alt="image" src="https://github.com/user-attachments/assets/d2d6714f-63d9-40ae-8de5-742cfe718a36" />

## Changelog:

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

Pick one each for the category and type tags:

[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method

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

Test Plan: I am not able to reproduce this issue locally either, so the changes in this PR are totally from my inference, I am not sure if it really makes sense, so please help take a deeper look, thanks.

Reviewed By: javache

Differential Revision: D69751695

Pulled By: cipolleschi

fbshipit-source-id: aa4654a30f5dfac99b72ed1bda0dae1e0dc881c9
2025-02-18 05:03:27 -08:00
Samuel SuslaandFacebook GitHub Bot 944d8e6f3c remove redundant main thread dispatch in RCTDeviceInfo (#49479)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49479

changelog: [internal]

Notification UIApplicationDidBecomeActiveNotification is always delivered on the main thread, no need for dispatch.

Reviewed By: javache

Differential Revision: D69750103

fbshipit-source-id: 070fa7f95d8ecddff5d56ba317c8ed4f0ad880f8
2025-02-18 05:01:03 -08:00
Mateo GuzmánandFacebook GitHub Bot 0c4855afae Migrate RuntimeScheduler & RuntimeExecutor to Kotlin (#49485)
Summary:
Converting to Kotlin two classes from `com.facebook.react.bridge`

## Changelog:

[INTERNAL] - Migrate RuntimeScheduler & RuntimeExecutor to Kotlin

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

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

Reviewed By: sammy-SC

Differential Revision: D69775060

Pulled By: javache

fbshipit-source-id: 93f352be8b56876f99f86119e4c6a9636017a581
2025-02-18 04:00:05 -08:00
Dawid MałeckiandFacebook GitHub Bot 71bd096136 Add PermissionsAndroid to buildTypes and align Flow with TS types (#49352)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49352

Changelog:
[Internal] - Added PermissionsAndroid to buildTypes and align Flow with TS types.

Reviewed By: huntie

Differential Revision: D69464744

fbshipit-source-id: 31591b2069d25a20bff569b296dcbda88d9f2148
2025-02-18 01:20:26 -08:00
Jakub PiaseckiandFacebook GitHub Bot 91edb9c184 Align LayoutAnimation types with OSS (#49467)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49467

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69745571

fbshipit-source-id: 4c27b6c22126a2c8b0965e1a88f9dc310e5ff77c
2025-02-18 01:10:02 -08:00
Jakub PiaseckiandFacebook GitHub Bot 721c7fafa4 Add ReactNative to the list of translated modules (#49472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49472

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69748223

fbshipit-source-id: 97aed0dfc25de9117db3c359970dd94899dd1417
2025-02-18 00:41:51 -08:00
Alex HuntandFacebook GitHub Bot cda2d11c16 Split index.js types into index.js.flow (#49470)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49470

Adds a `packages/react-native/index.js.flow` file.

**Motivation**

This is on the critical path to generating TypeScript types, and a full API snapshot, from `index.js.flow`.

As we iterate, this new file will move to closely matching `types/index.d.ts` by adding type exports (missing today) — giving us an equivalent public API in both languages.

**Motivation for this pattern**

Having a type index file:

- Will become the entry point for `yarn build-types`.
- Enables us to bypass the `module.exports` pattern in `index.js` without a runtime breaking change.
    - This pattern is preferable because:
        - 1/ Aligns with existing manual TypeScript definitions (i.e. these are **already restricted** to `import` syntax in user code)
        - 2/ Allows doc comments on original types to propagate to IDEs/users.

**Implementation notes**

NOTE: This diff has **no effect** on compiled code at runtime, and **no effect** on the current manual TypeScript API of `react-native`. It only has an effect on Flow usage in fbsource — most of which are deep type imports today.

- Exports are grouped and sorted identically to each pre-existing getter in `index.js`.

Changelog: [Internal] - Redefine root `react-native` type exports, affecting Flow usages only

Reviewed By: rubennorte

Differential Revision: D69659837

fbshipit-source-id: c65e30d1ac5c4f322cfde9335dbee80a8c9efda8
2025-02-17 13:57:48 -08:00
Rubén NorteandFacebook GitHub Bot e57cd0916c ] Fix native module check when not using batched bridge (#49483)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49483

Changelog: [internal]

Reviewed By: fabriziocucci

Differential Revision: D69753755

fbshipit-source-id: fe267ed60b5f7d6baac7dee5d7be0f733b34e9e9
2025-02-17 12:49:32 -08:00
Sunny LuoandFacebook GitHub Bot 3a4798cc30 fix: Inconsistency SVG Handling between bundle command and Image.resolveAssetSource (#49452)
Summary:
ref: https://github.com/facebook/react-native/pull/28266

Currently, SVG is not recognized as an image in the CLI bundle command, as defined in [assetPathUtils.js](https://github.com/facebook/react-native/blob/main/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js#L43-L50) . This is the correct behavior, as it ensures that SVG files are copied to the raw folder for Android resources.

However, there is an inconsistency with Image.resolveAssetSource, which does not follow the same classification. Instead, it resolves SVG assets to the drawable folder, leading to blank svg rendering errors in some scenario (codepush).

## Changelog

[Android][Fixed] - getAndroidResourceFolderName() should return raw folder for svg file

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

Test Plan:
1. Use svg file this way `<LocalSvg asset={require('./react-logo.svg')} />`
2. Use `react-native bundle` command to make a bundle and sideload that bundle from sdcard. The svg file should render correctly.

Reviewed By: cortinico

Differential Revision: D69750779

Pulled By: Abbondanzo

fbshipit-source-id: 3af8d4a5da07213cdbb968b070d2507ed897d194
2025-02-17 11:04:39 -08:00
Ruslan LesiutinandFacebook GitHub Bot 13dae0601d Record React Native process (#49370)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49370

# Changelog: [Internal]

When we start tracing, we will record metadata event for current process.

We will base it off the assumption that the thread where we handle `Tracing.start` event is the main one.

We can't register the main thread yet:
1. We can't assume that CDP messages are handled on it - this is not the case for Windows and in a long term Inspector will be moved to its own thread
2. We don't have any similar mechanism as Runtime Executor, but for Main thread. This will require Host providing an executor for it.

I've validated at the top of the stack that not registering the main thread should not affect how trace is displayed in CDT.

Reviewed By: rozele

Differential Revision: D69465926

fbshipit-source-id: 103de1da9d00564bf201456ad04a465387c1d542
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot acebebfd21 Expose API for registering processes and threads (#49083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49083

# Changelog: [Internal]

> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.

Added 2 new public methods to `PerformanceTracer` instance for registering metadata Trace Events for processes and threads.

Reviewed By: huntie

Differential Revision: D68439733

fbshipit-source-id: dd9f0e72e2414b8c665c57a542cbbfe7df34a516
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot 71f0b4d5a0 Use real process id and thread ids (#49309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49309

# Changelog: [Internal]

Use newly added module to get real OS-level process and thread ids.

We will keep process id on an instance, because I don't think it could change over time? For thread id, we will get it at the time of event registration.

Reviewed By: rozele

Differential Revision: D69316094

fbshipit-source-id: e12f2ea147ee8bf5a0a13ef293b8d85a0b64fc02
2025-02-17 09:34:33 -08:00
Ruslan LesiutinandFacebook GitHub Bot 994d7cc2f7 Define OSCompat module (#49302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49302

# Changelog: [Internal]

Added OS-agnostic module that will implement 2 basic capabilities:
- Getting current process id
- Getting current thread id

Reviewed By: javache

Differential Revision: D69316093

fbshipit-source-id: 114d235f1137eaf9c41d95df76f15532766d1bc8
2025-02-17 09:34:33 -08:00
Oskar KwaśniewskiandFacebook GitHub Bot 74de9526ab chore(iOS): deprecate RCTAppDelegate (#49078)
Summary:
Recently, I've introduced `RCTReactNativeFactory` in this PR: https://github.com/facebook/react-native/issues/46298, which is a good successor for `RCTAppDelegate`.

### Why?

`RCTAppDelegate` introduced strong coupling between React Native and AppDelegate pattern. From iOS 13+ there is a newer equivalent (Scene Delegate) which is not possible to achieve with current architecture. The proposed solution involves migration to a `RCTReactNativeFactory` a class that encapsulates initialization logic of React Native.

This migration will make brownfield initialization easier by making it more flexible and simpler to integrate into already established apps.

### Deprecation plan

The plan I've discussed with cipolleschi involves:

- Deprecation of `RCTAppDelegate` in 0.79 (current main)
- Migration off `RCTAppDelegate` to SceneDelegate + `RCTReactNativeFactory` in 0.80

## Changelog:

[IOS] [DEPRECATED] - deprecate RCTAppDelegate

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

Test Plan: Not needed

Reviewed By: cortinico

Differential Revision: D69061022

Pulled By: cipolleschi

fbshipit-source-id: b02a0ff3f26be9320da749f38c9cf083804f9f30
2025-02-17 09:12:17 -08:00
Kudo ChienandFacebook GitHub Bot cdc166709d Allow passing custom JSRuntimeFactory to DefaultReactHost (#49366)
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md

## Changelog:

[ANDROID] [CHANGED] - Allow passing custom JSRuntimeFactory to DefaultReactHost

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

Test Plan:
- ci passed
- test from https://github.com/react-native-community/javascriptcore/pull/4

Reviewed By: cipolleschi

Differential Revision: D69656837

Pulled By: cortinico

fbshipit-source-id: ba8bf744c920a70c10fe5f6743f8dd182c88c4d4
2025-02-17 07:30:45 -08:00
Vitali ZaidmanandFacebook GitHub Bot 63080727a7 minor variable names and console message contents and timing refactors (#49464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49464

Changelog:
[General][Internal] - minor variable names and console message contents and timing refactors

Reviewed By: hoxyq

Differential Revision: D69667948

fbshipit-source-id: 2305b873c85cd193cbbb63b03819a8d360e11880
2025-02-17 07:01:33 -08:00
Nicola CortiandFacebook GitHub Bot bbfccd088b RNGP - Convert if to when in getPackagingOptionsForVariant (#49426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49426

This is a nit, but I'm following up on a review comment that was left behind.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69656370

fbshipit-source-id: 76de4d77d9993bd9a35d7df019a6cebcce13d632
2025-02-17 06:51:50 -08:00
Samuel SuslaandFacebook GitHub Bot 49b7ce0856 delete RCTUIUtils (#49453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49453

changelog: [internal]

Reviewed By: rubennorte

Differential Revision: D69716706

fbshipit-source-id: 46e786de85fbee142855384e2338529de6c8a644
2025-02-17 06:40:36 -08:00
Kudo ChienandFacebook GitHub Bot 176bed79b4 decouple jsc when USE_THIRD_PARTY_JSC=1 on ios (#49371)
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md. this pr tries to decouple all jsc code when `USE_THIRD_PARTY_JSC=1` on ios

this pr includes these changes:
- exclude `React-jsc` pod and pod dependency when `USE_THIRD_PARTY_JSC=1`
- in objcpp code, remove `JSCExecutorFactory` / `RCTJscInstance` references when `USE_THIRD_PARTY_JSC=1`. it throws c++ errors like `No JSRuntimeFactory specified.` when no engine is specified (USE_HERMES=0 && USE_THIRD_PARTY_JSC=1). people need to override delegate methods to specify a JSRuntimeFactory.

## Changelog:

[IOS] [CHANGED] - Decouple JSC when `USE_THIRD_PARTY_JSC=1`

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

Test Plan:
- ci passed
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=1 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 bundle exec pod install`

Reviewed By: cortinico

Differential Revision: D69662457

Pulled By: cipolleschi

fbshipit-source-id: b272f46dde896d0981cfca75c9bfcf6775507307
2025-02-17 06:39:09 -08:00
Alex HuntandFacebook GitHub Bot 7368265107 Remove unstable_enableLogBox (#49427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49427

Also refine lint/`$FlowFixMe`s in `index.js`.

Changelog:
[General][Breaking] Remove deprecated `unstable_enableLogBox` function. LogBox is enabled by default.

Reviewed By: cortinico

Differential Revision: D69656713

fbshipit-source-id: 21ce775c84e17da036583f099a17f6524f9b9bf1
2025-02-17 05:48:06 -08:00
Alex HuntandFacebook GitHub Bot f940be1caa Remove index.js.flow shim from Node packages (#49461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49461

Flow now supports Package Exports 🎉. This means we can delete the compatiblity pattern in each of our build-enabled Node.js packages.

This simplifies the internal package structure needed to support Flow while developing from source in the monorepo — no prod impact.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D69741143

fbshipit-source-id: 070715cb6beb00eb393186dbf95856ceb87fabef
2025-02-17 05:44:22 -08:00
Mateo GuzmánandFacebook GitHub Bot d41f56176c Make ReactOverflowViewWithInset & NativeKind internal (#49456)
Summary:
As part of the initiative to reduce the public API surface, this classes can be internalized. I've checked there are no relevant OSS usages:

- [NativeKind](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+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+com.facebook.react.uimanager.NativeKind)
- [ReactOverflowViewWithInset](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+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+com.facebook.react.uimanager.ReactOverflowViewWithInset&p=1)

## Changelog:

[INTERNAL] - Make ReactOverflowViewWithInset & NativeKind internal

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

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

Reviewed By: cipolleschi

Differential Revision: D69736740

Pulled By: cortinico

fbshipit-source-id: 493cd3c10c0a99126b0e9b5536468977bbe03ecc
2025-02-17 04:37:00 -08:00
Vitali ZaidmanandFacebook GitHub Bot 502033337e keep heartbeat between inspector proxy and debugger going even if not idle (#49441)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49441

Changelog:
[General][Internal] - keep heartbeat between inspector proxy and debugger going even if not idle

When heartbeat was only used to keep the connection alive and to detect debugger timeouts, it was enough to send a ping every time the connection was idle for 10 seconds.

Now, when we use the heartbeat as a way to track how good is the round trip time between the inspector proxy and the debugger, we would like to make this tracking more reliable by sending a ping 10 seconds after each pong, even if the connection is not idle.

It also simplifies the code and makes it more clear by removing the confusing `shouldSetTerminateTimeout` variable.

Reviewed By: hoxyq

Differential Revision: D69665738

fbshipit-source-id: c8175b54d2b3df32ee60b316ec7bcf7bc0f0a1ee
2025-02-17 04:29:33 -08:00
zhongwuzwandFacebook GitHub Bot 16a476c0ee Fabric: Fix over reporting trait changes (#49431)
Summary:
Fixes https://github.com/facebook/react-native/issues/49330. We can keep the same logic as paper arch , please see https://github.com/facebook/react-native/pull/39439.

## Changelog:

[IOS] [FIXED] - Fabric: Fix over reporting trait changes

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

Test Plan: Repro in https://github.com/facebook/react-native/issues/49330.

Reviewed By: rshest

Differential Revision: D69740128

Pulled By: javache

fbshipit-source-id: 2946df68ab7eb88809c21dfcf33ce23f4cd6cb41
2025-02-17 04:19:28 -08:00
Mateo GuzmánandFacebook GitHub Bot e065411c91 Remove com.facebook.react.modules.network.TLSSocketFactory class (#49457)
Summary:
As part of the initiative to reduce the public API surface, I found that this class is not used in the codebase and can be removed.

[GH search for TLSSocketFactory](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+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+com.facebook.react.modules.network.TLSSocketFactory) – this class has some OSS usages, but all the ones I found are from old/non-active repos so that's why I think it is safe to remove but should be marked as [BREAKING] at the same time.

## Changelog:

[ANDROID] [BREAKING] - Remove com.facebook.react.modules.network.TLSSocketFactory class

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

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

Reviewed By: javache

Differential Revision: D69736673

Pulled By: cortinico

fbshipit-source-id: 1e7abe289cd3894eff5967ae224c3fb8d0501f1a
2025-02-17 03:47:28 -08:00
Nicola CortiandFacebook GitHub Bot 43cffb96db Gradle Configuration Cache - Round 3 (#49439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49439

This is the next part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm removing the `onlyIf` lambdas to make some tasks CC friendly.

The problem is that some `onlyIf` lambdas can't easily be serialized. Here I'm cleaning up
the problematic one to move the condition checks at execution time

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69664732

fbshipit-source-id: a457b2fae8114568ec4e04d772c9944022b1e1a5
2025-02-17 03:35:43 -08:00
Nicola CortiandFacebook GitHub Bot 0014265795 Gradle Configuration Cache - Round 2 (#49438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49438

This is the second part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm making the exec tasks CC friendly.

The problem is that previously we were using explicit streams which are not CC friendly
for stderr/stdout. The solution is to create a custom task and handle files as input
properties.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69662246

fbshipit-source-id: ad7e82e52b12d508ee15b68408882fdc3516d287
2025-02-17 03:35:43 -08:00
Nicola CortiandFacebook GitHub Bot e8b7772dc9 Gradle Configuration Cache - Round 1 (#49421)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49421

This is a first part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm making all those tasks `prepare*` CC friendly.

Those tasks were not CC friendly as they were referencing an external variable inside their body.
We don't need to know the library version, we can just substring after the first folder
and the tasks will behave as before.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69655168

fbshipit-source-id: 801d7817c7e2d7380342f175565cc9b1ff30c5d0
2025-02-17 03:35:43 -08:00
Jakub PiaseckiandFacebook GitHub Bot f15f618503 Sort entry points, add clipboard and AccessibilityInfo (#49458)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49458

Changelog: [Internal]

Sorts the entry points in the TS generator script and adds `Clipboard` and `AccessibilityInfo` which, as far as I can see, require no changes for their types to align with OSS.

Reviewed By: huntie

Differential Revision: D69663092

fbshipit-source-id: cfdb9ab5c07105497a1cdf4ebdc8de1e34b510bd
2025-02-17 02:59:58 -08:00