Commit Graph
38167 Commits
Author SHA1 Message Date
Simek 6066919eb4 resolve conflict, deduplicate lock again 2025-08-13 20:11:35 +02:00
Rubén NorteandFacebook GitHub Bot d009a02c6c Add benchmark to compare rendering times for View and ViewNativeComponent (#53248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53248

Changelog: [internal]

This adds a new benchmark that compares the rendering time (only rendering, not committing, mounting, effects, etc.) of `<View>` and `<ViewNativeComponent>`.

Baseline:

| (index) | Task name                                | Latency avg (ns)  | Latency med (ns)   | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ---------------------------------------- | ----------------- | ------------------ | ---------------------- | ---------------------- | ------- |
| 0       | 'render 100 views (Noop)'                | '333036 ± 0.39%'  | '328452 ± 2393.0'  | '3019 ± 0.18%'         | '3045 ± 22'            | 3003    |
| 1       | 'render 100 views (ViewNativeComponent)' | '1335974 ± 3.45%' | '1228468 ± 7541.5' | '797 ± 0.71%'          | '814 ± 5'              | 1000    |
| 2       | 'render 100 views (View)'                | '2296988 ± 1.60%' | '2170821 ± 12374'  | '449 ± 0.74%'          | '461 ± 3'              | 1000    |

This shows that **`<View>` currently has an overhead of 75% in rendering time**.

I've also tested a modification of `View` such as:

```
component View(...props: ViewProps) {
  return {
    // This tag allows us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,
    // Built-in properties that belong on the element
    type: ViewNativeComponent,
    key: undefined,
    // $FlowExpectedError[prop-missing]
    ref: props.ref,
    props,
  };
}
```

This makes `View` basically a no-op component, and the benchmark after this looks like:

| (index) | Task name                                | Latency avg (ns)  | Latency med (ns)  | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ---------------------------------------- | ----------------- | ----------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'render 100 views (View)'                | '1743010 ± 2.25%' | '1630816 ± 10616' | '600 ± 0.74%'          | '613 ± 4'              | 1000    |
| 1       | 'render 100 views (ViewNativeComponent)' | '1370699 ± 4.04%' | '1242284 ± 14172' | '789 ± 0.74%'          | '805 ± 9'              | 1000    |

This shows that `View`, just for existing as a wrapper component, has an overhead of 31% in rendering time, which means that **the opportunities to reduce the overhead beyond what we already did are limited**.

Reviewed By: rshest

Differential Revision: D80169514

fbshipit-source-id: aa2a1fc3f9d0ee3a60c03dd32555802fa7265251
2025-08-13 10:14:21 -07:00
Rubén NorteandFacebook GitHub Bot e8bf982bac Support overriddenDuration in Fantom benchmarks (#53250)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53250

Changelog: [internal]

This updates the types for Fantom benchmarks to support the new `overriddenDuration` option from `tinybench`.

It also exposes a new method in the benchmark namespace to access the same timestamp used in benchmarks.

Reviewed By: rshest

Differential Revision: D80169515

fbshipit-source-id: 59af197eababbf5b8544ee9f1862b206756dc87d
2025-08-13 10:14:21 -07:00
Rubén NorteandFacebook GitHub Bot c17267ec87 Upgrade tinybench to v4.1.0 (#53249)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53249

Changelog: [internal]

This just upgrades tinybench (used in Fantom benchmarks) to v4.1.0, which contains a feature we need to customize test durations.

Reviewed By: rshest

Differential Revision: D80169516

fbshipit-source-id: 5813b3050843b52d604619a44a5e097e26f54432
2025-08-13 10:14:21 -07:00
SimekandFacebook GitHub Bot 50d5316b1b Workspace: align eslint-plugin-jest with Jest version (#53246)
Summary:
While verifying the lock deduplication changes, I have spotted that `eslint-plugin-jest` package does not match Jest version used within the workspace.

## Changelog:

[INTERNAL][CHANGED] - update `eslint-plugin-jest` package in workspace to align with Jest version used

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

Test Plan: Running `yarn test`, `yarn lint-ci` and `test-typescript` checks does not yield any errors.

Reviewed By: rshest, cortinico

Differential Revision: D80170591

Pulled By: robhogan

fbshipit-source-id: f3ac58bc26cf2d3a34899f8558f872b3df85942d
2025-08-13 09:36:21 -07:00
Mateo GuzmánandFacebook GitHub Bot bc54a06fcb Migrate YogaNative to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNative to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1839

Reviewed By: rshest

Differential Revision: D79897725

Pulled By: cortinico

fbshipit-source-id: 6fc98565368d831b8698464fe26ad47f8fff6a74
2025-08-13 08:56:03 -07:00
riteshshukla04andFacebook GitHub Bot c5956da8c0 Fix: Setting maxLength to 0 in TextInput still allows typing on iOS (#52890)
Summary:
Trying to fix https://github.com/facebook/react-native/issues/52860
## 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
-->
[IOS][FIXED] Setting maxLength to 0 in TextInput still allows typing on iOS

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

Test Plan:
https://github.com/user-attachments/assets/56549e0f-6bbf-461e-815c-794abdee2018

Tested on Android too

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D80095701

Pulled By: cipolleschi

fbshipit-source-id: 5e76f88798e32097e6a619c44ff6240b4f01fc6f
2025-08-13 07:23:30 -07:00
Samuel SuslaandFacebook GitHub Bot 568f59e5b1 use trace section in C++ Animated instead of perfetto (#53223)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53223

changelog: [internal]

remove dependency on perfetto and use TraceSection like we do elsewhere.

Reviewed By: zeyap, rubennorte

Differential Revision: D80087082

fbshipit-source-id: 08d3434985443db9a83189a4dfabc65d6eda8166
2025-08-13 06:52:16 -07:00
Mateo GuzmánandFacebook GitHub Bot 33ca53d9db Migrate YogaConfigFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaConfigFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1833

Reviewed By: rshest

Differential Revision: D79897762

Pulled By: cortinico

fbshipit-source-id: 9457b307204f2066a02690f96a88fce6755f915e
2025-08-13 06:46:48 -07:00
Philip HeinserandFacebook GitHub Bot 91e69b5d4c fix crashes on non-UTF8 Info.plist files under local frameworks (#52336)
Summary:
fix: https://github.com/facebook/react-native/issues/52279

## Changelog:

[iOS] [FIXED] - non-UTF8 crashes Info.plist local frameworks

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

Test Plan:
after this change pods install and are working with the new warning:
[!] Failed to read Info.plist at /Users/user/apps/test/ios/promiflash/Frameworks/YouTubeEmbeddedPlayerFramework.framework/Info.plist: invalid byte sequence in UTF-8

Reviewed By: cortinico

Differential Revision: D80096932

Pulled By: cipolleschi

fbshipit-source-id: f60cd67cb99a581d6fbab92422c1adf7b50066eb
2025-08-13 02:51:10 -07:00
Christoph PurrerandFacebook GitHub Bot 9f0d24bb05 Enforce void return type for void return type in JS C++ TM spec (#53214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53214

Changelog: [General] [Fixed] Enforce void return type for void return type in JS C++ TM spec

Example if you have this spec
```
export interface Spec extends TurboModule {
  +foo: (bar: string) => void;
}
```
We must enforce in C++ that the return type is `void` as e.g.
```
  void foo(jsi::Runtime& rt, const std::string& bar);
```
Right now you can return any type in C++ such as `std::string` which does not make sense

Reviewed By: lenaic

Differential Revision: D79980538

fbshipit-source-id: 9b99ea6b1ac97d1e46cdb9952e83c445ec5503b7
2025-08-12 23:13:16 -07:00
Zeya PengandFacebook GitHub Bot 9f77d421bb make sure to only disable js sync & animate layout when disableFabricCommitInCXXAnimated==false (#53230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53230

## Changelog:

[Internal] [Changed] - make sure to only disable js sync & animate layout when disableFabricCommitInCXXAnimated==false

Reviewed By: sammy-SC

Differential Revision: D80002015

fbshipit-source-id: 5e6ee4b5908fe8d2ee52b77ca3b78164debc4d59
2025-08-12 14:57:41 -07:00
Alan LeeandFacebook GitHub Bot 1c7925abb0 edit RN change log (#53232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53232

Remove entry that was reverted for 0.81 release

Changelog: [Internal]

Reviewed By: shwanton, cortinico

Differential Revision: D80108112

fbshipit-source-id: 3176e7e26407ad8c71434b5576c722dc28021d08
2025-08-12 13:41:39 -07:00
Samuel SuslaandFacebook GitHub Bot b44e1839ca fix crash in adjustForMaintainVisibleContentPosition (#53208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53208

changelog: [internal]

When Fabric View Culling is enabled together with immediate state update, it may lead to a crash inside of `[RCTScrollViewComponentView _adjustForMaintainVisibleContentPosition]`.
When doing immediate state update, we can avoid calling `[RCTScrollViewComponentView _adjustForMaintainVisibleContentPosition]` altogether to avoid the crash.

Reviewed By: lenaic

Differential Revision: D80000362

fbshipit-source-id: 123b70aa31edb14a99bb968648eb8b8aac84afb6
2025-08-12 13:25:16 -07:00
Rubén NorteandFacebook GitHub Bot 4ee326f52c Add documentation for JS memory profiler in Fantom (#53226)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53226

Changelog: [internal]

This adds documentation about how to take JS memory heap snapshots in Fantom.

Reviewed By: lenaic

Differential Revision: D80090283

fbshipit-source-id: 04f66a62aa756d1020b8d8ef6fc0ea7e68341710
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot 90804fd088 Add documentation for JS sampling profiler in Fantom (#53227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53227

Changelog: [internal]

This adds docs for the new JS sampling profiler in Fantom

Reviewed By: lenaic

Differential Revision: D80090284

fbshipit-source-id: 0f7fa498cf141a51ac6fda331522945d42fc494d
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot e2035379b6 Add documentation for debugging in Fantom (#53228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53228

Changelog: [internal]

This adds some documentation about how to debug Fantom tests (C++ and JS).

Reviewed By: lenaic

Differential Revision: D80090286

fbshipit-source-id: 435d2079abfe72e93de0c297347b15dc39b25a89
2025-08-12 11:08:08 -07:00
Rubén NorteandFacebook GitHub Bot 0bf7721862 Use Jest naming for test regex in Fantom docs (#53229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53229

Changelog: [internal]

Tiny change to align with how Jest refers to this argument in its docs: https://jestjs.io/docs/cli#jest-regexfortestfiles

Reviewed By: lenaic

Differential Revision: D80090285

fbshipit-source-id: 86a4ad75078eb9b7575fca9659cc1a2e678f7a0a
2025-08-12 11:08:08 -07:00
Mateo GuzmánandFacebook GitHub Bot 35d8086881 Migrate DoNotStrip to Kotlin
Summary:
Migrate com.facebook.yoga.annotations.DoNotStrip to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1840

Reviewed By: rshest

Differential Revision: D79897758

Pulled By: cortinico

fbshipit-source-id: 79585e6ab793bd72e04440581d866f7721667db3
2025-08-12 10:54:27 -07:00
Samuel SuslaandFacebook GitHub Bot 65b5a5b25d make glog android only include + declare the dependency on glog (#53224)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53224

changelog: [internal]

glog is only used on Android.

Reviewed By: christophpurrer

Differential Revision: D80085730

fbshipit-source-id: 0dbec7929551f7c16719846c1868b0509b1d519a
2025-08-12 10:30:49 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 27217e8bd6 Initialize props for RCTPullToRefreshViewComponentView (#53231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53231

The RCTPullToRefreshViewComponentView props are not initialized when the component view is created. this could lead to undefined behaviors and crashes.

This change fixes it.

## Changelog:
[iOS][Fixed] - Properly initialize the RCTPullToRefreshViewComponentView

Reviewed By: sammy-SC

Differential Revision: D80093141

fbshipit-source-id: dac98d56c749b9f5d85338279c8da2a7e5ddb4a3
2025-08-12 10:16:19 -07:00
Mateo GuzmánandFacebook GitHub Bot 7e461003c6 Migrate YogaLayoutType to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLayoutType to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1837

Reviewed By: rshest

Differential Revision: D79897708

Pulled By: cortinico

fbshipit-source-id: e3c8a3cc60f806d151d2be956b26dd98963254a6
2025-08-12 09:49:31 -07:00
Samuel SuslaandFacebook GitHub Bot bd287e8e2c move some C++ Animated headers into internal folder (#52991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52991

changelog: [internal]

move internal files only to internal folder in C++ Animated

Reviewed By: rshest

Differential Revision: D79436926

fbshipit-source-id: fb8badefdbf7b54a351e57e457f2b6aaf36dc2a6
2025-08-12 09:32:43 -07:00
Mateo GuzmánandFacebook GitHub Bot db2a9c089c Migrate LayoutPassReason to Kotlin
Summary:
Migrate com.facebook.yoga.LayoutPassReason to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1836

Reviewed By: rshest

Differential Revision: D79897685

Pulled By: cortinico

fbshipit-source-id: 87d2e4b95fbdbfe48d84019e9ffb50deb9286d8c
2025-08-12 09:10:30 -07:00
Mateo GuzmánandFacebook GitHub Bot 40afa75a7c Migrate YogaNodeFactory to Kotlin
Summary:
Migrate com.facebook.yoga.YogaNodeFactory to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1832

Reviewed By: zielinskimz

Differential Revision: D79897733

Pulled By: cortinico

fbshipit-source-id: 3ea4f5635eb8c910719c13d3087356b96b6f0746
2025-08-12 08:57:43 -07:00
Mateo GuzmánandFacebook GitHub Bot 453508ada8 Migrate YogaMeasureOutput to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureOutput to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1842

Reviewed By: rshest

Differential Revision: D79897681

Pulled By: cortinico

fbshipit-source-id: 63280b6aed9bbeeb1e71458a1793c9647dcf0726
2025-08-12 07:55:41 -07:00
Mateo GuzmánandFacebook GitHub Bot 05eddd354e Migrate YogaMeasureFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaMeasureFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1835

Reviewed By: mdvacca

Differential Revision: D79897728

Pulled By: cortinico

fbshipit-source-id: 959ae976622838147685cf6088674dce25f5cc99
2025-08-12 07:40:31 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 641a79dc51 Improve benchmark comparison printout ("slower"->"faster") (#53221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53221

# Changelog:
[Internal] -

This changes the benchmark test results comparison print the results slightly differently, in particular it now uses the slowest result as a baseline and prints how much faster the other ones are (as opposed to printing "slower" previously).

This arguably brings a more positive vibe when looking into the benchmark results :)

Reviewed By: andrewdacenko

Differential Revision: D80082134

fbshipit-source-id: 7dc9c7c520afe08270d4f5da9031db02261690ba
2025-08-12 06:56:14 -07:00
Nicola CortiandFacebook GitHub Bot f1d014adbb Simplify RNTester Autolinking (#53095)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53095

This change simplifies the RNTesterApplication so that it's looking closer to the template MainApplication file.
In order to do so, I had to create 2 files inside the `metainternal/` folder as those files are
generated as part of the CLI Autolinking

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79722917

fbshipit-source-id: 06852c72ae1e1abed9952b1637515123977bc7b4
2025-08-12 05:49:49 -07:00
Vitali ZaidmanandFacebook GitHub Bot 7bfec89a97 temporary disable perf monitor to fix tests (#53209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53209

Changelog: Internal

Reviewed By: sammy-SC

Differential Revision: D80000286

fbshipit-source-id: 899cd5e6b193957579e61af65cf8177cd1666473
2025-08-12 05:47:11 -07:00
Rubén NorteandFacebook GitHub Bot 65974e938c Add support for JS debugging in Fantom (#53215)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53215

Changelog: [internal]

This adds a new environment variable to Fantom that allows debugging the JS code in tests.

Usage:

```
FANTOM_DEBUG_JS=1 yarn fantom <test>
```

**Does NOT work in OSS yet**. We need to include a third-party library to send HTTP and WebSocket requests and implement a wrapper on top of it.

Reviewed By: christophpurrer

Differential Revision: D79883372

fbshipit-source-id: d077c373a036033344e61d58274d5cd14028bda4
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 9c201c0f8f Automatically inject debugger statements in tests in preparation for debug mode (#53205)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53205

Changelog: [internal]

This injects a custom Babel transform for Fantom tests that automatically injects `debugger` statements in the generated code. This simplifies debugging by providing a default interruption point in the test setup for the test author to decide what to debug.

This has no effect unless the debugger is opened, which isn't happening yet.

Reviewed By: rshest

Differential Revision: D79996000

fbshipit-source-id: 6153587264d293a067e359edba4f64f41898c506
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 4978385067 Allow custom factories for HTTP and WebSocket clients for DevTools (#53200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53200

Changelog: [internal]

TSIA. This is necessary for Fantom to use real HTTP and WebSocket connections for DevTools, while still providing stubs for the runtime (the networking and websockets native modules provided to clients).

If there are no specific factories for DevTools provided, we fall back to regular ones (keeping backwards compatibility).

Reviewed By: rshest

Differential Revision: D79806934

fbshipit-source-id: 6d16fa44e11f3c8e304c3c3d31fe952d0ba5811a
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 42db2f8405 Split ReactInstanceConfig.enableDebugging into enableInspector and enableDevMode (#53201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53201

Changelog: [internal]

This splits the `ReactHost` option `enableDebugging` into more granular options:
- `enableInspector` which enables the connection with the inspector/debugger.
- `enableDevMode` which enables the use of bundles from Metro, reloads, etc.

This allows us to enable the inspector in Fantom without consuming bundles from Metro.

This should be backwards compatible with existing apps.

In the future, we should be able to inject custom `DevSupportManager` instances into the `ReactHost` so we can customize all options with any level of granularity (the same way we do on Android, for example).

Reviewed By: rshest

Differential Revision: D79804006

fbshipit-source-id: c28e788e5006cdbeb1a373d44b4e5aec1acec702
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot c2c2e6b7c2 Connect debugger before loading bundle (#53203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53203

Changelog: [internal]

This makes ReactHost connect the inspector immediately after creating the instance, aligned with how we do it on Android, instead of doing it as part of loading a bundle.

Reviewed By: rshest

Differential Revision: D79804004

fbshipit-source-id: b165520b0feb089fdfaa323413d697939c7ac794
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot e0b22e1ebf Rename global variable with Metro server for Fantom (#53202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53202

Changelog: [internal]

Just a minor refactor to follow the convention of prefixing Fantom-related globals and environment variables.

Reviewed By: rshest

Differential Revision: D79804007

fbshipit-source-id: 0c9a57c1b08ae18ae03cd66d1a6ef9690e0dea42
2025-08-12 05:41:11 -07:00
Rubén NorteandFacebook GitHub Bot 6fb0072f01 Refactor logic to find available port for Metro in Fantom (#53204)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53204

Changelog: [internal]

This changes the logic to find an available port for Metro on Fantom to do this outside Metro. Before, we'd set `0` as the port for Metro to find an available port, but in a following change we'll need to know the port before calling into Metro. This allows that.

Reviewed By: rshest

Differential Revision: D79804005

fbshipit-source-id: 5c2e2f4acbba3a79771586799b65653d46b8fe72
2025-08-12 05:41:11 -07:00
RakaDoankandFacebook GitHub Bot 739dfd2141 Help Codegen to find library's package.json after failure of importing library's package.json due to missing of ./package.json subpath (#53220)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53220

This is fix for some React Native libraries can't be found by Codegen, and will make the libraries unusable in new architecture (Turbo Modules)

Internally in the Codegen script, it will try to import library's package.json file with the `require.resolve`, but for some React Native libraries will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code due to using the `exports` field in their package.json file while not exposing the package.json file itself. As an example
```json
{
  "exports": {
    ".": {
      "import": {
        "types": "./lib/typescript/module/index.d.ts",
        "default": "./lib/module/index.js"
      },
      "require": {
        "types": "./lib/typescript/commonjs/index.d.ts",
        "default": "./lib/commonjs/index.js"
      }
    },
    "./package.json": "./package.json" <-- here some libraries missed this
  },
  "codegenConfig": {}
}
```

Personally feel weird that library author has to expose their package.json only for the sake of Codegen and i believe library author shouldn't, even the library consumer don't need it.

## Changelog:

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

[GENERAL] [FIXED] - Help Codegen find library's package.json if some libraries using `exports` field in their package.json file and the `./package.json` subpath is not explicitly defined

bypass-github-export-checks

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

Test Plan:
`require.resolve('library/package.json')` [here](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js#L203) will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code by Node.js. So if it does, help Codegen retry to find closest library's package.json with [`require.main.paths`](https://nodejs.org/api/modules.html#requiremain) search paths

You can init new app React Native CLI app with my sample react native library here [`ping-react-native`](https://github.com/RakaDoank/ping-react-native) v1.2.2.
Due to missing of the `package.json` subpath, before this change, it's autolinked but unusable due to missing of the spec header file. After this change, it works normally.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D80080243

Pulled By: cipolleschi

fbshipit-source-id: d33bf9eeb385ccf0c076e4d800a0d2840bd91b68
2025-08-12 04:45:07 -07:00
Mateo GuzmánandFacebook GitHub Bot 001736000f Migrate YogaStyleInputs to Kotlin
Summary:
Migrate com.facebook.yoga.YogaStyleInputs to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1830

Reviewed By: rshest

Differential Revision: D79897662

Pulled By: cortinico

fbshipit-source-id: a4063a8c0f608050162cd3707834040e35f9ebf7
2025-08-12 03:34:21 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 841866c354 Add accessibility props test to the <Text/> component (#53218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53218

# Changelog:
[Internal] -

Uses the existing generalized accessibility props test suite, recently created by andrewdacenko, to test the corresponding props in the <Text/> component.

Reviewed By: andrewdacenko

Differential Revision: D80000693

fbshipit-source-id: ebbceef8db7b56dc5e4ba1ac7c027a5952b680a7
2025-08-12 00:11:06 -07:00
generatedunixname89002005232357andFacebook GitHub Bot 677ee671d0 Revert D79993649 (#53217)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53217
Changelog: [Internal]
Fix rn-tester jobs

This diff reverts D79993649
(The context such as a Sandcastle job, Task, SEV, etc. was not provided.)

Depends on D79993649

Reviewed By: cortinico

Differential Revision: D80030502

fbshipit-source-id: 1feee2e2ae6a1edbeb755687aecb2a25d9759a90
2025-08-11 15:39:00 -07:00
Nick LefeverandFacebook GitHub Bot cc71f9c550 Create tryDispatchMountItems runnable only when needed (#53196)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53196

In the FabricUIManager, the runnable created for scheduled mounts is only used if currently running on the UI thread.

With this diff the runnable only gets created when needed.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D79969412

fbshipit-source-id: ee78890322af8580357389aad8357f7c0d18490f
2025-08-11 14:45:36 -07:00
Andrew DatsenkoandFacebook GitHub Bot 6738dbcc7e Generalize accessibility testing (#53182)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53182

Changelog: [Internal]
Move accessibility tests into reusable test suite.

Reviewed By: rshest

Differential Revision: D79897200

fbshipit-source-id: d98ebc7d16e7fd5c3c81086df4eec07dfdcb2fb0
2025-08-11 13:59:43 -07:00
Andrew DatsenkoandFacebook GitHub Bot 1feb364f72 Add accessibilityState (#53179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53179

Changelog: [Internal]
Add accessibilityState debug prop

Reviewed By: zeyap

Differential Revision: D79894111

fbshipit-source-id: b9914965b053c239c7f954130a32240b15070b17
2025-08-11 13:59:43 -07:00
Mateo GuzmánandFacebook GitHub Bot a2eb3b299d Migrate YogaBaselineFunction to Kotlin
Summary:
Migrate com.facebook.yoga.YogaBaselineFunction to Kotlin.

X-link: https://github.com/facebook/yoga/pull/1831

Reviewed By: joevilches, mdvacca

Differential Revision: D79897676

Pulled By: cortinico

fbshipit-source-id: 2f175bf60a871c4635d1575faec1096f9c970f48
2025-08-11 10:51:55 -07:00
Vitali ZaidmanandFacebook GitHub Bot 8d998ce96c consolidated all 0.81 rcs entries in the changelog into 0.81 (#53212)
Summary:
Changelog: [Internal]

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

Reviewed By: cortinico

Differential Revision: D80005041

Pulled By: vzaidman

fbshipit-source-id: 93f570d9ddccdf8d4febc9d9f7702646ad7a6b56
2025-08-11 10:22:45 -07:00
RakaDoankandFacebook GitHub Bot 8dcb18d2b3 Help Codegen to find library's package.json after failure of importing library's package.json due to missing of ./package.json subpath (#53195)
Summary:
This is fix for some React Native libraries can't be found by Codegen, and will make the libraries unusable in new architecture (Turbo Modules)

Internally in the Codegen script, it will try to import library's package.json file with the `require.resolve`, but for some React Native libraries will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code due to using the `exports` field in their package.json file while not exposing the package.json file itself. As an example
```json
{
  "exports": {
    ".": {
      "import": {
        "types": "./lib/typescript/module/index.d.ts",
        "default": "./lib/module/index.js"
      },
      "require": {
        "types": "./lib/typescript/commonjs/index.d.ts",
        "default": "./lib/commonjs/index.js"
      }
    },
    "./package.json": "./package.json" <-- here some libraries missed this
  },
  "codegenConfig": {}
}
```

Personally feel weird that library author has to expose their package.json only for the sake of Codegen and i believe library author shouldn't, even the library consumer don't need it.

## Changelog:

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

[GENERAL] [FIXED] - Help Codegen find library's package.json if some libraries using `exports` field in their package.json file and the `./package.json` subpath is not explicitly defined

bypass-github-export-checks

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

Test Plan:
`require.resolve('library/package.json')` [here](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor/utils.js#L203) will throw an error with `ERR_PACKAGE_PATH_NOT_EXPORTED` code by Node.js. So if it does, help Codegen retry to find closest library's package.json with [`require.main.paths`](https://nodejs.org/api/modules.html#requiremain) search paths

You can init new app React Native CLI app with my sample react native library here [`ping-react-native`](https://github.com/RakaDoank/ping-react-native) v1.2.2.
Due to missing of the `package.json` subpath, before this change, it's autolinked but unusable due to missing of the spec header file. After this change, it works normally.

Rollback Plan:

Reviewed By: cortinico

Differential Revision: D79993649

Pulled By: cipolleschi

fbshipit-source-id: fa2bbd6178f5e5fef19a14e67f09ee8a727d01de
2025-08-11 10:10:04 -07:00
Andrew DatsenkoandFacebook GitHub Bot 4fa3c00324 Add base test for TouchableWithoutFeedback (#53178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53178

Changelog: [Internal]
Add base integration test for TouchableWithoutFeedback

Reviewed By: zeyap

Differential Revision: D79889935

fbshipit-source-id: a72a85c647e371e6a6b330cd6eb2c3cc7c71b2f5
2025-08-11 10:03:28 -07:00
Michał PierzchałaandFacebook GitHub Bot fc6d7d4f0f Update RNC CLI in RNTester to v20.0.0 (#53206)
Summary:
Bump CLI to stable v20 for RNTester

## Changelog:

[INTERNAL] [CHANGED] - Update RNC CLI in RNTester to v20.0.0

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

Reviewed By: cortinico

Differential Revision: D79997077

Pulled By: rshest

fbshipit-source-id: 7264d942967fbfbc7fa5704f1089c0e7dbd3eb4b
2025-08-11 09:37:54 -07:00
Richard BarnesandFacebook GitHub Bot 9eb90f8911 Remove unused exception parameter from hermes/unittests/API/CDPAgentTest.cpp (#53213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53213

`-Wunused-exception-parameter` has identified an unused exception parameter. This diff removes it.

This:
```
try {
    ...
} catch (exception& e) {
    // no use of e
}
```
should instead be written as
```
} catch (exception&) {
```

If the code compiles, this is safe to land.

Reviewed By: dtolnay

Differential Revision: D79968851

fbshipit-source-id: 18f2e6861f099915b1aad6aba58217ba94eb10c8
2025-08-11 09:35:31 -07:00