Commit Graph

32153 Commits

Author SHA1 Message Date
imWildCat e320ab47cf fix the path of the script phase (#45208)
Summary:
Since 0.75-rc.x, I cannot run pod install because of an linking issue of react native firebase.

https://github.com/reactwg/react-native-releases/issues/341#issuecomment-2194568204

## Changelog:

[IOS][FIXED] Auto linking script of script phase

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

Test Plan: Full demo of this fix: <https://github.com/imWildCat-archived/react-native-075-rc2-regression-ios-linking-script-phase>

Reviewed By: christophpurrer

Differential Revision: D59125585

Pulled By: blakef

fbshipit-source-id: be96d3b207eff67c5e0d777203e7fc0d10103fc0
2024-06-27 16:14:59 -07:00
Saad Najmi a557a81f96 Remove [RCTConvert UIBarStyle:] (#44597)
Summary:
Resolves https://github.com/microsoft/react-native-macos/issues/2008

Followup to https://github.com/facebook/react-native/pull/42100 / https://github.com/facebook/react-native/commit/157cb0e02b6328e8b640f2b302a11c298a240493 , let's remove the deprecated RCTConvert method.

## Changelog:

[IOS] [REMOVED] - Remove `[RCTConvert UIBarStyle:]`

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

Test Plan: CI should pass

Reviewed By: christophpurrer

Differential Revision: D59128144

Pulled By: javache

fbshipit-source-id: 3e66422a7f4a139a6d68cbdfc6aae211ea239d4e
2024-06-27 16:07:57 -07:00
Sam Zhou 1a990d1904 Deploy 0.238.3 to xplat (#45209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45209

Changelog: [Internal]

Reviewed By: alexmckenley

Differential Revision: D59119421

fbshipit-source-id: a547a153c051c103ecd16ad0497d30d43dbe80a7
2024-06-27 14:02:03 -07:00
Tim Yung 1341169a4b RN: Remove forwardRef from ScrollView (#45197)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45197

With React 19, `forwardRef` is no longer necessary because `ref` is available on props. However, this only holds true for functional components — not class components.

This eliminates the `forwardRef` invocation in `ScrollView`, while retaining the wrapper component to map `ref` to `scrollViewRef` for the class component. For now...

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D59091873

fbshipit-source-id: 60afcd441aec82fa050738b5c09083f3a26378d6
2024-06-27 11:08:11 -07:00
Alex Hunt bfc51f97da Expose preprocessor flag/Buck constraint for Fusebox opt in (#45203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45203

Configures a `REACT_NATIVE_ENABLE_FUSEBOX_DEBUG` flag, and exposes this flag in the Buck target via a [constraint setting](https://www.internalfb.com/intern/wiki/Buck-users/select-and-friends/#constraint-setting-and-c). This is an additional hook to enable the new debugger stack (codename Fusebox) as part of our internal rollout.

NOTE: This approach replaces D59014161 (reverted).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D59109110

fbshipit-source-id: 7d23d9d402569b00d8dd17b9c8f3bcc108f0365f
2024-06-27 09:44:15 -07:00
Jorge Cabiedes Acosta eb9c388492 Update Filter header (#45151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45151

This change was missed when fixing hue-rotate and adding drop-shadow. I believe the only issue with this was stacking context was not being created for these two filters.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D58965245

fbshipit-source-id: e6bfdb738a8bc8caa878f60420cfe8b421f64aa4
2024-06-27 09:43:39 -07:00
Nicola Corti e8d3ad7216 Let build_android produce a signed maven-local.zip archive (#45161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45161

This is part of a bigger refactoring of the Android pipelines.
As `build_android` is already building everything, let's save the maven-local
so it can be reused by other jobs (test_android_helloworld and build_npm_package).

Changelog:
[Internal] [Changed] - Let build_android produce a signed maven-local.zip archive

Reviewed By: cipolleschi, blakef

Differential Revision: D59002893

fbshipit-source-id: db03946c975b2ce91dae0c4011981b2fe9dd6113
2024-06-27 09:29:22 -07:00
Riccardo Cipolleschi 2adb389fac Disable unit tests for flakyness in CircleCI (#45133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45133

Recently, CircleCI has failed pretty often due to these tests.
The reason is that we migrated these jobs to M1 machines, as circleCI is deprecating intel ones, and on these machines the simulators tend to freeze. Hence, every often we get stuck when running the tests. :(

We are going to move to GHA, so that should not be a big issue.

## Changelog:
[Internal] - Disable unit tests in CircleCI to improve CI robustness

Reviewed By: cortinico

Differential Revision: D58948614

fbshipit-source-id: 5420bdf0fda325779a4e287e7b00c623de822ccb
2024-06-27 09:27:24 -07:00
Oskar Kwaśniewski 815c415fb9 refactor: supportedInterfaceOrientations method to use RCTKeyWindow() (#43026)
Summary:
This PR refactors `supportedInterfaceOrientations` to use RCTKeyWindow instead of `[RCTSharedApplication() keyWindow]`.

## Changelog:

[IOS] [CHANGED] - Refactor supportedInterfaceOrientations method to use RCTKeyWindow()

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

Test Plan: CI Green

Reviewed By: dmytrorykun

Differential Revision: D59109614

Pulled By: cipolleschi

fbshipit-source-id: 025534c419078dce29e1e5caacf8a1b15de1abcc
2024-06-27 07:58:50 -07:00
Tim Yung fb58494283 RN: Fix mockComponent for Functional Components (#45196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45196

Currently, `mockComponent` makes a false assumption that if a component is a function, it extends `React.Component`.

There's a bunch of problems with this mocking setup with requiring mock components that extend `React.Component`, but this change does not attemp to solve that.

This change unblocks future refactors to make native components export functional components (that are neither class component nor `forwardRef` results).

Changelog:
[General][Changed] - Fixed native component mocking in Jest unit tests to support functional components

Reviewed By: javache

Differential Revision: D59097730

fbshipit-source-id: ca2784ac3baa9ab4ab6a503c5fd6437c60179352
2024-06-27 07:26:04 -07:00
Tim Yung 3965b7d78b RN: Fix Test Case Isolation in Modal-test.js (#45195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45195

Configure `Modal-test.js` to reset modules between test cases so that there is better isolation, making the tests easier to reason about and to debug.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D59097729

fbshipit-source-id: 3b9260283e171ff7fa6b7ffc56685f703875291e
2024-06-27 07:26:04 -07:00
Riccardo Cipolleschi c0b5e2e031 Bump CLI dependencies to alpha.11 (#45179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45179

## Changelog:
[General][Changed] - Bumps the CLI to alpha 11

Reviewed By: cortinico

Differential Revision: D59055459

fbshipit-source-id: 3bebe80d0cf6e7af8d7f74f3a5e4e2ccc91cf419
2024-06-27 04:11:44 -07:00
Riccardo Cipolleschi 119ab33036 Port changes in the release testing script from the release branch (#45174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45174

As per title, this port bck to main the changes we made in the release testing script.

## Changelog:
[Internal] - Update release testing script to work with the new template

Reviewed By: blakef

Differential Revision: D59054045

fbshipit-source-id: 0e93c2db94499407845b4fb2c98c8b44310e770f
2024-06-27 04:11:44 -07:00
Riccardo Cipolleschi cf8d3f8007 Port CI improvements from Release branch to main (#45175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45175

This change ports the CI improvements we made on stable branch to main.

## Changelog:
[Internal] - Port back to main improvements we made in GHA

Reviewed By: cortinico

Differential Revision: D59053873

fbshipit-source-id: 73eb7e33b9bbdc5d8c3a9294f487ad969b144bf3
2024-06-27 04:11:44 -07:00
Rubén Norte b80812a9af Avoid unnecessary creation of null shared pointers in IntersectionObserverManager (#45190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45190

Just a small follow up from the previous change to `IntersectionObserverManager`.

Changelog: [internal]

Reviewed By: javache

Differential Revision: D59065041

fbshipit-source-id: 2944299143e6a0fe53fe64083db85635e72d71af
2024-06-27 03:36:36 -07:00
Pieter De Baets c2e080419b Fix crash on reload when useImmediateExecutorInAndroidBridgeless is enabled (#45162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45162

Previously we would crash in ReactInstance#callFunctionOnModule (P1443291303) when reloading (due to the onHostPause call) because we removed a source of synchronization by using the immediate executor.

Workaround it by making sure we always null out references to `mReactInstance` before we actually start destroying it.

Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D59002404

fbshipit-source-id: 3ee14cd1fe7d423bb6158356bb99b3d2d6af8d6f
2024-06-27 03:25:39 -07:00
Tim Yung c128a517b8 RN: Avoid Invalidating ScrollView Children on unstable_subscribeToOnScroll (#45170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45170

Reimplements `unstable_subscribeToOnScroll` so it does not invalidate all descendant children upon first invocation per `ScrollView` instance.

Previously, the state update would cause the entire `ScrollView` component to re-render. This refactors the `enableSyncOnScroll` boolean state so that it resides in a lower level component that implicitly memoizes all of its `props` (including the `ScrollView` children).

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D59033393

fbshipit-source-id: 5a4b75aebdcbd0dd1dfa28511862bee495816250
2024-06-26 20:17:05 -07:00
Tim Yung 18302831c4 RN: Improvements to LogBoxInspectorHeader (#45194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45194

Makes a couple improvmeents to `LogBoxInspectorHeader`:

- Avoid eagerly initializing the `StatusBar` TurboModule until it is actually needed (which is only when the inspector is rendered on Android).
- Switch to `SafeAreaView` on iOS, for more accurate spacing (instead of the hardcoded iPhone X notch size).

Changelog:
[General][Changed] - Improve LogBox initialization performance
[iOS][Changed] - Improve LogBox safe area insets styling

Reviewed By: lyahdav

Differential Revision: D59081529

fbshipit-source-id: 01cc351fa9267f96b7a3c13cf1db80de3e597f93
2024-06-26 20:17:05 -07:00
Rubén Norte 39b33f158f Add unmount method in UIManagerMountHook and use it to notify not intersecting state in IntersectionObserver (#45186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45186

Changelog: [internal]

(this is an internal change because `IntersectionObserver` hasn't been released yet).

When testing IntersectionObserver, I realized that it wasn't triggering notifications for elements not intersecting when the surface that contained them was completely deallocated.

This is unexpected because IntersectionObserver notifications are delivered when the element is removed from the root, but not when the root itself is removed.

This fixes that behavior by:
1. Adding a method in `UIManagerMountHooks` to get a notification about the surface being unmounted. This is necessary to keep the API backwards compatible.
2. Using that method in `IntersectionObserverManager` to notify all observers (and report a change if necessary).

Reviewed By: javache

Differential Revision: D59061136

fbshipit-source-id: ef5669f9d6b08d98652489e6731902d192ec28f8
2024-06-26 11:40:21 -07:00
Alex Hunt 2cb04b4e2a Implement new HostTargetMetadata fields (iOS) (#44933)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44933

Resubmission of D58288489 (reverted due to C++ types in ObjC header).

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D58522256

fbshipit-source-id: 5a413f1d5cca9555e309ab07e4de0e19ad2603cc
2024-06-26 10:44:26 -07:00
Leon Xu 873ebc8055 Normalize newlines in public-api-test (#45145)
Summary:
Tests were failing on windows due to parsing CRLF line endings. This change enables the API tests for windows by normalizing line endings before parsing the file.

## Changelog:
[INTERNAL] [ADDED] - `public-api-test` now runs on Windows.

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

Pick one each for the category and type tags:

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

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

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

Test Plan: Build-time-only change; relying on CircleCI

Reviewed By: cipolleschi

Differential Revision: D59001867

Pulled By: huntie

fbshipit-source-id: a7a41945e8c93288be1d5b7b59df7f621e467657
2024-06-26 10:42:47 -07:00
Alex Hunt 2c210939d3 Unify versioning step in release process (#45185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45185

Follow-up to D59058085.

Since the release branch for 0.75 has been cut, we are able to simplify this step.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D59058084

fbshipit-source-id: 21b77a74e13bb196336a63b984f921f0c9fde587
2024-06-26 10:14:12 -07:00
Alex Hunt 5f60ad65ca Rename set-rn-version script, mark as deprecated (#45184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45184

This is a follow-up to D59055522.

> NOTE:This diff will be followed up by a merge of the set-rn-version script into set-version. (I had considered a rename to version-rn-artifacts, intentionally keeping this script separate and distinct from a future [lerna version + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)

- Rename `set-rn-version` to `set-rn-artifacts-version` (more accurate).
- Mark this script as deprecated.
    - For now, there are too many references to this script in CI test jobs to refactor away this entry point, so I am avoiding this — these should later be standardised to `set-version`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D59058085

fbshipit-source-id: 4123ac73b5c7a2e07a1d1b6da61e0ad94fc31f84
2024-06-26 10:14:12 -07:00
evanbacon 8989c9b71d mark all of react-native as client boundary for React Server Components (#43986)
Summary:
While developing React Server Component support for React Native, I've been adding this patch to the `react-native` package. It opts the entire `react-native` package out of being server rendered.

In the future, we'll want to circle back and refactor the `react-native` package to be more isomorphic so we can allow for utilities like `processColor` to be used in server bundles that target native platforms.

## Changelog:

[GENERAL] [ADDED] - Added support for importing `react-native` in a `react-server` environment for React Server Components support.

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

Pick one each for the category and type tags:

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

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

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

Test Plan:
Using react-native with this patch in a framework that supports React Server Components for native platforms, such as my unreleased branch of Expo Router, will allow for server rendering views from `react-native` to RSC Flight code with client references to the `react-native` package, e.g.

```js
import { View } from 'react-native';

export default function App() {
  return <View testID="basic-view" style={{ "backgroundColor":"#191A20" }}/>
}
```

Can be server rendered to ↓

```
2:I["/node_modules/react-native/index.bundle?platform=ios&dev=true#798513620",["..."],"View"]
1:["$","$L2",null,{"testID":"basic-view","style":{"backgroundColor":"#191A20"}}]
```

> The client boundaries (URL paths) are specific to the current Expo CLI implementation (based on Metro) and may look different in other implementations.

Reviewed By: rickhanlonii

Differential Revision: D55891243

Pulled By: TheSavior

fbshipit-source-id: d8dc9590039181ebf2c013dacca5f255d7a8f625
2024-06-26 09:25:56 -07:00
Alex Hunt ebf1a7b79b Bump packages for next major release (#45015)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45015

Set package versions to `0.76.0-main` (`0.75-stable` branch was cut).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58687399

fbshipit-source-id: 27ed987e4557705845d57d64e7547cddbd982a03
2024-06-26 07:59:49 -07:00
Alex Hunt 4a6b889e93 Move all package.json updates into set-version script (#45180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45180

- Simplifies the responsibilities of `scripts/releases/set-rn-version.js`.
    - This no longer modifies `packages/react-native/package.json`, delegating this to `set-version`.
- Simplifies logic in `set-version`, **fixing behaviour** against deps in `packages/react-native/package.json`.
- This also acts as cleanup since D58469912 (template removal) — removing the unreferenced `update-template-package.js` util.

NOTE: This diff will be followed up by a merge of the `set-rn-version` script into `set-version`. (I had considered a rename to `version-rn-artifacts`, intentionally keeping this script separate and distinct from a future [`lerna version` + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D59055522

fbshipit-source-id: 79b937f9e0ac790512b180ab4147aefef7f5202c
2024-06-26 07:59:49 -07:00
Alex Hunt 616d7f2095 Fix set-version script to skip react-native interdependencies (#45028)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45028

Since the addition of new workspaces to the repo which introduce interdependencies on `react-native` (`helloworld`, `react-native-test-library`), this fix is needed to preserve our current versioning strategy and bump the repo after yesterday's `0.75-stable` branch cut.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D58725561

fbshipit-source-id: ab282806560f47dc5acf7e694302ca6b85649b14
2024-06-26 07:59:49 -07:00
Alex Hunt 0fb611009e Back out "Expose preprocessor flag for fuseboxEnabledDebug"
Summary:
Reverting. The behaviour of [`exported_preprocessor_flags`](https://buck.build/rule/cxx_library.html#:~:text=in%20platform_preprocessor_flags.-,exported_preprocessor_flags,-(defaults%20to%20%5B%5D) was misunderstood (applies this flag).

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: hoxyq

Differential Revision: D59058502

fbshipit-source-id: bf05fbfb3cf865ae6501545561952742ebd0a122
2024-06-26 07:12:20 -07:00
Riccardo Cipolleschi e6dd44d6e5 Create Changelog for 0.75.0-RC.2 (#45183)
Summary:
Adds the Changelog for RC.2

## Changelog:
[General][Added] - Add changelog lines for RC2

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

Test Plan: N/A

Reviewed By: huntie

Differential Revision: D59058256

Pulled By: cortinico

fbshipit-source-id: 055eab41ac67fadf9414ab58216ed9428e2b4f76
2024-06-26 06:40:00 -07:00
Riccardo Cipolleschi aead3db639 Remove the workaround to import the Paper renderer (#44814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44814

We needed this workaround to import the paper renderer in the New Architecture to make sure that the event emitter is properly registered before we use it.

With the previous change, we don't need this lines of code anymore as we are using a different mechanism for the events.

## Changelog:
[Internal] - Avoid to import the old Renderer in the New Architecture

## Facebook:
This diff was initially part of D57097880, but I split them for the OTA

Reviewed By: cortinico

Differential Revision: D58234325

fbshipit-source-id: 1335992460635e9e97ee83615f9fd2651936b32c
2024-06-26 06:38:51 -07:00
Edmond Chui c6cbaf278c Update debugger-frontend from 750ed14...7cd81c1 (#45177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45177

Changelog: [Internal] - Update `react-native/debugger-frontend` from 750ed14...7cd81c1

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebookexperimental/rn-chrome-devtools-frontend/compare/750ed147da1c0edd118f359f906d5c7553c338a8...7cd81c1548a4bca19732037dcf82662a6ed9ca39).

Reviewed By: hoxyq

Differential Revision: D59053693

fbshipit-source-id: f3b22340d3ddd6efe8f9963f025ebd47a07830ab
2024-06-26 04:27:14 -07:00
Alex Hunt 981141c9a1 Expose preprocessor flag for fuseboxEnabledDebug (#45167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45167

Configures a `REACT_NATIVE_ENABLE_FUSEBOX_DEBUG` flag, and exposes this flag in the Buck target. This is an additional hook to enable the new debugger stack (codename Fusebox) as part of our internal rollout.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D59014161

fbshipit-source-id: f05e8b01ed07da90ef6d7a66ade05f462dd82023
2024-06-26 03:53:54 -07:00
Pieter De Baets 2dfb09c51a Match convertRawProp error handling in iterator-based props parsing (#45156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45156

We don't want to bubble up exceptions from props parsing, so match the behaviour from convertRawProp and fall back to the default value when an exception is encountered.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D59000397

fbshipit-source-id: f6f64a80fed98525cdd2a5b5d360c2d6ede76a12
2024-06-26 03:46:25 -07:00
Nicola Corti 88a9b6e89f Only build_android should write to the Gradle Cache (#45160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45160

This should optimize the Gradle cache, so that only `build_android` which
effectively builds everything Android related, should be allowed to write there.

More info on this strategy here:
https://github.com/gradle/actions/blob/main/docs/setup-gradle.md

Changelog:
[Internal] [Changed] - Only build_android should write to the Gradle Cache

Reviewed By: cipolleschi

Differential Revision: D59002323

fbshipit-source-id: 31b815747efdf93bfc7baf97799e287c8dcd7f02
2024-06-26 03:40:50 -07:00
Dmitry Rykun d3e0430dea Fix output path for generated artifacts (#45165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45165

This is a fix for https://github.com/facebook/react-native/issues/45112
This diff changes the codegen so that the output path is computed relative to project root (or `path` if provided) instead of current working directory.

Changelog: [General][Fixed] - Codegen computes output path relative to project root instead of current working directory.

Reviewed By: fkgozali

Differential Revision: D59009821

fbshipit-source-id: 3a138a3508fc239c8600b8c9f242f1c665f8e3c0
2024-06-26 01:59:54 -07:00
Peng Jiang b9ec0e5a1a use view.getPaddingStart() directly (#45150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45150

As the androidx.core 1.13.1 change, ViewCompact.getPaddingStart and getPaddingEnd are deprecated.

based on the suggestion from https://developer.android.com/reference/kotlin/androidx/core/view/ViewCompat#getPaddingStart(android.view.View), use: view.getPaddingStart and view.getPaddingEnd directly.
 {F1717102270}

Changelog: [Internal] - Migrating deprecated APIs with AndroidX.Core 1.13.1

Reviewed By: alanleedev

Differential Revision: D58955567

fbshipit-source-id: b84377e1ded0d94e9035dcfa4dbd9c463396a322
2024-06-26 01:47:24 -07:00
Peng Jiang 71f8d7608f use view.LAYOUT_DIRECTION_RTL directly (#45152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45152

As the androidx.core 1.13.1 change, ViewCompat.LAYOUT_DIRECTION_RTL is deprecated. Based on the suggestion from https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_RTL(), use view LAYOUT_DIRECTION_RTL directly and they have the same value.
 {F1716960190}

Changelog: [Internal] - Migrating deprecated APIs with AndroidX.Core 1.13.1

Reviewed By: alanleedev

Differential Revision: D58953460

fbshipit-source-id: 938200d1d0b1c7cc167f0119cc20ba72d16351a4
2024-06-26 01:47:24 -07:00
Jingbo Yang 8bd9952eaf Replace YogaConstants.UNDEFINED with Float.NaN (#45141)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45141

Reviewed By: javache, NickGerleman

Differential Revision: D58915391

fbshipit-source-id: 73ebee6abaced092366abdfc0ff41a66e7ff6c03
2024-06-25 18:48:15 -07:00
Neil Dhar 993f9fd8db Implement more missing methods on WithRuntimeDecorator (#45049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45049

WithRuntimeDecorator is missing many methods that were added after it.
Add implementations for them.

The underlying issue here is that because this inherits from
RuntimeDecorator, which implements all methods, there is no compilation
error for this runtime when we add new methods.

Changelog:
[GENERAL] [FIXED] - Add missing methods to the WithRuntimeDecorator class.

Reviewed By: avp

Differential Revision: D58752127

fbshipit-source-id: d80b4ed1c38698ed3850d0cd961bf7ddde2449a0
2024-06-25 18:11:47 -07:00
Bartłomiej Błoniarz 218ea5d44c Add missing WithRuntimeDecorator methods (#45042)
Summary:
This PR adds missing `WithRuntimeDecorator` methods related to `NativeState`. This pattern is used by reanimated to ensure no concurrent access to the runtime. Without this `override` the `RuntimeDecorator` implementation was used, bypassing our mutex.

Changelog:
[GENERAL] [FIXED] - Add missing `NativeState` methods to the `WithRuntimeDecorator` class.

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

Reviewed By: fbmal7

Differential Revision: D58744051

Pulled By: neildhar

fbshipit-source-id: 3f5c85d0bf7cd6445d0c434ac4ae7ed54df203ba
2024-06-25 18:11:47 -07:00
Gijs Weterings 295626bc35 Upgrade @grpc/grpc-js from 1.7.0 to 1.10.9 (#45131)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45131

Changelog: [General][Security] Upgrade grpc/grpc-js from 1.7.0 to 1.10.9 (CVE-2024-37168)

Reviewed By: fabriziocucci

Differential Revision: D58948299

fbshipit-source-id: fc1d0047eedfd081212be68cf95fca571efd78d3
2024-06-25 17:30:10 -07:00
Gijs Weterings d538879e08 Upgrade braces from 3.0.2 to 3.0.3 (#45132)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45132

Changelog: [General][Security] Upgrade braces from 3.0.2 to 3.0.3 (CVE-2024-4068)

Reviewed By: hoxyq

Differential Revision: D58948245

fbshipit-source-id: 4ef653f2574e763f3a8d227310b55e0f336f19f4
2024-06-25 17:30:10 -07:00
Gijs Weterings 13f1b9e10f upgrade ws from 7.5.1 to 7.5.10 (#45129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45129

X-link: https://github.com/facebook/metro/pull/1297

Changelog: [General][Security] Update ws from 7.5.1 to 7.5.10 (CVE-2024-37890)

Reviewed By: hoxyq

Differential Revision: D58947571

fbshipit-source-id: 43ee200e02fcc17a47a30e0baaab4f01043fc6fd
2024-06-25 17:30:10 -07:00
Gijs Weterings 80cfacef78 Upgrade ws from 6.2.2 to 6.2.3 (#45130)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45130

Changelog: [General][Security] Update ws from 6.2.2 to 6.2.3 (CVE-2024-37890)

6.2.3 is a patch to mitigate a dos vuln https://github.com/websockets/ws/releases/tag/6.2.3

Reviewed By: hoxyq

Differential Revision: D58946681

fbshipit-source-id: ff73f31ffd9b14392e3bea4e616cb5f4c9b8d13f
2024-06-25 17:30:10 -07:00
Zeya Peng b5683a7516 Create util functions to convert Color <-> uint8_t RGBA values (#45139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45139

## Changelog

Sometimes we pass down int RGBA values in [0, 255] to represent color components in ReactNative;
and other times we use float. Since we introduce display P3, we probably want to use color depth more than 8bit

In the first case, when RGBA are passed down as uint8_t, we can directly calculate Color/SharedColor without normalizing them to [0,1] and scale back to [0, 255] as `colorFromComponents` does; otherwise there could be some precision loss..

So here I'm adding some new utils for that purpose: see `colorFromRGBA`, `redFromColor`, `greenFromColor`, etc

[Internal]
Examples in codebase:
* rgba in [0, 255]:
https://www.internalfb.com/code/fbsource/[67148a47147b0e15f0f0748003394040611c2bc2]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/graphics/fromRawValueShared.h?lines=28-35

* rgba in [0, 1]:
https://www.internalfb.com/code/fbsource/[67148a47147b0e15f0f0748003394040611c2bc2]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/graphics/fromRawValueShared.h?lines=37-45

https://www.internalfb.com/code/fbsource/[67148a47147b0e15f0f0748003394040611c2bc2]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/graphics/fromRawValueShared.h?lines=47-64

Reviewed By: rshest

Differential Revision: D58872165

fbshipit-source-id: 748a12a99591c895fed65cda6deeaa2a3e0c3cf5
2024-06-25 16:04:56 -07:00
Tim Yung 08b05f30c2 RN: Refactor ScrollView Native Component Imports (#45168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45168

Refactors the native component imports in `ScrollView` so that 1) they create less clutter in the `ScrollView` implementation file, and 2) they offer more efficient import inlining.

Currently, `ScrollView` has to evaluate both horizontal and vertical components even though only one may be used. Now this optimization is possible.

Changelog: [Internal]

Reviewed By: lyahdav

Differential Revision: D59015990

fbshipit-source-id: 963009821a7d3019d36a43269e9792ac1f2f38ec
2024-06-25 13:25:43 -07:00
Ruslan Lesiutin 2e03d262d4 upgrade[react-devtools-*]: v.5.3.0 (#45159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45159

Changelog: [Internal]

via `js1 upgrade react-devtools -v ^5.3.0`

allow-large-files

Reviewed By: EdmondChuiHW

Differential Revision: D59001348

fbshipit-source-id: e17e1070b38256644fa987bd00510b8a7c5d848a
2024-06-25 10:52:46 -07:00
Dmitry Rykun a44dd57f10 Update codegen artifacts for react-native-test-library (#45164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45164

Some changes have been made to the codegen since `react-native-test-library` was published. This diff updates the generated artifacts in that library.
Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D59010093

fbshipit-source-id: f11ccd3645da72d45c70581e485f8546166ca182
2024-06-25 09:57:04 -07:00
zhongwuzw 70b43bb013 Fixes js bundle failed (#45155)
Summary:
When I enabled `FORCE_BUNDLING`, it build errors like below. cc blakef
![image](https://github.com/facebook/react-native/assets/5061845/d23f6bad-ed60-4f1f-8111-2361c93e93a4)

## Changelog:

[INTERNAL] [FIXED] - Fixes js bundle failed

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

Test Plan: Enable FORCE_BUNDLING and build success.

Reviewed By: cipolleschi

Differential Revision: D59006962

Pulled By: blakef

fbshipit-source-id: 1142d1ddbae7346b67712fac0237950847211992
2024-06-25 08:57:21 -07:00
Ramanpreet Nara 7522336412 Bridgeless: Allow js bundle configuration via filepaths
Summary:
## Summary
Right now, the only way to load the javascript bundle is through the assets:// directory.

But, legacy react native also supports loading bundles via regular file urls.

If present, those file urls override the assets:// bundle urls.

This diff implements that support in bridgeless.

Changelog: [Android][Added] Allow js bundle file urls

Reviewed By: christophpurrer

Differential Revision: D58977143

fbshipit-source-id: 6f1a170546c8bbeac3a1b9d2dd5633177e33a688
2024-06-25 07:13:39 -07:00