Commit Graph

38536 Commits

Author SHA1 Message Date
Ramanpreet Nara aa41184633 Take 2: Mitigate deadlock hazard in RCTUtils.m (#50807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50807

This structure is unsafe:

```
// In each native module:
+load
  dispatch_once
    NSBundle mainBundle
```

NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.

## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D73265906

fbshipit-source-id: f718e5bba7e95517613204b1f95e1b637e6c2366
2025-04-21 15:49:27 -07:00
Phillip Pan 5b5cf0e199 cleanup queue configs for some native modules (#50832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50832

Changelog: [iOS][Breaking]

these experiences did not end up shipping, so cleaning them up.

Reviewed By: fkgozali

Differential Revision: D73343958

fbshipit-source-id: ff0dc1394748c897aed9c66513b250dfc2192e0d
2025-04-21 15:09:54 -07:00
Alan Lee 77f2c610db fixed wrong class name in string (#50831)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50831

fixed wrong class name in string

Changelog:
[Internal]

Reviewed By: Abbondanzo

Differential Revision: D73370669

fbshipit-source-id: 76529099b1eabc4e23333fb97aec2c9b613ee7e0
2025-04-21 14:32:26 -07:00
David Vacca 7284bea018 Delete unused tag constant in LegacyArchitectureLogger (#50819)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50819

Delete unused tag constant in LegacyArchitectureLogger

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D73322326

fbshipit-source-id: 38463792675094db721d1fa018185d4aed17c1d8
2025-04-21 12:26:41 -07:00
George Zahariev 6ad41f9a3f Update hermes-parser and related packages in xplat to 0.28.1 (#50803)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50803

Bump hermes-parser and related packages to [0.28.1](https://github.com/facebook/hermes/blob/main/tools/hermes-parser/js/CHANGELOG.md).

Changelog: [internal]

Reviewed By: panagosg7

Differential Revision: D73242526

fbshipit-source-id: fbe0a233b4ae1315eb0e060c6338eb7156a5c6ea
2025-04-21 07:50:22 -07:00
David Richey 634f06688c Apply SWIFTFORMAT to fbsource
Summary:
```
hg files -I '**/*.swift' \
| arc lint \
  --take SWIFTFORMAT \
  --apply-patches \
  --no-paths-check \
  --paths-from - \
  --eden-prefetch \
  --output none \
  > /dev/null
```

Reviewed By: ebgraham

Differential Revision: D73276943

fbshipit-source-id: 5432642a217fc1fa37eb97409a2cc282f65c3117
2025-04-20 18:08:18 -07:00
David Vacca 0bdf7bf2c4 Log LegacyArchitectureLogger asserts only in Debug mode (#50818)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50818

Logging LegacyArchitectureLogger asserts only in Debug mode as that will give us enough information about wrong usages of Legacy Architecture at this point

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D73322301

fbshipit-source-id: 981a26b1bd7c89080f35ef0ab27677b0a38f2665
2025-04-20 13:44:24 -07:00
Nick Gerleman f98c227ee9 Fix Android Gradle Build and Missing Buck Build for Test (#50813)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50813

This is already in the same package, which makes Gradle build unhappy. Then, this wasn't invoked at all by a Buck build, because we have target per folder. Let's fix those.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D73286269

fbshipit-source-id: 6100c83e6607705160e4602e8637e3b1ebe8f28b
2025-04-18 18:01:56 -07:00
Tim Yung f2518d4374 RN/Metro: Configure Transformer for React 19 (#50809)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50809

Configures `react-native/metro-babel-transformer` (used by `react-native/babel-preset`) to parse source using `hermes-parser` to target React 19. This changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).

Most of this was already accomplished in https://github.com/facebook/react-native/pull/50377 ({D72070021}), but this call site was missed.

Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.

Reviewed By: elicwhite

Differential Revision: D73279825

fbshipit-source-id: c0d64cb8c0adb22b78c5fbed1b2c386c8b3f3ede
2025-04-18 17:14:47 -07:00
Joe Vilches db6e000023 Allow Switch to use default UISwitch accessibility annoucements (#50796)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50796

When we render a `Switch` today we are never actually focusing on the native `UISwitch` that gets rendered. We instead focus on the parent `RCTViewComponentView` which houses the `UISwitch` as a `contentView`. That is because of [this logic](https://www.internalfb.com/code/fbsource/[b7e1547dab5a]/xplat/js/react-native-github/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm?lines=1211-1213). This blocks the accessibility of any descendants, including the `contentView`.

What we lose here is the announcement of "on" and "off" based on the toggle state that comes built into `UISwitch`. To do this today you need to add `accessibilityState={{checked: ...}}` which is very unintuitive. Android DOES announce "on" and "off".

We can fix this with an override on the switch class.

Changelog: [iOS][Fixed] - Fix "on" and "off" announcements on `Switch`

Reviewed By: realsoelynn

Differential Revision: D73226500

fbshipit-source-id: ff4eed0b0b4b978e4b59c5e4b37d880373f6506c
2025-04-18 15:33:42 -07:00
Nick Gerleman f6589177ce Fix logic around hiding chrome with deeplinks on small screen (#50806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50806

1. `useWindowDimensions` is already returning in DIPs, my math was just wrong before
2. Playground is marking itself as a deeplink when it shouldn't be

Changelog: [internal]

Reviewed By: cortinico, joevilches

Differential Revision: D73221335

fbshipit-source-id: 32dfa9d60609faccef8e264aa46d64b79250b64d
2025-04-18 15:31:57 -07:00
Jakub Piasecki 5fd5188172 Fix TextInput onContentSizeChange event being dispatched only once on iOS (#50782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50782

Changelog: [IOS][FIXED] Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture

Currently, the comparison to decide whether to send event happens between the content size before and after layout metrics update. Those values turn out to be the same in all but the first call.

This updates the logic to use the previously send values in the comparison.

Reviewed By: huntie

Differential Revision: D73182563

fbshipit-source-id: 3b764a89c1844e203001d75022a3295a3fd747f2
2025-04-17 23:54:07 -07:00
Nick Gerleman 3e5c609a1e Back out "Mitigate deadlock hazard in RCTUtils.m" (#50795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50795

This diff causes `rntester-ios` to launch into legacy architecture by default.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D73225574

fbshipit-source-id: 9a4f1967bbabd23936cf2faf9a2bf48a850a4d11
2025-04-17 20:14:06 -07:00
nishan (o^▽^o) 1b45dc8033 feat: radial gradient js prop passing (#50268)
Summary:
Adds JS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[GENERAL] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50266 and https://github.com/facebook/react-native/pull/50269 and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898524

Pulled By: jorge-cab

fbshipit-source-id: 39bdf0f647ba19839b6e6deb09b30a1c337e6457
2025-04-17 16:39:44 -07:00
nishan (o^▽^o) a2409941c2 feat: radial gradient android changes (#50269)
Summary:
Adds android changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[ANDROID] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in processBackgroundImage-test.js in https://github.com/facebook/react-native/pull/50268
- Merge this and [this](https://github.com/facebook/react-native/pull/50268) and check examples in `RadialGradientExample.js`

Reviewed By: NickGerleman

Differential Revision: D71898546

Pulled By: jorge-cab

fbshipit-source-id: 2872bcf16a492c7bc829be10eedb0f6c7dad32c7
2025-04-17 16:39:44 -07:00
nishan (o^▽^o) d7533dce1c feat: radial gradient iOS (#50266)
Summary:
Adds iOS changes for radial gradient. Previous PR - https://github.com/facebook/react-native/pull/50209

## Changelog:
[IOS] [ADDED] - Radial gradient
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

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

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

Test Plan:
- Added tests in `processBackgroundImage-test.js` in https://github.com/facebook/react-native/pull/50268
- Merge this, https://github.com/facebook/react-native/pull/50268 and check examples in `RadialGradientExample.js`

Reviewed By: joevilches

Differential Revision: D71898565

Pulled By: jorge-cab

fbshipit-source-id: ac00c7c3cc7dcbe9116c2d60dac8eb1a87153908
2025-04-17 16:39:44 -07:00
Mohd. Yasir Ansari 867858df65 refactor: migrate DynamicFromObject to Kotlin (#50754)
Summary:
PR migrates DynamicFromObject class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromObject to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: mlord93

Differential Revision: D73118014

Pulled By: alanleedev

fbshipit-source-id: 84958ff07ccafea9ec3dbdf06467c638eb92d49d
2025-04-17 15:54:18 -07:00
Ramanpreet Nara fa9d082747 Bridgeless: Fix unstable_hasComponent
Summary:
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.

## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.

The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.

## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.

Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.

Reviewed By: yungsters

Differential Revision: D73127468

fbshipit-source-id: ee30bde486a6bb970f40f654c65a8946452f49b3
2025-04-17 14:33:26 -07:00
Nick Gerleman f144b53122 Remove "usesMapBufferForStateData" template parameter from ConcreteShadowNode and ConcreteState
Summary:
These internals have leaked pretty far. As we are adding support for JNI reference state wrappers, lets hide this, and make functions for getting MapBuffer work automatically if state data exposes the requisite functions, instead of external users needing to worry about multiple possible `ConcreteState` types for a given state data type.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73158627

fbshipit-source-id: e3ac2a045368d46fab72e2017fc28d680db6a7c0
2025-04-17 14:25:22 -07:00
Nicola Corti f1f2788410 Re-add an eventName field inside Event.kt to unbreak several libraries (#50787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50787

Converting Event from Java to Kotlin resulted in a number of breaking changes for Kotlin
libraries that were using an `.eventName` accessors from the `getEventName()` Java method.

This diff re-adds the `eventName` property without backing field.
This could potentially be disruptive in OSS but only one library is affected:
https://github.com/search?type=code&q=%22import+com.facebook.react.uimanager.events.Event%22+%22val+eventName%3A%22+%22%3A+Event%3C%22+language%3AKotlin+path%3A*Event.kt+NOT+is%3Afork+NOT+org%3Afacebook+NOT+path%3AInteropEvent.kt

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D73193202

fbshipit-source-id: a69159950e1ef275c93f265f264525236a19d1db
2025-04-17 13:06:13 -07:00
Alex Hunt 16a61bf2ba Remove .npmignore files from other packages, add lint check (#50786)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50786

Follows https://github.com/facebook/react-native/pull/50784. Having any `.npmignore` files is a gotcha — remove and replace with `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73193257

fbshipit-source-id: de715d74195e4f53c817c11f244a61c79b8ce5bc
2025-04-17 12:48:28 -07:00
Alex Hunt 09187491a6 Align __test_fixtures__ to __fixtures__ (#50785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50785

Enables us to simplify exclude patterns in `package.json#files`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D73185320

fbshipit-source-id: 40219a0e440740bec35876fff6e37e4bf4fe9ddc
2025-04-17 12:48:28 -07:00
Alex Hunt d1cf58484d Replace .npmignore files, ignore all test/fixture/docs directories (#50784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50784

Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.

This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.

```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```

NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). Having `"files"` as one source of truth is better and safer. See https://github.com/npm/cli/issues/6221.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73185321

fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
2025-04-17 12:48:28 -07:00
generatedunixname89002005287564 cd5991c648 Fix CQS signal. Id] 19045409 -- readability-redundant-string-init in xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/view
Reviewed By: dtolnay

Differential Revision: D73175242

fbshipit-source-id: 4f79d0f661a15fda883eb9f03c42040da9a740c8
2025-04-17 11:59:57 -07:00
Gijs Weterings e2232090d7 Update Danger to 13.0.4
Summary:
parse-git-config is a transitive dep for Danger that hasn't been updated in years and has an unresolved CVE (CVE-2025-25975)

Danger has moved away from this dependency yesterday and cut a new version, so we can update to resolve

Changelog: [General][Fixed] Update Danger to 13.0.4

Reviewed By: cortinico

Differential Revision: D73181590

fbshipit-source-id: e5c512e6f381725eea71d64555018327144e23be
2025-04-17 09:49:03 -07:00
Alex Hunt 2410fc97b7 Reorganise dev tooling/debugging modules as src/private/devsupport/ (#50730)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50730

This is a consolidation of our "dev support" features in the `src/private/` dir.

New grouping:

- `src/private/devsupport/`
    - `devmenu/` — The Dev Menu and in-app inspection features (in-app UI)
        - `elementinspector/` — The Element Inspector overlay (panel with sub-features), accessed from  Dev Menu → Toggle Element Inspector
        - `perfmonitor/` — The Perf Monitor overlay, accessed from Dev Menu → Show Perf Monitor
    - `rndevtools/` — Modules supporting React Native DevTools (external UI)

`NativeReactDevToolsRuntimeSettingsModule.js` and `NativeReactDevToolsSettingsManager.js` are also moved out of `specs_DEPRECATED/`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D73031559

fbshipit-source-id: 952a469f31f4cd05aeed27dc7023552e723ca078
2025-04-17 09:43:48 -07:00
Nicola Corti a3d38d5722 Kotlin to 2.1.20 (#50780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780

This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.

Changelog:
[Android] [Changed] - Kotlin to 2.1.20

Reviewed By: rshest

Differential Revision: D73122000

fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
2025-04-17 08:40:20 -07:00
Jakub Piasecki 6bc9447506 Update TextInput props, expose more types from the package (#50781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50781

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D73180987

fbshipit-source-id: e47d8fa674ab7e5e821e9786f8069c0b7466a082
2025-04-17 08:03:30 -07:00
Bogusz Kaszowski 74e8c78268 refactor: migrate DynamicFromArray to Kotlin (#50602)
Summary:
PR migrates DynamicFromArray class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.

## Changelog:

[ANDROID] [CHANGED] - Migrated DynamicFromArray to Kotlin

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

Test Plan: Run RN-Tester application and played around with it a bit.

Reviewed By: rshest

Differential Revision: D73179609

Pulled By: cortinico

fbshipit-source-id: e304884fea9f57e152bca4926677d7338dc2403a
2025-04-17 07:23:48 -07:00
Nick Lefever 95ca59eb94 Add unit test for shadow node state on clone (#50774)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50774

Adding a Fantom test for the `useShadowNodeStateOnClone` feature flag, showing that the shadow node state is maintained after commit hook processing only when the feature flag is enabled.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73121159

fbshipit-source-id: bbd7f46fbf49394ca5015e825a59d2fb1b519ee5
2025-04-17 06:18:36 -07:00
Jakub Piasecki b3c110b0b2 Add a lint rule preventing named type imports from React (#50776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50776

Changelog: [Internal]

Adds a lint rule that prevents the use of named imports when importing types from React. `flow-api-translator` relies on the `React` namespace being used when generating TypeScript definitions based on Flow.

Reviewed By: huntie

Differential Revision: D73170799

fbshipit-source-id: 96d014b016c7cec8d3b266447dc7a185d2b1da26
2025-04-17 05:39:22 -07:00
Gourav Khunger cb51d25ba8 refactor: FrescoBasedTextInlineImageSpan (#50532)
Summary:
I've migrated `FrescoBasedTextInlineImageSpan.java` to kotlin. Reference https://github.com/facebook/react-native/issues/50513.

## Changelog:

[ANDROID] [CHANGED] - Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin.

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

Pick one each for the category and type tags:

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

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

Test Plan: Tested the RN tester app with `yarn android` on both new and old architecture.

Reviewed By: rshest

Differential Revision: D73031024

Pulled By: cortinico

fbshipit-source-id: e7208bf1103849f38c3dc26d73b31315b2326275
2025-04-17 04:42:23 -07:00
riteshshukla04 f5ae157820 Added more test cases for URL (#50768)
Summary:
I forgot to add toString and protocol in test cases last time when we merged this https://github.com/facebook/react-native/pull/50043

## Changelog:

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

Pick one each for the category and type tags:

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

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL][ADDED] More Test cases

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

Test Plan: Tested with yarn jest

Reviewed By: rshest, cipolleschi

Differential Revision: D73169665

Pulled By: cortinico

fbshipit-source-id: 1115c0ccce52a67663fcd60ef376ce7bde502d1f
2025-04-17 03:18:13 -07:00
Rubén Norte 7ff5db3c46 Fix last Excalidraw SVG diagram in docs (#50765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50765

Changelog: [internal]

TSIA

Reviewed By: andrewdacenko

Differential Revision: D73117512

fbshipit-source-id: fd575e819781e93c3f8bf796415b3ff03797fb07
2025-04-17 01:59:21 -07:00
Nicola Corti 93f161b4bd Unblock binary-compatibility-validator for Kotlin 2.1.0
Summary:
This unblocks the `binary-compatibility-validator` for Kotlin 2.1.0
I've bump the tool to the latest version + re-aligned all the dependencies to the one used by the tool as well
(diff utils, asm, kotlinx-metadata-jvm).

Reviewed By: mdvacca

Differential Revision: D73057557

fbshipit-source-id: 020babea3a4032a8f9919ce7f456c3d4fb9a8e0c
2025-04-17 01:52:49 -07:00
Nicholas Wilson a3252def19 docs(typo): Fix typos in CHANGELOG-pre-060.md (#50772)
Summary:
Nothing big, fixed typos in CHANGELOG

## Changelog:

[INTERNAL] - Fix Changelog message

<!-- 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/50772

Reviewed By: cortinico

Differential Revision: D73155730

Pulled By: arushikesarwani94

fbshipit-source-id: 0f169b455af5d657f3fa09a99562eb376c955389
2025-04-17 01:06:59 -07:00
Nicola Corti 9d84909330 Enable CMP0069=NEW for all the targets
Summary:
Since I enabled INTERPROCEDURAL_OPTIMIZATION last week, we're having a warning for gtest that
they're not setting this CMake policy: CMP0069
https://cmake.org/cmake/help/latest/policy/CMP0069.html

As Gtest is not a production dependency, we can safely ignore this warning. So I'm enabling the policy for all the targets.

Changelog:
[Internal] [Changed] -

Reviewed By: alanleedev

Differential Revision: D73122573

fbshipit-source-id: 319a889024f080752f0c9287d011209459dcb013
2025-04-17 00:00:51 -07:00
Nick Gerleman 71c82ce1ad Remove code related to onInlineViewLayout event
Summary:
Afacit from searching both fbsource and GitHub, this should be totally dead.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D73154613

fbshipit-source-id: 1ed993ae53e7bc97232a8200b5fb4e01f0db7bb4
2025-04-16 19:57:32 -07:00
Nick Lefever 96939f160b Use source shadow node state on clone (#50773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50773

With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.

This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.

Changelog: [Internal]

Reviewed By: rshest, cipolleschi

Differential Revision: D72315898

fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
2025-04-16 18:58:26 -07:00
Nick Lefever b962646079 Add feature flag for using shadow node state on clone (#50751)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50751

See title

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D73067007

fbshipit-source-id: 2a67ed33ebd35ffaa3470d75ef6f695471820fa6
2025-04-16 18:58:26 -07:00
Nick Lefever 539f2377a4 Add feature flag for RSNRU on commit (#50745)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50745

See title

Changelog: [Internal]

Reviewed By: fabriziocucci

Differential Revision: D73038437

fbshipit-source-id: e304f3521799c893a51ee8da8e85f45352a8d873
2025-04-16 18:58:26 -07:00
riteshshukla04 4fa57f98da Replaced abort with Default value (#50764)
Summary:
Fixes https://github.com/facebook/react-native/issues/50740

## Changelog:
[INTERNAL] - App Crash on wrong prop type

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

Test Plan: Tested with wrong prop on RN Tester

Reviewed By: cipolleschi

Differential Revision: D73130916

Pulled By: NickGerleman

fbshipit-source-id: 21ffc242e6398509584baf27cf3fb98cbaf2582d
2025-04-16 17:16:32 -07:00
generatedunixname89002005287564 986bcdbbfb Fix CQS signal. Id] 42896038 -- modernize-concat-nested-namespaces in xplat/js/react-native-github/packages/react-native/ReactCommon/hermes/inspector-modern/chrome
Reviewed By: dtolnay

Differential Revision: D73023455

fbshipit-source-id: 394a337d10546308efa4a49aa7e72b67ef41c2f1
2025-04-16 16:52:06 -07:00
Riccardo Cipolleschi 5ed459283a Add deprecation message for receiveCommand (#50770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50770

OSS CI is failing because the we forgot a deprecation message in ReactScrollViewManager.

## Changelog:
[Internal] - Add deprecation annotation to fix ci build

Reviewed By: sbuggay

Differential Revision: D73136939

fbshipit-source-id: 4f39d7c7ae60aaca1011b70135d9535b16ed58e0
2025-04-16 15:51:37 -07:00
zhongwuzw 692b05e77d CSS Added hwb(H W B / A) notation (#50750)
Summary:
Fixes https://github.com/facebook/react-native/issues/50583. cc NickGerleman

## Changelog:

[GENERAL] [FIXED] - CSS Added hwb(H W B / A) notation

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

Test Plan: Added hwb(H W B / A) notation

Reviewed By: cipolleschi

Differential Revision: D73126316

Pulled By: NickGerleman

fbshipit-source-id: 8e3730c6de44a0b4d8a21339e1f7339cb70e2044
2025-04-16 15:47:28 -07:00
Vitali Zaidman 95af970096 Update debugger-frontend from 26e19a4...bc635fa (#50762)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50762

Changelog: [Internal] - Update `react-native/debugger-frontend` from 26e19a4...bc635fa

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

Reviewed By: huntie

Differential Revision: D73102920

fbshipit-source-id: a6c7c4cee2cf8e2ba4ecf130eafa5e6bf6c71e10
2025-04-16 13:46:04 -07:00
Vitali Zaidman e18e4feb3a react native devtools extra telemetry (#50737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50737

Changelog: [Internal][General] the debugger can now be opened with the query param "telemetryInfo"

Corresponding PR on debugger: https://github.com/facebook/react-native-devtools-frontend/pull/157

Reviewed By: huntie

Differential Revision: D72972397

fbshipit-source-id: 51612d90fedb489ffa1079bfd86d27d0f38b6eee
2025-04-16 13:46:04 -07:00
Sam Zhou 3ab7c26e20 Deploy 0.268.0 to xplat (#50769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50769

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D73120518

fbshipit-source-id: 34017d8c5be1200e669d97012be3d329c815e607
2025-04-16 12:54:38 -07:00
Eugene Lin d4f2b02b4d Lower JS Thread Priority by 10
Summary:
## Changelog: [Internal]: [Threading][Added] - Add option to change thread priority
D73074402 handles lowering priority for IWM js and granite threads. this diff handles lowering priority for in game panel js thread

JS thread inherits parent thread priority by default
lowering priority by 10

Reviewed By: rshest

Differential Revision: D72842049

fbshipit-source-id: 6797f7c8406a410956c64bb08a12d2b26c100040
2025-04-16 11:19:29 -07:00
Ramanpreet Nara a6f510003c Mitigate deadlock hazard in RCTUtils.m
Summary:
This structure is unsafe:

```
// In each native module:
+load
  dispatch_once
    NSBundle mainBundle
```

NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.

## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.

Created from CodeHub with https://fburl.com/edit-in-codehub

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D73058551

fbshipit-source-id: 9d14b5556748288227cfb93940f79d44997d7b47
2025-04-16 10:33:53 -07:00