Compare commits

...
Author SHA1 Message Date
Pieter De Baetsandmeta-codesync[bot] 693e9628e8 Mark mOnViewAttachMountItems as final in SurfaceMountingManager.java (#54344)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54344

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D85904478

fbshipit-source-id: 961d12bf1cbf04b9087a518531b20d87be3ccb63
2025-10-31 15:50:52 -07:00
David Vaccaandmeta-codesync[bot] 0e3a210be1 Add comprehensive KDoc documentation to FilterHelper (#54350)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54350

Added comprehensive KDoc documentation to the FilterHelper object and its primary public method for parsing and applying CSS filter effects on Android S+ (API 31+).

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85926889

fbshipit-source-id: e20bb0697753e710d66acc3ef4078ab009d6dc5d
2025-10-31 14:42:30 -07:00
David Vaccaandmeta-codesync[bot] b8f9d982f5 Add KDoc documentation to ComponentNameResolverBinding (#54349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54349

Added comprehensive KDoc documentation to the ComponentNameResolverBinding object and its JNI method for installing component name resolvers into the JavaScript runtime.

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85926888

fbshipit-source-id: 253577d4c5d48bee22acb5666680becd4e632879
2025-10-31 14:42:30 -07:00
David Vaccaandmeta-codesync[bot] 7d7d843666 Add KDoc documentation to ComponentNameResolver interface (#54348)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54348

Added comprehensive KDoc documentation to the ComponentNameResolver interface and its property providing access to registered component names.

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85926887

fbshipit-source-id: ae12629e27f88555c7876d3343a146b1b5c3dec0
2025-10-31 14:42:30 -07:00
David Vaccaandmeta-codesync[bot] 89bcc02a07 Add KDoc documentation to BlendModeHelper (#54347)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54347

Added comprehensive KDoc documentation to the BlendModeHelper object and its public method for parsing CSS mix-blend-mode properties on Android Q+.

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85926891

fbshipit-source-id: bcafa6b02281d5265f59b34641847bc3b19d6604
2025-10-31 14:42:30 -07:00
David Vaccaandmeta-codesync[bot] ad0210c535 Add comprehensive KDoc documentation to BackgroundStyleApplicator (#54346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54346

Added comprehensive KDoc documentation to the BackgroundStyleApplicator class and all 25 public methods covering backgrounds, borders, outlines, and box shadows.

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85926890

fbshipit-source-id: 5a398bf8d57d6b6dff6b012ac225bc96d56e2573
2025-10-31 14:42:30 -07:00
David Vaccaandmeta-codesync[bot] cc2101d063 Add KDoc documentation to FloatUtil class (#54345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54345

Added comprehensive KDoc documentation to the `FloatUtil` class and its public methods to improve code readability and developer experience.

The documentation explains:
- The purpose of epsilon-based floating-point comparison and why it's necessary
- The role of the EPSILON constant in determining equality
- Special case handling for NaN values (both considered equal when both are NaN)
- Null value handling in the nullable overload
- Method parameters and return values

This documentation will help developers understand the rationale behind using this utility instead of direct float equality comparisons, which can be unreliable due to floating-point precision issues.

changelog: [internal] internal

Reviewed By: lenaic

Differential Revision: D85923748

fbshipit-source-id: d054099de3d9903801aadca4cfcd3127bb6d5297
2025-10-31 14:42:30 -07:00
Gianni Moschiniandmeta-codesync[bot] e2b62bc435 fix code snippet text container in AnsiHiglight (#54360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54360

## Changelog:

[General] [Fixed] - Fixing an issue with the error LogBox formatting on windows causing text to wrap

Reviewed By: rickhanlonii, yannickl

Differential Revision: D76845667

fbshipit-source-id: 4b1ce705396f9818cbe9be80d521478b5eba632b
2025-10-31 13:24:51 -07:00
Luna Weiandmeta-codesync[bot] 025e0e47ef Remove clipping check on scrollview (#54357)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54357

Changelog: [Internal] - Ignore whether ScrollView enables subview clipping and just use the drawing rect for forwarding a clippingRect for VirtualView

Reviewed By: yungsters

Differential Revision: D85817030

fbshipit-source-id: e89298d106ec993ce1ca63131da002e0685c34dd
2025-10-31 13:23:26 -07:00
Rubén Norteandmeta-codesync[bot] 15589485c5 Remove legacy profiling for network requests (#54353)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54353

Changelog: [internal]

We have support for the network track in performance traces so we no longer need this custom integration.

Reviewed By: huntie

Differential Revision: D85946500

fbshipit-source-id: 4efa132a6524af6595ddf9f8c2b5651959fa1f94
2025-10-31 11:11:33 -07:00
Rubén Norteandmeta-codesync[bot] ad5ff285a9 Unify perf tracks under a React Native track group (#54354)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54354

Changelog: [internal]

This just renames the tracks for network, etc. to go under a "⚛ Native" track group.

Reviewed By: huntie

Differential Revision: D85946501

fbshipit-source-id: f7ea65bfd84ed4965749f7e22091bcaff38a5bc3
2025-10-31 11:11:33 -07:00
Rubén Norteandmeta-codesync[bot] 3806edc1bd Use try/finally for performance measure for device events (#54355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54355

Changelog: [internal]

Small refactor to make sure profiling timespans don't break if there's an exception in one of the listeners.

Reviewed By: huntie

Differential Revision: D85951560

fbshipit-source-id: 162672a7e644893f46a3b0100284bc4125a83757
2025-10-31 11:11:33 -07:00
nishan (o^▽^o)andmeta-codesync[bot] 20ba98e00d feat(iOS) - Add contrast and hue rotate filter (#54294)
Summary:
This PR adds support for `contrast` and `hueRotate` filter support on iOS as discussed here - https://github.com/react-native-community/discussions-and-proposals/issues/927

## Changelog:

[IOS] [ADDED] - Add contrast and hue-rotate CSS filters

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

Test Plan:
Test Filter screen in RNTester app. Checkout contrast and hue-rotate examples. Results are consistent on android and iOS.

<img width="300" height="auto" alt="Screenshot 2025-10-28 at 6 43 10 AM" src="https://github.com/user-attachments/assets/da7e4166-5723-4e4d-8d94-df9efb127672" />

<img width="300" height="auto" alt="Screenshot 2025-10-28 at 6 02 40 AM" src="https://github.com/user-attachments/assets/2d332202-6b2e-4269-93ed-3f80d3e03e4a" />

cc - joevilches thanks! remaining filters are `invert` and `sepia`. These are a bit tricky as they don't have direct SwiftUI equivalents. I am trying a few things, will do a PR when I get it working.

Reviewed By: jorge-cab

Differential Revision: D85961419

Pulled By: joevilches

fbshipit-source-id: f4628b17570e5b8fd3092392224f2d84b7d47d1d
2025-10-31 11:09:37 -07:00
Alex Huntandmeta-codesync[bot] a74387be66 Add Performance Issues to Perf Monitor (2/2) (#54266)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54266

Introduces the concept of **Performance Issues**, an experimental performance signals concept for React Native.

**Design**

Performance Issues are an **experimental** user space API via the User Timings `detail` object.

```
performance.measure({
  start,
  end,
  detail: {
    devtools: {
      ...
    },
   rnPerfIssue: {
     name: 'React: Cascading Update',
     severity: 'warning', // 'info' | 'warning' | 'error',
     description:
      'A cascading update is a update that is triggered by a previous update. This can lead to performance issues and should be avoided.',
    learnMoreUrl:
      'https://react.dev/reference/dev-tools/react-performance-tracks#cascading-updates',
    }
  }
});
```

When `rnPerfIssue` is present, we eagerly report an the event over CDP, regardless of an active performance trace, via the `"__react_native_perf_issues_reporter"` runtime binding.

**This diff**

- Updates the V2 Perf Monitor UI (Android) to display Performance Issues as a count.
    - (UI parts of this diff, including `HostTarget::installPerfIssuesBinding` are reinstated from the previous INP design, removed in D82208400).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D85448199

fbshipit-source-id: 0cee0eff275219fa46ccf788a6208889d3a0506e
2025-10-31 09:39:10 -07:00
Alex Huntandmeta-codesync[bot] ee9ef3bf2d Add Performance Issues to Perf Monitor (1/2) (#54265)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54265

Introduces the concept of **Performance Issues**, an experimental performance signals concept for React Native.

**Design**

Performance Issues are an **experimental** user space API via the User Timings `detail` object.

```
performance.measure({
  start,
  end,
  detail: {
    devtools: {
      ...
    },
   rnPerfIssue: {
     name: 'React: Cascading Update',
     severity: 'warning', // 'info' | 'warning' | 'error',
     description:
      'A cascading update is a update that is triggered by a previous update. This can lead to performance issues and should be avoided.',
    learnMoreUrl:
      'https://react.dev/reference/dev-tools/react-performance-tracks#cascading-updates',
    }
  }
});
```

When `rnPerfIssue` is present, we eagerly report an the event over CDP, regardless of an active performance trace, via the `"__react_native_perf_issues_reporter"` runtime binding.

**This diff**

- Adds a `perfIssuesEnabled` feature flag.
- Initial implementation of the above API.
- Initially reports a "Cascading Render" issue, aligning 1:1 with the corresponding React performance track event (note: to be added in the React codebase, see https://github.com/facebook/react/pull/34961).

This feature is gated by the `perfMonitorV2Enabled` feature flag.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D85448200

fbshipit-source-id: e5aed5138682331e1cd3a713a5f09fb6745138bc
2025-10-31 09:39:10 -07:00
Alex Huntandmeta-codesync[bot] 6d68cdf5c3 Fix missing jsi dependency following #54262 (#54341)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54341

Changelog: [Internal]

{F1983141005}

Reviewed By: cipolleschi

Differential Revision: D85888301

fbshipit-source-id: 54cfaf2995bf0231e661fc11e115266578e1f692
2025-10-31 05:57:29 -07:00
Pieter De Baetsandmeta-codesync[bot] 6757e547c5 Mark private static fields as final in ReactHorizontalScrollView (#54343)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54343

Fixed NotWrittenPrivateField lint warnings in ReactHorizontalScrollView.java by marking three private static fields as final:

- DEBUG_MODE: Changed from `private static boolean` to `private static final boolean`
- TAG: Changed from `private static String` to `private static final String`
- NO_SCROLL_POSITION: Changed from `private static int` to `private static final int`

These fields are initialized once and never modified, making them compile-time constants. Marking them as final follows Java best practices and prevents potential issues with Redex code optimization.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D85904890

fbshipit-source-id: f83a19392a2418d8415936421f1e021316643056
2025-10-31 04:23:26 -07:00
Nolan O'Brienandmeta-codesync[bot] 3ff4ab2290 Fix missing enum values in switch statements (#54342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54342

`-Wswitch-enum` was introduced in 2024 and is beneficial because it will err when switch statement is missing a case for an enum, even with `default:` present.  This helps alert developers when they add an enum value of all the switch statements that need updating.

These diffs are to help progress the codebase so that we can enable `-Wswitch-enum` by default in `fbobjc`

## Changelog:
[General] [Fixed] - Add missing value to switch for `-Wswitch-enum` builds

Differential Revision: D85835952

fbshipit-source-id: e56c45895a63325e565315a39ea59df769c4a3ad
2025-10-30 21:01:45 -07:00
Vladimir Makaevandmeta-codesync[bot] ae4d79d279 Daily arc lint --take CLANGFORMAT
Reviewed By: ionutluzinschi

Differential Revision: D85728900

fbshipit-source-id: 022ac989ce5519b5b065a9fa8a20ce6438309b4c
2025-10-30 15:56:46 -07:00
Alex Huntandmeta-codesync[bot] 7403e85233 Update debugger-frontend from 96e6bb8...7aa57d1 (#54340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54340

Changelog: [Internal] - Update `react-native/debugger-frontend` from 96e6bb8...7aa57d1

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/96e6bb8ecdff166816e2a469b7594f1276bda8c1...7aa57d13e50ce9d74a91c9315c9b0ded00fbc19f).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [7aa57d13e](https://github.com/facebook/react-native-devtools-frontend/commit/7aa57d13e) | Alex Hunt (hello@alexhunt.dev) | 2025-10-30T19:45:26+00:00 | [Add AGENTS.md (#215)](https://github.com/facebook/react-native-devtools-frontend/commit/7aa57d13e) |
| [d524f81db](https://github.com/facebook/react-native-devtools-frontend/commit/d524f81db) | Alex Hunt (hello@alexhunt.dev) | 2025-10-30T18:43:44+00:00 | [Enable Performance panel by default (#216)](https://github.com/facebook/react-native-devtools-frontend/commit/d524f81db) |
| [62f76dfbb](https://github.com/facebook/react-native-devtools-frontend/commit/62f76dfbb) | Alex Hunt (hello@alexhunt.dev) | 2025-10-30T17:01:50+00:00 | [Update project name in setup script (#214)](https://github.com/facebook/react-native-devtools-frontend/commit/62f76dfbb) |

Reviewed By: hoxyq

Differential Revision: D85888511

fbshipit-source-id: fbe4be107d8be6db7b91199dfe44b604b5be0036
2025-10-30 13:31:38 -07:00
Eric Rozellandmeta-codesync[bot] 600a8dc1da Allow customization of requestChildFocus scroll behavior in ScrollView (#54325)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54325

Apps that override ScrollView may need to customize the auto scroll behavior on focus.  This adds a protected method for apps that override ReactScrollView to customize focus behaviors.

## Changelog
[Internal]

Reviewed By: joevilches

Differential Revision: D85779339

fbshipit-source-id: 1ba978ed14ceb224ddc1d0da97727ff9702972e7
2025-10-30 12:22:50 -07:00
Alex Huntandmeta-codesync[bot] 9693a2b855 Support parsing of detail arg from console.timeStamp (#54262)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54262

Similar to `performance.measure()`, Chrome is adding an optional `detail` arg to `console.timeStamp`. Here we implement this for React Native, by direct passing to the `"TimeStamp"` trace event args.

[`console.timeStamp()`](https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static) remains an experimental, non-standard API.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D85437162

fbshipit-source-id: 36f5f6207cf205df5a216bde95013ea9540fc082
2025-10-30 11:42:24 -07:00
Rubén Norteandmeta-codesync[bot] e8fcde50e3 Simplify module after DOM API feature flag cleanup (#54323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54323

Changelog: [internal]

We no longer need to lazily load these modules, because they're always used now.

Reviewed By: lunaleaps

Differential Revision: D85782126

fbshipit-source-id: 263eb234558b90d9cf5c6d55bccb39eb8d1c6a48
2025-10-30 08:37:04 -07:00
Rubén Norteandmeta-codesync[bot] 234b53d0f8 Merge tests for legacy node methods into ReactNativeElement test (#54321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54321

Changelog: [internal]

Just moving some tests from `ReactFabricPublicInstance` to `ReactNativeElement` now that they're only used for that class.

Reviewed By: lunaleaps

Differential Revision: D85782130

fbshipit-source-id: 1445f61df2cbd691e09187b3b122032ad941cd67
2025-10-30 08:37:04 -07:00
Rubén Norteandmeta-codesync[bot] 8217165442 Delete unused legacy ReactFabricHostComponent class (#54320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54320

Changelog: [internal]

This class is no longer used after we shipped DOM APIs.

Reviewed By: lunaleaps

Differential Revision: D85782129

fbshipit-source-id: 7ffa33aa1bade777d2b3fb7ae8b7c136376983a7
2025-10-30 08:37:04 -07:00
Rubén Norteandmeta-codesync[bot] 9c4601abec Clean up feature flag "enableAccessToHostTreeInFabric" (#54322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54322

Changelog: [internal]

This just cleans up the feature flag, which is set to `true` by default and it's been enabled in `stable` already.

Reviewed By: lunaleaps, yungsters

Differential Revision: D85782127

fbshipit-source-id: 0a6174708066cfe597b4c6dbc8bb33829c6155e9
2025-10-30 08:37:04 -07:00
Rubén Norteandmeta-codesync[bot] beccee2164 Promote Web Performance APIs to stable (#54324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54324

Changelog: [General][Added] - Enable Web Performance APIs

This promotes the Web Performance APIs from canary to stable.

Reviewed By: cipolleschi

Differential Revision: D85783108

fbshipit-source-id: 8d8b4565f28dc20d63e677c01366f4f37d5c46e4
2025-10-30 08:34:57 -07:00
Samuel Suslaandmeta-codesync[bot] 71f5c744db add name of command for systrace for easier debugging (#54328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54328

changelog: [internal]

makes debugging easier if there is name of command.

Reviewed By: christophpurrer, javache

Differential Revision: D85784113

fbshipit-source-id: 14f89ea8b8401dce2dc84d14caaecc6cacda04b2
2025-10-30 06:04:42 -07:00
Harini Malothuandmeta-codesync[bot] f9754d3459 Ccomparison between signed and unsigned values, causing a error (#54318)
Summary:
We saw this error while integrating  changes in react native windows
https://github.com/microsoft/react-native-windows/issues/15292
Fixed type consistency in cloneMultipleRecursive by using size_t for loop iterator to properly match vector size type, improving type safety when iterating over children nodes.

## Changelog:
[GENERAL][FIXED] - Use size_t instead of int for vector iteration in cloneMultipleRecursive
<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

|GENERAL|FIXED|- Message

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

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

Reviewed By: christophpurrer

Differential Revision: D85800905

Pulled By: javache

fbshipit-source-id: 2fdb539e1c9af56eebdd5c7a900fa0e697bcab3a
2025-10-30 03:52:14 -07:00
Jorge Cabiedes Acostaandmeta-codesync[bot] d0015e0838 Fix visual artifacts when sometimes using decimal assymetric borderRadii (#54237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54237

Before we were adding a single pixel for the stretchable area. in RCTViewComponentView we calculate what percentage is 1 pixel from the entire image to create the unit rectangle:
```
    CGRect contentsCenter = CGRect{
        CGPoint{imageCapInsets.left / imageSize.width, imageCapInsets.top / imageSize.height},
        CGSize{(CGFloat)1.0 / imageSize.width, (CGFloat)1.0 / imageSize.height}};
```

However sometimes when dividing `1.0 / imageSize.width` we would get a big enough float that causes a rounding error essentially having part of the border bleed into the stretchable region.

The easiest way to fix this is give the stretchable region a little more space so to prevent the bleeding.

We can do this by rounding the edgeInsets that give the border area its size

The alternative is some shockingly complex math to appropriately calculate the most convenient stretchable area size

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D85260693

fbshipit-source-id: 50eaba2189f3ff524be730211f8d19023522c68a
2025-10-29 20:31:35 -07:00
Peter Abbondanzoandmeta-codesync[bot] 26ad9492b3 Implement resizeMethod="resize" for image prefetching (#54228)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54228

## Issue
When prefetching images with the `resizeMethod` prop set, there's a brief period of time where the image has not laid out and the dimensions are 0x0. Since `ImageSource.h` only considers the `type` and `uri` properties for equality, two different `ImageSource` objects would be considered equal despite having different `size`. We would continue on to prefetch the image in its fullest quality and retain that image in `ImageState`, and upon subsequent requests once we have non-zero layouts, we would bail out early in the `ImageShadowNode::updateStateIfNeeded` method since both the old image source and image request params are equal in this case.

## Fix
Rather than adding `size` to the equality check, this change adds identical logic directly from `ReactImageView` to determine if we should postpone the image request: if the image is resizable and we don't have a width or a height, postpone!

## Additional Context
I noodled with a few spots of where this should ultimately live, but this seemed like the least invasive without making some larger refactors. The other approach I considered was to instead return an optional `ImageRequest` object from `ImageManager->requestImage call` to signal that no request was ever made, and using the `ImageRequest` response as part of the equality check.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D85200818

fbshipit-source-id: 82090feb500dafa47af14220a17262d715d20a7a
2025-10-29 16:52:18 -07:00
Zeya Pengandmeta-codesync[bot] b5e209181e Fix EXC_BAD_ACCESS introduced in #54211 (#54319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54319

## Changelog:

[Internal] [Changed] - Fix EXC_BAD_ACCESS introduced in #54211

Reviewed By: sammy-SC

Differential Revision: D85779978

fbshipit-source-id: 7b240e1484fdcc57283325febf75faedaba585cd
2025-10-29 16:33:13 -07:00
Eric Rozellandmeta-codesync[bot] 8a3cc6411e Remove unnecessary local variable in for deferred focus (#54326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54326

This variable was not needed, isAttachedToWindow was working as expected.

## Changelog
[Internal]

Reviewed By: Abbondanzo

Differential Revision: D85798355

fbshipit-source-id: 1716b323b4ac0d1d6f3e29370223db66540020d2
2025-10-29 16:18:32 -07:00
Rubén Norteandmeta-codesync[bot] b68329f7ca Implement Kotlin API for PerformanceTracer in RNDT (#54316)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54316

Changelog: [internal]

This defines an internal class in Kotlin to access `PerformanceTracer` methods, necessary for platform-specific integrations on Android.

Reviewed By: sbuggay

Differential Revision: D85689126

fbshipit-source-id: 84cb675984b90c677c3a322b191e24cc6b58c74f
2025-10-29 15:35:35 -07:00
Rubén Norteandmeta-codesync[bot] 712c544be6 Implement method to subscribe to tracing start/stop in RNDT (#54315)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54315

Changelog: [internal]

This adds methods to `PerformanceTracer` so consumers can be notified when tracing starts/stop. This is necessary to activate features necessary for tracing that would be costly to enable all the time.

Reviewed By: sbuggay

Differential Revision: D85689124

fbshipit-source-id: 9f9f79162dcb988ac4be02a8911401ce448461a9
2025-10-29 15:35:35 -07:00
Eric Rozellandmeta-codesync[bot] 9d498f676d Defer focus until attached (#54309)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54309

We can encounter cases where something is rendered by React but not yet attached to Android at the point focus is called.

If we defer focus until the View is attached to the window, we can avoid apps needing to add annoying timeouts or other creative mechanisms to wait for native mount before calling imperative focus.

The only caveat here is that if you call imperative focus on something offscreen initially that is attached later (e.g., due to clipping), apps could encounter undesirable bugs where focus jumps at the point the previously detached view is now attached. One might also argue it's  bug prone to call focus on something that is far offscreen / you don't plan to mount onscreen immediately.

## Changelog

[Android][Fixed] Defers focus until View is attached

Reviewed By: sbuggay

Differential Revision: D85727424

fbshipit-source-id: 677834aa2d9ba2d3247d1e71b3fe0cdd9a6ec4aa
2025-10-29 11:56:02 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] da5f15a25b Update draft release creation with Hermes V1 (#54313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54313

This change updates the draft release workflow to add dSYMS for Hermes V1 and also updating the url from where the dSYMs can be downloaded.

## Changelog:
[Internal] -

Reviewed By: j-piasecki

Differential Revision: D85758123

fbshipit-source-id: 7d771266de5b3829e9a39c649b610aaf79aa6206
2025-10-29 11:15:18 -07:00
Peter Abbondanzoandmeta-codesync[bot] b0b434469e Add feature flag for checking if components should send key presses (#54295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54295

Sets up a feature flag for keydown/keyup events. Split out from actual work implementing the feature to avoid having to run codegen each commit

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D84938062

fbshipit-source-id: b556f347720b4a651cd321996f2914a9c670c7a1
2025-10-29 09:38:32 -07:00
Pieter De Baetsandmeta-codesync[bot] aec3294807 Enable k2 for all targets, remove compiler warnings (#54284)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54284

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D85563230

fbshipit-source-id: 6eb7c6479ad3d0f6d6249a6a320e7835dc298db6
2025-10-29 09:30:10 -07:00
Peter Abbondanzoandmeta-codesync[bot] 242728d6c1 Set sweepActiveTouchOnChildNativeGesturesAndroid default feature flag value to true (#54307)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54307

First of the remaining steps to fully rollout `sweepActiveTouchOnChildNativeGesturesAndroid`. It's already enabled by default everywhere an override is set, letting this bake for a week then going to remove

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D85700377

fbshipit-source-id: 81f5b8679e5562ba6c5dfae331052b181b5258ec
2025-10-29 08:28:49 -07:00
generatedunixname537391475639613andmeta-codesync[bot] a7973378ba xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java (#54311)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54311

Reviewed By: javache

Differential Revision: D85546696

fbshipit-source-id: aec0b077bca68c4a9abef98ee9db41f80edb09d9
2025-10-29 04:39:18 -07:00
Tim Yungandmeta-codesync[bot] 3f971d931c Pressability: Setup Insertion Effect Experiment (#54292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54292

Sets up a feature flag to experiment with using `useInsertionEffect` in `Pressability`, instead of `useEffect.

Using `useInsertionEffect` enables `Pressability` to behave more predictability in component trees with `<Activity mode="hidden">` because the events are scheduled more similarly to platform controls (e.g. focus and blur events will still fire even when "hidden").

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D85612742

fbshipit-source-id: c2faab25bfcf7f964521e680eb3c4132c1087ef4
2025-10-28 12:27:37 -07:00
Phil Pluckthunandmeta-codesync[bot] c0290329cd Fix outputs when iOS artifacts generator is run from Xcode script phase (#54066)
Summary:
An earlier change (0.79 and onwards, I believe?) runs the iOS artifacts code generator script in Xcode as well as from Cocoapods. This duplication runs it twice, but the second step isn't able to load the new `autolinking.json` correctly; See: https://github.com/facebook/react-native/pull/53503

This PR "double" fixes this by:
- simply passing the "real" output directory to the artifacts generator in (`script_phases.sh`) where it's called by Xcode, rather than a temporary directory
- preferring `$RCT_SCRIPT_OUTPUT_DIR` if it's set as an environment variable in the artifacts generator (which it is by `script_phases.sh`)

While this is technically redundant, future changes here make this feel like a safer option, since both conventions overlap in these two places, and the double fix may prevent a regression here in the shortterm and convey what this path is supposed to be in both places.

## Changelog:

[IOS] [FIXED] - Fix autolinking-generated react-native-config output not being used in ReactCodegen script phase due to temp output directory

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

Test Plan:
- Prefer `$RCT_SCRIPT_OUTPUT_DIR` env var for finding `build/generated/autolinking/autolinking.json`
- Always use real `$RCT_SCRIPT_OUTPUT_DIR` as output in `withCodegenDiscovery` in `react_native_pods_utils/script_phases.sh` (which is called by Xcode rather than Cocoapods to invoke the artifacts generator) since the temporary output directory isn't necessary

Reviewed By: javache

Differential Revision: D85673625

Pulled By: cipolleschi

fbshipit-source-id: 9d297fb0ee24f52a0bb7c5a8f41bf770bf63b18f
2025-10-28 10:45:33 -07:00
Peter Abbondanzoandmeta-codesync[bot] 99273f4b01 Replace deprecated postOnAnimationDelayed calls (#54285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54285

`View#postOnAnimationDelayed` has existed [since API 16](https://developer.android.com/reference/android/view/View#postOnAnimationDelayed(java.lang.Runnable,%20long)) and has been marked as deprecated in ViewCompat [since 1.13.0](https://developer.android.com/reference/androidx/core/view/ViewCompat#postOnAnimationDelayed(android.view.View,java.lang.Runnable,long)). Let's clean it up!

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D85569478

fbshipit-source-id: 7cedf59c9c8fe44d2cec63d7539d955a4fa597e3
2025-10-28 10:10:37 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 28101284a9 Bump eslint-plugin-react-hooks to 7.0.1 (#54303)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54303

React 19.2.0 introduces the `useEffectEvent`, which are functions that can be used inside `useEffect` but that should not be listed in the `useEffect` dependencies.

Without this bump, eslint will still tell the user to add the function declared with `useEffectEvent` into the dependency array of a useEffect.

## Changelog:
[General][Changed] - Bump eslint-plugin-react-hooks to 7.0.1

Reviewed By: huntie

Differential Revision: D85658780

fbshipit-source-id: 75860f06a2875b53de61f4f99572277d9d04839f
2025-10-28 08:01:13 -07:00
Samuel Suslaandmeta-codesync[bot] a18f7a7c7b Back out "Remove UIManagerCommitHookManager 2/2" (#54302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54302

Changelog: [Internal]

Original commit changeset: 1c7705187346

Original Phabricator Diff: D85261208

Reviewed By: javache, rubennorte

Differential Revision: D85660275

fbshipit-source-id: 19e6c44871660a53399276445bc2d3ee97cd2ac0
2025-10-28 05:22:28 -07:00
Ruslan Lesiutinandmeta-codesync[bot] afb504c11e Update debugger-frontend from 54afd87...96e6bb8 (#54287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54287

Changelog: [Internal] - Update `react-native/debugger-frontend` from 54afd87...96e6bb8

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/54afd8765db32a9640edef3788085b991fe4b88a...96e6bb8ecdff166816e2a469b7594f1276bda8c1).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [96e6bb8ec](https://github.com/facebook/react-native-devtools-frontend/commit/96e6bb8ec) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-10-27T14:51:39Z | [feat: use scoped field in trace events to propagate stack traces (#213)](https://github.com/facebook/react-native-devtools-frontend/commit/96e6bb8ec) |

Reviewed By: huntie

Differential Revision: D85579573

fbshipit-source-id: b35d40a79890356761bfdfaeb7ba5c2bc19b93a5
2025-10-28 05:11:21 -07:00
Christoph Purrerandmeta-codesync[bot] e81626e34e Expose MultiPostProcessor for testing (#54296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54296

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D85624761

fbshipit-source-id: 3adf5edafe7ed8bf416048a347a1fd9e60bfea2a
2025-10-28 00:55:00 -07:00
Nolan O'Brienandmeta-codesync[bot] 916e53f845 Fix implicit fallthrough in switch statements (#54290)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54290

A few places where we fall through intentionally are implicit.  We can make those explicit with `NS_FALLTHROUGH`.  Many places, however, are bugs from failing to add a `break` :eek: -- fix those places too.

These are all found via `-Wimplicit-fallthrough`... we will seek to make this an error by default (vs only in `CompilerWarningLevel.MEDIUM` or higher).

## Changelog:
[iOS] [Fixed] - Add missing `break;` to `-[RCTViewManager pointerEvents]`

Reviewed By: philIip

Differential Revision: D85583441

fbshipit-source-id: e8959b27a2e23ccfc6581286257d5d41b18c5630
2025-10-27 19:35:58 -07:00
Eric Rozellandmeta-codesync[bot] 363d297260 Mitigate int overflow in findNextFocusableElement (#54291)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54291

We are computing a weighted distance by squaring the major and minor axis distance. For particularly long lists, this means that items that are quite far away have a tendency to overflow the int value when squared, producing a negative number that becomes the smallest weighted distance.

Switching the computed value to double should mitigate the issue, since MAX_DOUBLE >>> MAX_INT ^ 2.

## Changelog

[Android][Fixed] - Resolves an int overflow in findNextFocusableElement

Reviewed By: martinbooth

Differential Revision: D85598005

fbshipit-source-id: 2a5de4e10c21f3d42ae5872d311e714b3f92efad
2025-10-27 19:04:38 -07:00
Christoph Purrerandmeta-codesync[bot] d9019a0b27 Remove UIManagerCommitHookManager 2/2 (#54235)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54235

Changelog: [Internal]

Reverting `experimental_prefetchResources` back to `experimental_prefetchResource` for simplicity of use

Reviewed By: lenaic, mdvacca

Differential Revision: D85261208

fbshipit-source-id: 1c7705187346a2422dddb5c106fd372a8ee49283
2025-10-27 18:40:58 -07:00
Intl Schedulerandmeta-codesync[bot] 7a73c8a8a0 translation auto-update for batch 0/61 on master
Summary:
Chronos Job Instance ID: 1125908095431451
Sandcastle Job Instance ID: 2285883636

Processed xml files:
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml
android_res/rendercore/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/common/util/res/values/strings.xml
android_res/com/facebook/content/res/values/strings.xml
android_res/com/facebook/common/i18n/res/values/strings.xml
android_res/com/facebook/common/timeformat/res/values/strings.xml
android_res/com/facebook/resources/res/values/strings.xml
android_res/com/facebook/iorg/common/upsell/res/values/strings.xml
android_res/com/facebook/iorg/common/res/values/strings.xml
android_res/com/facebook/dialtone/res/values/strings.xml
android_res/com/facebook/common/strings/external/res/values/strings.xml
android_res/com/facebook/common/strings/res/values/strings.xml
android_res/com/facebook/fbui/widget/pagerindicator/res/values/strings.xml
android_res/com/facebook/fbui/widget/contentview/res/values/strings.xml
android_res/com/facebook/zero/messenger/semi/res/values/strings.xml
android_res/com/facebook/zero/res/values/strings.xml
android_res/com/facebook/zero/common/res/values/strings.xml
android_res/com/facebook/widget/facepile/res/values/strings.xml
android_res/com/facebook/widget/res/values/strings.xml
android_res/com/facebook/tabbar/res/values/strings.xml
android_res/com/facebook/ui/toolbar/res/values/strings.xml
android_res/com/facebook/dialtone/messenger/res/values/strings.xml
libraries/foa/ui/cds/widgets-litho/brandasset/res/values/strings.xml
android_res/com/oculus/twilight/app/res/values/strings.xml
android_res/com/bloks/foa/cds/bottomsheet/strings/res/values/strings.xml
android_res/com/facebook/reportaproblem/res/values/strings.xml
android_res/com/facebook/catalyst/shell/res/values/strings.xml
android_res/com/facebook/horizon/res/values/strings.xml
android_res/com/oculus/twilight/reportaproblem/res/values/strings.xml
android_res/com/facebook/config/appspecific/res/values/strings.xml
android_res/com/facebook/fbavatar/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/nativetemplates/res/values/strings.xml
android_res/com/facebook/video/components/feed/res/values/strings.xml
android_res/com/facebook/runtimepermissions/res/values/strings.xml
android_res/com/oculus/twilight/gcm/messaging/res/values/strings.xml
android_res/com/oculus/twilight/gcm/res/values/strings.xml
android_res/com/oculus/twilight/gcm/messageinvite/res/values/strings.xml
android_res/com/oculus/twilight/gcm/messagefollowback/res/values/strings.xml
android_res/com/oculus/twilight/gcm/followrequest/res/values/strings.xml
android_res/com/facebook/rtc/notification/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/common/res/values/strings.xml
android_res/com/facebook/rtc/runtimepermissions/manager/res/values/strings.xml
android_res/com/facebook/rtc/connectionservice/res/values/strings.xml
android_res/com/facebook/rtc/helpers/connectionservicecoordinator/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callstatus/participantinfo/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callstatus/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/incoming/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/participant/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/pip/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/header/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callcontrols/audioselector/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/callcontrols/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/incall/res/values/strings.xml
android_res/com/facebook/rp/platform/ui/ended/res/values/strings.xml
android_res/com/facebook/payments/dcp/res/values/strings.xml
libraries/smartcapture/common/common-ui/res/values/strings.xml
android_res/com/bloks/common/components/autogenmediagallery/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml
android_res/com/facebook/wearable/companion/settings/keys/res/values/strings.xml
android_res/com/facebook/stella/res/values/strings.xml
android_res/com/meta/fxmetalogin/res/values/strings.xml
libraries/smartcapture/selfie/selfie-ui/res/values/strings.xml
libraries/smartcapture/id/id-ui/res/values/strings.xml
libraries/smartcapture/id/id-ui-components/res/values/strings.xml
libraries/smartcapture/id/id-sdk/impl/res/values/strings.xml
android_res/com/facebookpay/widget/res/values/strings.xml
android_res/com/facebookpay/ecpexception/res/values/strings.xml
android_res/com/facebookpay/expresscheckout/res/values/strings.xml
android_res/com/fbpay/auth/res/values/strings.xml
android_res/com/oculus/twilight/hsrmobile/res/values/strings.xml
android_res/com/oculus/twilight/calling/res/values/strings.xml
../xplat/messengervr/msys/feature_aggregation/src/i18n/res/values/strings.xml
android_res/com/oculus/socialplatform/msys/res/values/strings.xml
android_res/com/facebook/voltron/fbdownloader/res/values/strings.xml
android_res/com/facebook/ui/emoji/res/values/strings.xml
android_res/com/facebook/ui/emoji/common/res/values/strings.xml
android_res/com/facebook/presence/status/res/values/strings.xml
android_res/com/facebook/auth/res/values/strings.xml
android_res/com/facebook/rooms/mainapp/permissions/res/values/strings.xml
android_res/com/facebook/rooms/mainapp/precheck/res/values/strings.xml
android_res/com/facebook/messaging/presence/res/values/strings.xml
android_res/com/oculus/twilight/primarydex/res/values/strings.xml
android_res/com/facebook/appupdate/res/values/strings.xml
android_res/com/facebook/wearable/apps/activities/res/values/strings.xml
android_res/com/facebook/wearable/apps/activities/dailynudge/res/values/strings.xml
android_res/com/facebook/wearable/apps/activities/socialwellness/res/values/strings.xml
android_res/com/facebook/wearable/apps/activity_watchface/res/values/strings.xml
android_res/com/facebook/wearable/apps/assistant/res/values/strings.xml
android_res/com/facebook/wearable/apps/avatar/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D85620003

fbshipit-source-id: 48bf25db80a647fb558d7cca1c960a4a909c6388
2025-10-27 16:57:13 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] b5321041a1 Bump Machines to macos-15 (#54280)
Summary:
GH asked us to bump the machines from macos-14 to macos-15

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: javache

Differential Revision: D85570467

Pulled By: cipolleschi

fbshipit-source-id: 659b9c538a883b7bca1c6aeb2d1a7dceb6a22663
2025-10-27 15:41:36 -07:00
nishan (o^▽^o)andmeta-codesync[bot] 1198a55d50 Add grayscale, drop-shadow and saturate filter support on iOS (#53873)
Summary:
This PR adds support for `grayscale`, `drop-shadow` and `saturate` filter support on iOS as discussed here - https://github.com/react-native-community/discussions-and-proposals/issues/927

## Changelog:

[IOS] [ADDED] - Add grayscale, drop-shadow and saturate CSS filters

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

Test Plan:
Test Filter screen in RNTester app. Checkout `grayscale`, `drop-shadow` and `saturate` examples. Results are consistent on android and iOS.

<img width="auto" height="300" alt="Screenshot 2025-09-22 at 1 07 28 PM" src="https://github.com/user-attachments/assets/f26fc60a-48f6-4aa2-82e9-56e986082fed" />

<img width="auto" height="300" alt="Screenshot 2025-09-22 at 1 08 08 PM" src="https://github.com/user-attachments/assets/d87925c8-f05c-4ed2-a651-8c7670339f87" />

<img width="auto" height="300" alt="Screenshot 2025-09-22 at 2 37 30 PM" src="https://github.com/user-attachments/assets/582fcadf-1189-4f01-9868-ff9fe71eeda0" />

## Aside

Will do one more PR to add remaining filters. Splitting into two to keep it easier to review.

Reviewed By: cipolleschi, jorge-cab

Differential Revision: D85352008

Pulled By: joevilches

fbshipit-source-id: 33931ceeaa6f47cf39988c8696bd90f659ade730
2025-10-27 14:50:27 -07:00
Ruslan Lesiutinandmeta-codesync[bot] f9e3db512b jsinspector: refactor domain notifications implementation (#54244)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54244

# Changelog: [Internal]

Refactors the logic a bit.

We will use `Runtime` domain as a signal for installation of `console.createTask()` implementation.

Reviewed By: huntie

Differential Revision: D85274860

fbshipit-source-id: 80c91a8a83ba2b95b70aa38a72529bbd20275c0d
2025-10-27 08:32:46 -07:00
Ruslan Lesiutinandmeta-codesync[bot] 8253a34883 Remove unused methods from RuntimeAgent (#54261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54261

# Changelog: [Internal]

These are actually unused and we've changed the approach - CDP agents do not control tracing status.

Reviewed By: huntie

Differential Revision: D85436029

fbshipit-source-id: faa79bbda92c0e0c55f26389bfe0c6efcf9e76c8
2025-10-27 08:32:46 -07:00
LS Hungandmeta-codesync[bot] 796d182d89 Add missing INIT_REACT_RUNTIME_START and APP_STARTUP_START in loadScript (#54255)
Summary:
Resolves https://github.com/facebook/react-native/issues/53818

On a freshly init bare react native project, upon booting up the iOS simulator, the logs shows the following warnings:
```
Unbalanced calls start/end for tag 20
Unbalanced calls start/end for tag 19
```

The detailed cause is explained in [this comment in the issue thread](https://github.com/facebook/react-native/issues/53818#issuecomment-3441319443), and I'm copying it here for ease of reading:

> The `Unbalanced calls start/end for tag 20` message comes from [RCTPerformanceLogger.markStartForTag](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/React/Base/RCTPerformanceLogger.mm#L78)
>
> 19 represents `RCTPLAppStartup` case of `RCTPLTag` (react performance logger tag), and 20 represents `RCTPLInitReactRuntime`
>
> In C++, they are also referred to as `ReactMarker::APP_STARTUP_STOP` and `ReactMarker::INIT_REACT_RUNTIME_STOP` respectively (see [here](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTPerformanceLoggerUtils.mm#L21) and [here](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/React/CxxBridge/RCTCxxBridge.mm#L116))
>
> The performance logger logs these "stop" events inside [ReactInstance::loadScript](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp#L270-L271).
>
> Notice that [L267-272](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp#L267-L272), we have:
> ```
>     if (hasLogger) {
>       ReactMarker::logTaggedMarkerBridgeless(
>           ReactMarker::RUN_JS_BUNDLE_STOP, scriptName.c_str());
>       ReactMarker::logMarkerBridgeless(ReactMarker::INIT_REACT_RUNTIME_STOP);
>       ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_STOP);
>     }
> ```
>
> But earlier in [L241-244](https://github.com/facebook/react-native/blob/2d980558a616d13c542a1d0f8659beb04d31ab08/packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp#L241-L244), we have:
> ```
>     if (hasLogger) {
>       ReactMarker::logTaggedMarkerBridgeless(
>           ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str());
>     }
> ```

## 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] - Address unexpected warning about "Unbalanced calls start/end for tag 20/19"

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

Test Plan:
Steps to reproduce are described by original issue reporter [here](https://github.com/facebook/react-native/issues/53818#issue-3426203510). The issue surfaced in a freshly init bare react native project

1. Create a bare react-native project
2. Run iOS simulator
3. "Unbalanced calls start/end for tag 20/19" does not show up in Xcode terminal

Reviewed By: javache

Differential Revision: D85421729

Pulled By: cipolleschi

fbshipit-source-id: f80c0dd18e1d4817b1111af29ca516b494742d5a
2025-10-27 04:00:29 -07:00
Daewoon Kimandmeta-codesync[bot] 0cadb8cfc8 Suppress DEPRECATION warnings for checking scaledDensity on some tests (#54278)
Summary:
Suppress DEPRECATION warnings for checking scaledDensity on some tests.

## Changelog:

[Internal] Suppress DEPRECATION warnings for checking scaledDensity on some tests.

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

Test Plan: none

Reviewed By: cipolleschi, fabriziocucci

Differential Revision: D85554602

Pulled By: javache

fbshipit-source-id: 26a8e6a4c658581dbf17358f7b1a791513fb1933
2025-10-27 03:32:41 -07:00
Nikita Lutsenkoandmeta-codesync[bot] 59affc38a6 clang-format | Format fbsource with clang-format 21.
Reviewed By: ChristianK275

Differential Revision: D85317706

fbshipit-source-id: b399c5c4b75252999442b7d7d2778e7a241b0025
2025-10-26 23:40:59 -07:00
Zeya Pengandmeta-codesync[bot] 43f464b218 pass down isAsync arg to start/stopOnRenderCallback to indicate thread (#54252)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54252

## Changelog:

[Internal] [Added] - pass down isAsync arg to start/stopOnRenderCallback to indicate thread

make it more explicit where start/stopOnRenderCallback is invoked so we can handle it on each platform in a more thread safe way

Reviewed By: lenaic

Differential Revision: D85365058

fbshipit-source-id: 5f0ee1343547fe3466fcd23282e0f27e129a2e7d
2025-10-24 11:52:48 -07:00
Daewoon Kimandmeta-codesync[bot] 642f086b8c Fix text not scaling down when system fontScale < 1.0 (#54238)
Summary:
Fixes https://github.com/facebook/react-native/issues/54168

In React Native 0.82.0, text on Android does not scale down when the system font scale is set to less than 1.0 (e.g., 85%). This regression was introduced when `PixelUtil.toPixelFromSP()` was changed to use `DisplayMetricsHolder.getScreenDisplayMetrics()` instead of `getWindowDisplayMetrics()` in commit [1ad2ec09](https://github.com/facebook/react-native/commit/1ad2ec099ac0ccc7402c37783004fbad3dbe0484).

The issue occurs because:
1. **windowDisplayMetrics** is obtained from `context.resources.displayMetrics` and includes the system font scale from `Configuration`
2. **screenDisplayMetrics** is populated by `Display.getRealMetrics()`, which returns physical display metrics **without** the system font scale setting ([Reference](https://developer.android.com/reference/android/view/Display#getRealMetrics(android.util.DisplayMetrics)))

When `getRealMetrics()` is called, it overwrites the `scaledDensity` value (which is `density * fontScale`), effectively resetting it to just `density` and losing the user's font scale preference.

## 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
-->
[ANDROID] [FIXED] - Fix text not scaling down when system fontScale < 1.0

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

Test Plan:
https://github.com/kdwkr/rn-0.82.0-android-layout-scale
Tested with this reproducer

 ---

Reviewed By: javache

Differential Revision: D85350263

Pulled By: alanleedev

fbshipit-source-id: ff646cf0405f689ff2a9166a1474fdb8b1b85fd6
2025-10-24 10:49:55 -07:00
Nick Lefeverandmeta-codesync[bot] 851d59a620 Add fantom test for syncOnCommit with passChildrenWhenCloning bug fix (#54264)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54264

Implementing a fantom test covering the correct update of runtime shadow node references when using passChildrenWhenCloningPersistedNodes combined with syncOnCommit.

Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D85437783

fbshipit-source-id: adad786e293c1acfe13e3a07ffb210dec0c17292
2025-10-24 10:20:43 -07:00
Nick Lefeverandmeta-codesync[bot] 91d5e99158 Fix missing reference updates with syncOnCommit (#54263)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54263

When enabling `passChildrenWhenCloningPersistedNodes` and `updateRuntimeShadowNodeReferencesOnCommit`, updates inserting shadow nodes between existing child shadow nodes would result in shadow node reference updates being skipped.

Since `passChildrenWhenCloningPersistedNodes` requires that the react fiber references the mounted shadow node instance at all times, this would result in invalid react renders, bringing back old revisions holding invalid layout metrics.

This diff updates the reference update applied on commit, submitting the updated shadow node references for added shadow nodes. Inserted shadow nodes between existing child shadow nodes will move the previously mounted shadow nodes to the end of the child array. This leads to the `updateMountedFlag` pass to consider these as "added" shadow nodes.

Changelog: [Internal]

Reviewed By: sbuggay

Differential Revision: D85406405

fbshipit-source-id: 7bd9a492fc67549970183c0932cfd7c8b7e61312
2025-10-24 10:20:43 -07:00
nishan (o^▽^o)andmeta-codesync[bot] 3d08683d0f feat(JS): background-size, position and repeat styles (#52284)
Summary:
This PR adds support for background size, position and repeat styles. It follows the [CSS](https://www.w3.org/TR/css-backgrounds-3/#backgrounds) spec. Currently we default to `background-origin: padding-box` and `background-clip : border-box` to match the web's behavior. We can introduce these styles later. I have split the PR intro three parts for review. This PR includes JS parsing and style propagation to native changes. I wanted to introduce one style at a time, but CSS spec is such that size, position and repeat are intertwined.

## Changelog:
[GENERAL][ADDED] - Background size, position and repeat styles.
<!-- 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/52284

Test Plan:
Merge the [iOS](https://github.com/facebook/react-native/pull/52283) and [android](https://github.com/facebook/react-native/pull/52282) PR into this, this PR includes `BackgroundImageExample`. I have also added testcases for parsing syntax in JS.

https://github.com/user-attachments/assets/b7192fdf-52ba-4eb0-a1be-d47c72d87e92

Reviewed By: joevilches

Differential Revision: D82973282

Pulled By: jorge-cab

fbshipit-source-id: a94e33962c6708be963e1cac049da50d4764da64
2025-10-24 10:13:25 -07:00
nishan (o^▽^o)andmeta-codesync[bot] e859293674 feat(android): background-size, position and repeat styles (#52282)
Summary:
This PR adds support for background size, position and repeat styles. It follows the [CSS](https://www.w3.org/TR/css-backgrounds-3/#backgrounds) spec. Currently we default to `background-origin: padding-box` and `background-clip : border-box` to match the web's behavior. We can introduce these styles later. I have split the PR intro three parts for review. This PR includes android only changes. I wanted to introduce one style at a time, but CSS spec is such that size, position and repeat are intertwined.

## Changelog:
[ANDROID][ADDED] - Background size, position and repeat styles.
<!-- 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/52282

Test Plan:
Merge the [JS](https://github.com/facebook/react-native/pull/52284) PR, rebuild android app and test RNTester app, it includes `BackgroundImageExample`. I have also added testcases for parsing syntax in JS.

https://github.com/user-attachments/assets/b7192fdf-52ba-4eb0-a1be-d47c72d87e92

Reviewed By: joevilches

Differential Revision: D82993837

Pulled By: jorge-cab

fbshipit-source-id: 52859e51d2c4bab27823d3eb913993fdfbb4c04d
2025-10-24 10:13:25 -07:00
nishan (o^▽^o)andmeta-codesync[bot] d8c2f1c883 feat(iOS): background-size, position and repeat styles (#52283)
Summary:
This PR adds support for background size, position and repeat styles. It follows the [CSS](https://www.w3.org/TR/css-backgrounds-3/#backgrounds) spec. Currently we default to `background-origin: padding-box` and `background-clip : border-box` to match the web's behavior. We can introduce these styles later. I have split the PR intro three parts for review. This PR includes iOS only changes. I wanted to introduce one style at a time, but CSS spec is such that size, position and repeat are intertwined.

## Changelog:
[IOS][ADDED] - Background size, position and repeat styles.
<!-- 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/52283

Test Plan:
Merge the [JS](https://github.com/facebook/react-native/pull/52284) PR, run `pod install` and test RNTester example, it includes `BackgroundImageExample`. I have also added testcases for syntax parsing in JS.

https://github.com/user-attachments/assets/b7192fdf-52ba-4eb0-a1be-d47c72d87e92

Reviewed By: joevilches

Differential Revision: D82993888

Pulled By: jorge-cab

fbshipit-source-id: af545acaf4b9d116b5905f912c494d2e77324380
2025-10-24 10:13:25 -07:00
Alex Huntandmeta-codesync[bot] d9262c60f4 Update BG trace label based on touch support (#54247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54247

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D85253083

fbshipit-source-id: 4f87e9200c1ade237fd184349add88ca263aaab3
2025-10-24 04:08:17 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] c7fb31ce5d Fix releases and nightlies after moving hermes to Hermes repo (#54257)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54257

When moving Hermes to the Hermes repo, we mistakenly updated the nightly and the publish_release job to depend on an non-existing job

## Changelog:
[Internal] - Fix CI jobs for nightlies and releases

Reviewed By: huntie

Differential Revision: D85422837

fbshipit-source-id: 18d4ef73c80032b55f09f27e4b58b399f0a148c9
2025-10-24 03:19:44 -07:00
Jakub Piaseckiandmeta-codesync[bot] 58bd51e7e2 Increase the maximum number of pointers tracked at the same time on iOS to 17 (#54248)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54248

Changelog: [IOS][FIXED] - Raised the maximum number of pointers tracked at the same time to 17

The current pool of pointer ids that can be used at the same time has the size of 11, while the maximum supported by some of the devices is 17 - https://developer.apple.com/forums/thread/17606.

To reproduce this problem use the iPad pro and place more than 11 pointers on the screen - the app becomes unresponsive due to [an infinite loop](https://github.com/facebook/react-native/blob/d93d32547bfadba731999ea251ca5e1d6c6c8912/packages/react-native/React/Fabric/Utils/RCTIdentifierPool.h#L22).

Reviewed By: cipolleschi

Differential Revision: D85345975

fbshipit-source-id: df6ba61f933406e7dc4e31382b35f002611fa433
2025-10-24 03:03:03 -07:00
Jakub Piaseckiandmeta-codesync[bot] fcb51b1392 Change value of HERMESVM_HEAP_HV_MODE on Android (#54240)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54240

Changelog: [Android][Changed] Changed value of `HERMESVM_HEAP_HV_MODE` to `HEAP_HV_PREFER32` for Hermes V1

Reviewed By: cipolleschi

Differential Revision: D85329156

fbshipit-source-id: c7d0a948b1262d081cf0b2c9972f89a8efcf3808
2025-10-24 02:59:21 -07:00
Christoph Purrerandmeta-codesync[bot] 2d980558a6 Remove UIManagerCommitHookManager 1/2 (#54234)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54234

Changelog: [Internal]

This feature does not work reliably and caused crashes during experimentation

Reviewed By: lenaic

Differential Revision: D85259390

fbshipit-source-id: 5b3d48e411f1e8fae2ee8c64166b53a28b1211d1
2025-10-23 18:57:28 -07:00
Ruslan Lesiutinandmeta-codesync[bot] d93d32547b Group sampling methods in header files (#54243)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54243

# Changelog: [Internal]

Just formatting.

Reviewed By: sbuggay

Differential Revision: D85266409

fbshipit-source-id: 7435fe1cb82d94a9e19cbba631f812d2b821f68a
2025-10-23 07:35:41 -07:00
Vitali Zaidmanandmeta-codesync[bot] 94995fdd9f add rules to prefer Error objects to be thrown and rejected (#54229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54229

Changelog: [General][Added] Added eslint rule to warn when a non-error is being thrown from a function or rejected for a promise.

Reviewed By: huntie

Differential Revision: D85237916

fbshipit-source-id: e0e4fbc6b4620a19be1959d3953856c7e44ad4e0
2025-10-23 06:42:55 -07:00
Vitali Zaidmanandmeta-codesync[bot] 9cadfe6607 add meaningful error reported from functions (#54230)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54230

Changelog: [General][Added] add meaningful error reporting when `AccessibilityInfo`'s methods are not available.

Reviewed By: javache

Differential Revision: D85162912

fbshipit-source-id: 3a233cfa54cefd3463e59d125053d4ffdd32be9b
2025-10-23 06:42:55 -07:00
Sam Zhouandmeta-codesync[bot] a729160dfa Deploy 0.289.0 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D85310296

fbshipit-source-id: 5c657dd986c85c1b6d29f627bc55d7f85b4e5d36
2025-10-23 06:42:11 -07:00
Jakub Piaseckiandmeta-codesync[bot] b8463053d4 Add Hermes version to the new app screen (#54241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54241

Changelog: [Internal]

Added Hermes version besides information that the app is running using Hermes. This information will be helpful now that Hermes is being published independently from React Native and users are able to choose between two versions at a time (current and V1).

Reviewed By: cipolleschi

Differential Revision: D85333735

fbshipit-source-id: b07b75be3e3d4b5424d4c2185916bac507fc5eca
2025-10-23 04:45:45 -07:00
Luna Weiandmeta-codesync[bot] b823b26a37 Add support for rootMargin (#54176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54176

Changelog: [Internal] - Add support for `rootMargin` for IntersectionObserver.

Reference:
- https://www.w3.org/TR/intersection-observer/#dom-intersectionobserver-rootmargin
- https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin

Reviewed By: rubennorte

Differential Revision: D84787370

fbshipit-source-id: 752a9a32becde73d1a92469f9b74240918519b24
2025-10-22 16:40:18 -07:00
Peter Abbondanzoandmeta-codesync[bot] ed75963c0d Run flingAndSnap logic from ACTION_SCROLL events (#54226)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54226

https://github.com/facebook/react-native/pull/54226

Joysticks, mouse wheels, and trackpads can issue an `ACTION_SCROLL` event when performing scroll. However, the `ACTION_SCROLL` generic motion event does not run the post touch runnable and paging/snap alignment is not honored when these events are received. To fix this, both ScrollView implementations should call `handlePostTouchScrolling` with a 0 velocity, ensuring that momentum events are sent, fabric scroll state is updated, and `flingAndSnap` is properly called to align to a page.

This change adds some checks to queue a runnable that calls `handlePostTouchScrolling` after no more `ACTION_SCROLL` events are received in the same 20ms delay it uses to determine a stable frame. The end result is that snap alignments are correctly honored

Changelog: [Android][Fixed] - Controller-driven scroll events now honor paging/snap alignment

Reviewed By: javache

Differential Revision: D85172309

fbshipit-source-id: 5818777b3c371b3da4aa925a8c840e0da89bf6a4
2025-10-22 15:45:47 -07:00
Calix Tangandmeta-codesync[bot] 6f8432330c Hotfix VirtualViewContainerStateExperimental delete (#54236)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54236

Changelog[Internal] -
Fix faulty changes made to Interval Tree in previous diff.

The issue was in the right-right rotation case of the internal Interval Tree implementation:

```
// Right heavy
    if (bf < -1) {
      if (balanceFactor(node.right) > 0) {
        node.right =
            rotateRight(...)
```

This diff also includes a minor update to logic in IntervalTree's `delete` operation.  There was previously a missing `balance` operation.

Reviewed By: lunaleaps

Differential Revision: D85263661

fbshipit-source-id: 8636984161a8668d74973b6aebad9842d4d7f34f
2025-10-22 14:04:26 -07:00
Zeya Pengandmeta-codesync[bot] 9f7a3bb2ff Allow passing down frameRateListenerCallback in cxx animated (#54142)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54142

## Changelog:

[Internal] [Added] - Allow passing down frameRateListenerCallback in cxx animated

exposing `frameRateListenerCallback` to add instrumentation at animation frame and stop
we're deferring the actual implementation of frame rate listening/logging to app/platform side

Reviewed By: sammy-SC

Differential Revision: D84510183

fbshipit-source-id: d8835542e8e50c5018032c951a510fec27b5a4d5
2025-10-22 11:45:32 -07:00
Zeya Pengandmeta-codesync[bot] 4c7351d9b1 always invoke onRender via UIManagerNativeAnimatedDelegate (#54211)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54211

## Changelog:

[Internal] [Added] - always invoke onRender via UIManagerNativeAnimatedDelegate

Previously only android invokes `onRender` via UIManagerNativeAnimatedDelegate::runAnimationFrame()
consolidating so it's easier for debugging, also in cases where we want to add extra work per frame (e.g. add performance logging) in AnimatedNodesManagerProvider

Reviewed By: sammy-SC

Differential Revision: D85071075

fbshipit-source-id: 770df523de506c8442d063c417229e36bcf5dd31
2025-10-22 11:45:32 -07:00
Rick Hanlonandmeta-codesync[bot] a6fab2192a remove isomorphic version checks from legacy react native renderers (#54232)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54232

We're not syncing the legacy renderers, which means the React package will continue to move forward while these stay frozen. That means we need to remove the version compatibility checks between react and the legacy ReactNativeRenderers.

Changelog:
[Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D85248891

fbshipit-source-id: 19e0812c59f69301e2666e6272c10ac56ecbde1f
2025-10-22 11:01:43 -07:00
Jakub Piaseckiandmeta-codesync[bot] 5fcbd64986 Clean up hermes-utils (#54208)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54208

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D85047132

fbshipit-source-id: 859ca41e5513e914a708b43c0cd795cb665a5ea4
2025-10-22 09:48:13 -07:00
Jakub Piaseckiandmeta-codesync[bot] 77164aaa29 Don't publish Hermes artifacts from the React Native Repository (#53986)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53986

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D83137498

fbshipit-source-id: 63203406002a31d0f2d9cf7577274f6e33544c74
2025-10-22 09:48:13 -07:00
Jakub Piaseckiandmeta-codesync[bot] e2165619dd Remove steps related to building hermes (#53901)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53901

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D83051151

fbshipit-source-id: a88efd5ff908568a7b85ce6a6812103ee963766e
2025-10-22 09:48:13 -07:00
Jakub Piaseckiandmeta-codesync[bot] e3287d9699 Use the Hermes artifacts in actions (#53837)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53837

Changelog: [Internal]

Replaces usage of Hermes built inside the React Native repository with the release published from the Hermes repo.

Reviewed By: cipolleschi

Differential Revision: D82721725

fbshipit-source-id: 357d5e2b914675ec6e60f810c382a945aa461732
2025-10-22 09:48:13 -07:00
Jakub Piaseckiandmeta-codesync[bot] 27bb34c006 Always use Hermes artifacts published from Hermes repository (#53833)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53833

Changelog: [GENERAL][CHANGED] - Use Hermes artifacts published independently from React Native

Reviewed By: cortinico

Differential Revision: D82626463

fbshipit-source-id: 99a34a34c53b7f8f1c0da3da8a0e750e42a2e9b7
2025-10-22 09:48:13 -07:00
Jakub Piaseckiandmeta-codesync[bot] 406dd87290 Update release processes to update the Hermes versions independently from React Native (#53985)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53985

Changelog: [Internal]

Updates the release scripts to set the Hermes version independently from React Native.

Reviewed By: cipolleschi

Differential Revision: D82438054

fbshipit-source-id: 154c19d1d0d16fd5879ad663428d803ceadc5a1f
2025-10-22 09:48:13 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 93c17cd0c4 Add changelog for 0.79.7 (#54224)
Summary:
Add changelog for 0.79.7

## Changelog:
[Internal] -

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

Test Plan: N/A

Reviewed By: christophpurrer

Differential Revision: D85168976

Pulled By: cipolleschi

fbshipit-source-id: 6807d1df9da62043f87bedf0d0209cd81fda816c
2025-10-21 16:59:30 -07:00
Rick Hanlonandmeta-codesync[bot] 0c5a22003b Apply fixup patch to fbsource
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react's builds/facebook-fbsource branch on GitHub. Land this patch as soon as possible, as the difference
reflected on here is already on GitHub and future changes may depend on these
changes!

<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge

Generated by: https://www.internalfb.com/intern/sandcastle/job/9007201517475550/

GitHub Repo: facebook/react

# Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D84722100

fbshipit-source-id: cbc6f4cdec01124b00ca011b1667c4f7bdb98a37
2025-10-21 15:20:16 -07:00
Ramanpreet Naraandmeta-codesync[bot] e2c803435c c++: Simplify native module lookup (#54227)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54227

All these flags were introduced for rollout purposes. We no longer need them. Let's get rid of them

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D85171189

fbshipit-source-id: 4bd0531dfc3a9841fbe7db9a8f80329e04896e08
2025-10-21 15:05:35 -07:00
Rubén Norteandmeta-codesync[bot] 1a02e8bffe Simplify tests passing refs to Fantom instead of nodes (#54222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54222

Changelog: [internal]

Reduce boilerplate in some tests now that we can pass refs to some Fantom APIs.

Reviewed By: javache

Differential Revision: D85143176

fbshipit-source-id: 0e107891f1027a185821e21e5fa76f019cec5bb1
2025-10-21 09:34:49 -07:00
Rubén Norteandmeta-codesync[bot] e58bbbcd8e Allow passing refs where nodes are expected (#54221)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54221

Changelog: [internal]

Small change in the Fantom API to accept refs and reduce boilerplate. See next diff for examples

Reviewed By: javache

Differential Revision: D85143177

fbshipit-source-id: fd65abcc1b107df8726fee172b284f5dc96e88a6
2025-10-21 09:34:49 -07:00
Alan Hughesandmeta-codesync[bot] bd004e0c12 Add changelog for v0.82.1 (#54216)
Summary:
Add Changelog for 0.82.1

## Changelog:
[Internal] - Add Changelog for 0.82.1

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D85137528

Pulled By: cortinico

fbshipit-source-id: 3705a91227874f3ac5e006b8b3e2d26acaf91a2f
2025-10-21 08:24:36 -07:00
Moti Zilbermanandmeta-codesync[bot] 74d3472e2f Better source locations for EXPECT_CALL failures (#54129)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54129

Changelog: [Internal]

The team maintaining gmock is [uninterested, as a matter of principle,](https://github.com/google/googletest/issues/2646#issuecomment-630919122) in improving the ergonomics of writing helper functions around `EXPECT_CALL`. However, such helpers have proven very useful for the `jsinspector-modern` C++ test suite. The out-of-the-box ergonomics *are* pretty bad, though, so this diff tries to improve the situation.

The biggest offender in our test suite is the `expectMessageFromPage` helper function - if a test fails because an expectation isn't met, the error message points to the `EXPECT_CALL` line inside `expectMessageFromPage`, which is utterly useless compared to the line of test code that *called* `expectMessageFromPage`.

Here, we reach into gmock's internals slightly to create a variant of the `EXPECT_CALL` macro that allows passing in a [`std::source_location`](https://en.cppreference.com/w/cpp/utility/source_location.html) (thanks, C++20!). We then teach `expectMessageFromPage` and other such helpers to capture a source location at the call site (using a parameter with a default value to `source_location::current()`) and use the modified macro to pass it into gmock.

Reviewed By: huntie

Differential Revision: D84368993

fbshipit-source-id: 62f64b6c5f626a54bc3da7143d84ee2d75d16ac6
2025-10-21 08:19:02 -07:00
Moti Zilbermanandmeta-codesync[bot] f7cc2e565a Add tests for Tracing domain reporting of network requests (#54128)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54128

Changelog: [Internal]

Adds an integration test for `NetworkReporter`'s CDP Tracing domain output (via `PerformanceTracer` behind the scenes), i.e. the traces that power the Network track in the Performance panel in React Native DevTools.

The test covers the `Tracing` and `Network` domains being enabled simultaneously, as well as `Tracing` on its own.

Reviewed By: huntie

Differential Revision: D84337901

fbshipit-source-id: f82af33575806fc3b99636cdb1eb9803c04c8c07
2025-10-21 08:19:02 -07:00
Pieter De Baetsandmeta-codesync[bot] 708f527ec7 Ensure JVM thread is attached when destroying FabricMountingManager (#54218)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54218

Observed some crashes coming from `schedulerDidRequestPreliminaryViewAllocation` which seemed to point at the FabricMountingManager being destroyed from the Hades GC thread. That thread is not attached to the JVM, so would crash when trying to destroy this global_ref.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D85143603

fbshipit-source-id: 2ecd42d57188e6f3d69a6124e21ee8913b3d5b89
2025-10-21 06:33:11 -07:00
Ruslan Lesiutinandmeta-codesync[bot] f4a942254a fix: add clearMarks and clearMeasures to performance global stub (#54214)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54214

# Changelog: [Internal]

React started using `clearMeasures` in https://github.com/facebook/react/pull/34803. It only does it if `performance.measure()` is defined. This should be enough for a  feature check of User Timings API presence, but out stub doesn't follow the same spec.

Adding `clearMarks()` and `clearMeasures()` stubs to the object.

Reviewed By: rubennorte

Differential Revision: D85082720

fbshipit-source-id: 3b117a6545e131cdbb2d5efb73d500a928469864
2025-10-21 06:18:18 -07:00
Dawid Maleckiandmeta-codesync[bot] 4ddf2ce64f Android: Add new configuration for DevSupportManager (#53557)
Summary:
Following the [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/925), this PR adds new `DevMenuConfiguration` object and extends `ReactHost` API for passing settings to the particular `DevSupportManager`.  The `DevMenuConfiguration` includes:

- isDevMenuEnabled,
- isShakeGestureEnabled,
- areKeyboardShortcutsEnabled,

## Changelog:

[ANDROID][ADDED] - Add new configuration for `RCTDevMenu`

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

Test Plan:
Tested with different configuration on `DevMenuConfiguration`:

<details>
<summary>Click to view code</summary>

```kt
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    fullyDrawnReporter.addReporter()
    maybeUpdateBackgroundColor()

    reactDelegate?.reactHost?.let { reactHost ->
      val devMenuConfiguration = DevMenuConfiguration(
        isDevMenuEnabled = true,
        isShakeGestureEnabled = false,
        areKeyboardShortcutsEnabled = false,
      )
      reactHost.setDevMenuConfiguration(devMenuConfiguration)
    }

    // register insets listener to update margins on the ReactRootView to avoid overlap w/ system
    // bars
    reactDelegate?.reactRootView?.let { rootView ->
      val insetsType: Int =
          WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.displayCutout()

      val windowInsetsListener = { view: View, windowInsets: WindowInsetsCompat ->
        val insets = windowInsets.getInsets(insetsType)

        (view.layoutParams as FrameLayout.LayoutParams).apply {
          setMargins(insets.left, insets.top, insets.right, insets.bottom)
        }

        WindowInsetsCompat.CONSUMED
      }
      ViewCompat.setOnApplyWindowInsetsListener(rootView, windowInsetsListener)
    }
  }
```

</details>

Reviewed By: vzaidman, cortinico

Differential Revision: D81684310

Pulled By: coado

fbshipit-source-id: 4e2c27ffc68037432587f4920b243f3dfdccb2fb
2025-10-21 02:38:33 -07:00
Calix Tangandmeta-codesync[bot] 328d07a30d Implement VirtualViewContainerStateExperimental (interval tree, updateModes optimization) (#54213)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54213

## Changelog: [Internal]
Modifies `VirtualViewContainerStateExperimental` to use an interval tree to store the container's VirtualViews. Interval tree's query allows us to lower the frequently-used updateModes() operation from `O(n)` to `O(m + log n)`, where `m` is the number of VirtualViews in the hysteresis range. General layout changes incur a penalty due to the requirement of maintaining a balanced BST.

Performance Changes:
* updateModes(): `O(n) -> O(m + log n)` (new algo)
* updateMode(): `O(1) -> O(1)`
* add VV: `O(1) -> O(log n)`
* update VV: `O(1) -> O(log n)`
* delete VV: `O(1) -> O(log n)`

We expect scrolling to be much more frequent than a total layout change/updating many of the elements in the container at once. However, the initial load of a page will take `O(n log n)` time rather than `O(n)` time.

We also include some bookkeeping sets for "old" hysteresis, prerender, and visible VVs. This will increase the memory footprint of `VirtualViewContainerState` by `O(m)`.

More details are in https://docs.google.com/document/d/1Cmamx6fNfruoHLApX8tedqNVZsCEUyoBvQWpMvBsfcY/edit?tab=t.gqla6vu3231k.

### Note
This diff only covers the Android version. iOS may follow after experimentation.

Reviewed By: lunaleaps

Differential Revision: D83783201

fbshipit-source-id: 93a7a93784d668e09d8ddacc7e30d289ccd8b7a2
2025-10-20 19:08:52 -07:00
Calix Tangandmeta-codesync[bot] 793f99d949 Split VirtualViewContainerState into classic, experimental versions [Android] (#54162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54162

Changelog [Internal]:

Splits VirtualViewContainerState implementation into three parts: (1) an abstract parent class, (2) the "classic" version (existing version), and (3) the "experimental" version (new changes to be made). The experimental version is a copy of the classic version for now.

Reviewed By: lunaleaps

Differential Revision: D84569206

fbshipit-source-id: b41cd9faf06d2de0dff17148ded72193107e5b9e
2025-10-20 19:08:52 -07:00
Calix Tangandmeta-codesync[bot] f4acf23374 Refactor debugLog in ReactVirtualViewExperimental.kt (#54157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54157

Changelog [Internal]
Removes unnecessary `debugLog` import in ReactVirtualViewExperimental and refactors the debug function

Reviewed By: lunaleaps

Differential Revision: D84608555

fbshipit-source-id: 548076537c26a4fffba2c47be47d1cee4cf6f3ef
2025-10-20 19:08:52 -07:00
Calix Tangandmeta-codesync[bot] 0b05253dec Add VirtualViewContainerState version native feature flag (#54156)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54156

Changelog: [Internal]

Introduces new React Native feature flag for VirtualViewContainerState versioning changes.

Follow up diffs will create classic and experimental versions of VirtualViewContainerState. This feature flag is meant to eventually be overridden with MetaConfig variables.

Reviewed By: lunaleaps

Differential Revision: D84569199

fbshipit-source-id: aaca31bd1946c56f7de3d7fd52a126b0165e59d4
2025-10-20 19:08:52 -07:00
Christoph Purrerandmeta-codesync[bot] a63262f4bd use ThemedReactContext for resource prefetching (#54201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54201

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D85015776

fbshipit-source-id: 1a237aa7cae39ddb242c09f202f3566c03baefed
2025-10-20 12:14:14 -07:00
Christoph Purrerandmeta-codesync[bot] 6a37389e28 Image prefetcher > Correctly set blurRadius data type (#54200)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54200

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D85014621

fbshipit-source-id: f4ff244443ce0fef5b9cdd6005da002445f3f632
2025-10-20 12:14:14 -07:00
Rubén Norteandmeta-codesync[bot] 05ec7e0ad1 Add basic definition of DOM APIs in legacy TypeScript types (#54124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54124

Changelog: [General][Fixed] Fixed missing type definitions for new DOM APIs in legacy TypeScript types.

Fixes https://github.com/facebook/react-native/issues/54103.

Reviewed By: huntie

Differential Revision: D84363784

fbshipit-source-id: f92362c78c72da986b26ea18c673f90fd4b48fca
2025-10-20 11:38:35 -07:00
generatedunixname89002005232357andmeta-codesync[bot] 2f8392387b Revert D84624705 (#54209)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54209

Changelog: [Internal]

This diff reverts D84624705
The marker is logged even if there is a full bundle reload.

Depends on D84624705

Reviewed By: hoxyq

Differential Revision: D85048405

fbshipit-source-id: 0d634a034efe42b404abe1992a4f82280dbeedec
2025-10-20 08:40:01 -07:00
Nicola Cortiandmeta-codesync[bot] 50b1bec2d5 RNGP - Move matchingFallbacks to be called inside maybeCreate("debugOptimized") (#54186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54186

The `marchingFallback` directive is applied directly on the build type.
However here is invoked inside the `externalNativeBuild` making it confusing, because in reality
it has nothing to do with `externalNativeBuild`. So I'm moving it to the correct location
(this has no effect on the build setup, is just to make the code easier to read).

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D84921628

fbshipit-source-id: 064336ad64a8e1de20b747276f6e5ca7ce7cb677
2025-10-20 08:01:26 -07:00
Pieter De Baetsandmeta-codesync[bot] bc906488ae Add Fantom test for backgroundImage parsing (#54185)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54185

Validate that the changes in D83341309 work across both experiment variants.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D84924308

fbshipit-source-id: 7bf13d00f32c7af778b142ff3abdd0c2f7a5ba24
2025-10-20 07:00:42 -07:00
nishan (o^▽^o)andmeta-codesync[bot] a9780f9102 feat: background image native CSS parser (#53609)
Summary:
This PR adds native CSS parser for `backgroundImage` property. Currently, it supports linear-gradient and radial-gradient spec compliant CSS syntax.

## Changelog:

[GENERAL] [ADDED] - background image native parser.

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

Test Plan:
- Replicated existing testcases from JS. Currently i've added CSS syntax testcases. Checkout `CSSBackgroundImageTest.cpp`

### Verify example screens in RNTester
- Set `enableNativeCSSParsing` to true in `ReactNativeFeatureFlags.config.js` and run `yarn featureflags --update`
- Rebuild the project and verify `LinearGradientExample` and `RadialGradientExample` screens on both platforms.

### Notes
- Currently it is difficult to run CSS renderer tests. I made a custom cmake config to get it working, some steps would be helpful.
- Right now the new CSS renderer seems to be only working on iOS. NickGerleman mentioned there is some WIP to get it working on android. So please test this PR on iOS.

Reviewed By: mdvacca

Differential Revision: D83341309

Pulled By: javache

fbshipit-source-id: 91b88e3df164766c1f0021283697b1e5f9b44bfc
2025-10-20 07:00:42 -07:00
Nick Lefeverandmeta-codesync[bot] 4c4270d6c7 Add endFillColor prop to scroll view (#54203)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54203

Adding the Android `endFillColor` property to the scroll view props, setting the default value to `TRANSPARENT`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D85021077

fbshipit-source-id: 73eb12671035b1b2e2ca95a08b7c73b55ce2c0da
2025-10-20 04:36:52 -07:00
Nick Lefeverandmeta-codesync[bot] df7508db58 Add overScrollMode prop to scroll view (#54202)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54202

Adding the `overScrollMode` property to the Android scroll view props.

Changelog: [Internal]

Differential Revision: D85019462

fbshipit-source-id: 2809743a89e80ad851fce4f90da6a8f7a67e1501
2025-10-20 04:36:52 -07:00
David Vaccaandmeta-codesync[bot] d9ea1b2453 Delete unused imports (#54195)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54195

Delete unused imports

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84955362

fbshipit-source-id: 1d89271b72080690a139d9dc99f1bf1576e3f4e9
2025-10-18 09:39:02 -07:00
David Vaccaandmeta-codesync[bot] eafc472b7e Explicitly set default values for fields of ShadowNodeUpdateInfo (#54194)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54194

Explicitly set default values for fields of ShadowNodeUpdateInfo

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954459

fbshipit-source-id: 0b2fc7d35ec8e515db91f86cea85bb78cf746cd1
2025-10-18 09:39:02 -07:00
David Vaccaandmeta-codesync[bot] 6237882055 Explicitly set default values for fields of ShadowViewNodePair (#54193)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54193

Explicitly set default values for fields of ShadowViewNodePair

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954458

fbshipit-source-id: 7ca2ed92d5622cf4dc01088d4e53b946d1bbd279
2025-10-17 21:28:39 -07:00
David Vaccaandmeta-codesync[bot] 0a3344c31f Explicitly set default values for fields of ResourceTimingData (#54192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54192

Explicitly set default values for fields of ResourceTimingData

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954457

fbshipit-source-id: 9f121a9e8567b851fa74756a2fa58dab9fd60827
2025-10-17 21:28:39 -07:00
David Vaccaandmeta-codesync[bot] 82826f24d5 Explicitly set default values for fields of NetworkResource (#54191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54191

Explicitly set default values for fields of NetworkResource

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954456

fbshipit-source-id: 27f48ca0c174045023da4d87429973b26a788103
2025-10-17 21:28:39 -07:00
David Vaccaandmeta-codesync[bot] 9d172c0b37 Explicitly set default values for field of structTraceEvent (#54190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54190

Explicitly set default values for field of structTraceEvent

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84954461

fbshipit-source-id: 51b950d26d4236ff561b77751983defaccd799b0
2025-10-17 21:28:39 -07:00
David Vaccaandmeta-codesync[bot] ff50b29050 Explicitly set default values for fields of struct JSRuntimeFlags (#54189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54189

Explicitly set default values for fields of struct JSRuntimeFlags

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84952242

fbshipit-source-id: 41de7eb791c9880c83573d670f4a777bf0a753d9
2025-10-17 21:28:39 -07:00
David Vaccaandmeta-codesync[bot] c3868e5e4c Explicitly set default values for fields of HostTargetMetadata struct (#54188)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54188

Explicitly set default values for fields of HostTargetMetadata struct

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D84952243

fbshipit-source-id: e01b8137dac571a6e001681184bca2eef7cc9ee8
2025-10-17 21:28:39 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 535efc1403 Fixed tint color for action sheets (#54180)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54180

in iOS 26, the tintColor prop is not applied by default to the action sheets buttons.

This change fixes it by restoring the same behavior we had before iOS 26.

## Changelog:
[iOS][Fixed] - Apply tint color to Actions sheets buttons

Reviewed By: cortinico

Differential Revision: D84844319

fbshipit-source-id: e211d0a735ea2da35f825c3568d66ba83e4ad832
2025-10-17 09:47:58 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 82d2352b19 Fix ActionSheet presented with an interactive background (#54179)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54179

iOS 26 changed how the `popoverPresentationController.sourceView`and the `popoverPresentationController.sourceRect` are handled by iOS.

Before iOS 26, those two properties were ignored by iPhones but used by iPads.

After iOS 26, those two properties are used by both iPhones and iPads.

This introduced an issue where users presenting an action sheet were actually able to interact with the back button on iPhone even ehwn they were not supposed to.

This change adds a condition over the idiom used (iPhone/iPad) to make sure that we use the anchors only with the iPad idions as it used to be before.

## Changelog:
[iOS][Fixed] - Revert action sheet behavior not to break apps on iOS 26

Reviewed By: RSNara

Differential Revision: D84842625

fbshipit-source-id: 347dfc21ee478abd02ba26078cb27d05e9cb64c5
2025-10-17 09:47:58 -07:00
Tomasz Sapetaandmeta-codesync[bot] be4fcdafb1 Improve decoding full-sized images in RCTImageLoader (#54184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54184

In Expo, someone reported (https://github.com/expo/expo/issues/40158) that `expo-image-manipulator` causes memory crashes when processing large images (> 30MB).
Image manipulator uses `RCTImageLoader` to load and decode images. As opposed to the Image component, it always requests for images in full size. For large images it may crash at `CGImageSourceCreateThumbnailAtIndex` which in the provided repro slowly increases memory usage until it finally crashes after a few seconds of running.
I figured out that not including the `kCGImageSourceThumbnailMaxPixelSize` option works much better, but using `CGImageSourceCreateImageAtIndex` instead of `CGImageSourceCreateThumbnailAtIndex` works even better – it's faster and consumes less memory during decoding. This is more or less what `SDWebImage` library does, see [`SDImageIOAnimatedCoder`](https://github.com/SDWebImage/SDWebImage/blob/master/SDWebImage/Core/SDImageIOAnimatedCoder.m#L488-L509).
With the proposed changes, it's still crashing but only for the largest image (64MB), other images (40MB and 50MB) are now working fine. Obviously, it cannot be fixed entirely and it's not recommended to load such big images without downscaling them.

## Changelog:

[IOS] [CHANGED] - Use `CGImageSourceCreateImageAtIndex` instead of `CGImageSourceCreateThumbnailAtIndex` to decode full-sized images

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

Test Plan: I've tested the examples of the `Image` component in RNTester as well as the repro provided in https://github.com/expo/expo/issues/40158

Reviewed By: javache

Differential Revision: D84835416

Pulled By: cipolleschi

fbshipit-source-id: a182dd00f00194f0463ad4f583cc695647414fca
2025-10-17 09:00:45 -07:00
Dawid Maleckiandmeta-codesync[bot] 269b0bd877 fix(android): displaying dev menu items in light mode (#54119)
Summary:
Fixes displaying dev menu items to also take into account the current theme mode. Previously, in light mode, items were not visible because the text was white on a white background for enabled options.

## Changelog:

[ANDROID][FIXED] - fixed displaying dev menu items in light mode.

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

Test Plan:
Checked in light and dark mode with all options enabled except for "Open DevTools" being disabled.

| Before | After |
|:------:|:-----:|
|<img  alt="before-light" src="https://github.com/user-attachments/assets/5a08cb92-8822-4af3-976d-c20db408bcaa" /> |<img alt="after-light" src="https://github.com/user-attachments/assets/02561c15-b6ec-499a-bf83-99bc0c2a9471" />|

| Before | After |
|:------:|:-----:|
| <img alt="before-dark" src="https://github.com/user-attachments/assets/44b2c59e-2fc2-41cc-a599-136ac455afbb" /> |<img alt="after-dark" src="https://github.com/user-attachments/assets/51e6167b-4d3a-4686-a20e-eca17c3b0e10" />|

Reviewed By: sbuggay, cortinico

Differential Revision: D84346125

Pulled By: coado

fbshipit-source-id: e082d1985fdcafe8620cbd02a78a1b122fb08e53
2025-10-17 01:34:22 -07:00
Luna Weiandmeta-codesync[bot] 802e1a7726 Support edge-adjacent intersections (#54175)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54175

Changelog: [Internal] - Fix a bug with IntersectionObserver where we weren't considering edge-adjacent intersections.

So it is valid for `intersectionRatio` to be 0, but still be intersecting.

Reviewed By: mdvacca

Differential Revision: D84787414

fbshipit-source-id: ef6ab35be594f5b734c8c25d2475ee2a6dba1fe5
2025-10-16 23:26:47 -07:00
Luna Weiandmeta-codesync[bot] 9d6fa7d77e Use 'explicit root' instead of 'custom root' terminology (#54177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54177

Changelog: [Internal] - Rename the term "custom root" to "explicit root" to align with w3c spec. And "implicit root" for the document root.

Reviewed By: mdvacca

Differential Revision: D84795887

fbshipit-source-id: afec23f6763af56c6de1d3fce2f9501187559fb9
2025-10-16 23:26:47 -07:00
Nick Lefeverandmeta-codesync[bot] ae5728bbb4 Extract ValueUnit percent formatting to separate file (#54170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54170

This diff extracts the `toString(double, char)` function used to format percent values from `ValueUnit` into a separate `DoubleConversions` file.

This was added to graphics directly instead of moving it to core to avoid introducting cyclic dependencies since core depends on graphics.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D84714535

fbshipit-source-id: e41be90d211c28dba12e0920293698b3e1d3a1c7
2025-10-16 17:16:31 -07:00
Peter Abbondanzoandmeta-codesync[bot] 7c543db181 Fix resizeMethod prop (#54178)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54178

The `resizeMethod` prop was reading from `internal_analyticTag` and not setting on the backing image, this change remaps it

Changelog: [General][Fixed] resizeMethod was not propagated correctly on Android with Props 2.0

Reviewed By: javache

Differential Revision: D84716400

fbshipit-source-id: 320aded79cba787585d875fc46111bca34c0c30c
2025-10-16 15:26:46 -07:00
Nicola Cortiandmeta-codesync[bot] 40ac4478fb Move to use proguard-android-optimize.txt inside RNTester (#54143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54143

This will become the default in AGP 9.x so let's update it inside RNTester as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D84548388

fbshipit-source-id: 755344b93204f074926e47ef2a5c980b60e9121b
2025-10-16 13:46:38 -07:00
Andrew Datsenkoandmeta-codesync[bot] 9ab95dd2b5 Delete unused script (#54171)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54171

Changelog: [Internal]

Remove outdated and unused script.

Reviewed By: cortinico

Differential Revision: D84636692

fbshipit-source-id: 402c15735ec1d5a646147b83a1c8def4de9811d0
2025-10-16 12:54:47 -07:00
Nick Lefeverandmeta-codesync[bot] 2ab23aeb40 Add fadingEdgeLength prop to android scroll view props (#54164)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54164

Adding `fadingEdgeLength` prop to the Android scroll view props together with prop diffing support for Props 2.0.

Changelog: [Internal]

Differential Revision: D84788963

fbshipit-source-id: 6cf8011816311797fe0d805f68ccb026e32d7bff
2025-10-16 06:49:58 -07:00
Andrew Datsenkoandmeta-codesync[bot] e79920c662 Fix EXC_BAD_ACCESS for animated (#54158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54158

Changelog: [Internal]

Animated was capturing `self` directly in C++ std::function contexts. When capturing Objective-C objects in C++ lambdas, they aren't automatically retained. When these lambdas were invoked later (potentially after `self` was deallocated), accessing `_onRender` and other instance variables caused the crash.

Reviewed By: zeyap

Differential Revision: D84638972

fbshipit-source-id: 38f8630cf4f677e29afff07348c2d5dbb1f5cd08
2025-10-15 08:29:24 -07:00
Alex Huntandmeta-codesync[bot] 094794ac92 Add performance marker for Fast Refresh update (#54154)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54154

Adds a prominent vertical "Fast Refresh ⚛︎" marker entry in the performance timeline when a Fast Refresh update is complete.

This is available in apps with `performance.mark()` enabled (Canary feature).

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D84624705

fbshipit-source-id: 6c0ae0b8ae0acaaaba559a1854f64218bf5feabb
2025-10-14 17:51:13 -07:00
Will Spagnoliandmeta-codesync[bot] 0b68dcfac8 Update copyright from Facebook to Meta Platforms (#54144)
Summary:
Fix sync script to emit “Meta Platforms, Inc.” instead of "Facebook, Inc."

## Changelog:

[General] [Fixed] - Updated sync script to emit “Meta Platforms, Inc.” instead of "Facebook, Inc." in copyright notice.

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

Test Plan: Tests Required: No

Reviewed By: cortinico

Differential Revision: D84636157

Pulled By: andrewdacenko

fbshipit-source-id: 51f199ff31d7406519e1b985393b7e5b6f4cd602
2025-10-14 13:29:05 -07:00
Rob Hoganandmeta-codesync[bot] 670a4d942f Babel preset: Add unstable_preserveClasses to experiment with disabling class transforms for SH (#54153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54153

Disable `babel/plugin-transform-classes` and `babel/plugin-transform-class-properties` when `customTransformOptions.unstable_preserveClasses` is truthy.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D84506895

fbshipit-source-id: 6c66cf6cea037ec183235a058a86b558a7876582
2025-10-14 10:52:16 -07:00
Nick Lefeverandmeta-codesync[bot] 93278d548b Fix binary size regression for BackgroundImage (#54126)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54126

The binary size for RN builds increased by ~180KiB due to the implementation of the `experimental_backgroundImage` property diffing.

This diff removes default inlining for the `toDynamic` serialization functions of the structs used by the linear and radial gradient styles.

Combined with the binary size improvements done previously for `ColorStop` and `ValueUnit`, the binary size has been reduced by 176.0KiB

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D84214151

fbshipit-source-id: 58b045eee839beb4f944689e752096df8f310e77
2025-10-14 10:46:02 -07:00
Nick Lefeverandmeta-codesync[bot] fc74d8c579 Disable inlining of ColorStop and ValueUnit toDynamic conversion (#54125)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54125

With ColorStop and ValueUnit being used at multiple locations, inlining the `toDynamic` conversion used for RN Android and using `std::format` to convert floating point values to string increased the binary size of RN Android by ~180KiB. This diff declares the functions outside the header to avoid inlining the functions and removes the dependency on `std::format` for the percent value string formatting.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D84349391

fbshipit-source-id: 2aab6f057f8b69d0af3779f6edabdd42705d0445
2025-10-14 10:46:02 -07:00
lukmccallandmeta-codesync[bot] 39ede95921 Fix request permission is not always resolving in Android 16 (#53898)
Summary:
Fixes: https://github.com/facebook/react-native/issues/53887
Fixes: https://github.com/expo/expo/issues/39480

In the latest Android 16 update, requesting permissions does not always change the app's state (the `onPause` and `onResume` functions aren't called). For instance, when you deny permission 3 times, the last promise won't resolve until you move the app to the background. The current logic inside the `ReactActivityDelegate` assumes that Android will call `onResume` after receiving permission state information from the system, which is no longer the case.

Probably connected with [this commit](https://android.googlesource.com/platform/packages/modules/Permission/%2B/5dca0ccb26f2b99d706a1d3e9402f851e849c913)

## Changelog:

[ANDROID] [FIXED] - Fix request permission not always resolving in Android 16

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

Test Plan:
- I've tested it in the RNTester by denying the camera permission three times.
- I've also checked if the patch works with the Expo permissions code.

Reviewed By: javache

Differential Revision: D83059478

Pulled By: cortinico

fbshipit-source-id: 7bf33b379a1b6606ad2da2f75d337bf951e3986b
2025-10-14 09:03:29 -07:00
Vitali Zaidmanandmeta-codesync[bot] d7bcaf6cb4 Update debugger-frontend from 8cce390...54afd87 (#54152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54152

Changelog: [Internal] - Update `react-native/debugger-frontend` from 8cce390...54afd87

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/8cce39003f66f66a8fb4c0e581a2b5046cf9c1d1...54afd8765db32a9640edef3788085b991fe4b88a).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [54afd8765](https://github.com/facebook/react-native-devtools-frontend/commit/54afd8765) | Vitali Zaidman (vzaidman@gmail.com) | 2025-10-13T15:50:57-04:00 | [fix memory profiling race condition (#211)](https://github.com/facebook/react-native-devtools-frontend/commit/54afd8765) |
| [b8e5768ec](https://github.com/facebook/react-native-devtools-frontend/commit/b8e5768ec) | Alex Hunt (hello@alexhunt.dev) | 2025-09-30T21:20:30+01:00 | [Re-enable Network Request Initiator view (#210)](https://github.com/facebook/react-native-devtools-frontend/commit/b8e5768ec) |

Reviewed By: huntie

Differential Revision: D84542157

fbshipit-source-id: f29ec029b05decbc3ab1cd412df06af55981fc21
2025-10-14 08:45:28 -07:00
Marco Wangandmeta-codesync[bot] 2c749a814a Deploy 0.288.0 to xplat (#54145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54145

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D84571624

fbshipit-source-id: 7bb915d544ac539b055c32ddec9a52d05cec0a99
2025-10-14 00:07:14 -07:00
Marc Rousavyandmeta-codesync[bot] 5ffff0153c perf: Move func into CallInvoker::invokeAsync (#54141)
Summary:
Instead of copying the `std::function` into `invokeAsync`, we now move it.

## Changelog:

[GENERAL] [CHANGED] - Move `std::function` into `CallInvoker::invokeAsync` instead of copying it

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

Test Plan: Build, run. A lot of code still uses the old `invokeAsync` function.

Reviewed By: christophpurrer

Differential Revision: D84563949

Pulled By: javache

fbshipit-source-id: 283be3d12f1ac1c7f3da528c6b50b36cc81cd82a
2025-10-13 23:49:08 -07:00
Christoph Purrerandmeta-codesync[bot] 6d7a93f2b1 Add GTest utility methods to test C++ Turbo Module EventEmitters (#54060)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54060

Changelog: [Internal]

Adds a test case to assert Turbo Module eventEmitter properties in GTests

Reviewed By: javache

Differential Revision: D83280050

fbshipit-source-id: 6c05d779c38a6988f07a11ccb436429aa1a12975
2025-10-13 20:21:32 -07:00
Christoph Purrerandmeta-codesync[bot] 0fd24c75a1 Simplify C++ TM base classes (#54059)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54059

Changelog: [Internal]

Right now for a simple spec as
```
import type {CodegenTypes, TurboModule} from 'react-native';

import {TurboModuleRegistry} from 'react-native';

export type ScreenshotManagerOptions = CodegenTypes.UnsafeObject;

export interface Spec extends TurboModule {
  +getConstants: () => {};
  takeScreenshot(
    id: string,
    options: ScreenshotManagerOptions,
  ): Promise<string>;
}

const NativeModule = TurboModuleRegistry.get<Spec>('ScreenshotManager');
export function takeScreenshot(
  id: string,
  options: ScreenshotManagerOptions,
): Promise<string> {
  if (NativeModule != null) {
    return NativeModule.takeScreenshot(id, options);
  }
  return Promise.reject();
}
```

we generate **TWO** `facebook::react::TurboModule` sub classes (`NativeScreenshotManagerCxxSpecJSI` and `NativeScreenshotManagerCxxSpec`) to construct ONE C++ TM.

In particular header
```
#pragma once

#include <ReactCommon/TurboModule.h>
#include <react/bridging/Bridging.h>

namespace facebook::react {

class JSI_EXPORT NativeScreenshotManagerCxxSpecJSI : public TurboModule {
 protected:
  NativeScreenshotManagerCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);

 public:
  virtual jsi::Object getConstants(jsi::Runtime& rt) = 0;
  virtual jsi::Value
  takeScreenshot(jsi::Runtime& rt, jsi::String id, jsi::Object options) = 0;
};

template <typename T>
class JSI_EXPORT NativeScreenshotManagerCxxSpec : public TurboModule {
 public:
  jsi::Value create(jsi::Runtime& rt, const jsi::PropNameID& propName)
      override {
    return delegate_.create(rt, propName);
  }

  std::vector<jsi::PropNameID> getPropertyNames(
      jsi::Runtime& runtime) override {
    return delegate_.getPropertyNames(runtime);
  }

  static constexpr std::string_view kModuleName = "ScreenshotManager";

 protected:
  NativeScreenshotManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
      : TurboModule(
            std::string{NativeScreenshotManagerCxxSpec::kModuleName},
            jsInvoker),
        delegate_(reinterpret_cast<T*>(this), jsInvoker) {}

 private:
  class Delegate : public NativeScreenshotManagerCxxSpecJSI {
   public:
    Delegate(T* instance, std::shared_ptr<CallInvoker> jsInvoker)
        : NativeScreenshotManagerCxxSpecJSI(std::move(jsInvoker)),
          instance_(instance) {}

    jsi::Object getConstants(jsi::Runtime& rt) override {
      static_assert(
          bridging::getParameterCount(&T::getConstants) == 1,
          "Expected getConstants(...) to have 1 parameters");

      return bridging::callFromJs<jsi::Object>(
          rt, &T::getConstants, jsInvoker_, instance_);
    }
    jsi::Value takeScreenshot(
        jsi::Runtime& rt,
        jsi::String id,
        jsi::Object options) override {
      static_assert(
          bridging::getParameterCount(&T::takeScreenshot) == 3,
          "Expected takeScreenshot(...) to have 3 parameters");

      return bridging::callFromJs<jsi::Value>(
          rt,
          &T::takeScreenshot,
          jsInvoker_,
          instance_,
          std::move(id),
          std::move(options));
    }

   private:
    friend class NativeScreenshotManagerCxxSpec;
    T* instance_;
  };

  Delegate delegate_;
};

} // namespace facebook::react
```
and cpp
```
#include "AppSpecsJSI.h"

namespace facebook::react {

static jsi::Value __hostFunction_NativeScreenshotManagerCxxSpecJSI_getConstants(
    jsi::Runtime& rt,
    TurboModule& turboModule,
    const jsi::Value* args,
    size_t count) {
  return static_cast<NativeScreenshotManagerCxxSpecJSI*>(&turboModule)
      ->getConstants(rt);
}

static jsi::Value
__hostFunction_NativeScreenshotManagerCxxSpecJSI_takeScreenshot(
    jsi::Runtime& rt,
    TurboModule& turboModule,
    const jsi::Value* args,
    size_t count) {
  return static_cast<NativeScreenshotManagerCxxSpecJSI*>(&turboModule)
      ->takeScreenshot(
          rt,
          count <= 0 ? throw jsi::JSError(
                           rt, "Expected argument in position 0 to be passed")
                     : args[0].asString(rt),
          count <= 1 ? throw jsi::JSError(
                           rt, "Expected argument in position 1 to be passed")
                     : args[1].asObject(rt));
}

NativeScreenshotManagerCxxSpecJSI::NativeScreenshotManagerCxxSpecJSI(
    std::shared_ptr<CallInvoker> jsInvoker)
    : TurboModule("ScreenshotManager", jsInvoker) {
  methodMap_["getConstants"] = MethodMetadata{
      0, __hostFunction_NativeScreenshotManagerCxxSpecJSI_getConstants};
  methodMap_["takeScreenshot"] = MethodMetadata{
      2, __hostFunction_NativeScreenshotManagerCxxSpecJSI_takeScreenshot};
}

} // namespace facebook::react
```

The goal of this change is to simplify that and only have **ONE** `facebook::react::TurboModule` base class for a concrete Cxx TM as this header

```
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#pragma once

template <typename T>
class JSI_EXPORT NativeScreenshotManagerCxxSpec : public TurboModule {
public:
  static constexpr std::string_view kModuleName = "ScreenshotManager";

protected:
  NativeScreenshotManagerCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeScreenshotManagerCxxSpec::kModuleName}, jsInvoker) {
    methodMap_["getConstants"] = MethodMetadata {.argCount = 0, .invoker = __getConstants};
    methodMap_["takeScreenshot"] = MethodMetadata {.argCount = 2, .invoker = __takeScreenshot};
  }

private:
  static jsi::Value __getConstants(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
    static_assert(
      bridging::getParameterCount(&T::getConstants) == 1,
      "Expected getConstants(...) to have 1 parameters");
    return bridging::callFromJs<jsi::Object>(rt, &T::getConstants,  static_cast<NativeScreenshotManagerCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
  }

  static jsi::Value __takeScreenshot(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
    static_assert(
      bridging::getParameterCount(&T::takeScreenshot) == 3,
      "Expected takeScreenshot(...) to have 3 parameters");
    return bridging::callFromJs<jsi::Value>(rt, &T::takeScreenshot,  static_cast<NativeScreenshotManagerCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
      count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
      count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt));
  }
};
```

This reduces the generated code from 101 lines to 31 - **REDUCTION of 2/3**

Reviewed By: javache

Differential Revision: D83810977

fbshipit-source-id: 6d0c0271846c8544399c7050b7331b0180cbbadf
2025-10-13 20:21:32 -07:00
vineethkuttanandmeta-codesync[bot] c629019080 Avoid data loss during conversion (#54132)
Summary:
Avoid data loss during conversion which fixes https://github.com/microsoft/react-native-windows/issues/14698

## Changelog:

Added a one-line fix to static_cast to a float

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Avoid data loss during conversion

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

Test Plan: Working in react native windows

Reviewed By: javache

Differential Revision: D84510049

Pulled By: cortinico

fbshipit-source-id: 37691a9169bf143d19d438e2ce2bbea67f711b3a
2025-10-13 19:47:34 -07:00
Nicola Cortiandmeta-codesync[bot] 69dc655005 RNGP - Fix build failures encounted with AGP 9.0.0-alpha05 - Round 1 (#53778)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53778

I've been looking into the next major bump of AGP to 9:
https://developer.android.com/build/releases/agp-preview#android-gradle-plugin-built-in-kotlin

This change adapts our project so that it keeps on buildign with AGP 8
(as the bump to 9 would be a breaking change), but it addresses some of the build
failures we'll be having with AGP 9:

- Set `resValues` build option to true (default was changed true -> false in AGP 9)
- Opts out our project from `android.builtInKotlin` and `android.newDsl` for the time being.

Changelog:
[Android] [Fixed] - Fix build failures with RNGP due to AGP 9.0.0-alpha05

Reviewed By: alanleedev

Differential Revision: D82452555

fbshipit-source-id: 99561f039bf943f5ce99008ce073ca86431cfaed
2025-10-13 18:16:18 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] b44d4b4292 Add function to coordinate the headers preparation for the app (#53677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53677

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that runs `prepareHeaders` that configures the headers for React Native and Codegen targets.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778440

fbshipit-source-id: 26b973c07e82f30663e51c4a8e0e72f54765115e
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 2ea9fd6c86 Add function to generate artifact for codegen (#53676)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53676

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that generates codegen artifacts. Those are required by React Native and by the app to build properly.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778439

fbshipit-source-id: 7fe5cc0b612d2d9324d68fe04ec556e986ec14af
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 7a86ee0aef Add function to create hard links for the app (#53675)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53675

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that create hardlinks for React Native so it can build from source

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778454

fbshipit-source-id: 702a603629e4fad154b5d79dea6d96fcd80235b9
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] d45523639d Add function to set build from source to true (#53674)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53674

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function updates the PAckage.swift file to set BUILD_FROM_SOURCE to true

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778460

fbshipit-source-id: b06ebc546aa8e87acdb15706a0559e9046173784
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 87d6043788 Add function to configure the app for swift by creating modulemap and umbrella header (#53673)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53673

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that configure React Native to be swift compatible by creating the React-umbrella and modulemap

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778437

fbshipit-source-id: 8bfd0df3abed813a221e5ef7972f4b7a6e292e76
2025-10-13 16:30:51 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] c827474b58 Configure Package.swift file to be able to build from source (#53667)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53667

This change updates the Package.swift file to enable building RNTester and HelloWorld from source.

The set of changes is the following:
- add a BUILD_FROM_SOURCE flag to toggle between building for creating prebuilds and building an app from source
- configure the proper header search path based on whether we want to build an app from source or not
- split the ReactFabricComponents target in multiple subtargets. This is required because when building from source we can't have targets whose Source folder is overlapping.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778452

fbshipit-source-id: 00553a9966e7d96177e70d45179e712536c23124
2025-10-13 15:36:36 -07:00
Devan Buggayandmeta-codesync[bot] f4e93df55e Add custom dimension provider to RCTDeviceInfo (#54107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54107

Adds a dimension provider override to RCTDeviceInfo.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D84131733

fbshipit-source-id: 2419bcb9a23486eee61f203414084d5105a091f8
2025-10-11 00:47:42 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 6f482708b5 Sync React 19.2 into React Native (#54109)
Summary:
X-link: https://github.com/facebook/metro/pull/1598

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

This change syncs React 19.2 into React native.

bypass-github-export-checks
## Changelog
[General][Changed] - Bump React version to 19.2

Reviewed By: cortinico

Differential Revision: D84282848

fbshipit-source-id: 8bc57be1f39a913c284fb782883ce91fae6750fc
2025-10-10 11:44:06 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 2fe008b902 Add configure iOS prebuilds (hermes and dependencies) (#53671)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53671

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that prepares the prebuilds for ios so we can leverage them when building from source

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778467

fbshipit-source-id: bacfcfd3d646bfa27dcd800417e4787308a51a86
2025-10-10 11:19:38 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] a1575d04ce Add function to run pod deintegrate (#53706)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53706

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that runs `pod deintegrate` to remove remainings of cocoapods

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778468

fbshipit-source-id: 20e1cfefcef8318d63d4a6ff92050ced0f91ef53
2025-10-10 11:19:38 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] f0725f7802 Add script to find the directory that contains the Xcodeproj (#53669)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53669

## Context

When configuring an app to build with SwiftPM from source, there is a sequence of operations we need to run in order to prepare the project correctly.

## Changed

Add a function that given the root of the app and the name of the xcodeproject file, can return the path to the Xcode project file

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778456

fbshipit-source-id: f7050bcb049d75a5b1cabf340a5b98f4736e60b3
2025-10-10 11:19:38 -07:00
Zeya Pengandmeta-codesync[bot] 53464e8483 make NativeAnimatedNodesManagerProvider owner of animationBackend (#54079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54079

## Changelog:

[Internal] [Changed] - make NativeAnimatedNodesManagerProvider owner of animationBackend

so NativeAnimatedNodesManager and NativeAnimatedNodesManagerProvider don't both keep a shared_ptr reference

Reviewed By: sammy-SC

Differential Revision: D83870762

fbshipit-source-id: e3d27f4a58830405196f728cbe5400364ba9f95b
2025-10-10 08:55:37 -07:00
Moti Zilbermanandmeta-codesync[bot] 487844e533 Android: Report fetch(), XHR and RCTNetworking call stacks to Network panel (#54084)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54084

Android port of D83754145.

1. Teaches the native networking module on IOS to track a `devToolsRequestId` along with each request, and use it instead of the internal `requestId` to identify the request to `NetworkReporter`.
2. Uses `__NETWORK_REPORTER__.createDevToolsRequestId` (D83238216) to generate a `devToolsRequestId` from JS and pass it into native. This records a JavaScript call stack as the [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) of the request.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83981793

fbshipit-source-id: b4b8828433881c15e44a0468275a5cf398e7d050
2025-10-10 07:08:55 -07:00
Sam Zhouandmeta-codesync[bot] 5f5a77c342 Fix https://github.com/facebook/react-native/issues/54102 by wrapping the prettier mock in a try-catch (#54114)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54114

This setup script will be published in the react-native package.
Other people might not have prettier installed, so it will crash the mock below.
Therefore, we wrap this mock in a try-catch.

Changelog: [General][Fixed] Fixed https://github.com/facebook/react-native/issues/54102

Reviewed By: cortinico

Differential Revision: D84292458

fbshipit-source-id: e884b02eec6abb7a964e01dd01f72f6e2ee31dab
2025-10-10 06:30:08 -07:00
aialokandmeta-codesync[bot] 118a6621f5 Updated copyright header from Facebook to Meta in yoga-config.cmake.in (#54087)
Summary:
Update the copyright header in packages/react-native/ReactCommon/yoga/cmake/yoga-config.cmake.in from
```
# Copyright (c) Facebook, Inc. and its affiliates.
```
 to
 ```
 # Copyright (c) Meta Platforms, Inc. and affiliates.
 ```
 for consistency with the rest of the codebase. This change does not affect functionality.

 close https://github.com/facebook/react-native/issues/54086

## Changelog:
[GENERAL] [CHANGED] - Updated copyright header in Yoga CMake file from Facebook to Meta.

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

Test Plan: Tests Required: No

Reviewed By: robhogan

Differential Revision: D84101874

Pulled By: cortinico

fbshipit-source-id: 534fb700dcbb14d0e91c8c287e8a9af251cba4f9
2025-10-10 05:39:56 -07:00
Moti Zilbermanandmeta-codesync[bot] 30999b868c Deprecate NetworkingModule.sendRequestInternal (#54101)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54101

Changelog:
[Android][Deprecated] Mark `NetworkingModule.sendRequestInternal` as deprecated

The `NetworkingModule.sendRequestInternal` method is an implementation detail of the `sendRequest` method and does not need to be public. In this diff, we mark it as deprecated ahead of removing it from the public API in a future release of React Native.

Reviewed By: javache

Differential Revision: D84250142

fbshipit-source-id: fad62eeae4f9bf06e00578b3cfb6c2c077c08e5c
2025-10-10 02:15:32 -07:00
Nick Lefeverandmeta-codesync[bot] e926ad0428 Allow overriding the horizontal scroll position restore (#54115)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54115

Horizontal scroll view extensions should be able to  customize the scrolling behavior for state restores. This adds the `restoreScrollTo` function that will be called to restore the scroll position to the location provided by the shadow node state.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D84310601

fbshipit-source-id: 007caa3d0922a5430ffc6f970eebb180a112f894
2025-10-09 20:59:18 -07:00
Nick Lefeverandmeta-codesync[bot] 78bdf584e2 Enable scroll state restore for Trait::hidden (#54113)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54113

With `Trait::hidden` unmounting and remounting views for shadow nodes holding scroll state, we have to restore the scroll position from the shadow node state when the scroll view is being remounted

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84291899

fbshipit-source-id: 596839f56757dbdf9485e82380af31a71865e1df
2025-10-09 19:40:45 -07:00
Nick Lefeverandmeta-codesync[bot] 8d245e9f61 Control trait::hidden support through feature flag (#54112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54112

This diff adds the possibility to control the use of `Trait::Hidden` on Android platforms through feature flags. The feature flag is Android specific and only accessed on Android platforms.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84289662

fbshipit-source-id: 0ee1d0702aa36df25c842017673176a9c7984b23
2025-10-09 19:40:45 -07:00
Zeya Pengandmeta-codesync[bot] d2eca58996 use processor flag -DRN_USE_ANIMATION_BACKEND to gate animation backend dep (#54091)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54091

## Changelog:

[Internal] [Changed] - use processor flag -DRN_USE_ANIMATION_BACKEND to gate animation backend dep

So it's only enabled for catalyst and fantom when building with BUCK while gated from other meta apps, and enabled by default in oss version

Reviewed By: sammy-SC

Differential Revision: D84157729

fbshipit-source-id: e822f11c4b64b77b17a698bf3b60b5c5a4faf4f4
2025-10-09 19:01:20 -07:00
Pieter De Baetsandmeta-codesync[bot] e8988e9460 Remove RCTFBSystrace (#54097)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54097

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84196086

fbshipit-source-id: b178b541224c6376bf78dc19fc9051bca4c46023
2025-10-09 18:56:15 -07:00
Pieter De Baetsandmeta-codesync[bot] 7787d2fbb5 Move RCTAnimatedModuleProvider to open-source (#54096)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54096

Exporting this since we have some incoming changes to Animated which okwasniewski wants to make and should be applied to CxxAnimated too.

This is not hooked up to any OSS apps yet.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D84200113

fbshipit-source-id: 7a278ebf3f9c2b0779971591804d3fbd89ce4723
2025-10-09 16:29:42 -07:00
David Vaccaandmeta-codesync[bot] e5e8e637db Delete LayoutDirectionUtil from fbsource
Summary:
LayoutDirectionUtil is part of legacy architecutre, in this diff I'm deleting it from fbsource

changelog: [internal] internal

Reviewed By: shwanton, cortinico

Differential Revision: D83984648

fbshipit-source-id: 161e4347ccab160fb1be66cba05f9474c0ad3b72
2025-10-09 14:49:30 -07:00
generatedunixname537391475639613andmeta-codesync[bot] e4da3437d9 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/AndroidInfoHelpers.kt (#54106)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54106

Reviewed By: javache

Differential Revision: D84130472

fbshipit-source-id: a1bfff89e0b6d36d2bcb3045a35ca15c6599f9d8
2025-10-09 14:41:55 -07:00
Zeya Pengandmeta-codesync[bot] 1e1af623b1 Defer to responder system to terminate on scroll (#54007)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54007

## Changelog:

[Android] [Changed] - Defer to responder system to terminate on scroll

when FeatureFlag responderTerminateOnScrollAndroid is turned on

on ios, we don't dispatch TouchCancel at scroll to terminate scrollview's children, instead, responder system handles responder termination when it receives onScroll event

Currently, TouchCancel native event at scroll will stop any ongoing touch events dispatched from native, and will unexpectedly terminate responder even if responder has transferred from child of scrollView to parent view, because of race condition. Fixing this will require revisiting a large part of the native touch system on android.

Reviewed By: sammy-SC

Differential Revision: D83584281

fbshipit-source-id: 10b3c98c30037b50f1705e11aa9ca016a6c3d974
2025-10-09 13:58:04 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 5abda9c7da Add env var to compile-out legacy arch (#53975)
Summary:
In this change, we are allowing users to install cocoapods with the RCT_REMOVE_LEGACY_ARCH flag enabled to compile out the legacy architecture.

For it to work, we had to adjust some part of the framework that we forgot about when working on the internal side of this feature.

bypass-github-export-checks

## Changelog:
[iOS][Added] - Added way to set the RCT_REMOVE_LEGACY_ARCH flag from Cocoapods to compile ou the legacy arch

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

Test Plan:
Tested locally with RNTester and HelloWorld:

```
cd packages/rn-tester
RCT_REMOVE_LEGACY_ARCH=1 bundle exec pod install
open RNTesterPods.xcworkspace
```

Then build and run and verify that the app keeps running.

Same check with Hello World.

Reviewed By: cortinico

Differential Revision: D83471112

Pulled By: cipolleschi

fbshipit-source-id: e5c8fe4eccb3c25510228f20e9e6da3980b0bf0d
2025-10-09 11:27:33 -07:00
Eric Rozellandmeta-codesync[bot] 8cc9bbc892 Execute commands in order (#54074)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54074

Currently, we dispatch view commands eagerly at the beginning of a batch. This behavior originated with https://github.com/facebook/react-native/commit/b54257c628b1a174a2c41960e7fc4d2d719ad731.

However, this can make it difficult to allow developers to control mount item execution order. For example, someone may want to make sure a view command is processed *after* a particular mount item, and not exclusively rely on retryable command exceptions.

This change sets up a feature flag to enable in-order execution of view command mount items.

## Changelog

[Internal]

Reviewed By: mdvacca, sammy-SC

Differential Revision: D84061054

fbshipit-source-id: 7cb68c43823ed67f541f4e8f2d7471629609a905
2025-10-08 21:19:30 -07:00
Devan Buggayandmeta-codesync[bot] e3a5af6a99 Re-land - Genalize focus/blur behavior in JS (#54085)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54085

Re-land generalized focus/blur commands.

Changelog: [Internal]

Reviewed By: rozele, javache

Differential Revision: D84082783

fbshipit-source-id: 8c2ae87ad878f3cb95a6449f2bd6a80fe590d149
2025-10-08 20:31:00 -07:00
Moti Zilbermanandmeta-codesync[bot] 24d0d4414f Fix __DEBUGGER_SESSION_OBSERVER__ for concurrent sessions (#54083)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54083

Changelog: [Internal]

Fixes a bug in `__DEBUGGER_SESSION_OBSERVER__` where the wrong state could be reported if more than one session existed. Now we reuse the accurate domain status tracking mechanism added in D83847356.

Reviewed By: hoxyq

Differential Revision: D84007326

fbshipit-source-id: e7f2c33286aa69c3bd9d5662d35dad579ca3c770
2025-10-08 17:40:25 -07:00
Moti Zilbermanandmeta-codesync[bot] 5c7cbebfee Refactor console API implementation to use tryExecuteSync for clarity (#54069)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54069

Changelog: [Internal]

D83238216 added a `tryExecuteSync` function for use with `EnableExecutorFromThis` objects - concretely, for calling functions on  a `weak_ptr<RuntimeTarget>` from the JS thread while ensuring the `RuntimeTarget` is always destroyed on the inspector thread.

`tryExecuteSync` is a generalisation of the lambda-based `delegateExecutorSync` helper from `RuntimeTargetConsole`, so in this diff we refactor the latter to use the more general and better-documented function.

Reviewed By: huntie

Differential Revision: D83838062

fbshipit-source-id: 85fd5a43e204cc634b573e2a3bda47a9ec523fca
2025-10-08 17:38:42 -07:00
Moti Zilbermanandmeta-codesync[bot] 81d652543b iOS: Report fetch(), XHR and RCTNetworking call stacks to Network panel (#54052)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54052

1. Teaches the native networking module on IOS to track a `devToolsRequestId` along with each request, and use it instead of the internal `requestId` to identify the request to `NetworkReporter`.
2. Uses `__NETWORK_REPORTER__.createDevToolsRequestId` (D83238216) to generate a `devToolsRequestId` from JS and pass it into native. This records a JavaScript call stack as the [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) of the request.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83754145

fbshipit-source-id: ee08f419d2a7013bbc915ee40b1428d7810e6c42
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] aa685408a2 Check Network domain state in RuntimeTargetNetwork (#54082)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54082

Changelog: [Internal]

Followup from D83238216.

Adds bookkeeping in `RuntimeTarget` to allow checking from the JS thread whether there is a session with the `Network` CDP enabled. We then use this in the implementation of `__NETWORK_REPORTER__.createDevToolsRequestId` as a more precise alternative to checking the `NetworkHandler` singleton's state.

This is a first step towards breaking up the `NetworkHandler` singleton, subsuming its responsibilities into the Target/Agent architecture of `jsinspector-modern` and fixing a variety of bugs in the process.

NOTE: The additions to `RuntimeTarget` are more general than just tracking the `Network` domain - I'll use them in an upcoming diff to fix a concrete bug related to concurrent session support in `DebuggerSessionObserver`.

Reviewed By: huntie

Differential Revision: D83847356

fbshipit-source-id: 3384e3feb44adbd9ed4d54a20875669d63ae8764
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] a4be9b236f Add JS API for allocating network request IDs, capturing call stacks (#54051)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54051

Adds the private, experimental `__NETWORK_REPORTER__.createDevToolsRequestId()` JavaScript method behind the Fusebox network inspection feature flag.

`createDevToolsRequestId()` returns a unique string ID for a network request, and records the current call stack as the request's [initiator](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator). If the native networking layer passes the same request ID into the C++ `NetworkReporter::reportRequestStart` method, the corresponding CDP [`requestWillBeSent`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#event-requestWillBeSent) event will contain the stack trace.

Changelog: [Internal]

Reviewed By: robhogan, huntie

Differential Revision: D83238216

fbshipit-source-id: 5076d887254cd9711f86f72792e791eabc43f297
2025-10-08 15:26:25 -07:00
Moti Zilbermanandmeta-codesync[bot] d932f28209 Add generateRandomUuidString C++ helper (#54089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54089

Changelog: [Internal]

Adds a minimal standards-compliant UUID v4 generator to `react/utils` for use elsewhere in React Native. We don't need UUID parsing, support for UUID versions other than 4, a UUID value type, or extremely high performance - which makes inlining this simple, portable implementation directly in our codebase acceptable.

Reviewed By: robhogan

Differential Revision: D84149720

fbshipit-source-id: 399d88f4adaff3be4fef5dd1abab3c8552ca1a75
2025-10-08 15:26:25 -07:00
Nick Lefeverandmeta-codesync[bot] 9afd6bb2f4 Fix transformOrigin conversion ignoring unit type (#54092)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54092

The `transformOrigin` conversion didn't call into the `toDynamic` conversion for the underlying `ValueUnit` instances for the x and y coordinates. This diff fixes the conversion so that percentages would be correctly converted.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D84165034

fbshipit-source-id: 40bf32a45770cd43fc67103f4c2e9785abffb033
2025-10-08 15:25:41 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 0e8065cfee xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/animated/InterpolationAnimatedNode.kt (#54094)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54094

Reviewed By: javache

Differential Revision: D83948964

fbshipit-source-id: 217a6dd51f44781961b1a6e22c6eb85e39346e2c
2025-10-08 14:25:20 -07:00
Phillip Panandmeta-codesync[bot] 0dcb939247 introduce response listener in native network (#54093)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54093

Changelog: [Internal]

adding a private! api so we can parse text payloads

Reviewed By: mdvacca

Differential Revision: D83939903

fbshipit-source-id: 8f348648f16d53f2bd86046fb0c3689d7bae3d93
2025-10-08 13:03:32 -07:00
Zeya Pengandmeta-codesync[bot] 197783be1e create UIManagerAnimationBackend to replace forward declare class AnimationBackend (#54058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54058

## Changelog:

[Internal] [Changed] - create UIManagerAnimationBackend to replace forward declare `class AnimationBackend`

for other delegates in UIManager, we usually explicitly create an interface in UIManager package with the public APIs we want to expose, we can follow that pattern here, so we avoid the forward declaration without definition situation, and decoupling UIManager with AnimationBackend

also this way, in the future, animation runtimes that consume AnimationBackend can just include `UIManagerAnimationBackend` (where we expose all of public APIs of AnimationBackend) and remain somewhat decoupled too

Reviewed By: sammy-SC

Differential Revision: D83679693

fbshipit-source-id: e58d180b7d36a3f0e766c2914b16128346abe070
2025-10-08 12:51:23 -07:00
Moti Zilbermanandmeta-codesync[bot] 52b2c466c5 Support recording request initiator call stacks in NetworkHandler (#54050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54050

Changelog: [Internal]

A naive approach to keeping track of request initiators inside the `NetworkHandler` singleton for CDP reporting purposes:

1. Expose a new `recordRequestInitiatorStack` method.
2. Keep the CDP-formatted stack trace (as a `folly::dynamic`) in a map keyed by request ID.
3. Destructively consume the stack trace during `onRequestWillBeSent`.

Reviewed By: huntie

Differential Revision: D83754143

fbshipit-source-id: 4f5a335f2eed66a168f9d39a66c8af6ccee23d6f
2025-10-08 10:28:07 -07:00
Andrew Datsenkoandmeta-codesync[bot] 5b9873ff35 PlatformColor caching & invalidation (#54076)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54076

Changelog: [Internal]
Add PlatformColor caching so we do not need to make as many JNI calls which helps with perf.

Reviewed By: javache

Differential Revision: D83050864

fbshipit-source-id: 56a53a5facccdbbb3ff18a66df9e07d794bb074c
2025-10-08 07:41:37 -07:00
Moti Zilbermanandmeta-codesync[bot] b31a2fb4b8 Add RuntimeTargetDelegate::serializeStackTrace API (#54048)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54048

Changelog: [Internal]

Adds an engine-agnostic mechanism for serialising a previously captured stack trace as a CDP [`Runtime.StackTrace`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Runtime#type-StackTrace). This complements the existing `RuntimeTargetDelegate::captureStackTrace` method, which returns an opaque, engine-specific representation of a stack trace.

This can be used as a building block for implementing higher-level CDP message types like [`Network.Initiator`](https://cdpstatus.reactnative.dev/devtools-protocol/tot/Network#type-Initiator) within React Native, while keeping the underlying stack trace representation private to each engine.

NOTE: This diff includes an implementation for Hermes that duplicates logic from the Hermes codebase. Further up the stack, I have diffs to replace this with a new API to be provided by Hermes.

Reviewed By: huntie

Differential Revision: D83754142

fbshipit-source-id: 1439ea446665562e5f92c7b1dcb6ab65af1324cd
2025-10-08 05:51:42 -07:00
Gang Zhaoandmeta-codesync[bot] e32307e054 Revert deletion of old Hermes CDPHandler (#54078)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54078

Changelog:
[General][Fixed] 6e1c0a removed old Hermes CDPHandler, which is a
breaking change, revert here.

Reviewed By: cipolleschi

Differential Revision: D84076229

fbshipit-source-id: 7ac426178754d6320c1803a50d57afa10e3126e5
2025-10-07 19:39:29 -07:00
Nick Lefeverandmeta-codesync[bot] 31bff4e093 Restore scroll state of horizontal scroll view on mount (#54001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54001

This diff adds support for state restore to the horizontal scroll view. The same logic was applied as for the vertical scroll view. The only difference being that the shadow node for the horizontal scroll view needed to be updated to add `ScrollState`.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83247017

fbshipit-source-id: 7c26901df4c43ed70addc7b6d8afb9a6d3e549a8
2025-10-07 19:20:15 -07:00
Nick Lefeverandmeta-codesync[bot] 2bbea50991 Restore scroll state of scroll view on mount (#54000)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54000

Update the scroll view manager to load the fabric state and restore the scroll position and scroll away top padding on mount. Restoring the scroll view happens in the react scroll view state setter, which gets called by the `ReactScrollViewHelper` with the deserialized state provided on mount.

The state loading will happen only until the scroll view itself submits a new state to Fabric (due to scrolling). This guarantees that we only restore the initial state on mount.

This diff also updates the scroll away top padding setter to support setting a new value without triggering a fabric state update.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83247016

fbshipit-source-id: 7ae44b9f69c58da9e5163574073767aea2713b62
2025-10-07 19:20:15 -07:00
Nick Lefeverandmeta-codesync[bot] aa85da33a5 Support loading and assigning scroll state from scroll view helper (#53999)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53999

Update the `ScrollViewHelper` class to support reading the scroll state from the provided `stateWrapper` and assigning it to the view implementing the `HasScrollState` interface.

This will be used in a future diff to implement scroll state loading on the scroll view component in the scroll state setter function. This enables having one implementation of the state loading for all variants of the scroll view (vertical and horizontal scroll views).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D83247018

fbshipit-source-id: 44f10edab2341981b85d6ab8b83c7bea96c1e09d
2025-10-07 19:20:15 -07:00
Vitali Zaidmanandmeta-codesync[bot] aa492fadab combine all 0.82.0 changelog entries (#54088)
Test Plan:
## Changelog: [INTERNAL]

Pull Request resolved: https://github.com/facebook/react-native/pull/54088
Imported from GitHub, without a `Test Plan:` line.

Reviewed By: fabriziocucci

Differential Revision: D84105761

Pulled By: vzaidman

fbshipit-source-id: 0f3ad014f04b02d91cbb2fb7951d7a57d27df963
2025-10-07 17:10:02 -07:00
Zeya Pengandmeta-codesync[bot] 4740f211ae Extract helper function from AnimatedColor.js to process input color value (#54077)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54077

## Changelog:

[Internal] [Changed] - Extract helper function from AnimatedColor.js to process input color value

Reviewed By: rozele

Differential Revision: D84062952

fbshipit-source-id: 2005dc33d7fd6928ba2638d0d99a2e5faa8448d8
2025-10-07 15:39:32 -07:00
Zeya Pengandmeta-codesync[bot] 9e98c72ad3 Move using declarations into AnimationBackend class (#54057)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54057

## Changelog:

[General] [Changed] - Move using declarations into AnimationBackend class

names like `facebook::react::Callback` is a bit too generic and it'll be included in the scope whenever AnimationBackend.h is included in; `StartOnRenderCallback` already exists in c++ native animated (there we also nest the `using`s under class)

Reviewed By: sammy-SC

Differential Revision: D83867098

fbshipit-source-id: a50144bbbd1b441e3ef7b2884a19b091c3190c44
2025-10-07 14:34:25 -07:00
Zeya Pengandmeta-codesync[bot] 4a88282a9c create feature flag responderTerminateOnScrollAndroid (#54008)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54008

## Changelog:

[Internal] [Added] - create feature flag responderTerminateOnScrollAndroid

Reviewed By: javache

Differential Revision: D83584280

fbshipit-source-id: aa9633d61c0d2cc6af7da839c065f20da698995b
2025-10-07 12:39:55 -07:00
Christoph Purrerandmeta-codesync[bot] 38f52a5bc8 Use correct base class for NativeReactNativeFeatureFlags (#54046)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54046

Changelog: [Internal]

Per documentation the base class to extend from is the non `JSI` one:

https://reactnative.dev/docs/the-new-architecture/pure-cxx-modules#3-write-the-native-code

Reviewed By: rubennorte

Differential Revision: D83815509

fbshipit-source-id: b05b80d2c6102bf27905411a299ec09e16bb8c25
2025-10-07 11:31:08 -07:00
Riccardo Cipolleschiandmeta-codesync[bot] 58afeeff1d Split macro for static module registration (#53992)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53992

This change descouple the Static Module registration from the Disable Legacy arch macro

## Changelog:
[Internal] -

Reviewed By: RSNara

Differential Revision: D83554091

fbshipit-source-id: 515aecc00428281a95441954513ccf21ff180f6f
2025-10-07 10:54:32 -07:00
Christoph Purrerandmeta-codesync[bot] 44725b88be Fix race condition in ImageFetcher when registering/unregistering commitHooks (#53862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53862

Recently, we observed a `use-after-free race condition` where the ImageFetcher object was destroyed while it was still registered as a UIManagerCommitHook.

The crash occurred in `std::vector::size()` at line 635 when accessing corrupted memory.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D82846245

fbshipit-source-id: fe0d9156ec6bc004339ed987bb5937699ebdf23b
2025-10-07 10:22:29 -07:00
Moti Zilbermanandmeta-codesync[bot] 83fbb0b536 Track Network domain status in SessionState (#54068)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54068

Changelog: [Internal]

Adds a `SessionState::isNetworkDomainEnabled` bit, managed in `HostAgent`, to align with other domains. Network support is still gated behind feature flags as before.

Reviewed By: hoxyq

Differential Revision: D83847357

fbshipit-source-id: 8f94c803d04256a7e41503f2a690e97b91e3ed5e
2025-10-07 02:52:48 -07:00
James Moranandmeta-codesync[bot] c24e67fb53 Removing all references of hz_tracing V2 from the codebase (#54062)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54062

Renaming every V2 tracing macro so that it no longer has `_V2` suffixed. This diff completes the migration of the hz_tracing V1->V2 API.

This is a very large diff but is comprised of mostly mechanical changes. Most of these files were edited using `find` and `sed`, specifically:
`find . -type f \( -name "*.h" -o -name "*.cpp" \) -exec sed -i 's/HZT_\(.*\)_V2/HZT_\1/g' {} +`.

Since this is just a rename, no difference in functionality is expected.

Changelog: [Internal]

Differential Revision: D83808657

fbshipit-source-id: 64effdf701b1ff600185abfb737f9c0fa2250ddf
2025-10-06 22:15:27 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 8542682754 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt (#54071)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54071

Reviewed By: ianlevesque

Differential Revision: D83924405

fbshipit-source-id: a1bc441cb818ccde8038ea9a3a3ce20f4a4571db
2025-10-06 16:34:32 -07:00
Andrew Datsenkoandmeta-codesync[bot] 8ed0e1eba5 Add Platform Color example (#53908)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53908

Changelog: [Internal]
Add an example to show how Platform Color can react to changes in appearance.
This currently works on iOS for all colors, but for Android we need to "reset" desired tree with `key`.

Reviewed By: zeyap

Differential Revision: D82751014

fbshipit-source-id: 3e4b2b3ddff8c003ca835d6f26dbf9f7e82d413d
2025-10-06 12:05:31 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 064fd59602 Fix CQS signal readability-redundant-smartptr-get in xplat/js/react-native-github/packages (#54065)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54065

Reviewed By: javache

Differential Revision: D83817146

fbshipit-source-id: 36bafe7d363d7978e2d74a98aee444af9f538de4
2025-10-06 10:43:45 -07:00
Gabriel Donadelandmeta-codesync[bot] 3f7f9d8fb8 Expose NativeComponentRegistry API to index.d.ts (#54043)
Summary:
Follow up of https://github.com/facebook/react-native/pull/52999 so that users can import `NativeComponentRegistry` from react-native when using typescript

On 0.82 when users try to import `NativeComponentRegistry` without using the Strict TypeScript API they get:
```
Module '"react-native"' has no exported member 'NativeComponentRegistry'.ts(2305)
```

## Changelog:

[GENERAL] [ADDED] - Expose NativeComponentRegistry API to index.d.ts

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

Test Plan: CI should be green

Reviewed By: christophpurrer

Differential Revision: D83830024

Pulled By: huntie

fbshipit-source-id: e63258b30aed4b33b2881656df0ad88a4a7d670a
2025-10-06 09:42:28 -07:00
generatedunixname89002005287564andmeta-codesync[bot] b9baddfd5d Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] (#54003)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54003

Reviewed By: javache

Differential Revision: D83622358

fbshipit-source-id: e0b4bdd65d8af9ec0e25c28a2e02371d52154c2d
2025-10-06 08:00:57 -07:00
Christian Falchandmeta-codesync[bot] 068ec39aea fixed cp command to work with gnu coreutils (#54063)
Summary:
When using gnu coreutils, installation of ReactNativeDependenices on iOS fails at compile time with errors like in the following issue (in the Expo repo):

https://github.com/expo/expo/issues/38992

This is caused by a missing `.` in the end of the path name that the built-in MacOS cp command handles well, but that will create an extra Headers folder when using cp from gnu coreutils.

This commit fixes this by adding the missing `.`

## Changelog:

[IOS] [FIXED] - Fixed issue when using gnu coreutils cp command when using precompiled binaries causing compilation error

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

Test Plan:
- Verify that you're running gnu coreutils (`cp --version`)
- Create new expo app `npx create-expo-app`
- Build on iOS - should error without this fix, should work with the fix.

Reviewed By: christophpurrer

Differential Revision: D83964083

Pulled By: javache

fbshipit-source-id: 46dc074ca9b7fc97fa5a37ef48d68a895e3310ff
2025-10-06 07:51:25 -07:00
Moti Zilbermanandmeta-codesync[bot] 5027375851 Lightly refactor DebuggerSessionObserverTest (#54055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54055

Changelog: [Internal]

TSIA

Reviewed By: robhogan

Differential Revision: D83841197

fbshipit-source-id: e263f4098e09d0789abc1c33ee7ca4dac44600b2
2025-10-06 03:52:38 -07:00
Christian Falchandmeta-codesync[bot] 07f40ec6b4 add support for symbolication of precompiled React.xcframework (#54033)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54033

This commit adds support for symbolication of the XCFrameworks on request.

Symbol files are big and only needed if you need to debug React Native itself - f.ex. if you are a framework developer like Expo.

Symbolication can be performed by setting the `RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1` environment variable. This will cause the `ReactNativeCoreUtils` class to download symbol files and symbolicate the XFrameworks by doing the following:

- After downloading the requested React.XCFramework the symbols will also be downloaded and places in the artifacts folder.
- The XCFrameworks will be expanded and the folders in the symbol archive will be extracted into the XCFramework before it is zipped up again.

<img width="400" alt="image" src="https://github.com/user-attachments/assets/ec8dd2e1-c7f8-4d5f-a3b6-b8ffbb678c95" />

## Changelog:

[IOS] [FIXED] - Added support for symbolication of precompiled React.xcframework

Test Plan:
```
RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Remember to clean (remove the Pods directory) before turning on/off.

Reviewed By: christophpurrer

Differential Revision: D83753187

Pulled By: cipolleschi

fbshipit-source-id: f1522e1befdea99fb8c65695322ea3ed68e6caed
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] 12850c2962 add building blocks to symbolicate precompiled React.xcframework (#54032)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54032

This commit adds building blocks to support the symbolication of the XCFrameworks on request.

Symbol files are big and only needed if you need to debug React Native itself - f.ex. if you are a framework developer like Expo.

This change introduces some helper function that are needed to handle the dSYMS:
- `processDSYMs` the main function that unzip the symbols and prepare the framework for them
- `remap_sourcemaps_for_symbols` a support function that creates a mapping symbol -> file so that the debug can interpret them properly
- `generate_plist_content` a support function that generates the plist with all the mappings

These functions are used in the next commit of the stack.

## Changelog:

[Internal] - Added building blocks to support symbolication

Test Plan:
These functions are used in the next commit.
We split the commit to simplify the review. See the Test plan of the next commit to test them.

Reviewed By: cortinico

Differential Revision: D83753189

Pulled By: cipolleschi

fbshipit-source-id: 5d8027f5393a4e5a11f1b736c9901d40e7c5139b
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] 0a71b43fbc Update the sourceproperty to avoid multiple downloads (#54031)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54031

This commit updates the cocoapods source for RNDependencies so that the source for the package is the locally downloaded file so we don't download twice!

## Changelog:

[IOS] [FIXED] - Update the `source`property to avoid multiple downloads

Test Plan:
Run:
```
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Multiple times and observe that the dependencies are not downloaded multiple times.

Reviewed By: christophpurrer

Differential Revision: D83753188

Pulled By: cipolleschi

fbshipit-source-id: e3fedca921b0ff9ba10ec3e5a7ba18dfbdffc3ba
2025-10-04 10:21:21 -07:00
Christian Falchandmeta-codesync[bot] f0f8b95719 Improve logging functions (#53976)
Summary:
This change remove some unnecessary logs and improve the logging functions for the prebuilds

bypass-github-export-checks

## Changelog:

[IOS] [CHANGED] - Updated logging functions for prebuilds

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

Test Plan:
Run:
```
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Reviewed By: christophpurrer

Differential Revision: D83481709

Pulled By: cipolleschi

fbshipit-source-id: bad358c6e6abfcb1568344e5161109dff7ee06ab
2025-10-04 10:21:21 -07:00
Gang Zhaoandmeta-codesync[bot] 36e1c0afed Remove old CDPHandler (#53983)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53983

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83525759

fbshipit-source-id: 0a223a54339496e4e85ecb173b3c7e0012c4fba8
2025-10-03 10:29:45 -07:00
James Moranandmeta-codesync[bot] b3341d3541 Replace hz_tracing V1 macros with newer V2 variants (#54036)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54036

We are migrating away from the older V1 macros to the V2 macros, which have better code-stripped functionality and less business logic embedded in the API.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83760301

fbshipit-source-id: b6c9ea155ebe22d6d4ce023a1dbb2cfd52fb8394
2025-10-03 10:05:29 -07:00
Moti Zilbermanandmeta-codesync[bot] fc60030a34 Add basic test for NetworkReporter and CDP Network domain (#54049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54049

Changelog: [Internal]

Adds `JsiIntegrationTest`-based tests for the C++ layer responsible for handling the CDP `Network` domain. The tests use `NetworkReporter` to mimic the behaviour of a React Native platform that is generating network events.

NOTE: There are **significant problems** with the `NetworkReporter` / `NetworkHandler` singleton design: cross-Host and cross-Instance data pollution/corruption, inability to inspect multiple Hosts at once, inconsistency between the singleton's state and the CDP session's state, etc. The singletons similarly lack any kind of mechanism for test isolation (e.g. methods for clearing state between tests). As we iteratively fix these problems, the tests will require updating (and we'll be able to write stricter tests to cover the fixes).

Reviewed By: huntie

Differential Revision: D83746505

fbshipit-source-id: 7ee3c68e67f0d29587cbfafa98cf107d27065ffc
2025-10-03 06:10:29 -07:00
Moti Zilbermanandmeta-codesync[bot] c0e381db1c Reduce log spam from naggy mocks in tests (#54047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54047

TSIA

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83825727

fbshipit-source-id: a4a8ffc38571596985ae2687142dbc8a974be39c
2025-10-03 06:10:29 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 6db4a0171e xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/progressbar/android/react/renderer/components/progressbar/AndroidProgressBarShadowNode.cpp (#54054)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54054

Reviewed By: rshest

Differential Revision: D83735540

fbshipit-source-id: e4284fdb76344584a983cfd242c2463912f3a6bf
2025-10-03 04:35:31 -07:00
Nick Lefeverandmeta-codesync[bot] 88cf30a675 Add backgroundImage prop diffing to View (#54042)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54042

Update the View component props to diff the `backgroundImage` property and assign the value to `experimental_backgroundImage` which maps to the `backgroundImage` property on the Android `ReactViewManager`.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788008

fbshipit-source-id: 5f9d93403af483c9494d2782aedad604cbb7cbbc
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] d9d3b3e08b Add toDynamic conversion for RadialGradient (#54041)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54041

Implement toDynamic conversion of the RadialGradient following the parse logic as described here: https://www.internalfb.com/code/fbsource/[28de0c66daab]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/RadialGradient.kt?lines=33-129

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788007

fbshipit-source-id: 305e6f5011f16103a559132e61b6d4eae24cc137
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] c53541f3a1 Add toDynamic conversion for LinearGradient (#54040)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54040

Implement toDynamic conversion of the LinearGradient following the parse logic as described here: https://www.internalfb.com/code/fbsource/[5fa7eb2b733a]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/LinearGradient.kt?lines=24-76

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788005

fbshipit-source-id: 9114451b12e31ad86abde54dbe2c8819a304e777
2025-10-02 22:00:56 -07:00
Nick Lefeverandmeta-codesync[bot] e88962bb1a Add toDynamic conversion for ValueUnit and ColorStop (#54039)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54039

Adding toDynamic conversion to `ColorStop` and `ValueUnit` structs which are being used by the linear and radial gradient data structures.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D83788006

fbshipit-source-id: 1ec0300ac4f17b65b6896d4d2c131eb05a059a22
2025-10-02 22:00:56 -07:00
Eric Rozellandmeta-codesync[bot] 26502c6319 Do not scroll to child inside nested scroll view (#54044)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54044

In rare cases, there may be a vertical ScrollView nested inside another vertical ScrollView. In these cases, when the requestChildFocus method is called, we may attempt to bring the entire focused child into view. However, we really only want to bring the entire nested ScrollView into view.

## Changelog

[Android][Fixed] Focused scroll into view behaviors for nested vertical scroll views

Reviewed By: bvanderhoof

Differential Revision: D83804043

fbshipit-source-id: 8df8f637e7f908cc283f55c0d78ee03ed3bb9117
2025-10-02 21:20:53 -07:00
David Vaccaandmeta-codesync[bot] aab0d3397c Add a Log error to discourage usages of getJSModule(RCTEventEmitter) in new architecture (#54038)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54038

This diff adds a Log error to discourage usages of getJSModule(RCTEventEmitter) in new architecture, recommending migration to new API

changelog: [Android][Changed] Add Log error to discourage usages of getJSModule(RCTEventEmitter) API

Reviewed By: shwanton

Differential Revision: D83523928

fbshipit-source-id: d967456087a59366a3bca9590cb4d6d1fdd5b60d
2025-10-02 14:04:02 -07:00
Sam Zhouandmeta-codesync[bot] 36a9b7eda7 Replace React.ElementProps in tests and examples (#54035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54035

`React.ElementConfig` is often the better choice. See https://flow.org/en/docs/react/types/#toc-react-elementprops

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D83749631

fbshipit-source-id: 81b21c1a0dced5bc578d3a5752c303b57b467f7b
2025-10-02 13:48:56 -07:00
Sam Zhouandmeta-codesync[bot] 041b4c3dd0 Replace React.ElementProps with React.ElementConfig in createAnimatedComponent.js (#54034)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54034

`React.ElementConfig` is often the better choice. See https://flow.org/en/docs/react/types/#toc-react-elementprops

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D83750127

fbshipit-source-id: 788169d73cccc2ed7c9b250845ad7277fe79c47f
2025-10-02 13:47:40 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 481df76c24 Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [B] (#54028)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54028

Reviewed By: javache

Differential Revision: D83719979

fbshipit-source-id: 4d683f7f95b2dc8502653d22a9a1d9fd6ab03b81
2025-10-02 12:55:56 -07:00
Devan Buggayandmeta-codesync[bot] 8c90f81aab Improve DevMenu for Android 11 (#54023)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54023

Android 12 introduced a new AlertDialog that better fits a longer list of content.
Android 11 and earlier have an AlertDialog that has a very small list view, requiring users to scroll through to find what they need. This change also fixes Android 12+ enable/disable states on menu items, as it no longer uses `isEnabled` for styling.

Before:
{F1982416953}

After:
{F1982416486}

Android 12:
{F1982430956}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83688775

fbshipit-source-id: a96120142f648e849be670bde5897c884f1f5f52
2025-10-02 09:30:08 -07:00
Devan Buggayandmeta-codesync[bot] 6e8fab96fa Harden perf monitor to metro connection changes (#54022)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54022

Perf monitor shows in a broken state if metro is started while the app is running. This change improves the tracing and monitor lifecycle around the metro connection events.

Before:
{F1982430185}

After:
{F1982430062}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83714223

fbshipit-source-id: 76826122924baa1a80c04dcc5ff18bc756a8e816
2025-10-02 09:30:08 -07:00
Vitali Zaidmanandmeta-codesync[bot] 6c874f25e2 Fix SoLoader race condition in InspectorNetworkRequestListener (#54029)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54029

Changelog: [Android][Fixed] Fixed `SoLoader` race condition in `InspectorNetworkRequestListener`

When enabling `LoadNetworkResrouce` with flag `nativeSourceCodeFetching` in `InspectorInterfaces.h`, running the app, and opening the debugger, the app was crashing with
```
No implementation found for void com.facebook.react.devsupport.inspector.InspectorNetworkRequestListener.onHeaders(int, java.util.Map)
(
tried
  Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders
and
  Java_com_facebook_react_devsupport_inspector_InspectorNetworkRequestListener_onHeaders__ILjava_util_Map_2
) - is the library loaded, e.g. System.loadLibrary?
```

Reviewed By: huntie

Differential Revision: D83741114

fbshipit-source-id: b878fb4680e6a51f9403e8dea2872da85254e024
2025-10-02 07:36:10 -07:00
Devan Buggayandmeta-codesync[bot] 53dc68a31d Don't flash the performance monitor there's no metro connection (#54019)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54019

Currently the performance monitor flickers on boot if there's no metro connection. This change checks first if we have a packager before enabling the monitor.

No metro connection:
{F1982423105}

Metro connection:
{F1982423112}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83701372

fbshipit-source-id: d099880d3ab509942a937a6bde11ebdde13450cd
2025-10-02 07:21:18 -07:00
Devan Buggayandmeta-codesync[bot] 84947fb0de Fix performance analyze path from DevMenu (#54018)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54018

The DevMenu path for perf analyzing no-ops. This is due to incorrectly not inverting the bool result of `pauseAndAnalyzeBackgroundTrace()`. See https://www.internalfb.com/code/fbsource/%5Bfcebbc02e701%5D/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayManager.kt?lines=73-75.

{F1982418482}

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D83691623

fbshipit-source-id: a16e39b00c07b6846092cc29bc656a08a61d20bb
2025-10-02 07:21:18 -07:00
Rob Hoganandmeta-codesync[bot] 89f0a37800 Minor bump Metro to ^0.83.3 (#54010)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54010

Bump Metro minimum to 0.83.3

This release fixes a regression in loading config files that export promises.

Full changelog: https://github.com/facebook/metro/releases/tag/v0.83.3

Changelog:
[General][Changed] Metro bump to ^0.83.3

Reviewed By: vzaidman

Differential Revision: D83655569

fbshipit-source-id: 106a957620e4591ef3cce21d327886354913560b
2025-10-02 06:53:57 -07:00
generatedunixname89002005287564andmeta-codesync[bot] 880b7e2c3a Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [B] (#54025)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54025

Reviewed By: rshest

Differential Revision: D83704348

fbshipit-source-id: 8f5e34aa1b344a30dfea26661ac7b71fa4b2ddb1
2025-10-02 06:50:35 -07:00
generatedunixname89002005287564andmeta-codesync[bot] bcf974838e Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [A] (#54027)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54027

Reviewed By: javache

Differential Revision: D83703007

fbshipit-source-id: 36f08f1b48f52750065a39ef322cc675aa828f9e
2025-10-02 06:41:54 -07:00
generatedunixname89002005287564andmeta-codesync[bot] fd95f824d0 Fix CQS signal readability-named-parameter in xplat/js/react-native-github/packages [A] (#54026)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54026

Reviewed By: javache

Differential Revision: D83719624

fbshipit-source-id: 9e43d15dd4b44c9c7b3be711d62541135031d1f8
2025-10-02 06:24:14 -07:00
generatedunixname537391475639613andmeta-codesync[bot] 47d1d2b256 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp (#54024)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54024

Reviewed By: rshest

Differential Revision: D83641704

fbshipit-source-id: 2d102bc1078a951aefee2097914477c6508cc988
2025-10-02 06:22:42 -07:00
Nick Lefeverandmeta-codesync[bot] 0e03adcc79 Add support for nextFocus props to View (#54021)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54021

Adding missing `nextFocus*` props to the View props to enable correct Props 2.0 diffing.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D83714902

fbshipit-source-id: 9b47ba5ea3e177e72b77b1df4b6b6082848c77a4
2025-10-01 20:14:24 -07:00
David Vaccaandmeta-codesync[bot] 07fcdfebae Fix publish-updated-packages-test (#54017)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54017

Fix test: publish-updated-packages-test
changelog: [internal] internal

Reviewed By: christophpurrer

Differential Revision: D83699726

fbshipit-source-id: 45f4713d18ed74a6b344f34ab9b3dd7760088fcc
2025-10-01 17:22:35 -07:00
Moti Zilbermanandmeta-codesync[bot] 7dc26f58ee Allow tests to run against all versions of Hermes (#54011)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54011

Gets the `jsinspector-modern` (CDP backend) integration tests in React Native to pass when run against all relevant versions of Hermes: Legacy Hermes (`xplat/hermes`), Static Hermes stable (`xplat/shermes/stable`), and Static Hermes trunk (`xplat/static_h`).

This involves disabling the two types of failing test:

1. Tests that should be legitimately disabled because Static Hermes omits the legacy, pre-Fusebox debugger infra (see changes to `ReactInstanceIntegrationTest.cpp`)
2. Tests that should be passing but expose a current bug in Static Hermes (see changes to `JsiIntegrationTest.cpp`)

This provides a useful baseline for upcoming work in CDPDebugAPI (etc) across the different versions of Hermes.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83564896

fbshipit-source-id: c27f02266d63d58983c660ba0e4be5c44f02c9b6
2025-10-01 12:48:25 -07:00
David Vaccaandmeta-codesync[bot] 10c5c75de4 Delete Legacy Architecture class CoreModulesPackage (#53787)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53787

CoreModulesPackage is part of legacy architecture and unused on new architecture, let's delete it

changelog: [internal] internal

Reviewed By: rshest

Differential Revision: D82235543

fbshipit-source-id: bd18a1e26929c1f4533175d7567c552e142fbebb
2025-10-01 10:55:17 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 8825ec7464 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83661214

fbshipit-source-id: f1de9dc96d30c46da986f52c6bdb623eeee469dc
2025-10-01 08:54:14 -07:00
Nicola CortiandFacebook GitHub Bot d9a582e949 Bump packages to 0.83.0-main (#54009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54009

Packages haven't been bumped on main ahead of 0.83. This takes care of it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi, huntie

Differential Revision: D83580515

fbshipit-source-id: 7471e77f74e3fb3b4ee6538a49369b5df1393098
2025-10-01 07:13:33 -07:00
Bartłomiej BłoniarzandFacebook GitHub Bot e091759947 Animation Backend init (#53526)
Summary:
This diff adds AnimatedProps class that allows prop diffs to be passed to the backend. Currently it is implemented through subclassing, but the implementation details are subject to change. To simplify integration with animation frameworks AnimatedPropsBuilder class was created - frameworks can use it to prepare their diffs.

## Changelog:

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

Pick one each for the category and type tags:

[GENERAL] [ADDED] - AnimatedProps.h AnimatedPropsBuilder.h
[GENERAL] [CHANGED] - AnimationBackend initialisation and style updates

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

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

Test Plan:
js1 fantom AnimatedBackend-itest.js
js1 fantom Animated-itest.js

Reviewed By: zeyap

Differential Revision: D81309558

Pulled By: bartlomiejbloniarz

fbshipit-source-id: 92476568b6498d7ee64203f70a17c3e578de7ac1
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 7ec470d49a Expose the backend via UIManager (#53995)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53995

### Summary

Exposes the animation backend via UIManager by introducing two new methods: `unstable_setAnimationBackend` and `unstable_getAnimationBackend`. The `NativeAnimatedNodesManagerProvider` is updated to initialize the animation backend using the `useSharedAnimatedBackend` feature flag.

## Changelog:

[GENERAL] [ADDED] - unstable_setAnimationBackend, unstable_getAnimationBackend in UIManager
[GENRAL] [CHANGED] - call unstable_setAnimationBackend in NativeAnimatedNodesManager

Reviewed By: zeyap

Differential Revision: D81137954

fbshipit-source-id: b9a45b1d1e694e28865c27181bcbd578c1b7b9a0
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 3f396616d2 Init the backend closer to the uiManager (#53996)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53996

## Summary

This diff makes changes to the `NativeAnimatedNodesManager` and `AnimationBackend` to initialize the backend closer to the `UIManager`.

## Changelog:

[GENERAL] [CHANGED] - initialize the backend in NativeAnimatedNodesManagerProvider

Reviewed By: sammy-SC

Differential Revision: D81138133

fbshipit-source-id: 5be0c8d5f5e3593bcd8111bbd1d0e90502a53a0d
2025-10-01 04:15:11 -07:00
Bartlomiej BloniarzandFacebook GitHub Bot 325c681cb1 boostrap shared animation backend (#53994)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53994

# Summary

This diff introduces the Shared Animation Backend - a class that can be used by animation frameworks to schedule and run animation updates.

## Changelog:

[GENERAL] [ADDED] - AnimationBackend-itest.js AnimationBackend BUCK/CmakeLists
[GENERAL] [ADDED] - useSharedAnimationBackend feature flag
[GENERAL] [CHANGED] - make AnimatedNodesManager use the backend behind the flag

Reviewed By: zeyap, sammy-SC

Differential Revision: D80809364

fbshipit-source-id: dbfe273362410cdf2f9fc37d78adac7faf4cd118
2025-10-01 04:15:11 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 33bc2716e4 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#54002)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/54002

Reviewed By: javache

Differential Revision: D83622069

fbshipit-source-id: 70b1393dc71ea80d9910682ce86ffd7dd8cd04d5
2025-10-01 04:10:58 -07:00
Dawid MaleckiandFacebook GitHub Bot 29d5aa582f iOS: Add new configuration for RCTDevMenu (#53505)
Summary:
Following the [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/925), this PR adds new `RCTDevMenu` configuration  and extends `RCTReactNativeFactory` API for passing it to the particular `RCTHost`.  The `RCTDevMenuConfiguration` includes:

- isDevMenuEnabled,
- isShakeGestureEnabled,
- areKeyboardShortcutsEnabled

## Changelog:

[IOS][ADDED] - Add new configuration for `RCTDevMenu`

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

Test Plan:
Tested with different configurations on `RCTDevMenuConfiguration`:

<details>
<summary>Click to view code</summary>

```objc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  self.reactNativeFactory = [[RCTReactNativeFactory alloc] initWithDelegate:self];
#if USE_OSS_CODEGEN
  self.dependencyProvider = [RCTAppDependencyProvider new];
#endif

  RCTDevMenuConfiguration *devMenuConfiguration = [[RCTDevMenuConfiguration alloc] initWithDevMenuEnabled:true shakeGestureEnabled:false keyboardShortcutsEnabled:false];

  [self.reactNativeFactory setDevMenuConfiguration:devMenuConfiguration];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

  [self.reactNativeFactory startReactNativeWithModuleName:@"RNTesterApp"
                                                 inWindow:self.window
                                        initialProperties:[self prepareInitialProps]
                                            launchOptions:launchOptions];

  [[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];

  return YES;
}
```

</details>

Run helloworld:

<img src="https://github.com/user-attachments/assets/16c35176-6fbe-498c-96fd-a0fe988a5e3c" alt="hello-world-screenshot" width="300">

Reviewed By: cipolleschi

Differential Revision: D81684275

Pulled By: coado

fbshipit-source-id: 500e170c93df25949de433970442d20c442be7f2
2025-10-01 02:42:54 -07:00
React Native BotandFacebook GitHub Bot 3766e58b9a Add changelog for v0.82.0-rc.5 (#53993)
Summary:
Add Changelog for 0.82.0-rc.5

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.5

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83564973

Pulled By: vzaidman

fbshipit-source-id: 411da5ee9f1be6e9a8891c12a5e5e2e09c5c15f6
2025-10-01 00:35:58 -07:00
Chi TsaiandFacebook GitHub Bot 6031905711 Fix JSI isArray method to match JS Array.isArray (#53998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53998

As the previous few diffs, JSI `isArray` API should follow
`Array.isArray` from the JS spec.

The current implementation does not consider Proxy objects, only Array
exotic objects.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D83391784

fbshipit-source-id: 6db8e5a48458a1aa57006fb0747f62ec78efa675
2025-09-30 20:17:12 -07:00
Fernando GorodscyandFacebook GitHub Bot 990ca0d100 Add support for .ktx images (#53991)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53991

As part of D83474751 to migrate Store from arvr to xplat we discovered that ktx images are not setup correctly in xplat. Adding support for it in flow and jest

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D83562581

fbshipit-source-id: 8c7205417dc24ca2d48a2e2fa1ca7dea40504c18
2025-09-30 18:36:11 -07:00
Jakub PiaseckiandFacebook GitHub Bot e02e7b1a29 Request layout on configuration change only when the font scale has changed (#53984)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53984

Changelog: [ANDROID][CHANGED] - Request layout on configuration change only when the font scale has changed

Wraps call to `requestLayout` in a condition to only run layout when the font scale has changed to prevent it from executing in response to other configuration changes.

Reviewed By: Abbondanzo

Differential Revision: D83546632

fbshipit-source-id: 41a5199dd2ef72b8f6257637c1d35d4a790ea006
2025-09-30 08:40:09 -07:00
Pieter De BaetsandFacebook GitHub Bot af904e563e Unbreak Fb4aReactPackageTest (#53988)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53988

These broke during Kotlin conversions etc as `context.getSystemService` is nullable.

Changelog: [Internal]

Reviewed By: lenaic, rshest

Differential Revision: D83503457

fbshipit-source-id: f4d2a09d60c38e6e5ae2b01d61fa73459b0f7f4d
2025-09-30 05:03:42 -07:00
Nick LefeverandFacebook GitHub Bot a073080810 Fix serialization for vector of primitive type (#53982)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53982

This diffs adds specific `toDynamic` conversions for props defined as arrays holding primitive types. This fixes the serialization of `std::vector<Float>` that was failing to correctly convert to a `folly::dynamic` type when using Props 2.0.

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D83520605

fbshipit-source-id: 80a6ce2b3a265601f945ff3b76840c04e46aacdc
2025-09-29 18:17:49 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 5a4ed2d955 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [B] [B] (#53970)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53970

Reviewed By: rshest

Differential Revision: D83404453

fbshipit-source-id: 852d553b9c70a00c8493f8f0ad2d55df0a6093ea
2025-09-29 16:52:55 -07:00
Chris LewisandFacebook GitHub Bot 0a3bcc97ec Back out "Genalize focus/blur behavior in JS" (#53979)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53979

This reverts a previous change that modified how focus behavior is handled in JavaScript. That change caused hierarchy rows to no longer be focusable, either manually or programmatically as they were before, which in turn broke arrow key navigation in entity lists. Reverting the change restores the expected focus behavior and re-enables proper arrow key functionality within entity lists.

Changelog: [Internal]

Differential Revision: D83390685

fbshipit-source-id: 165567eceedce5d0a2e664a9ef3070d5a2bf9b67
2025-09-29 16:09:05 -07:00
Pieter De BaetsandFacebook GitHub Bot a81e94a40c Fix useNativeTransformHelper behaviour when frame size is 0 (#53978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53978

Inconsistency between the previous and old version of `processTransform` - if frameSize is 0, the transform was being ignored, which is not correct when considering a fixed transform origin and a rotation animation for example. Instead, always apply the transform origin if it's set.

Changelog: [Android][Fixed] Fixed representation of transforms when view is originally zero-sized

Reviewed By: mdvacca

Differential Revision: D83469083

fbshipit-source-id: e9ae1500f64c700708edb00b2d5871e3f224fb07
2025-09-29 15:37:24 -07:00
generatedunixname89002005287564andFacebook GitHub Bot fa465c6da9 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [A] [B] (#53972)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53972

Reviewed By: rshest

Differential Revision: D83405113

fbshipit-source-id: 5e7b3c37e08d49991fd112180625953a0edca047
2025-09-29 12:36:44 -07:00
Devan BuggayandFacebook GitHub Bot 0b14a19ea6 Migrate ReactRoot to Kotlin (#53238)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53238

Changelog:
[Android][Changed] - Migrated ReactRoot to Kotlin

Reviewed By: cortinico

Differential Revision: D80074359

fbshipit-source-id: 273f5bfc2826f59f2bb1521b8dbd95c48e5eb0c4
2025-09-29 12:28:02 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3774f75705 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#53969)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53969

Reviewed By: rshest

Differential Revision: D83350635

fbshipit-source-id: 48ec748e3ffadd9985daa40895ffbbd1dd40e946
2025-09-29 10:34:02 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 279835dc14 Daily arc lint --take KTFMT (#53974)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53974

Reviewed By: VladimirMakaev

Differential Revision: D83454863

fbshipit-source-id: 6742bac1207743f3fc58c48d1261de00bcfacf85
2025-09-29 10:05:01 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3fb6c12ec8 Fix CQS signal readability-const-return-type in xplat/js/react-native-github/packages (#53940)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53940

Reviewed By: javache

Differential Revision: D83238455

fbshipit-source-id: ea3d3180f37151b3bba432d55324f2d854f29bc4
2025-09-29 08:16:45 -07:00
generatedunixname89002005287564andFacebook GitHub Bot fe043446e8 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] (#53971)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53971

Reviewed By: rshest

Differential Revision: D83395511

fbshipit-source-id: 832901c112d6ebf0b58280bf12a50f7845251c5c
2025-09-29 06:30:14 -07:00
generatedunixname89002005232357andFacebook GitHub Bot c47205990d Revert D82781491 (#53968)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53968

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

Depends on D82781491

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D83442434

fbshipit-source-id: bd570564ee22d57bd7a3ca7f6990230de3e5ac4e
2025-09-28 22:09:03 -07:00
Nick LefeverandFacebook GitHub Bot 2f40224faf Add support for global view culling outset ratio setting (#53845)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53845

Adding a feature flag controlling the outset ratio set on the culling context frame. This feature flag value will add an outset on the width and height calculated by multiplying these with the provided ratio value. This will offset each side of the frame, maintaining the center of the frame at the same location.

This outset ratio helps mitigate async scroll blanking and focus handling on host platforms.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D82684027

fbshipit-source-id: 3d1aaf680c5896fd4bb992b272b650ab2c097905
2025-09-28 15:13:07 -07:00
Fernando GorodscyandFacebook GitHub Bot fb09b37646 Move files from arvr/js/apps/Store to xplat/js/RKJSModules/public/HzStoreVR
Summary:
# What

Moving Store from `arvr/js` to `xplat/js`.
This will enable Store to use xplat modern infra. Being on arvr/js legacy infra has created many problems [over the years](https://fb.workplace.com/groups/storecore/posts/2344707442611890/?comment_id=2345657702516864). Examples:

**2025**: https://fb.workplace.com/groups/storecore/permalink/2344707442611890/
**2024**: https://fb.workplace.com/groups/oculusjs/permalink/3366314690341563/
**2023**: https://fb.workplace.com/groups/xplatreact.engineering/permalink/730125568732098/

# How
## Previous Diff
* Remove usage of the legacy `react-router-3`. We don't want to carry this as a dependency to xplat/js.

## This Diff
This diff is the combination of several diffs (created to facilitate reviewing):

1. - D82581768 - Just move files from arvr/js/apps/Store to xplat/js/RKJSModules/public/HzStoreVR (Except for the index file and some mockUtils)
2. - D82581767 - Setup getConfig.js to generate a single BUCK for HzStoreVR and remove circular dependencies
3. - D82581769 - Fix location/import of assets
4. - D82581766 - Fix relay imports that were not using Haste
5. - D82664586 - Remove usage of old url module
6. - D83156829 - Fix buck: run js1 build buckfiles and build_and_run.sh
7. - D82844768 - Make arvr/js tests run with xplat Store
8. - D83005059 - Fix Flow errors
9. - D83259512 - Delete duplicated test files to make flow happy
10. - D83005098 - Fix Relay config for new Store VR location in xplat
11. - D83005073 - Enable React Forget on new HzStoreVR directory
12. - D83345573 - Fix arc lint -a
13. - D83403188 - Fix relay prefetch queries

## Next diffs
* Migrate tests to xplat jest config (renaming from *-rntest.js to *-test.js)
* Migrate other source code like arvr/js/libraries/store

## Open Source PR
For the change to RN open source .flowconfig to add .ktx image support: https://github.com/facebook/react-native/pull/53964
Changelog: [Internal]

Reviewed By: Tom910, mullender

Differential Revision: D82781491

fbshipit-source-id: 5ce6433916e5b144965e8906005e2e26fdcfcc95
2025-09-27 17:13:39 -07:00
Sam ZhouandFacebook GitHub Bot 488b31d29a Deploy 0.287.0 to xplat (#53965)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53965

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D83415742

fbshipit-source-id: ff6faa673a70cb8dc958ef2ad46245c720f3df9a
2025-09-27 14:01:43 -07:00
David VaccaandFacebook GitHub Bot 99b7cb77a7 Delete ReactRawTextShadowNode from codebase (#53949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53949

ReactRawTextShadowNode is part of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D83188351

fbshipit-source-id: 19514d8e5d96d2d2fb4fb4b25d422282894c8c18
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 969e14271c Delete ReactRawTextManager from codebase (#53947)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53947

ReactRawTextManager is legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83187075

fbshipit-source-id: 4e4f7feb3178b3f95a71ff805ec7d784f2811285
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 8386a9e4f1 Delete ReactVirtualTextShadowNode (#53948)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53948

ReactVirtualTextShadowNode is par of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83187955

fbshipit-source-id: d8bd0aa9cece68c7b4a4d5674ce97a8ef43a7fc5
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 163d553ba2 Delete NoSuchNativeViewException (#53946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53946

NoSuchNativeViewException is legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83186872

fbshipit-source-id: cbd3b2f537673745e634d0bfc8717fc93f1c0c5f
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot 589bf35cd1 Delete ReactVirtualTextViewManager from codebase (#53945)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53945

ReactVirtualTextViewManager is an internal legacy architecture class that's unused, we are deleting it

changelog: [internal] internal

Reviewed By: alanleedev

Differential Revision: D83186611

fbshipit-source-id: 323c77077ab91ffec35af8e4c12da4bdf13fa233
2025-09-26 14:07:25 -07:00
David VaccaandFacebook GitHub Bot dd6c23fb61 Delete YogaNodePool (#53944)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53944

YogaNodePool is an internal API used only by LegacyArchitecture of React Native Android, which is unused

This diff deletes YogaNodePool from the codebase

changelog: [internal] internal

Reviewed By: alanleedev, cortinico

Differential Revision: D83184441

fbshipit-source-id: 7c358985d9f19b38c28cca7fb0acf9322e97d87c
2025-09-26 14:07:25 -07:00
Devan BuggayandFacebook GitHub Bot 218d2f6fdc PerfMonitor - Add show/hide to dev menu (#53958)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53958

Adds a dev menu option to enable/disable the overlay, in case devs want to screenshot/record without disabling it at buildtime.

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D83293591

fbshipit-source-id: 3564b83a279db296d1cd22a8e8a83876cc705dbd
2025-09-26 12:28:25 -07:00
Devan BuggayandFacebook GitHub Bot 456e01bf3f PerfMonitor - Fix enable/disable states (#53957)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53957

There are cases where the overlay can get enabled multiple times, creating more than one view. This change no-ops enabling if the overlay is already enabled and just uses enable/disable for showing/hiding the view.
{F1982272836}

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D83275253

fbshipit-source-id: 4b468171a582e134071875f718c66d1659d67782
2025-09-26 12:28:25 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8bc133c6c1 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages (#53962)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53962

Reviewed By: javache

Differential Revision: D83330024

fbshipit-source-id: f35898ba42dc06909b927d5c4b5477e7d8c8e966
2025-09-26 10:50:27 -07:00
SimpleCreationsandFacebook GitHub Bot f7ea40bc28 Fix TypeScript types of positions in GradientValue (#53942)
Summary:
The original type of the `positions` property was mistakenly declared as a 2-dimensional array, which is not accepted in runtime. In reality, a flat string array is expected as per [linear gradient examples](https://github.com/facebook/react-native/blob/18ba21149ae46d3fa97fe0dcbe165999009d2a6e/packages/rn-tester/js/examples/LinearGradient/LinearGradientExample.js#L230).

## Changelog:

[General] [Fixed] - TypeScript types of `positions` in `GradientValue`

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83342637

Pulled By: javache

fbshipit-source-id: 556618dd43861b3d3f1728c089f790815f2f011b
2025-09-26 10:13:27 -07:00
Nurtau ToganbayandFacebook GitHub Bot ad5949ffd6 Fix TaskDispatchThread (#53961)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53961

Changelog: [Internal]

Fixed a bug in TaskDispatchThread. To understand bug, let me show an example. The task is scheduled to run after several seconds. It reaches loopCv_.wait_until() and waits there. There are 2 bad scenario:
1. wait_until spuriously wakes up and async task runs even before its scheduled time
2. new task is added with runSync(). New task gets added to the queue and loopCv_ is notified. Async task will run before its scheduled time and even worse queue_.pop() will remove sync task. Therefore runSync will be blocked for forever.

To fix this bug, we need to add `continue` after wait_until().

Also I added new test to prevent this bug in future.

Reviewed By: rshest

Differential Revision: D83345047

fbshipit-source-id: 37962613a123a123c0e110426ae782effe5a81c1
2025-09-26 08:54:24 -07:00
Rob HoganandFacebook GitHub Bot 2d2011c7ae Invalidate transform cache on update of/local changes to @react-native/babel-preset (#53867)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53867

`react-native/metro-babel-transformer` implements `getCacheKey` for Metro, but does not vary the cache key on changes to `react-native/babel-preset`, one of its dependencies, leading to false positive cache hits (changes not being reflected).

This is particularly a problem in development, although it potentially also leads to issues in the unusual case that `react-native/babel-preset` is updated via npm, but no other package is.

This adds a `getCacheKey` to `react-native/babel-preset` and incorporates it into `react-native/metro-babel-transformer`'s `getCacheKey`. It's based on `package.json#version` in production and a hash of package contents in development (`version.endsWith('-main')`).

Changelog:
[General][Fixed] Invalidate transform cache when `react-native/babel-preset` is updated

Reviewed By: huntie

Differential Revision: D82893894

fbshipit-source-id: 9bbc034eaf68ee0e5b3078fb2fe8f30caa7f11c9
2025-09-26 08:13:44 -07:00
Pieter De BaetsandFacebook GitHub Bot 29b74061e4 Inline lazy fields in core data types (#53959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53959

These data-types are super common in React Native, and the anonymous inner classes add significantly to the GC workload we see. For ReadableMap this means we can save 6 additional object allocations for each LazySynchronizedImpl and the lambda that's passed in to it. On synthetic benchmarks this seems to improve core operations around ~10%.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83245864

fbshipit-source-id: 69b314a1f52a32375b5e1f591555f50bfbc31843
2025-09-26 07:20:06 -07:00
Jakub PiaseckiandFacebook GitHub Bot 4f2755bda5 Update the version of Hermes V1 (#53930)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53930

Changelog: [GENERAL][CHANGED] - Update version of Hermes V1 used for React Native

Reviewed By: cortinico

Differential Revision: D83234930

fbshipit-source-id: 7cbad6c4b4fe6d7c8fe3ac25bea30bb25100ee18
2025-09-26 01:33:12 -07:00
Nivaldo BondançaandFacebook GitHub Bot 64d34080af Update ktfmt component on FBS:master (#53956)
Summary:
X-link: https://github.com/facebookexternal/meta-ar-mr-tooling/pull/200

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

Reviewed By: jselbo

Differential Revision: D82570814

fbshipit-source-id: 6eeade55734548d057c5eae77a9188172473a819
2025-09-26 01:00:36 -07:00
Eric RozellandFacebook GitHub Bot b9dcc1b670 Flip the order of component descriptor registration (#53953)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53953

For TurboModule registration, we register custom / app-specific TurboModules before core TurboModules to ensure that app-specific module overrides are preferred over core / default behaviors.

This provides a similar behavior for Fabric component descriptor registration.

## Changelog

[Internal]

Reviewed By: alanleedev

Differential Revision: D83273376

fbshipit-source-id: fd0fb5f10d2bc29839ae554f0e3cfc18d7957848
2025-09-25 19:56:41 -07:00
Eric RozellandFacebook GitHub Bot 49b0045669 Unseal ScrollViewProps (#53952)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53952

In React Native Android, you can technically override core components like ScrollView to add additional props and behaviors, but doing so in the new architecture requires ensuring that these props are tracked in the C++ props object.

This change unseals ScrollViewProps so they can be overridden in (rather rare and generally unsupported) cases where you need to customize ScrollView behaviors for a specific app.

## Changelog

[Internal]

Reviewed By: Abbondanzo

Differential Revision: D83268457

fbshipit-source-id: d1d895e9f060dcf94bf82538a33bf5f2fbb135d7
2025-09-25 19:56:41 -07:00
Ramanpreet NaraandFacebook GitHub Bot 2b5938c900 Remove legacy validation warning infra (#53792)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53792

This validation infra served us well, but it's no longer needed.

All the legacy architecture classes have been identified and deprecated. And in the next major release, we will simply remove them.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D82470292

fbshipit-source-id: 44b58e63b7aca4fa22ac6b891275417bf1add8d1
2025-09-25 17:58:52 -07:00
Ramanpreet NaraandFacebook GitHub Bot d3890080c8 Consolidate all c macros (#53823)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53823

Let's just use the same flag to compile out everything. I don't think we'll need the utility of separate flags.

Reviewed By: fkgozali

Differential Revision: D82476933

fbshipit-source-id: 1b5fbfad7d54e0af7db5459772b3e7a8472c1eb1
2025-09-25 16:59:07 -07:00
Luna WeiandFacebook GitHub Bot 62fd6895e3 fbsource//xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/virtual/viewexperimental:viewexperimentalAndroid (#53782)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53782

Changelog: [Internal] - Remove unnecessary ?. in VirtualViewExperimental

Reviewed By: yungsters

Differential Revision: D82426042

fbshipit-source-id: 2ba012b421b1d5000892e085a3277506829e7be2
2025-09-25 15:21:30 -07:00
Nurtau ToganbayandFacebook GitHub Bot 7b8590f860 Correctly join thread in TaskDispatchThread (#53943)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53943

Changelog: [Internal]

Thread join should happen only during TaskDispatchThread dtor, otherwise if quit is called on the same thread (thread_), then thread_ will get detached, which can lead to use of already deleted fields (queue_, running_) of TaskDispatchThread.

But we also need to make sure that on quit() call, loop is getting stopped, otherwise in loop, already running task will use already deleted fields of captured object. If quit() is called as task on thread_, then there is no need to wait for future because loop will organically end since running_ is false.

Reviewed By: rshest

Differential Revision: D83044012

fbshipit-source-id: a2da97a89093c47c64b693e3c9e5d6f7297c038e
2025-09-25 14:21:07 -07:00
Alex HuntandFacebook GitHub Bot 4e595b7c7d Update debugger-frontend from 8b84a77...8cce390 (#53941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53941

Changelog: [Internal] - Update `react-native/debugger-frontend` from 8b84a77...8cce390

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

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8cce39003](https://github.com/facebook/react-native-devtools-frontend/commit/8cce39003) | Alex Hunt (hello@alexhunt.dev) | 2025-09-25T15:05:50+01:00 | [Update Welcome panel assets and styling (#208)](https://github.com/facebook/react-native-devtools-frontend/commit/8cce39003) |
| [7724ccb99](https://github.com/facebook/react-native-devtools-frontend/commit/7724ccb99) | Alex Hunt (hello@alexhunt.dev) | 2025-09-25T08:46:01+01:00 | [Disable Perf Insights subpanel, collapse sidebar by default (#209)](https://github.com/facebook/react-native-devtools-frontend/commit/7724ccb99) |
| [538c309a3](https://github.com/facebook/react-native-devtools-frontend/commit/538c309a3) | Vitali Zaidman (vzaidman@gmail.com) | 2025-09-18T12:20:22+01:00 | [track when all startup resources are loaded (#205)](https://github.com/facebook/react-native-devtools-frontend/commit/538c309a3) |

Reviewed By: hoxyq

Differential Revision: D83248877

fbshipit-source-id: e5d7fb009a89bd97c8aac5f0a09b5733b8249651
2025-09-25 11:32:17 -07:00
riteshshukla04andFacebook GitHub Bot ed24a4d05b fix-types in Refresh control (#53907)
Summary:
Fixes https://github.com/facebook/react-native/issues/53893
The size should be of type string (large or default) . Typescript says number

## 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
-->
[GENERAL][FIXED] Fixed Types in Refresh control

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

Test Plan: N/A

Reviewed By: javache

Differential Revision: D83161286

Pulled By: arushikesarwani94

fbshipit-source-id: 4e557bc3780f297551b913c5c763c369cf3e374c
2025-09-25 11:15:16 -07:00
Vitali ZaidmanandFacebook GitHub Bot 92cae27cb2 only remove the Fast Refresh "Refreshing..." toast when all bundles being loaded finished loading. (#53937)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53937

Changelog: [General][Fixed] only remove the Fast Refresh "Refreshing..." toast when all bundles being loaded finished loading.

Reviewed By: huntie

Differential Revision: D83246895

fbshipit-source-id: f02fac9fe16b307ae4b36f09bc88f5261c590b15
2025-09-25 11:07:38 -07:00
Pieter De BaetsandFacebook GitHub Bot 490b05d0d8 Extract SynchronousMountItem (#53936)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53936

Align with other mount items and make it easier to identify in memory traces.

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83241794

fbshipit-source-id: 9df1523e265e560c15f93bad8cd91a651bc5a4e2
2025-09-25 10:04:48 -07:00
Pieter De BaetsandFacebook GitHub Bot 09441d8691 Fix ReactViewManager subclasses triggering view recycling (#53933)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53933

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D83238077

fbshipit-source-id: d3dc4f96b9934fcbcd9a80354f976d5eb0bc9f0c
2025-09-25 10:04:48 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 5735bb5955 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83233752

fbshipit-source-id: 4f87b05e552d728314d3c7be1d28267d58b8f19c
2025-09-25 06:17:47 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 6e9a46ab81 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm (#53931)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53931

Reviewed By: javache

Differential Revision: D83144241

fbshipit-source-id: 115f085974ca6cc13c1412ab59881e4f819b594b
2025-09-25 04:49:34 -07:00
Moti ZilbermanandFacebook GitHub Bot f599e2a613 Fix custom prebuilt binary handling in unstable_prepareDebuggerShell (#53927)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53927

Changelog: [Internal]

Fixes a bug that broke `unstable_prepareDebuggerShell` (and therefore the RNDT shell) in OSS.

Reviewed By: vzaidman

Differential Revision: D83178777

fbshipit-source-id: cfd93b14e2a94e36d8a3ee9f4605036a4279ef8c
2025-09-25 02:29:11 -07:00
Alex HuntandFacebook GitHub Bot b577679746 Update DevTools windowKey to a sha256 hash (#53923)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53923

Motivated by feedback on D83070252. This prevents us from including decodable information about debug targets in these values.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83139401

fbshipit-source-id: 01b01d23e4dfb06e400729b8cedf1fe2e098b209
2025-09-25 01:22:58 -07:00
Alex HuntandFacebook GitHub Bot 88f05b219c Fix build for debugger-shell (#53924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53924

Fix failing `yarn build` runs following D83070252.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83161092

fbshipit-source-id: 3e9e984699750add82794281a387eac0534da60d
2025-09-25 01:22:58 -07:00
Sam ZhouandFacebook GitHub Bot dc3736893d Deploy 0.286.0 to xplat (#53929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53929

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D83192932

fbshipit-source-id: 0457464a1ae1907a6906a26faa3ff319f01f9356
2025-09-24 18:25:10 -07:00
Vitali ZaidmanandFacebook GitHub Bot 3a954caf4f don't require projectRoot in devMiddleware (#53921)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53921

Changelog: [Internal] `devMiddleware` removed the unused option `projectRoot`

This option was used only in a dead branch of the code inside `InspectorProxy`.

The scenario where it appeared was enabling resolving script sources (`Debugger.getScriptSource`) starting with `file://` which were coming from the file system. However, we don't seem to ever point scripts at the filesystem this way.

Reviewed By: huntie

Differential Revision: D82739662

fbshipit-source-id: 9a130eaa83cb94ae0e36a5a1102c56ff8a36cffc
2025-09-24 12:47:24 -07:00
Calix TangandFacebook GitHub Bot 2dfb36e3c6 Simplify VirtualViewContainer hysteresis window logic (#53914)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53914

Pulls hysteresis window computation out of for loop. Simplify the remaining code.

Changelog: [Internal] - Same as general summary.

Reviewed By: lunaleaps

Differential Revision: D83005735

fbshipit-source-id: 824863c649406a750d44b31ac92878505ab61596
2025-09-24 10:05:34 -07:00
Christoph PurrerandFacebook GitHub Bot 10b45b6200 Add Unit Tests (#53913)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53913

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D83091947

fbshipit-source-id: 63baf543b180070591d4779b1203909359aec132
2025-09-24 08:56:01 -07:00
Alex HuntandFacebook GitHub Bot 430765b071 Update SafeAreaViewExample to lazily require deprecated API (#53922)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53922

Minor change motivated by restoring a clean JS console on startup for RNTester.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D83145673

fbshipit-source-id: be64b057b842f4922328f5bc62dc001d016fd0b7
2025-09-24 06:05:26 -07:00
generatedunixname537391475639613andFacebook GitHub Bot ed6aa0f25a xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp (#53919)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53919

Reviewed By: javache

Differential Revision: D83044510

fbshipit-source-id: df05c27f5863b6eac6c37ebe75343b30e515be7a
2025-09-24 05:15:26 -07:00
Alex HuntandFacebook GitHub Bot 8027067322 Implement saved window positioning per target (#53910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53910

NOTE: Resubmission of D82236159 — The `electron-store` dependency is now replaced with a local implementation.

As titled. A long awaited quality of life improvement that we can now deliver with our desktop shell.

Window arrangements are saved per [`windowKey`](https://github.com/facebook/react-native/blob/da7bf9c54567aae62ff355b79e66f511cb382065/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js#L193), mapping to each previously opened debugger target.

**Limitations**

- Does not save/restore macOS fullscreen app state.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D83070252

fbshipit-source-id: a77f106b6db31571313acd0270b87703e4de049d
2025-09-24 04:59:43 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot eb9e94256e Fix potential attempt to execute a task after shut down in TaskDispatchThread (#53900)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53900

# Changelog:
[Internal] -

There is a crash reported, which looks like it may be potentially caused by some scenarios when we are trying to execute a scheduled task after the TaskDispatchThread instance had been quit.

This adds a missing extra check in the corresponding code to avoid such scenarios.

Reviewed By: christophpurrer, lenaic

Differential Revision: D83050169

fbshipit-source-id: 0ee0fa5848b070c2dc3dd92dbad4e6d5996734b3
2025-09-24 04:27:30 -07:00
Kacper KafaraandFacebook GitHub Bot dc4a6d2c7e Add invalidation callback for non-recycled component instances on iOS (#53708)
Summary:
Since the view recycling is optional on iOS [since 0.74](https://github.com/facebook/react-native/commit/613a5a75977d84333df7cbd5701e01a7ab5a3385) when a view (with disabled view recycling) is unmounted / destroyed there is no lifecycle callback for a component view to notify it of such event. Currently we (`react-native-screens`) are forced to scan mutation list of every mounting transaction in every of ours container components. Components with view recycling turned on, get `prepareForRecycle` callback on Fabric & on old architecture, there was `invalidate` message sent (`RCTInvalidating` protocol). It would be nice & useful to have something like this for components with view recycling disabled, or enabled but not recycled due to pool being full.

In particular in `react-native-screens` we need an information that the component is being destroyed to release retained resources (view controllers & others).

I have concern regarding naming of this method, as it could collide / be mistaken with `invalidate` method of `RCTInvalidating` protocol, but naming is hard & I don't see a name that fits better 😄 Open for suggestions!

## 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] [ADDED] - Add invalidation callback for non-recycled component instances

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

Test Plan:
Apply this patch to `RNTMyNativeViewComponentView.mm`:

```objective-c

 diff --git a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
index 2eb7bff28e..8464da603b 100644
 --- a/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
+++ b/packages/rn-tester/NativeComponentExample/ios/RNTMyNativeViewComponentView.mm
@@ -123,6 +123,16 @@ using namespace facebook::react;
   [_view removeOverlays];
 }

+- (void)invalidate
+{
+  NSLog(@"RCTComponentViewProtocol invalidate called");
+}
+
++ (BOOL)shouldBeRecycled
+{
+  return NO;
+}
+
 - (void)fireLagacyStyleEvent
 {
   RNTMyNativeViewEventEmitter::OnLegacyStyleEvent value = {"Legacy Style Event Fired."};

```

& render `MyNativeView` in any of the RNTester screens / examples. Unmount the view & observe the log in XCode.

https://github.com/user-attachments/assets/be3f67bb-73e0-4af2-9ca1-f2eb9f3347bb

(called twice, because there are two components rendered at a time)

Reviewed By: javache

Differential Revision: D83139361

Pulled By: cipolleschi

fbshipit-source-id: 17ef964648ac44b583503b6b00fc5dd457887061
2025-09-24 04:26:38 -07:00
Jakub PiaseckiandFacebook GitHub Bot 417e068220 Relayout surfaces on font scale change (#53770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53770

Changelog: [ANDROID][FIXED] - Request layout on attached surfaces when font scale changes

Reviewed By: rshest

Differential Revision: D82422608

fbshipit-source-id: c087054a709f8d31a298cd8d83363fac1e23d03a
2025-09-24 04:16:33 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dc132a4fd4 Crash the app when Legacy Arch is enabled (#53911)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53911

This change mimics what we implemented on Android to crash the app.

This is in general never going t be triggered. It will be triggered only if users are actually going through the old way to initialize React Native, i.e. by using the RCTRootView class which creates thebridge, or if they are creating the bridge themselves.

## Changelog:
[iOS][Added] - Crash the app if they force the legacy architecture.

Reviewed By: RSNara, cortinico

Differential Revision: D83066377

fbshipit-source-id: 0907effceb9a3655ec8d6bde8e0986f50f1ab663
2025-09-24 02:45:46 -07:00
Moti ZilbermanandFacebook GitHub Bot 18ba21149a Run prebuilt standalone shell directly from fbsource on laptops (#53878)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53878

Changelog: [Internal]

Adds the `prebuiltBinaryPath` option to `unstable_spawnDebuggerShellWithArgs` and `unstable_prepareDebuggerShell`, for advanced integrations that need to change how the React Native DevTools prebuilt binary is distributed.

Reviewed By: huntie

Differential Revision: D82956699

fbshipit-source-id: 30f9c461c7d8f22a553f278bbe42b86742c98da7
2025-09-24 00:22:32 -07:00
Calix TangandFacebook GitHub Bot 53f89bacd4 VirtualView v2 support in HorizontalScrollView native component (Android) (#53890)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53890

Changelog: [Internal] -  Adds support for VirtualView v2 in Android HorizontalScrollView native component by implementing VirtualViewContainer interface. Only on Android because iOS equivalent native components are already set up to support virtualview v2 on horizontal scrollviews.

## Changes in Detail

Adds necessary changes to Android `HorizontalScrollView` native component to support the experimental version of VirtualView.

Reviewed By: lunaleaps

Differential Revision: D82783403

fbshipit-source-id: 1e55eb054ab098af5ca8dd526b27c574025943c4
2025-09-23 16:06:40 -07:00
Devan BuggayandFacebook GitHub Bot 14dc03e2bd Genalize focus/blur behavior in JS (#53829)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53829

Forwards along focus and blur calls to their respective native commands, leaving the TextInput path intact for now.

There are a few ways places to implement this, all with different trade offs. I decided to leave TextInputState.js intact and instead only go down the original path if the focused/blurred element is a TextInput by using the registered inputs in TextInputState. This revealed a subtle issue where the TextInputs aren't registered in time for the ref callback, meaning you can't focus them there if you rely on the registered list.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D82676628

fbshipit-source-id: d39c92dfc99ec4b5e100203bb43c8a4f9c80a649
2025-09-23 14:37:56 -07:00
Andrew DatsenkoandFacebook GitHub Bot 22002bb70c Allow to disable coverage via flag & disable it for benchmarks (#53912)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53912

Changelog: [Internal]
Add new fantom flag `fantom_disable_coverage` to be used in tests that are sensitive to things like memory allocation.
Also disable coverage for any benchmark test.

Reviewed By: arushikesarwani94

Differential Revision: D83070065

fbshipit-source-id: a885e79e3d0c88cfb7adef30cb60ab46a617edac
2025-09-23 13:40:31 -07:00
Devan BuggayandFacebook GitHub Bot b00d3be572 Make perf overlay more transparent (#53904)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53904

Adds more transparency to the background of the perf overlay, we got some feedback about it visually obscuring elements behind it.

{F1982191377}

{F1982191388}

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83037721

fbshipit-source-id: e70c799ea7942c6aea886e9a3580e324c4238048
2025-09-23 12:53:43 -07:00
Devan BuggayandFacebook GitHub Bot 4acb3d3e7c Remove "Background" from perf overlay title (#53903)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53903

Removes unnecessary "background" from title, narrowing the width of the overlay.
{F1982191268}

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83036209

fbshipit-source-id: 0a11f38e544e3d667a9a1fb957e351716f625f3e
2025-09-23 12:53:43 -07:00
Alex HuntandFacebook GitHub Bot f4b6131850 Harden lifecycle handling for Perf Monitor (#53905)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53905

Updates `PerfMonitorOverlayManager` so that it is minimally and correctly integrated in the `DevSupportManagerBase` reload cycle — attempting to fix a bug where the background profiling state on startup / subsequent packager connections would be out of sync.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D83058519

fbshipit-source-id: 9a9bb32d3215ccf722aa39ca0ca943449f7ae62e
2025-09-23 11:47:50 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b9e6e349f5 Fix CQS signal readability-avoid-const-params-in-decls in xplat/js/react-native-github/packages [B] (#53902)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53902

Reviewed By: javache

Differential Revision: D83033554

fbshipit-source-id: 85b48fb7051e3f58ee00cd6a160086701c66d7a2
2025-09-23 08:40:16 -07:00
React Native BotandFacebook GitHub Bot 1c2b9f9206 Add changelog for v0.82.0-rc.4 (#53886)
Summary:
Add Changelog for 0.82.0-rc.4

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.4

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D82993264

Pulled By: vzaidman

fbshipit-source-id: e1aba15613d5e62fcd503e15c878697adc088816
2025-09-23 05:00:38 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 1c5fb903fd Fix CQS signal readability-avoid-const-params-in-decls in xplat/js/react-native-github/packages [A] (#53897)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53897

Reviewed By: javache

Differential Revision: D83033417

fbshipit-source-id: 4aa2bfd49433a1f9c741241dcffe714b5091506b
2025-09-23 04:18:47 -07:00
Vitali ZaidmanandFacebook GitHub Bot 6936bd9f6b Dismiss DevLoadingView toast on touch (#53885)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53885

Changelog: [General][Added] DevServer banners can now be closed on tap. On iOS, don't close them after 15s anymore.

Banners, on iOS, but not Android, are currently closed after 15s since {D47478373} where it was introduced to deal with the banner telling users they need to connect to Metro stuck forever.

Instead of closing it after 15 seconds, allow the users on both Android and iOS to close it via a touch.

Reviewed By: huntie

Differential Revision: D82727997

fbshipit-source-id: 5aa2af78a4dbcd95b69423d52421900d4ab35244
2025-09-23 02:06:18 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 8c2f9e47fa Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D83031681

fbshipit-source-id: 0290d423b758ce42cd9a9c8cccc0f2cf16ad992b
2025-09-23 01:46:27 -07:00
Gabriel DonadelandFacebook GitHub Bot ee811a82ec Add changelog for v0.81.4 (#53720)
Summary:
Add Changelog for 0.81.4

## Changelog:
[Internal] - Add Changelog for 0.81.4

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D83013088

Pulled By: arushikesarwani94

fbshipit-source-id: 3693bf6582543465102cea5dbd7dd17dffe0a272
2025-09-23 01:19:46 -07:00
Marco WangandFacebook GitHub Bot 2e55154665 Deploy 0.285.0 to xplat (#53895)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53895

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D83000230

fbshipit-source-id: 7c070358623e9b68043bb8666f5c9dfc632ff2fb
2025-09-22 22:42:28 -07:00
Sam ZhouandFacebook GitHub Bot 5c369aa34c Add annotations to fix future natural inference errors in xplat/js: 6/n (#53894)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53894

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D83000736

fbshipit-source-id: 3ba5c59d9b2f7b967c0dccd24a73056430153bdc
2025-09-22 21:55:34 -07:00
Arushi KesarwaniandFacebook GitHub Bot 2065c31800 Updating ReactAndroid.api to unblock stable (#53891)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53891

D82726743 missed updating the ReactAndroid.api which was blocking fbandroid/stable:

https://www.internalfb.com/sandcastle/workflow/797137134054937206

Hence ran `buck2 run //xplat/js/scripts/rn-api:generate-rn-api-metadata` to update

Changelog: [Android][Fixed] - Fixed ReactAndroid.api

Reviewed By: mdvacca, sumkit, jorge-cab

Differential Revision: D83001140

fbshipit-source-id: 85e4f2005a28a3c98999198284133e4af1eaed89
2025-09-22 18:32:51 -07:00
David VaccaandFacebook GitHub Bot 5684546251 Delete LayoutAnimation (#53785)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53785

LayoutAnimation is part of legacy architecture and unused, let's delete it

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82235542

fbshipit-source-id: c0e2f08bcdffb9c5e102df7cca799f3a25296afe
2025-09-22 17:45:08 -07:00
David VaccaandFacebook GitHub Bot f09f4a779e Remove code from public LayoutAnimationController class (#53784)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53784

LayoutAnimation is part of legacy architecture, I'm deleting the code used from its non supported public APIs

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D82235545

fbshipit-source-id: 9665c57b68eba9d958d3f8b9dd4224558cc8e9f6
2025-09-22 17:45:08 -07:00
David VaccaandFacebook GitHub Bot ec5bc3b285 Delete LayoutAnimation tests (#53783)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53783

LayoutAnimation is part of legacy architecture, I'm deleting unused tests

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D82254268

fbshipit-source-id: df53215f126e37d8422ece46552596c31b11f61b
2025-09-22 17:45:08 -07:00
Christoph PurrerandFacebook GitHub Bot 46c75c1043 Add ImagePrefetching feature flag for JNI calls (#53865)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53865

This adds an additional feature flag to enable/disable image prefetch requests via JNI batching

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82871006

fbshipit-source-id: 6cd2577f26e6d4c906e7be2f62a397177691538f
2025-09-22 17:04:55 -07:00
Vitali ZaidmanandFacebook GitHub Bot e3bf881ae6 remove connection hints from being logged for the user (#53884)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53884

Changelog: [Internal]

Now that there's a clear display for when HMR is disconnected, we don't want to show messages regardless devices connection and disconnection to the DevServer because they are too partial.

Reviewed By: huntie

Differential Revision: D82727105

fbshipit-source-id: 32dd077f85d2044f89ae2d8d60a37c0ec6cccbbf
2025-09-22 15:55:25 -07:00
Sam ZhouandFacebook GitHub Bot e4368154a5 Turn on react.ref_as_prop=experimental.store_ref_in_props
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82932016

fbshipit-source-id: a391bdc06eef60d3054b8440c4ccfbaf62bc931a
2025-09-22 14:46:56 -07:00
Vitali ZaidmanandFacebook GitHub Bot 4148746941 add disconnection message (#53883)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53883

Changelog: [General][Added] - new banner added to indicate that Fast Refresh has lost connection, and that the app needs to be restarted to reconnect

When HMR were getting disconnected, we were not giving any indication for the user.

This lead to situations were the connection is re-established, but HMR is still disconnected, which is unexpected for users.

Instead, raise a banner hinting the user to reload the app to reconnect.

Reviewed By: huntie

Differential Revision: D82726853

fbshipit-source-id: d5f264547b2af89e9dc2a9046d063efe1145d690
2025-09-22 13:25:42 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 34f7137cdc xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/text/RawTextShadowNode.cpp (#53874)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53874

Reviewed By: rshest

Differential Revision: D82804676

fbshipit-source-id: 90a426cfeb4fe264d523dafe56d2d83f1ed3da11
2025-09-22 12:35:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot 4d45e5987c Align Android with iOS in displaying HMR "refreshing" in color (#53846)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53846

Changelog: [Android][Added] - hot reload banner is now displayed in blue background like on iOS

iOS has a colorful "Refreshing..." banner:
 {F1982086204}

While android doesn't respect the color HMR asks it to set up for the banner:
 {F1982086218}

Reviewed By: cortinico

Differential Revision: D82726743

fbshipit-source-id: 4042851f5a8fd7d4f238f25e2d83f77144742de9
2025-09-22 11:41:38 -07:00
Andrew DatsenkoandFacebook GitHub Bot 2e4da10b52 fix coverage patterns (#53881)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53881

Changelog: [Internal]
To make sure that coverage is insertect correctly when run in different metro setup where patterns do not match perfectly, we need to add glob prefix

Reviewed By: sammy-SC

Differential Revision: D82968565

fbshipit-source-id: c2676ef4c774411938039fc5b98a3b953f6ec916
2025-09-22 10:48:45 -07:00
Riccardo CipolleschiandFacebook GitHub Bot b10faf6c02 Create the orchestration function to coordinate the creation of the hard links (#53642)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53642

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function that is used to orchestrate the helpers function defined in previous changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778457

fbshipit-source-id: b4ab8c902d6d7e6ca4b89ccbab75c1b5d84ce00a
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c6395eccd4 add function hard links for headers from ReactCodegen (#53640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53640

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function to create hard links to Codegen Headers so that other libraries can access them.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778450

fbshipit-source-id: e9f62f1c81ce8a635cc880007f495de342342a25
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 515c735347 Add function to create hard links for headers of the third-party dependencies (#53638)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53638

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ThirdPartyDependencies that React native and libraries might need to access.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778459

fbshipit-source-id: b8f9f207a0fbe2265e2861bf508516946905b472
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6807231120 Create function to create hardlink to header required to build React Native Core (#53635)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53635

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we did two things:
1. we move the helper functions to a headers-utils.js file (and the tests to the `headers-utils-test.js` file)
2. we added a function that coordinates the creation of the header links *and added tests for it)

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778464

fbshipit-source-id: fd8eb5a7af55db0a08c4d299c5470058d5424768
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot fc4a692b8e Create utility function to create the right folder structure for headers in the ReactCommon folder (#53631)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53631

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links for the ReactCommon folder that has a complex structure and complex mapping requirements

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778470

fbshipit-source-id: e0f4001048fcde0e988fc3a05b53efb1de70460b
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 8db93abf12 Create utility function to create the right folder structure for headers in the ReactApple folder (#53629)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53629

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding a function to properly create the header structure for the headers in ReactApple that requires a special case.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778471

fbshipit-source-id: 095d901dce139cf8221251f952f474be943a5ab3
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7cd3328b21 Create script to create hard links for headers from a source path to a destination path (#53620)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53620

## Context

One of the quirk of SwiftPM is that the packages has to have access to the headers they need. Usually this is solved by properly setting the header_search_path. However, in  SwiftPM, we are not allowed to use headers search path that escape the package itself (basically, header search path can't start with `../`).

To work around this limitation we are recreating the correct Header structure by using hardlinks to the actual headers.

## Changed

In this change we are adding an helper function that creates links between a source folder and a destination folder.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81778469

fbshipit-source-id: 3954bc219f32ea53744393a83f3179beeaca95b3
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 072b105f52 Add function to extract headers from a folder (#53737)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53737

This change add a utility function to extract headers (both .h and .hpp) from a folder. It also allow to exclude some specific folders (e.g.: `tests`, non supported platforms, ...)

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82205692

fbshipit-source-id: 4fa6dee2ae4790c583beb96a959b0c3045c7b50a
2025-09-22 10:14:58 -07:00
Riccardo CipolleschiandFacebook GitHub Bot c1827fcd04 Add simple function to handle symlinks (#53736)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53736

This change adds a simple function that manages symlinks. This is used through the stack of changes to avoid code repetition.

## Context
SwiftPM is very picky in how the header structure must be.
In order to preserve the import/include statements as much as possible when building from source, we can recreate the header structure in a temporary folder inside the react-native package using symlinks.

In this way, users can still modify the headers and build RNTester and HelloWorld using SwiftPM without breaking changes.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D82202860

fbshipit-source-id: 0baa348c84f966a2e1eeb85b008f8e653bffe96c
2025-09-22 10:14:58 -07:00
Nicola CortiandFacebook GitHub Bot 0915833f7c Follow-up from previous transform matrix fix (#53876)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53876

This is just a couple of small nits after D82836192

Changelog:
[Internal] [Changed] -

Reviewed By: javache

Differential Revision: D82953710

fbshipit-source-id: 1a98c54a110ee1a72225de331bfe2efa4e4225c0
2025-09-22 09:48:59 -07:00
Pieter De BaetsandFacebook GitHub Bot 57a1820c85 Remove unused RCTHermesInstance field (#53858)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53858

We only use static methods from `HermesInstance`

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82816061

fbshipit-source-id: 515dad2e8d6e0a6f6ac26f93d5a86aedf875f93e
2025-09-22 08:47:33 -07:00
Nick LefeverandFacebook GitHub Bot e1a6c38cc1 Fix overflow with Props 2.0 in horizonal scroll view (#53872)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53872

This diff fixes the mismatch between the overflow initial value between the horizontal scroll view component initialization and the React core props instance initial value by applying the same correction as for the vertical scroll view component.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919365

fbshipit-source-id: 70e40f56ffa3ea87fa74035c885608f633890610
2025-09-22 04:19:36 -07:00
Nick LefeverandFacebook GitHub Bot e314f6161a Fix scrollview overflow prop not set with Props 2.0 (#53871)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53871

The props defined in `YogaStylableProps` define the overflow to be set to `Overflow::Visible` by default.

The scroll view initialized the overflow setting to `Overflow.SCROLL`. This meant that Props 2.0 would only set the overflow prop if it was different from Visible, leading to the scroll view not being configured correctly when asking for the overflow to be visible.

This diff assigns the correct initial value to the scrollview overflow setting only when enabling Props 2.0 to avoid any unexpected behavior changes when not using Props 2.0.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D82919286

fbshipit-source-id: d5368500cc4504164d6fdf7cf60042a9d5792853
2025-09-22 04:19:36 -07:00
Nicola CortiandFacebook GitHub Bot ce243df972 Correctly implement transform: matrix with 2d matrices (#53860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53860

Fixes https://github.com/facebook/react-native/issues/53639

I've realized that our docs and validation logic states that we do support
3x3 matrixes (for 2d transforms). However they're not properly processed
as the values are just copied into a 4x4 matrix.

This can be verified by applying the 3x3 identity matrix on any transform.

I'm fixing it by correctly populating the 4x4 matrix getting the values from the 3x3 matrix in input.

Changelog:
[General] [Fixed] - 9-element (2d) transform matrix are not correctly working

Reviewed By: christophpurrer

Differential Revision: D82836192

fbshipit-source-id: 12029b37ffd8375fff48ea7f9386b849dfe96a62
2025-09-22 03:28:31 -07:00
David VaccaandFacebook GitHub Bot 23b2b99c4b Fix incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method (#53863)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53863

In this diff I'm fixing an incorrect validation of feature flags in DefaultNewArchitectureEntryPoint.loadWithFeatureFlags() method.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82841006

fbshipit-source-id: 6f50f2475255d7b841d9224bc8808119dcc68aec
2025-09-22 02:34:59 -07:00
Sam ZhouandFacebook GitHub Bot 5ef054921c Turn on react.ref_as_prop=experimental.store_ref_in_props_but_remove_ref_in_react_element_config in fbsource (#53870)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53870

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82913848

fbshipit-source-id: c23f564404143535622fab3133d092d1fb566711
2025-09-21 14:04:21 -07:00
Sam ZhouandFacebook GitHub Bot 71b7dd8519 Prepare createAnimatedComponent API for flow's upcoming better react 19 ref-as-prop support (#53869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53869

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, it should preserve the existing type behavior, since in the TS version, the ref prop will be excluded anyways: https://github.com/facebook/react-native/blob/a4d43290c82e8ad93f03b304a78cdf0eaf41fba1/packages/react-native/ReactNativeApi.d.ts#L1434

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82916014

fbshipit-source-id: 2e62aab493dcf6f8f5e382c0739060c88e6f7ed5
2025-09-21 10:49:53 -07:00
Sam ZhouandFacebook GitHub Bot 5b544c7cd8 Simplify some RN types (#53868)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53868

This is a prep step to enable better Flow support for react 19 ref-as-prop. While it causes changes in the ReactNativeApi.d.ts snapshot, this diff simply inlines what these `React.ElementRef` evaluates into.

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D82915646

fbshipit-source-id: 64179eac7dde91381361fb9f1053d58100d864c3
2025-09-21 10:49:53 -07:00
Alex HuntandFacebook GitHub Bot a4d43290c8 Tweak Dev Menu appearance for iOS 26 (#53844)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53844

Small UI tweaks that help when scanning more visually spread out alert actions on iOS 26.

- Use bold (iOS 26 style) alert title.
- Differentiate "Cancel" actions with red system style.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D82731784

fbshipit-source-id: 0a0215fc75a4832e742e22328d5e21eee3808972
2025-09-20 03:23:31 -07:00
Nikita LutsenkoandFacebook GitHub Bot 7fb90c3f1b jsi | Remove unnecessary semicolons. (#53864)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53864

Changelog: [Internal] Removed unnecessary semicolons, improving code quality.

Reviewed By: cortinico

Differential Revision: D82828986

fbshipit-source-id: aaafc332a1dc5944cb136bf6dd105d68c1c99e8d
2025-09-20 03:15:57 -07:00
Christoph PurrerandFacebook GitHub Bot 362ed179a8 Fix race condition between experimental_prefetchResources and surface stop (#53861)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53861

Changelog: [Internal]

The issue is a race condition in the React Native Fabric mounting system where `experimental_prefetchResources` is called on a `SurfaceMountingManager` after the surface has been stopped.

1.) `experimental_prefetchResources` is called
2.) Concurrently, `stopSurface()` *can be* called, which sets `mThemedReactContext = null`
3.) `experimental_prefetchResources` then tries to access `mThemedReactContext` via `Assertions.assertNotNull(mThemedReactContext)`
4.) Since `mThemedReactContext` is now `null`, the assertion fails and throws an AssertionError

The fix involves adding a guard to check if the surface is stopped before accessing `mThemedReactContext`

Follows existing patterns used by other methods in the same class

https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java#L201-L213

Reviewed By: lenaic

Differential Revision: D82842572

fbshipit-source-id: 723bad24a075efa219766b0e148080dd42d59fba
2025-09-19 17:27:14 -07:00
Pieter De BaetsandFacebook GitHub Bot fcbe4d1677 Split off MessageQueueThread header to separate target (#53857)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53857

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82625359

fbshipit-source-id: 7650dcd424299a21388c7bcf6c33c89b9f09171d
2025-09-19 14:02:47 -07:00
Christoph PurrerandFacebook GitHub Bot 390c9d30dc Update ## v0.82.0-rc.0 (#53847)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53847

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D82753924

fbshipit-source-id: a5a2036ccd74cc7f7dd463d82e96f156a4e309e2
2025-09-19 13:46:17 -07:00
Kræn HansenandFacebook GitHub Bot 0198c92c71 Export @react-native/typescript-config/strict shorthand (#53564)
Summary:
Extending a tsconfig seems simpler than adding `compilerOptions` with `customConditions`.

### Before

```jsonc
{
  "extends": "react-native/typescript-config",
  "compilerOptions": {
    // ...
    "customConditions": ["react-native-strict-api", "react-native"]
  }
}
```

### After

```jsonc
{
  "extends": "react-native/typescript-config/strict"
  // ...
}
```

## Changelog:

[GENERAL] [ADDED] - Add `react-native/typescript-config/strict` export enabling the `react-native-strict-api` custom condition.

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

Test Plan:
### `package.json`

```
{
  "name": "react-native-ts-test",
  "private": true,
  "version": "0.1.0",
  "scripts": {
    "build": "tsc --noEmit"
  },
  "devDependencies": {
    "react-native/typescript-config": "^0.81.1",
    "typescript": "^5.9.2",
    "jest": "^30.1.2"
  },
  "dependencies": {
    "react-native": "^0.81.1"
  }
}
```

### `tsconfig.json`

```
{
  "extends": "react-native/typescript-config/strict",
  "include": ["src/index.ts"]
}
```

### `src/index.ts`

```
import { View } from "react-native";
```

Run `npx resolution-explorer` and select "react-native from src/index.ts to node_modules/react-native/types_generated/index.d.ts" to verify the types are resolved correctly.

```
Explicitly specified module resolution kind: 'Bundler'.
Resolving in CJS mode with conditions 'import', 'types', 'react-native-strict-api'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/src/package.json' does not exist.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/package.json'.
Loading module 'react-native' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.
Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.
Directory '/Users/kraen.hansen/Repositories/react-native-ts-test/src/node_modules' does not exist, skipping all lookups in it.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/package.json'.
Entering conditional exports.
Matched 'exports' condition 'react-native-strict-api'.
Using 'exports' subpath '.' with target './types_generated/index.d.ts'.
File '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' exists - use it as a name resolution result.
'package.json' has a 'peerDependencies' field.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native'.
Failed to find peerDependency 'types/react'.
Found 'package.json' at '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react/package.json'.
Found peerDependency 'react' with '19.1.1' version.
Resolved under condition 'react-native-strict-api'.
Exiting conditional exports.
Resolving real path for '/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts', result
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts'.
======== Module name 'react-native' was successfully resolved to
'/Users/kraen.hansen/Repositories/react-native-ts-test/node_modules/react-native/types_generated/index.d.ts' with Package ID
'react-native/types_generated/index.d.ts@0.81.1+react@19.1.1'. ========
```

Reviewed By: robhogan

Differential Revision: D82791201

Pulled By: philIip

fbshipit-source-id: f58d3b8fcf3d7f18dd29eef18a3c8c0cb57d1d78
2025-09-19 13:28:31 -07:00
SimekandFacebook GitHub Bot 34cd61f0d5 fix C++ in-code docs comments to silence warnings (#53835)
Summary:
Address invalid C++ in-code docs comments to silence few warnings. Ref:
* https://www.doxygen.nl/manual/commands.html#cmdtparam

## 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][FIXED] - Address invalid C++ in-code docs comments to silence the warnings.

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

Test Plan: Building RNTester app locally does not output the warnings related to in-code docs comments.

Reviewed By: cortinico

Differential Revision: D82791099

Pulled By: philIip

fbshipit-source-id: 2f93bfd4cd303471b2c52fcdf74871e5dee8c06a
2025-09-19 13:12:23 -07:00
David VaccaandFacebook GitHub Bot e349009cb8 Refactor ReactNativeNewArchitectureFeatureFlagsDefaults to remove legacy architecture configuration (#53791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53791

I'm removing parameter to configure new architecture in ReactNativeNewArchitectureFeatureFlagsDefaults because the new architecture is enabled by default everywhere.

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241552

fbshipit-source-id: 9c5cee4befc914d95b84b01325485923e17ff6da
2025-09-19 13:01:08 -07:00
David VaccaandFacebook GitHub Bot f847496749 Refactor ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android to enable new arch (#53790)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53790

New architecture should we enabled by default everywhere, Stable releases should use new arch now

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82241551

fbshipit-source-id: 2a1bf14f2f1da6e441a58b083ca5a55618eec256
2025-09-19 13:01:08 -07:00
Sam ZhouandFacebook GitHub Bot 2590cd739a Deploy 0.284.0 to xplat
Summary:
[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82786580

fbshipit-source-id: 8caa7802025004fce6cb5067c191b681087cb979
2025-09-19 07:33:42 -07:00
Sam ZhouandFacebook GitHub Bot 7ba64ca0f1 Pre-suppress errors for improved typing of Array.{includes,indexOf,lastIndexOf} in xplat
Summary:
In Flow 0.284, we will have a stricter version of `Array<T>.includes`. Instead of accepting `mixed`, we will only accept `T` to help catch logical errors. We did the same for `Array.indexOf` and `Array.lastIndexOf` as well.

This diff pre-suppresses newly discovered errors in part of the codebase.

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D82784398

fbshipit-source-id: 6cb11809844f964e0604d33b9f7a3989074cd1cc
2025-09-19 07:17:14 -07:00
Ruslan LesiutinandFacebook GitHub Bot 0e77015a85 Fix unkown name for Timestamps on Timings track (#53854)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53854

# Changelog: [Internal]

This fixes the unkown names message for TimeStamps on Timings track

Reviewed By: rubennorte

Differential Revision: D82812849

fbshipit-source-id: 91101998b4b7befa08bf0e45cae494765d5f2b6d
2025-09-19 06:53:23 -07:00
Ruslan LesiutinandFacebook GitHub Bot 1b5e8e63b6 Manually preserve ordering for Scheduler and Components tracks (#53853)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53853

# Changelog: [Internal]

Chrome DevTools orders tracks based on the timestamp of the first entry.

For React on Web we emit a few entries to establish the ordering:
https://github.com/facebook/react/blob/6eda534718d09a26d58d65c0a376e05d7e2a3358/packages/react-reconciler/src/ReactFiberPerformanceTrack.js#L57-L96

We are doing the same thing here, but in C++.

Reviewed By: rubennorte

Differential Revision: D82811889

fbshipit-source-id: cfc4060de05a3d74e240f019dbeaa910fa93eb0b
2025-09-19 06:53:23 -07:00
Tim YungandFacebook GitHub Bot 03d9f34a82 RN: Deprecate InteractionManager (#53832)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53832

Deprecates `InteractionManager` by adding a warning when it is imported.

Changelog:
[General][Changed] - InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`.

Reviewed By: javache

Differential Revision: D82704809

fbshipit-source-id: 99474cd7949abfe323c366b9ab8d8fc195578395
2025-09-19 05:10:47 -07:00
Tim YungandFacebook GitHub Bot 4a1388268d RN: Remove References to InteractionManager (#53830)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53830

Now that `InteractionManager` is deprecated (and no-ops), this removes all remaining references to it — in `Animated` and `PanResponder` — from the React Native repository.

Changelog:
[Internal]

Reviewed By: javache

Differential Revision: D82690242

fbshipit-source-id: d101d47d1f8640f70e2d199492d4345b63663251
2025-09-19 05:10:47 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot b821bc3aba Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D82813624

fbshipit-source-id: 51fe7a84af2d4f2da7027e1649ec038517f9d561
2025-09-19 04:53:33 -07:00
Moti ZilbermanandFacebook GitHub Bot e16b6470e4 Backout D82236159: [RN][debugger-shell] Implement saved window positioning per target (#53816)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53816

Changelog: [Internal]

D82236159 introduced the first `node_modules` dependency in the Electron part of `react-native/debugger-shell`. This is not currently handled correctly by the build script, so this resulted in an instacrashing binary.

I'm temporarily backing out D82236159 until we have a proper fix for the build script.

Reviewed By: robhogan

Differential Revision: D82632937

fbshipit-source-id: 6c7c182e2a7c89e6ea2761096dcc426dbf2ae5cb
2025-09-19 02:38:00 -07:00
Alex HuntandFacebook GitHub Bot cb7453fb9f Improve Network trace event field coverage (#53840)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53840

After this diff, successful network events are displayed as fully hydrated timespans in the Performance panel network track, with all metadata needed to usefully populate the UI.

**Changes**

Adds:
- `"ResourceFinish"`: `encodedDataLength`, `decodedBodyLength`
- `"ResourceReceiveResponse"`: Populates `data.timing` members, which enables *"Request sent and waiting"* to be rendered correctly in the timeline.

Removes:

- `"ResourceWillSendRequest"` events — very rarely emitted by Chrome and are extraneous for our use case.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82636798

fbshipit-source-id: a4b0f0671b97aaadc279ac56d39fee0c95d4ddc7
2025-09-18 14:41:16 -07:00
nishan (o^▽^o)andFacebook GitHub Bot c8e5f9766b fix(iOS): boxShadow + overflow hidden combination affecting pointer event box-none and scale transform. (#52413)
Summary:
This issue is only reproducible with combination of `overflow: hidden` and `boxShadow` i.e. when a [container view](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L799) is added to the hierarchy.

### Case 1:

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)", overflow: "hidden" }}
  onPress={() => {
    alert("Tapped");
  }}
/>
```

Here the view has `box-none` but it will still trigger the press event because this [line](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L658) returns the `_containerView` as `hitView` and this condition gets [fullfilled](https://github.com/facebook/react-native/blob/2ce7eab5f998788ffa8346b63cc4901d026456ba/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L676) (since it is not self). To fix this issue we should iterate on `self.currentContainerView.subviews`.

### Case 2:

Transform scale clipping child view.

```jsx
<Pressable
  pointerEvents="box-none"
  style={{ width: 300, height: 300, overflow: "hidden",
    transform: [
      { scale: 0.5 },
    ],
    boxShadow: "0 0 100px 0 rgba(0, 0, 0, 0.5)",
  }}
  onPress={() => {
    alert("parent view");
  }}
>
  <Pressable
    style={{
      position: "absolute",
      bottom: 0,
      right: 0,
      backgroundColor: "blue",
      height: 50,
      width: 100,
    }}
    onPress={() => {
      alert("child view");
    }}
  >
    <Text>Press me</Text>
  </Pressable>
</Pressable>;
```

The above style hides the child view on iOS whereas it is visible on android.

| iOS | Android |
   |---|---|
   | <img src="https://github.com/user-attachments/assets/14713ec9-1ae7-4425-9348-946d507188e8" width="200px" /> | <img src="https://github.com/user-attachments/assets/0f6e2368-037d-4b03-8a85-8a08f1578ff6" width="200px" /> |

This happens because `containerView` uses `self.frame` property which gets mutated due to scale transform. So containerView becomes `actualSize * scale * scale` instead of `actualSize * scale` and ends up clipping child views because of overflow hidden. Please checkout the layout hierarchy in the below screenshot. To fix it we need to use `self.bounds` instead of `self.frame` when setting the frame for container.

<img src="https://github.com/user-attachments/assets/9ce41756-f41f-4782-bfc9-b0c281f314b7" width="300px" />

## Changelog:

[IOS] [FIXED] - boxShadow + overflow hidden combination interfering with pointerEvents and transform scale.

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

Test Plan:
Test above example snippets and pointer events examples in RNTester.

cc - joevilches

Reviewed By: cortinico, jorge-cab

Differential Revision: D77872110

Pulled By: joevilches

fbshipit-source-id: e9693c79b47379531510607921ffaa6d6cc5c17b
2025-09-18 14:06:00 -07:00
Nicola CortiandFacebook GitHub Bot 1c5e0ffd9f Do not reset the native artifacts version to 1000.0.0 on release branches (#53817)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53817

What is currently happening, is that the various commits on the release branches like `0.82-stable` are resetting the version of native artifacts to `1000.0.0-<SHA>`.

The reason is that during the `test-all` workflow, we pass the `dry-run` as release type.
That's to prevent the various tools from calling `npm publish` and so on.

The problem is that on the releases branches, the version was already set at branch cut time.
Therefore, we see the version 1000.0.0 reappearing during Android E2E test in the emulator. Similary this is also affecting iOS prebuilds so I'm attempting to fix it here.

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82553599

fbshipit-source-id: 31a52e7df036e700663b3d3dd677973a7a210a30
2025-09-18 10:53:25 -07:00
Alex HuntandFacebook GitHub Bot 5b8827939d Support additional PerformanceResourceTiming fields (#53815)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53815

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D82561777

fbshipit-source-id: f387c4bca2112111e736433af90ada16efd14e8b
2025-09-18 09:57:25 -07:00
Andrew DatsenkoandFacebook GitHub Bot e97ef8f1fb Fix dotslash issue in OD (#53842)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53842

Changelog: [Internal]
There is a conflict between dotslash in node_modules and in OD it does not invoke buck2

Reviewed By: javache

Differential Revision: D82724326

fbshipit-source-id: c90cab58818e0245f8763b729c7e5432735eb05e
2025-09-18 07:39:22 -07:00
Nick LefeverandFacebook GitHub Bot e6390703e7 Fix scroll view FPS listener reset on init (#53838)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53838

The FPS listener is being assigned to all scroll view instances by the scroll view manager. This listener should not be reset when the view is being recycled and should stay assigned at all times.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D82720151

fbshipit-source-id: a2a37bad93efaa6e435725adf16c9ad1b4207ba0
2025-09-18 05:35:09 -07:00
generatedunixname537391475639613andFacebook GitHub Bot aacb9898f2 xplat/js/react-native-github/packages/react-native/ReactCommon/react/utils/TemplateStringLiteral.h (#53836)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53836

Reviewed By: rshest

Differential Revision: D82428779

fbshipit-source-id: 2716784a85c4885fe438348666b4772c2da3c400
2025-09-18 04:56:38 -07:00
Nicola CortiandFacebook GitHub Bot 460394e4b8 Turn on enableSwiftUIBasedFilters in the experimental channel (#53794)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53794

Basically what the title says. This is needed by Expo for experimetation.

Changelog:
[Internal] [Changed] -

Reviewed By: joevilches

Differential Revision: D82530292

fbshipit-source-id: 82ce8b1e8fc8d954cc04ec456ad80f769aedafe7
2025-09-18 04:34:47 -07:00
Nicola CortiandFacebook GitHub Bot 968ec9e093 Unpin version from react-native-android in run_fantom_tests (#53795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53795

I've published another docker image that should now work and unblock `run_fantom_tests`
so we don't need to pin the version to `v18.0` anymore:
https://github.com/react-native-community/docker-android

Changelog:
[Internal] [Changed] -

Reviewed By: huntie

Differential Revision: D82532516

fbshipit-source-id: 980c2feb053f9d096e70f37bb690e18cc8b87dc0
2025-09-18 04:12:50 -07:00
Alex HuntandFacebook GitHub Bot 6ef351b3ce Move trace event handling into NetworkReporter (#53776)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53776

Refactor and improve how we emit CDP trace events for network requests.

Key changes:
- Split up `PerformanceTracer` methods into discrete trace events.
- Move event calls out of `PerformanceEntryReporter` (upwards) into `NetworkReporter`. This now:
    - Aligns better with the matching source `NetworkReporter` events.
    - Removes metadata pieces from `PerformanceEntryReporter` that weren't part of the Web `PerformanceResourceTiming` API.
- Populate additional fields on `ResourceReceiveResponse`.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82433225

fbshipit-source-id: 4fce219f0c86a7257b8df250ef9f2b4ec8bd8de3
2025-09-18 03:01:22 -07:00
Jakub PiaseckiandFacebook GitHub Bot 674fb77d93 Update coordinates for remote artifacts of Hermes V1 (#53822)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53822

Changelog: [GENERAL][FIXED] - Fixed coordinates for Hermes V1 artifacts

Reviewed By: cortinico

Differential Revision: D82639319

fbshipit-source-id: becfab3248f2314af97549eb94feb27b19f5d1af
2025-09-18 01:26:08 -07:00
Devan BuggayandFacebook GitHub Bot 14458d8699 Add focus/blur commands to View (#53828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53828

Adds focus and blur commands to Android views.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82644681

fbshipit-source-id: 96fa6370e177c91742d285b0b158b77447d105f6
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 2945fa6e0e Hook up focus/blur events (#53827)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53827

Hook up focus/blur events to view.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146291

fbshipit-source-id: 3cb90d22c00d067099c4c6fac734f27030d87639
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 07b5802ee5 focus/blur event emission (#53826)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53826

Wires up focus/blur events to the base event emitter, gated by enabledImperativeFocus feature flag.

https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146275

fbshipit-source-id: 4b7bb1336f74bb0de2d7ecf0737dd63067bd558f
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 3e5838086f Add focus/blur commands to View (#53825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53825

Adds focus/blur commands to View on iOS.
https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82146249

fbshipit-source-id: 582f448f4d7525560ef74a23c0762e86d74550d4
2025-09-18 00:36:55 -07:00
Devan BuggayandFacebook GitHub Bot 596dece4c0 enableImperativeFocus feature flag (#53824)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53824

Creates a new feature flag to control focus/blur commands and event emissions for arbitrary views https://docs.google.com/document/d/1L4ViBnXq5hw858VoecZPmJE2llOB97Tjs2VtJ7RHlNI/edit?tab=t.0#heading=h.azm4b33t75uk

Changelog: [Internal]

Reviewed By: Abbondanzo

Differential Revision: D82146210

fbshipit-source-id: 59f3e6c8740b0c006f8930541205aa15192a9f59
2025-09-18 00:36:55 -07:00
Sam ZhouandFacebook GitHub Bot 4d2e38edd9 Deploy 0.283.0 to xplat (#53820)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53820

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82636194

fbshipit-source-id: 620016043bed481e43d0d4216280517c2890bfd7
2025-09-17 09:29:52 -07:00
React Native BotandFacebook GitHub Bot 926af3bc36 Add changelog for v0.82.0-rc.3 (#53813)
Summary:
Add Changelog for 0.82.0-rc.3

## Changelog:
[Internal] - Add Changelog for 0.82.0-rc.3

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D82628336

Pulled By: vzaidman

fbshipit-source-id: 2ade8a48981a70e571e7a8db0e15af0c722f82ba
2025-09-17 06:03:11 -07:00
Vitali ZaidmanandFacebook GitHub Bot de4e01bcc6 add the nodejs type for process.memoryUsage.rss() (#53805)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53805

Changelog: [Internal]

https://nodejs.org/docs/latest-v24.x/api/process.html#processmemoryusagerss

Reviewed By: huntie

Differential Revision: D82550739

fbshipit-source-id: 11026fb82608e004b10426776592f22e67eb0720
2025-09-17 01:24:59 -07:00
Marco WangandFacebook GitHub Bot 7d73d39535 Deploy 0.282.0 to xplat (#53810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53810

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D82597378

fbshipit-source-id: 40d601956d9f69ec8d68a2c324bb3449ee27c931
2025-09-16 23:32:23 -07:00
Eric RozellandFacebook GitHub Bot eba38b831c Fix DefaultNewArchitectureEntryPoint config validation (#53807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53807

We need to read the values off feature flags before checking them.

## Changelog
[Internal]

Reviewed By: javache

Differential Revision: D82572898

fbshipit-source-id: 09fbc09570c78b41d9c25fb03c5557e390da7cae
2025-09-16 20:20:14 -07:00
David VaccaandFacebook GitHub Bot 18cb4edfa7 Ensure legacy architecture can't be initialized in Android (#53806)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53806

The Legacy architecture of React Native is not supported anymore, let's ensure nobody can initialize it anymore

changelog: [internal] internal

Reviewed By: cortinico

Differential Revision: D82465004

fbshipit-source-id: 099764fb59d906b11cf6ad0cc6208f56df029d19
2025-09-16 17:33:14 -07:00
Sam ZhouandFacebook GitHub Bot dadd7cdaf7 Make ref prop optional in xplat: 1/n (#53801)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53801

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D82507711

fbshipit-source-id: 27c8004c0475765705a01c0b6afb274dab443a38
2025-09-16 09:10:22 -07:00
Tom ScallonandFacebook GitHub Bot 4308185b64 Allow EventEmitters to be reported as optional (#53804)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53804

## Changelog:

[General] [Fixed] - Allow `EventEmitter`s to be optional (for push safety)

Reviewed By: javache

Differential Revision: D82509571

fbshipit-source-id: 801a22b10b2709968009527130cfa890d30a4f3a
2025-09-16 08:59:12 -07:00
Nicola CortiandFacebook GitHub Bot d0d08e4554 Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint (#53780)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53780

This is a commit we're going to pick in 0.82 as we want to make sure users cannot invoke `load()`
from `DefaultNewArchitectureEntryPoint` with flags that are not true,true,true.

Changelog:
[Android] [Changed] - Runtime check that NewArchitecture is enabled in DefaultNewArchitectureEntryPoint

Reviewed By: mdvacca

Differential Revision: D82456975

fbshipit-source-id: 749996a3491913cfe400173608218077c3ffbc10
2025-09-16 07:30:55 -07:00
Nicola CortiandFacebook GitHub Bot 4858a0f469 Mark ReactTextInlineImageShadowNode as @LegacyArchitecture (#53735)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53735

This class should have been marked as LegacyArchitecture back then but was forgotten.
I'm doing it now.

Changelog:
[Internal] -

Reviewed By: javache

Differential Revision: D82219780

fbshipit-source-id: 5119b7469733d5d2d4b16e976b09231ad5f71f5f
2025-09-16 07:23:51 -07:00
Vitali ZaidmanandFacebook GitHub Bot f93506fb23 Fix typo in CHANGELOG.md (#53796)
Summary:
Fix typo in CHANGELOG.md

Changelog: [INTERNAL]

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

Test Plan: Fix typo in CHANGELOG.md

Reviewed By: fabriziocucci

Differential Revision: D82535096

Pulled By: vzaidman

fbshipit-source-id: fe93adf86ff48f0095312edbfce7b3ae6984198a
2025-09-16 06:49:03 -07:00
Moti ZilbermanandFacebook GitHub Bot f4aef39563 Revert D82459089: Update React Native DevTools binaries
Differential Revision:
D82459089

Original commit changeset: 3ccf7a1f07da

Original Phabricator Diff: D82459089

fbshipit-source-id: 9ab8827bfb534e5236c37a8a47206f891741a8e0
2025-09-16 05:33:44 -07:00
Ruslan LesiutinandFacebook GitHub Bot af7fc1b424 Update debugger-frontend from 5a792db...8b84a77 (#53789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53789

Changelog: [Internal] - Update `react-native/debugger-frontend` from 5a792db...8b84a77

Resyncs `react-native/debugger-frontend` from GitHub - see `rn-chrome-devtools-frontend` [changelog](https://github.com/facebook/react-native-devtools-frontend/compare/5a792db1225adda206313e9bf751198a1ca7851a...8b84a77b2c82c670886ef064dfc92d6bce83e579).

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [8b84a77b2](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T17:28:39+01:00 | [fix: avoid race conditions when fetching background trace (#206)](https://github.com/facebook/react-native-devtools-frontend/commit/8b84a77b2) |
| [95bd36ce9](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-09-15T14:45:07+01:00 | [feat: use application display name for trace title (#207)](https://github.com/facebook/react-native-devtools-frontend/commit/95bd36ce9) |

Reviewed By: huntie

Differential Revision: D82464061

fbshipit-source-id: c33db7a535a148f8316730009580aef00afe04f1
2025-09-16 05:18:00 -07:00
Zeya PengandFacebook GitHub Bot 8d03e63265 Revert D82461457: Clean up batchingControlledByJS in NativeAnimated kotlin
Differential Revision:
D82461457

Original commit changeset: a1208720b83e

Original Phabricator Diff: D82461457

fbshipit-source-id: 99416873f66c45ccf61614d3e356e6a777bbad6b
2025-09-16 03:39:45 -07:00
Alex HuntandFacebook GitHub Bot fae11d58bd Replace trivial uses of string_view (#53775)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53775

A refactor to align our C++ code style within `jsinpector-modern`.

We prefer `std::string` and `const std::string&` everywhere (see [C++ Core Guidelines F.15](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-conventional)), except for when we are handing potentially very large strings — in which case we must use `string_view` all the way down.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82446939

fbshipit-source-id: 4b1c43068d1339f4b4a4c7eb06b392d0b0f624e1
2025-09-16 03:17:57 -07:00
Alex HuntandFacebook GitHub Bot 6eb456bc4e Fix data race condition in NetworkHandler (#53788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53788

Fix thread safety issue due to member variable  in `NetworkHandler` singleton without mutex.

Also intend to un-singleton this class in the imminent future.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82460574

fbshipit-source-id: c0c614f8f1bb5ffba22872ae5717fbd2ca01f2e9
2025-09-16 03:03:06 -07:00
Nicola CortiandFacebook GitHub Bot 27630d3106 Remove unused --otp property from release infrastructure (#53779)
Summary:
The `--otp` flag is completely unused now, therefore it can be removed.
We don't pass the `NPM_CONFIG_OTP` env variable either as this was done back in the days of CircleCI so I'm cleaning this up.

## Changelog:

[INTERNAL] - Remove unused --otp property from release infrastructure

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

Test Plan: CI

Reviewed By: lunaleaps

Differential Revision: D82453539

Pulled By: cortinico

fbshipit-source-id: 84a6b82a037c754165c21e17976dc534d9a7ba4c
2025-09-16 02:52:58 -07:00
Pieter De BaetsandFacebook GitHub Bot 96c33a8b0b Update ws to 7.5.10 (#53781)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53781

Fixes deprecation warning printed when starting various `js1` tools

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D82449982

fbshipit-source-id: 852b5a6980badef146b4e194434f2f9c6dd9a1d5
2025-09-16 02:51:06 -07:00
Zeya PengandFacebook GitHub Bot c9dcd64ed5 Clean up batchingControlledByJS in NativeAnimated kotlin (#53793)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53793

## Changelog:

[Android] [Deprecated] - Clean up batchingControlledByJS in NativeAnimated kotlin

`start/finishOperationBatch` will no longer be called on kotlin NativeAnimated since D78005971 (https://github.com/facebook/react-native/pull/52521), so `batchingControlledByJS` will remain false. Cleaning up some logic and TODO comments there

this feature was added in D23010844

Reviewed By: christophpurrer

Differential Revision: D82461457

fbshipit-source-id: a1208720b83e614c2a5f994ec1a5005189c5f197
2025-09-16 00:44:23 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 15daa27871 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/view/LayoutConformanceShadowNode.h (#53772)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53772

Reviewed By: javache

Differential Revision: D82292073

fbshipit-source-id: 3a3f8e54b4217c8ce9432520e04c4f232b538687
2025-09-15 16:11:00 -07:00
nishan (o^▽^o)andFacebook GitHub Bot b365e26593 feat(iOS) - blur filter using SwiftUI (#52495)
Summary:
As per the discussion on the previous [PR thread](https://github.com/facebook/react-native/pull/52028#issuecomment-2979481948), this PR uses `SwiftUI` to implement blur filter on iOS.

## Approach:

To implement blur filter on iOS, we have two options:

1. Use `CAFilter` (private API, app can get rejected/API can break). Earlier [PR](https://github.com/facebook/react-native/pull/52028) was using that approach. Thanks to Nick for suggesting SwiftUI API.

2. Use `SwiftUI`. Wrap the view in a SwiftUI view and apply [blur](https://developer.apple.com/documentation/swiftui/view/blur(radius:opaque:)). This PR builds on top of that approach. This also enables a way to add `SwiftUI` only features like this one. Additional filters (grayscale, saturate, contrast, hueRotate) can also be added.

There are a few ways we can implement the SwiftUI approach:

1. Create a new `RCTSwiftUIComponentView` -> do style flattening in View -> check if `filter` is present and conditionally render the `RCTSwiftUIComponentView` on iOS, wrap children with a `SwiftUI` view. Tradeoff with this approach is that it adds `StyleSheet.flatten` overhead on JS side.
2. Add a `SwiftUI` container view inside of `RCTViewComponentView`. Tradeoff with this approach is that it complicates `RCTViewComponentView` a bit.

I decided to go with **2** to avoid the flattening tradeoff and try to minimize complicating `RCTViewComponentView`. it only adds the wrapper if it's required and removes if not (in this PR, blur filter style will add the wrapper, it will get removed if blur filter styling gets removed). It uses the existing container view pattern.

## Changelog:
[IOS][ADDED] - Filter blur

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

Test Plan:
Test filter blur example on iOS. SwiftUI view should be added to the hierarchy.

<img src="https://github.com/user-attachments/assets/742539f4-a96d-45f4-94ba-5eb588d0ad5a" width="300px" />

## Aside:

- This PR also adds a new swift podspec. Creating a new podspec felt the right approach as adding swift in existing ones were adding some complexity. But open for changes here. Also, need some eyes on the podspec configs. cc - chrfalch  🙏   this might also affect the SPM migration.
- Unrelated: Existing brightness filter has some inconsistency compared to android and web, it uses [self.layer.opacity](https://github.com/facebook/react-native/blob/6892dde36373bbef2d0afe535ae818b1a7164f08/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm#L1008) so transparent background color do not blend well unless the view has an opacity. One solution would be to calculate true background color by using brightness or else use the `SwiftUI`'s [brightness](https://developer.apple.com/documentation/swiftui/view/brightness(_:)), which would be cleaner imo (tested and it works).

Reviewed By: cipolleschi

Differential Revision: D79666764

Pulled By: joevilches

fbshipit-source-id: 05e43d75ce7b6f25b67b4eed632524a559ea1c2e
2025-09-15 15:04:54 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 7e85653c18 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt (#53750)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53750

Reviewed By: cortinico

Differential Revision: D82293987

fbshipit-source-id: 46bf93c7b8a2bf48a2246d9f5fc4ab8c1163badf
2025-09-15 13:04:17 -07:00
Ruslan LesiutinandFacebook GitHub Bot 01b4749f6a Emit stashed trace to an active Fusebox client (#53771)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53771

# Changelog: [Internal]

Instead of opening DevTools every time we emit a background trace, we are going to check if there is an active session with Fusebox client and will send it to the first one registered.

Reviewed By: huntie

Differential Revision: D82321146

fbshipit-source-id: 46b4d090ae9a6f8b4fc98181b303ff552c561eb8
2025-09-15 12:45:53 -07:00
Ruslan LesiutinandFacebook GitHub Bot 1b6d3c9ce1 refactor: emit the trace recoding on ReactNativeApplication domain initialization (#53760)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53760

# Changelog: [Internal]

This is a different approach from the one that I've introduced initially in [1].

This saves us from the scenario, where any local session could snatch the stashed trace recording. For example, if some session was created for a Runtime binding right after we've stashed the trace and before initializing real CDP session with the Frontend.

Reviewed By: huntie

Differential Revision: D82316584

fbshipit-source-id: 806a0f6dbdb4e4e928ce33af228cae86d43772e9
2025-09-15 12:45:53 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot fedad125bf Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D82459089

fbshipit-source-id: 3ccf7a1f07da7e79732c785afda1b938ee585ea6
2025-09-15 11:54:30 -07:00
Pieter De BaetsandFacebook GitHub Bot 64b30a9376 Fix newarch ignoring defaultfonthandler (#53755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53755

Changelog: [iOS][Fixed] Make `RCTSetDefaultFontHandler` compatible with the new arch, and add a more powerful version as `RCTSetDefaultFontResolver`

Reviewed By: fkgozali

Differential Revision: D82207676

fbshipit-source-id: eeeaf708491de9156ef4f1e045864e4322213902
2025-09-15 11:31:30 -07:00
ismarbesicandFacebook GitHub Bot 07da2ff3e1 feat(ios): support condensed system font on fabric (#52259)
Summary:
This PR adds support for using the condensed system font on iOS when passing "SystemCondensed" as fontFamily. This behavior existed in the old architecture but was never ported to the new one, see [RCTFont.mm](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Views/RCTFont.mm#L434) as reference. Fixes https://github.com/facebook/react-native/issues/52258.

## Changelog:

[IOS] [ADDED] - Add support for condensed system font when using the new react native architecture.

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

Test Plan:
Before:
<img width="275" src="https://github.com/user-attachments/assets/8744a5ae-252c-46db-b5f9-b803f3e1c671" />

After:
<img width="275" src="https://github.com/user-attachments/assets/69ec27a3-5c9a-46e3-a80a-0e02b76d8813" />

Reviewed By: cortinico

Differential Revision: D82208140

Pulled By: javache

fbshipit-source-id: b23a97c94bf45144c3f0860c30e35cae88c7dc2f
2025-09-15 11:31:30 -07:00
Alex HuntandFacebook GitHub Bot 90ac3ac7bd Expose unstable_NativeText and unstable_NativeView components (#53777)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53777

Expose `unstable_NativeText` and `unstable_NativeView` components as root exports of the `react-native` package.

These are exposed as `unstable_` APIs which have no semver guarantee.

**Motivation**

There is significant community interest / dependance on the currently private `TextNativeComponent` and `ViewNativeComponent` deep imports, to access the faster-performing inner versions of these UI components.

Using `<Text>` and `<View>`, while recommended and stable, has led to measurable performance overhead in some apps when compared with these `<Native*>` counterparts.

Notably, these APIs are also referenced by low-level libraries such as React Strict DOM.

I am proposing this change in order to:
- Unblock libraries which safely use these.
- Meet users where they are at.
- Unblock us from enabling the Strict TypeScript API (no deep imports).

References:

- https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13452047
- https://javascript.plainenglish.io/optimizing-text-component-rendering-in-react-native-b9d3565659d9
- https://github.com/search?type=code&q=react-native%2FLibraries%2FText%2FTextNativeComponent

**Ideal future state**

We are exposing these as unstable APIs because they should not be part of React Native's final API. The ideal end state is we improve the regular `<Text>` and `<View>` components to eliminate performance overhead and the need to access any lower level API.

Changelog:
[General][Added] - `unstable_NativeText` and `unstable_NativeView` are now exported from the `react-native` package

Reviewed By: javache

Differential Revision: D81588145

fbshipit-source-id: 2ea9b7f822286de85f49607944c6a484d1fcf242
2025-09-15 10:55:55 -07:00
Alex HuntandFacebook GitHub Bot dba8dbdeeb Implement support for Network trace events (#53761)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53761

Updates `NetworkReporter` and `PerformanceEntryReporter` to populate (minimal) `"ResourceSendRequest"` and `"ResourceFinished"` events when a CDP performance trace is active. This allows the Chrome DevTools Performance panel to display the "Network" track.

**Notes**

- The trace events that Chrome requires need extra fields which aren't present on `PerformanceResourceTiming`, hence the new + optional `devtoolsRequestId`, `requestMethod`, `resourceType` params. We only populate these in debug builds.

**Limitations**

- We emit a *complete trace event set* within `reportResourceTiming`, implementing basic initial support in the Performance panel Network track. This means 1/ either all/no events are sent for a given request (rather than incrementally), 2/ we aren't yet handling failed/cancelled requests in this pipeline.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82212362

fbshipit-source-id: 4c6d5d2510cc98ddc819a2778222b835411295c8
2025-09-15 07:45:32 -07:00
Jakub PiaseckiandFacebook GitHub Bot 0caf8e70d5 Add dependency on hermes-compiler (#53773)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53773

Changelog: [GENERAL][ADDED] - Added a dependency on hermes-compiler

Reviewed By: cortinico

Differential Revision: D82437752

fbshipit-source-id: 3b2d92b765f3a5ba949363ce7656e936403a1155
2025-09-15 06:16:25 -07:00
Luna WeiandFacebook GitHub Bot 56e5dff73f Hysteresis window for VirtualViewExperimental (#53765)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53765

Changelog: [Internal] Introduce hysteresis window for experimental VirtualView

Reviewed By: yungsters

Differential Revision: D82354142

fbshipit-source-id: 13ec0e3a46930d3bea0ea67060c5f0e1c137dec1
2025-09-13 21:41:49 -07:00
Luna WeiandFacebook GitHub Bot 4f20e4d0fc Subview clipping for VirtualViewExperiment (#53759)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53759

Changelog: [Internal] - Enable subview clipping for experimental version of VirtualView

Reviewed By: mdvacca

Differential Revision: D82313841

fbshipit-source-id: c6726fd5f443a55ec47c93ef13092fe8bb9297e0
2025-09-13 21:41:49 -07:00
Alex HuntandFacebook GitHub Bot 09a7e0a0fc Restore NOT_FOCUSABLE flag on Perf Monitor overlay (#53754)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53754

Fix following D82302063.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82311593

fbshipit-source-id: 07305c8d3fdbd9199662e20a813ccfbf46e6491b
2025-09-13 06:23:56 -07:00
David VaccaandFacebook GitHub Bot 4fb42c84d8 Delete ScreenshotTestsManagerModule (#53746)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53746

ScreenshotTestsManagerModule and ReactAppScreenshotTestActivity are not in use anymore, let's delete them

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D82249453

fbshipit-source-id: 73b0f2ef2e9a5370057c07c3bee03f9c0793d61a
2025-09-12 11:43:51 -07:00
generatedunixname89002005287564andFacebook GitHub Bot ebe51d6ce8 Fix CQS signal readability-static-accessed-through-instance in xplat/js/react-native-github/packages (#53756)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53756

Reviewed By: javache

Differential Revision: D82289100

fbshipit-source-id: 432d9cdf4116aadbd6f21e8fdb994a91a163bfd5
2025-09-12 10:18:49 -07:00
vladandFacebook GitHub Bot 81bbbe3c45 Fix deprecation message (#53751)
Summary:
This pull request fixes a small error in the deprecation message for `ReactContextBaseJavaModule#getCurrentActivity()`, where the reference to `getReactApplicationContext().getCurrentActivity()` contained a syntax error.

## Changelog:

[ANDROID] [FIXED] - Correct deprecation message for `ReactContextBaseJavaModule#getCurrentActivity()`

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

Reviewed By: javache

Differential Revision: D82302032

Pulled By: cortinico

fbshipit-source-id: 130991ef514663223165c30fccb920ce87403148
2025-09-12 09:11:04 -07:00
Alex HuntandFacebook GitHub Bot 35f6ed1146 Update SectionList to accept React elements for separators (#53599)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53599

Runtime and types fix for the `ItemSeparatorComponent` prop on `virtualized-list` components (`FlatList`, `SectionList`, `VirtualizedList`).

- Docs source, where this prop (adjacent to other `*Component` props) is documented as accepting elements: https://reactnative.dev/docs/virtualizedlist#itemseparatorcomponent.
- Existing runtime behaviour matching this definition: https://github.com/facebook/react-native/blob/8d33e1c205b12fe27f4319e6566bb0c088197810/packages/virtualized-lists/Lists/VirtualizedListCellRenderer.js#L197-L203

**Changes**

- Update Flow, manual TS type defs.
- Align runtime behaviour in `VirtualizedSectionList` to add matching `React.isValidElement()` behaviour.

Resolves https://github.com/facebook/react-native/issues/53531.

Changelog:
[General][Fixed] - The `ItemSeparatorComponent` prop on list components now accepts a React element as well as a component function.

Reviewed By: cortinico

Differential Revision: D81675423

fbshipit-source-id: 3eed93b1bea89554988d6e20fa61b72e17be55df
2025-09-12 07:54:04 -07:00
Nicola CortiandFacebook GitHub Bot f59a6f9508 Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null (#53752)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53752

Currently we `Objects.requireNotNull` on the `SurfaceMountingManager` inside the `getEncodedScreenSizeWithoutVerticalInsets`
function. However the `SurfaceMountingManager` could be null.
In that scenario, I'm returning 0 here (that will restore the old broken behavior, with the modal rendering on the top left corner for the first frame), instead of letting the app crash.

Changelog:
[Android] [Fixed] - Do not crash inside getEncodedScreenSizeWithoutVerticalInsets if SurfaceMountingManager is null

Reviewed By: javache

Differential Revision: D82225855

fbshipit-source-id: df84db612e77b6b981bc28afc0d293867b5d3b2e
2025-09-12 07:44:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 91d427fe52 Fix Switch layout with iOS26 (#53326)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53326

Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements.
This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823).

The `<Switch>` component was using hardcoded values for its size.
This change fixes the problem by:
- Using codegen for interface only
- Implementing a custom Sadow Node to ask the platform for the Switch measurements
- Updating the JS layout to wrap the size around the native component.

## Changelog:

[iOS][Fixed] - Fix Switch layout to work with iOS26

Reviewed By: sammy-SC

Differential Revision: D80454350

fbshipit-source-id: 1d468910276f7fde4559d2ae87cf60c8494caceb
2025-09-12 07:16:20 -07:00
Alex HuntandFacebook GitHub Bot d28ee162e3 Restore background tracing touch target (#53753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53753

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D82302063

fbshipit-source-id: 25c99c2449fd72b81ce3ac25473c41304993cbc1
2025-09-12 06:51:53 -07:00
Alex HuntandFacebook GitHub Bot 136d795c22 Implement saved window positioning per target (#53743)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53743

As titled. A long awaited quality of life improvement that we can now deliver with our desktop shell.

Window arrangements are saved per [`windowKey`](https://github.com/facebook/react-native/blob/da7bf9c54567aae62ff355b79e66f511cb382065/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js#L193), mapping to each previously opened debugger target.

**Limitations**

- Does not save/restore macOS fullscreen app state.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D82236159

fbshipit-source-id: e3c2f9c0cb05a3b8ef2208eb4a288e0be064489a
2025-09-12 05:26:27 -07:00
Alex HuntandFacebook GitHub Bot 88f3452992 Add website links to Help menu (#53741)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53741

Adds a couple of web link options to populate the "Help" menu in the RNDT desktop app. The default menu is otherwise unchanged.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D82231524

fbshipit-source-id: 9a57e6067854716691dc35938d6f27735b8c8448
2025-09-12 04:13:25 -07:00
Alex HuntandFacebook GitHub Bot 408abf66d7 Fix user facing display name for debugger-shell (#53740)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53740

Adjusts user facing app name used by Electron, which previously used `package.json#name` and led to this leaking into unwanted parts of the UI — e.g. "[About|Hide|Quit] react-native/debugger-shell" in the macOS menu bar.

**Changes**

- Set the `productName` field in `package.json` ([docs](https://www.electronjs.org/docs/latest/api/app#appname:~:text=npm%20modules%20spec.-,You%20should%20usually%20also%20specify%20a%20productName%20field%2C%20which%20is%20your%20application%27s%20full%20capitalized%20name%2C%20and%20which%20will%20be%20preferred%20over%20name%20by%20Electron.,-app.userAgentFallback%E2%80%8B)).

**Notes**

- This **changes** the `User-Agent` header sent by the app, now of the form `"... ReactNativeDevTools/0.82.0-main-dev ..."`.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D82228307

fbshipit-source-id: dd316ce5580a3ddf4138c7c3bf76aff99e4f4801
2025-09-12 04:13:25 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 82708c775e Fix CQS signal readability-isolate-declaration in xplat/js/react-native-github/packages (#53747)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53747

Reviewed By: javache

Differential Revision: D82197859

fbshipit-source-id: e76e29754188ff15c7b4ebde8060c04f89aa3b52
2025-09-12 03:52:25 -07:00
Gabriel DonadelandFacebook GitHub Bot bcf9d5850a Add changelog for v0.81.3 (#53694)
Summary:
Add Changelog for 0.81.3

## Changelog:
[Internal] - Add Changelog for 0.81.3

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D82111771

Pulled By: cortinico

fbshipit-source-id: a67f64e81afa794eb4ba260701a187cac9ca55bd
2025-09-12 03:49:52 -07:00
Vojtech NovakandFacebook GitHub Bot bc3503452f chore: improve codegen error when native project not found (#53726)
Summary:
While working on a somewhat non-standard library setup I ran into:

`[Codegen] TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined`

which was caused by `xcodeproj` file not found. The issue was on the project side rather than codegen, but the error message was rather unhelpful, so this improves it.

## Changelog:

[General][Changed] - improve codegen error when ios native project not found

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

Test Plan:
tested locally, received the improved error message:

`[Codegen] Error: Cannot find .xcodeproj file inside /Users/some_project. This is required to determine codegen spec paths relative to native project.`

Reviewed By: cortinico

Differential Revision: D82226931

Pulled By: cipolleschi

fbshipit-source-id: dd851205655048fc35ed9f5266cefdbfb067d211
2025-09-12 03:41:50 -07:00
Nicola CortiandFacebook GitHub Bot c4d2ac6401 Temporarily disable prebuilds for template e2e tests on main branch (#53715)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53715

This is a backport of https://github.com/facebook/react-native/commit/ee08261123ac513941189cf7566337156576d4dd
on `main` as otherwise 0.83 will also be affected by the same problem (CI broken for iOS on the release branch).

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D82119125

fbshipit-source-id: 6fbdcd42b446bd49ac71bbe834181ba91cc67990
2025-09-12 03:03:28 -07:00
Zeya PengandFacebook GitHub Bot 54ebfafb21 ensure animatedNodes collection is only accessed on render thread (#53734)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53734

## Changelog:

[Internal] [Changed] - ensure animatedNodes collection is only accessed on render thread

now `createAnimatedNode` can be called async from js thread (since https://github.com/facebook/react-native/pull/53476), `animatedNodes_` will be written on both threads, there was no proper locking mechanism for read

we can simply add locks wherever we read/write animatedNodes_; but there's way to use fewer locking - since AnimatedNode is created async, but will not be R/W async anywhere else, we can add a new collection to temporarily hold nodes created async and flush it on render thread

Reviewed By: lenaic

Differential Revision: D82119554

fbshipit-source-id: 7f29e9e046cdf2e233c548442d70f1ff5b931cdd
2025-09-11 20:29:00 -07:00
Yury DymovandFacebook GitHub Bot a7dc5051d3 React Native (#53651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53651

## Stack
We aim to remove +load methods from the codebase to reduce pre-main startup time and to unblock enabling startup optimizations

## Diff
Diff removes `+load` API from `RCT_EXPORT_MODULE` macro.
It introduces new parameter for `react_native_module_provider` function `eager`, which adds legacy RN modules to newly created socket `REACT_MODULE_EAGER_REGISTRATION_SOCKET`. This socket is invoked right before the RCTBridge is being initialized.

Impact: 137 static loaders are removed from the startup path

## RN
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D81727845

fbshipit-source-id: 4904499f2e8587717b26579364ed48ffed934774
2025-09-11 18:55:40 -07:00
Alex HuntandFacebook GitHub Bot 6e011c98c1 Strip back V2 Perf Monitor to status only (#53742)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53742

Simplify scope for the internal V2 Perf Monitor prototype, and clean up the current perf metrics approach.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D82208400

fbshipit-source-id: a03eb5f493064fc4b554d56a36a48df889f276b2
2025-09-11 14:21:00 -07:00
Peter AbbondanzoandFacebook GitHub Bot 0ee665ce12 Add API 26 check to ReactScrollViewHelper (#53688)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53688

Support for the `removeIf` method was [added to CopyOnWriteArrayList with AOSP in API 26](https://android-review.googlesource.com/c/platform/libcore/+/304056). On devices with API 24 and 25, invocations of either `ReactScrollViewHelper#removeScrollListener` or `ReactScrollViewHelper#removeLayoutChangeListener` would cause a crash. Rather than bump the required API version and lock out apps targeting API 24/25, this adds a separate code path to bulk remove items from the array list.

Changelog: [Internal]

Differential Revision: D82039300

fbshipit-source-id: 6509dc637534b8e546f84447dbcdce1c5bca42f0
2025-09-11 11:34:09 -07:00
Peter AbbondanzoandFacebook GitHub Bot 2dada2193a Apply LINEAR_TEXT setting with custom typefaces set (#53692)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53692

With some custom typefaces, font hinting causes "jittery" artifacts upon scaling the text. We already set the subpixel text flag for views with custom or modified typefaces and this change also sets the linear text flag. Per [Android documentation](https://developer.android.com/reference/android/graphics/Paint#SUBPIXEL_TEXT_FLAG), it's recommended that both of these flags are set together to avoid this exact artifacting. This change is being gated behind a feature flag to evaluate the performance impact of disabling glyph caches for all text, and may drive the need to introduce a prop that controls this setting in the future.

Changelog: [Internal]

Reviewed By: rozele

Differential Revision: D82050029

fbshipit-source-id: 9e6e023ff723641f663935b6cd7aae07045834bc
2025-09-11 11:32:18 -07:00
Panos VekrisandFacebook GitHub Bot 3d4f0f48fe fix flow typing of mockComponent (#53739)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53739

The previous condition `typeof isESModule extends true` in the definition of `mockComponent` is always `true` (this is expected by semantics of conditional types).

See [try-Flow](https://flow.org/try/#1N4Igxg9gdgZglgcxALlAIwIZoKYBsD6uEEAztvhgE6UYCe+JADpdhgCYowa5kA0I2KAFcAtiRQAXSkOz9sADwxgJ+NPTbYuQ3BMnTZA+Y2yU4IwRO4A6SFBIrGVDGM7c+h46fNRLuKxJIGWh8MeT0ZfhYlCStpHzNsFBAMIQkIEQwJODAQfiEyfBE4eWw2fDgofDBMsAALfAA3KjgsXGxxZC4eAw0G-GhcWn9aY3wWZldu-g1mbGqJUoBaCRHEzrcDEgBrbAk62kXhXFxJ923d-cPRHEpTgyEoMDaqZdW7vKgoOfaSKgOKpqmDA+d4gB5fMA-P6LCCMLLQbiLOoYCqgh6-GDYRYIXYLSgkRZkCR4jpddwPfJLZjpOBkUEKTwJEJ+DAkMiUFSwkyZCC3dbdAC+-EgGiSAB1YA9lHBoAACXmICrcAAUAEpZcAJbLtbKYFL4VBdVBlWhkLK0MRnlBVWaVsYIDBzbKFAsoGwSLKpDJZQB+WUARllZoATBrZSwJEJKIbgwBuWUCiVanW2eyy+SBgC8RuVXuwqvjAHpC7LM2XZcHk9qM7LWQGiyWTJReVX04G63Gk4aU9A0-JQ9mYMayfmG6Xy5Xu9XQ3X-WOmy2p+mZx7O1BE1AuxK9Y8DbriqU1RrWzvpXKhwAeABCZotECtAD4TWarzbZVfnfJXe7PfpfQGgwrMMIyjQ1lQABlrD1gVoAtZULAAqWUHjtVg0DaWUEJLDdW1TCQ21LHM8zg4tx2zf1WxrWdY0o9tV3nahF1w3t8P7Qih2VEcSJLMts0nHVlyg+t4MbRjKEolcK3jCUBVyEAGhMEgZSgJIGnAqxgwADn9KxwJAAUgA)

A bug in Flow made it so that when this type was exported `typeof isESModule` became `any`, which made it so that the conditional always evaluated to the first part. The bug is fixed in D82193099.

This diff uses a type parameter, which can be correctly instantiated at the call site.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D82226987

fbshipit-source-id: 411047c10ad88be867fe9b4c5a1672775b3c9322
2025-09-11 11:22:41 -07:00
Gabriel DonadelandFacebook GitHub Bot da7bf9c545 Add changelog for v0.81.2 (#53691)
Summary:
Add Changelog for 0.81.2

## Changelog:
[Internal] - Add Changelog for 0.81.2

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

Test Plan: N/A

Reviewed By: fabriziocucci

Differential Revision: D82111764

Pulled By: cortinico

fbshipit-source-id: 90a140b7114861afecfa1c65cd69adbeff178e14
2025-09-11 10:35:54 -07:00
Nicola CortiandFacebook GitHub Bot 29c1f72801 Do not invoke project. inside BundleHermesCTask (#53718)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53718

I've just realized we ended up invoking `project.` inside the execution of `BundleHermesCTask`.
This is an anti-pattern and is breaking Gradle Configuration caching.

Instead we should be checking if hermesV1Enabled is set during the Task registration and pass over this information
to the task.

Changelog:
[Internal] [Changed] -

Reviewed By: j-piasecki

Differential Revision: D82130643

fbshipit-source-id: d2026711666867b3767824381cc5be0af3b476cc
2025-09-11 07:20:25 -07:00
Jakub PiaseckiandFacebook GitHub Bot ae89022f9a Use artifacts published from Hermes repository when using Hermes V1 (#53725)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53725

Changelog: [GENERAL][CHANGED] - Changed the coordinates of hermes artifacts when using Hermes V1

Adds a new `version.properties` file to keep which hermes versions should be consumed from Maven once the versions of Hermes and React Native are decoupled. This diff only implements changes necessary for consuming Hermes V1, as we don't want to migrate everything quite yet (0.82).

Reviewed By: cortinico

Differential Revision: D82204203

fbshipit-source-id: d712257a73f7ba54612a55c1b312416376f28b56
2025-09-11 06:36:23 -07:00
Nicola CortiandFacebook GitHub Bot 7438fcd5d2 Unblock run_fantom_tests by pinning react-native-android to v18.0 (#53732)
Summary:
This temporarly unblocks `run_fantom_tests` till we find a solution for the docker image bump. See:
- https://github.com/react-native-community/docker-android/pull/242#issuecomment-3280029122

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: cipolleschi

Differential Revision: D82212022

Pulled By: cortinico

fbshipit-source-id: 652926addf12cc2d88ac2139d3ec58a266ced9ef
2025-09-11 06:21:39 -07:00
Rubén NorteandFacebook GitHub Bot 5ae5a120a7 Ship Web Performance APIs in canary (#53712)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53712

Changelog: [internal]

This enables the new Web Performance APIs in the canary channel.

Reviewed By: cortinico

Differential Revision: D82117694

fbshipit-source-id: 370b8397eeec350be8434728ab9d8ce1f5926117
2025-09-11 06:09:29 -07:00
Rubén NorteandFacebook GitHub Bot 9962add377 Remove redudant fields from ReactNativeStartupTiming (#53711)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53711

Changelog: [internal]

This removes some fields that contain the same time as `endTime`, which is confusing when documenting them.

Reviewed By: christophpurrer

Differential Revision: D82112473

fbshipit-source-id: 461e2b4b495ae641dcb3233874360a4f7b90dabf
2025-09-11 06:09:29 -07:00
Rubén NorteandFacebook GitHub Bot c015f626a8 Make eventCounts a getter (#53710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53710

Changelog: [internal]

This should be a getter according to the spec.

Reviewed By: hoxyq

Differential Revision: D82111779

fbshipit-source-id: 614bb4848907bacd80ef228aa747ae685cf2c1f7
2025-09-11 06:09:29 -07:00
Vitali ZaidmanandFacebook GitHub Bot cda0ad8c5f Update debugger-frontend from e87564a...5a792db (#53714)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53714

Changelog: [Internal] - Update `react-native/debugger-frontend` from e87564a...5a792db

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

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [5a792db12](https://github.com/facebook/react-native-devtools-frontend/commit/5a792db12) | Vitali Zaidman (vzaidman@gmail.com) | 2025-09-01T11:06:46+01:00 | [track clicks on script links (#204)](https://github.com/facebook/react-native-devtools-frontend/commit/5a792db12) |
| [7edec7c48](https://github.com/facebook/react-native-devtools-frontend/commit/7edec7c48) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-28T10:24:49+01:00 | [track the duration between user setting a breakpoint and the breakpoint being painted (#201)](https://github.com/facebook/react-native-devtools-frontend/commit/7edec7c48) |
| [273f02681](https://github.com/facebook/react-native-devtools-frontend/commit/273f02681) | Ruslan Lesiutin (28902667+hoxyq@users.noreply.github.com) | 2025-08-27T19:33:26+01:00 | [Revert "Add landingView query param enabling view focus on launch (#197)" (#202)](https://github.com/facebook/react-native-devtools-frontend/commit/273f02681) |
| [1e19c4454](https://github.com/facebook/react-native-devtools-frontend/commit/1e19c4454) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-21T16:23:44+01:00 | [Fixed Protocol Manager displaying events with no params as "(pending)". (#200)](https://github.com/facebook/react-native-devtools-frontend/commit/1e19c4454) |

Reviewed By: robhogan

Differential Revision: D82117068

fbshipit-source-id: 4112be5e8a4f643dffc46e7956c821041dad3b26
2025-09-11 03:49:25 -07:00
Riccardo CipolleschiandFacebook GitHub Bot dab8a45623 cipolleschi/fix rctnetworking not building (#53713)
Summary:
Fix Cocoapods builds with static libraries and dynamic frameworks

## Changelog:
[Internal] -

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

Test Plan: Tested locally on RNTester

Reviewed By: cortinico

Differential Revision: D82118127

Pulled By: cipolleschi

fbshipit-source-id: 73736c2382be5f6b0770bb7154780e6dcc4aca1c
2025-09-10 12:14:14 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 40c60adacf xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java (#53704)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53704

Reviewed By: cortinico

Differential Revision: D82098400

fbshipit-source-id: e692b8e2bad976805657c2f406831c346198554f
2025-09-10 07:23:21 -07:00
Riccardo CipolleschiandFacebook GitHub Bot a7cd3cc08f Make codegen generate a Package.swift file for Codegen'd target (#53619)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53619

With this change, we are making Codegen generate a Package.swift file so that we can integrate the `ReactCodegen` and the `ReactAppDependencyProvider` in apps only using SwiftPM

## Changelog
[iOS][Added] - Make codegen generate PAckage.swift file for the codegen targets

Reviewed By: cortinico

Differential Revision: D81769543

fbshipit-source-id: 1f1a1b9f41126e142931d5eda6e75109a69f828c
2025-09-10 05:25:54 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 87f8e85b7f Move generated code to ReactCodegen and ReactappDependencyProvider folder (#53618)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53618

This change makes sure that we generate the codegen files in the ReactCodegen and ReactAppDependencyProvider folder.

This is necessary as Swift PM needs the source code of packages to be grouped in folders that are children of where the Package.swift is located.

This is not a breaking change, because Cocoapods has been updated accordingly, import/include paths are not changed and the folder layout should not be accessed by anybody directly

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81769522

fbshipit-source-id: 7c70f96a9aa503c4faaf173b94c8ee0e326094a1
2025-09-10 05:25:54 -07:00
Phil PluckthunandFacebook GitHub Bot f6f5ea0b2e Remove outdated artifacts codegen early return (#53690)
Summary:
Follow-up to https://github.com/facebook/react-native/issues/53503 for a regression

When no React Native module is present this bail condition stops us from generating the artifacts podspec that's needed to complete build.

## Changelog:

[IOS] [FIXED] - Fix regression that skips artifacts code generation

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

Test Plan:
- Create an app **without** any React Native modules, run `pod install`; without this fix the podspec will be missing and the build will fail
  - With expo this can be reproduced using `create-expo-app --template blank-typescript@next` on `react-native@0.81.2`
  - With the community CLI this can be reproduced using `npx react-native-community/cli@latest init test --skip-install --version 0.81.2` and uninstalling `react-native-safe-area-context`

Reviewed By: javache

Differential Revision: D82103491

Pulled By: cipolleschi

fbshipit-source-id: 3d9619b5a935ca920220824b3963a9a107f926ca
2025-09-10 05:24:28 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 6c49572ee4 Make sure we don't run RN CI on forks (#53707)
Summary:
We had reports from the Community of the RN CI running on forks and causing high costs and bills for them
This change should make sure that the most impactful jobs only runs on the React Native CI and not on forks.

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D82107313

Pulled By: cipolleschi

fbshipit-source-id: ff7f418344975e7bb8306a6356d774c26bea3db1
2025-09-10 04:49:14 -07:00
Rubén NorteandFacebook GitHub Bot 529f55c8c9 Implement performance.timeOrigin (#53660)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53660

Changelog: [internal]

(This is internal because these APIs aren't enabled in OSS yet)

Implements `performance.timeOrigin` to allow converting timestamps from `performance.now()` to be based on the Unix epoch.

This implementation isn't fully spec-compliant to align with the current implementation of `performance.now()`, where the base of the clock is system boot time instead of app startup / navigation time.

Reviewed By: huntie

Differential Revision: D82016724

fbshipit-source-id: e3a066721cecf41e2fd963beb94a0a2f1c5d6493
2025-09-10 04:48:55 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 481fb612a2 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGflagsTaskTest.kt (#53702)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53702

Reviewed By: cortinico

Differential Revision: D82093601

fbshipit-source-id: 133936f59d155fa1d68358abe4015c7b7b1613a6
2025-09-10 04:41:29 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 3ce6a05aac fix: add conditional checks for facebook/react-native repo for nightly (#53700)
Summary:
This PR adds additional checks to run nightly jobs only on the main repo.

I noticed pretty heavy usage on my fork of React Native:

<img width="951" height="179" alt="Screenshot 2025-09-10 at 11 47 29" src="https://github.com/user-attachments/assets/91cb9e4a-8658-42bd-bbfe-ffba01b0b3b3" />

I also noticed a typo in this file with output instead of outputs

## Changelog:

[INTERNAL] [FIXED] - add conditional checks for facebook/react-native repo for nightly workflow

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

Test Plan: Check if the syntax is correct.

Reviewed By: cortinico

Differential Revision: D82104958

Pulled By: cipolleschi

fbshipit-source-id: fc2e6e0299345ebd115c7a574a5a8161f2b0ca5c
2025-09-10 03:57:54 -07:00
Jakub PiaseckiandFacebook GitHub Bot 813b9441ca Read Hermes V1 opt-in flag from the app's properties (#53665)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53665

Changelog: [ANDROID][FIXED] - Read the Hermes V1 opt-in flag from the apps properties when building from source

Reviewed By: cortinico

Differential Revision: D82018545

fbshipit-source-id: f3c6fdbac190f47b6bf6836105d9e0909d8b86ba
2025-09-10 00:51:41 -07:00
Zeya PengandFacebook GitHub Bot cf5040b4f8 fix array type parsing in DynamicEventPayload::extractValue (#53689)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53689

## Changelog:

[General] [Fixed] - fix array type parsing in DynamicEventPayload::extractValue

When unwrapping event mapping like `e.nativeEvent.touches[0].locationX` e.g. for Animated.event like below,

```
onTouchMove={Animated.event(
  [
    {
      nativeEvent: {
        touches: {
          0: {locationX: animatedValue},
        },
      },
    },
  ],
  {useNativeDriver: true},
)}
```
here it'll throw exception `terminating due to uncaught exception of type folly::TypeError: TypeError: expected dynamic type 'object', but had type 'array'` when getting into folly dynamic array, because array index in the event path is string instead of integer

Reviewed By: rozele

Differential Revision: D82050538

fbshipit-source-id: ed25c8917b90190c995d1fcd6d60af207e72e270
2025-09-09 21:12:26 -07:00
Luna WeiandFacebook GitHub Bot 019a553ea4 Remove enable_eager_alternate_state_node_cleanup param (#53693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53693

Changelog: [Internal] - Remove usage of `enableEagerAlternateStateNodeCleanup`  as it is default true now

Reviewed By: yungsters

Differential Revision: D81962955

fbshipit-source-id: 80b0d9321b1162dd79d052b05acb3dc9459e37d2
2025-09-09 18:46:39 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 2ae5a74f06 Fix CQS signal modernize-use-using in xplat/js/react-native-github/packages (#53661)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53661

Reviewed By: javache

Differential Revision: D81764229

fbshipit-source-id: 617716ddb5cf17d41a4927c3a6cce6074278d8b0
2025-09-09 11:37:24 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 3d4a4caac8 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GeneratePackageListTaskTest.kt (#53614)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53614

Reviewed By: javache

Differential Revision: D81764947

fbshipit-source-id: de19d7d89f3a7e19285928f9541b0b47b503d160
2025-09-09 11:34:37 -07:00
Alex HuntandFacebook GitHub Bot cdc4a8ead4 Wire up background tracing and actions in Perf Monitor (#53460)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53460

Completes the first pass of adding background performance trace controls in the V2 Perf Monitor UI.

Key changes:
- Initiates background trace on `PerfMonitorOverlayManager::init`.
- Wires up background trace recording states in button dialog, and connects `pauseAndAnalyzeBackgroundTrace` and `resumeBackgroundTrace` actions.
- Moves UI manager/view classes into `perfmonitor` subpackage.
- Fixes `responsivenessScore` determination/UI coloring.
- Adds tooltip UI to the overlay view.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D80807554

fbshipit-source-id: 53360c2d454adfbba40fd795d400b28d90ff9e61
2025-09-09 10:31:04 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 226d2ba160 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt (#53656)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53656

Reviewed By: cortinico

Differential Revision: D82005918

fbshipit-source-id: 5b0728e68fff865e8a9271c0dfc0a3cc19baa54c
2025-09-09 08:13:12 -07:00
Rubén NorteandFacebook GitHub Bot a16c6c9477 Add feature flag to enable Web Performance APIs by default (#53547)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53547

Changelog: [internal]

This creates a new feature flag to enable the modern Web performance APIs in RN by default. It's disabled by default so it shouldn't have any effect at the moment.

Reviewed By: rshest

Differential Revision: D80811430

fbshipit-source-id: 47d5fd12ac8809aa3c5ad37cdd31c0d9e3ed5912
2025-09-09 08:07:31 -07:00
Vitali ZaidmanandFacebook GitHub Bot 59b8974d3c changelog/v0.80.0-rc.1 (#53662)
Summary:
Changelog: [Internal]

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

Reviewed By: fabriziocucci

Differential Revision: D82020526

Pulled By: vzaidman

fbshipit-source-id: 43eb1d038f71dbeb30bd1bf4a94779a9fad56215
2025-09-09 07:46:35 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 2c30215bc7 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/core/tests/TestComponent.h (#53658)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53658

Reviewed By: javache

Differential Revision: D81904578

fbshipit-source-id: 03725446586cc206690995f7d2d274c0b1249abe
2025-09-09 04:57:44 -07:00
generatedunixname537391475639613andFacebook GitHub Bot f568c9b953 xplat/js/react-native-github/packages/gradle-plugin/shared-testutil/src/main/kotlin/com/facebook/react/tests/OsRule.kt (#53655)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53655

Reviewed By: cortinico

Differential Revision: D82008708

fbshipit-source-id: 9ba77512a5e6e7749981726d739d88df287a63d3
2025-09-09 03:42:58 -07:00
25harshandFacebook GitHub Bot 968909488a fix(iOS): Fix RCTDeviceInfo crash when application.delegate.window is nil (#53645)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->

Fixes a crash in `RCTDeviceInfo.interfaceOrientationDidChange` when `application.delegate.window` is nil. This crash affects multiple modern iOS app architectures where the traditional window property may not be set:

- **SwiftUI apps using `main`** instead of traditional AppDelegate
- **Brownfield React Native integrations** where the host app manages windows
- **Scene-based lifecycle apps** (iOS 13+) using SceneDelegate
- **Custom window management** setups

**The Problem:**
```
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[MyApp.AppDelegate window]: unrecognized selector sent to instance'
```

This occurs when trying to access `.frame` on a nil window object during orientation changes. Modern iOS development patterns don't always require setting `application.delegate.window`, but React Native's RCTDeviceInfo assumes this property exists.

**The Solution:**
Replace direct `application.delegate.window` access with `RCTKeyWindow()` and add nil-safe fallback:

```objc
// Before (crashes in modern apps)
BOOL isRunningInFullScreen =
    CGRectEqualToRect(application.delegate.window.frame, application.delegate.window.screen.bounds);

// After (safe for all app configurations)
UIWindow *delegateWindow = RCTKeyWindow();
BOOL isRunningInFullScreen = delegateWindow ?
    CGRectEqualToRect(delegateWindow.frame, delegateWindow.screen.bounds) : YES;
```

This approach:
- Uses `RCTKeyWindow()` pattern already established elsewhere in RCTDeviceInfo
- Provides safe fallback defaulting to fullscreen when window state is unknown
- Maintains existing multitasking detection behavior (Split View, Slide Over)
- Is backward compatible with traditional React Native apps

## 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] - Fix RCTDeviceInfo crash when application.delegate.window is nil in modern iOS app architectures

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

Test Plan:
### Manual Testing

**1. SwiftUI main App Test:**
```bash
# Created SwiftUI app with main lifecycle
# Integrated React Native component
# Result: No crash during orientation changes, fullscreen detection works
 PASS: Orientation changes handled safely
 PASS: Multitasking detection stable
```

**2. Traditional React Native App:**
```bash
# Tested with standard RN template app
# Verified existing behavior unchanged
 PASS: Existing functionality preserved
 PASS: No regressions in dimension reporting
```

**3. Brownfield Integration:**
```bash
# Integrated RN in existing iOS app without window property
# Triggered orientation changes and multitasking transitions
 PASS: No crashes during orientation events
 PASS: Split View and Slide Over work correctly
```

**4. Scene-based Lifecycle App:**
```bash
# Created app using SceneDelegate for window management
# Tested orientation and multitasking scenarios
 PASS: Proper handling when SceneDelegate manages windows
 PASS: No crashes during app lifecycle transitions
```

### Edge Case Testing

**RCTKeyWindow() Returns Nil:**
- Confirmed defaults to `YES` (fullscreen)
- No crashes when no key window available
- Multitasking detection remains stable

**Multiple Window Scenarios:**
- Tested with iPad multiple windows
- Uses correct key window for measurements
- Proper behavior in complex window hierarchies

**Orientation During Transitions:**
- App backgrounding/foregrounding during orientation
- Multitasking mode changes during rotation
- No crashes or inconsistent states

### Automated Testing

```bash
# All existing tests pass
yarn test
 RCTDeviceInfoTests pass

# Code style compliance
yarn lint
 Follows React Native Objective-C guidelines
```

### Impact Verification

**Before Fix:**
- Crash in SwiftUI apps using main
- Crash in Scene-based lifecycle apps
- Crash in brownfield integrations

**After Fix:**
- All app architectures work safely
- Multitasking detection preserved
- Backward compatibility maintained
- No performance impact

Rollback Plan:

Reviewed By: javache

Differential Revision: D81931754

Pulled By: cipolleschi

fbshipit-source-id: c3ea1a2922b1d48ca6bc1fc32861b490322fd254
2025-09-09 02:23:52 -07:00
Alex HuntandFacebook GitHub Bot e7ce4ff0bf Move NetworkReporter out of jsinspector-modern (#53484)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53484

Refactor to better organise network event reporting features.

- Introduce new `ReactCommon/react/networking` package, containing `NetworkReporter` class (outer-most interface with each platform).
    - Move `ReactCommon/performance/timeline` dependency to this level, removing jsinspector→performance dependency.
- Simplifies the remaining `NetworkHandler` in `jsinspector-modern/network` — which now is only focused on CDP network reporting.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D81129562

fbshipit-source-id: 6c36045e872b0fd9510d0fa3e98acb0969e74d72
2025-09-08 13:35:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 49be01add1 Move headers from .h to .mm file (#53617)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53617

In the RCTAppDelegate.h file there are a couple of headers that are not used and that can be either removed or moved to the .mm file.
This reduce the coupling between the AppDelegate library and React Core and allow us to reduce the size of the exported headers in the umbrella header.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D81769485

fbshipit-source-id: b811dde0331e8a668618e0c8eb250fd81bf48545
2025-09-08 10:27:24 -07:00
Nicola CortiandFacebook GitHub Bot 13120f630d Remove unnecessary extra quote on hermesVersionProvider (#53641)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53641

This extra quote is causing the build on the 0.82-stable to fail. The reason is that the Path for the `.hermesversion` file is composed wrongly so we attempt to build hermes from the `main` branch.

Changelog:
[Internal] [Changed] -

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

Reviewed By: j-piasecki, vzaidman

Differential Revision: D81925624

fbshipit-source-id: 700f9d44b6c7efdb845232dad8ca7c2e3136385d
2025-09-08 09:09:23 -07:00
Rick HanlonandFacebook GitHub Bot d0140ce53b enable opt-in for enableDefaultTransitionIndicator (#34373)
Summary:
So we can test the feature.

DiffTrain build for [3168e08f8389d258de9eb7c8d19b9d44a0f250f2](https://github.com/facebook/react/commit/3168e08f8389d258de9eb7c8d19b9d44a0f250f2)

Reviewed By: kassens

Differential Revision: D81599263

fbshipit-source-id: a33ca01250206a2a35350f7fad09e43071522df7
2025-09-08 08:43:40 -07:00
Jakub PiaseckiandFacebook GitHub Bot d0fb33822d Check value of the Hermes V1 flag instead of whether it's defined (#53637)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53637

Changelog: [ANDROID][FIXED] - Check for the value of the HERMES_V1_ENABLED flag instead of whether it's defined

Reviewed By: cortinico

Differential Revision: D81920483

fbshipit-source-id: 550ae9fd27f666affe102b1c5c3f51bde7b5923e
2025-09-08 07:16:48 -07:00
Rob HoganandFacebook GitHub Bot 2152180fa0 Minor bump memfs dev dependency (#53628)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53628

Bump the `memfs` dependency used in tests to the latest minor - there have been a considerable number of updates since 4.7 including support for various newer (and some old) Node fs APIs: https://github.com/streamich/memfs/blob/master/CHANGELOG.md

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D81879137

fbshipit-source-id: e75946dac100809cb39c88971fd6ed397dc9f49e
2025-09-08 06:54:09 -07:00
Ramanpreet NaraandFacebook GitHub Bot e7aeea26bd Deprecate legacy javascript apis (#53630)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53630

These JavaScript apis were a part of react native's legacy architecture. Let's deprecate them, so that we can eventually remove them in the future.

Changelog: [General][Deprecated] - Deprecate legacy javascript react native apis

Reviewed By: cortinico

Differential Revision: D81795732

fbshipit-source-id: 0a2bd142fa7e08c1f3daaa437ee127a2156e045b
2025-09-08 04:30:21 -07:00
Bartosz KaszubowskiandFacebook GitHub Bot c04248dc5c chore: Add Bluesky badge to README (#53616)
Summary:
Add Bluesky badge to README.

## Changelog:

[INTERNAL][ADDED] Add Bluesky badge to README

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

Test Plan:
The updated README has been checked out on the PR branch.

## Preview:

<img width="1880" height="746" alt="Screenshot 2025-09-05 at 13 00 34" src="https://github.com/user-attachments/assets/dc1dfa9c-9e08-449d-82b8-dcb92ae92268" />

Reviewed By: cipolleschi

Differential Revision: D81909921

Pulled By: cortinico

fbshipit-source-id: b5fa79f152f126944bc1c31c8fbb86889f0f25db
2025-09-08 03:48:46 -07:00
Nick LefeverandFacebook GitHub Bot 02e3a999ed Back out "Use uint32_t as internal Color representation" (#53622)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53622

Reverting to avoid lossy conversion on hosts expecting signed int values for color conversion.

Changelog: [Internal]

Reviewed By: rozele, javache

Differential Revision: D81785268

fbshipit-source-id: 4a8d099e378fa55e76a58c2ab0356d88e344de2c
2025-09-05 20:37:58 -07:00
Mark VerlingieriandFacebook GitHub Bot 44b2da0df2 Revert D81766029: Make feature flag "enableViewRecyclingForScrollView" true by default
Differential Revision:
D81766029

Original commit changeset: df4a260b9bde

Original Phabricator Diff: D81766029

fbshipit-source-id: f1cd2a2cef632cfe9cbf0cd13e9ec20cfa5cc6ae
2025-09-05 11:58:48 -07:00
Zeya PengandFacebook GitHub Bot dae2f606c7 Course correct props at SurfaceMountingManager.updateProps() (#53589)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53589

## Changelog:

[Android] [Changed] - [c++ animated] Course correct props at SurfaceMountingManager.updateProps()

Sometimes a React update will try to commit to the same view that native animated modified before via direct manipulation, and after the update host view will use the prop value currently in Fabric. In `AnimatedMountingOverrideDelegate` there's logic to course correct at ShadowTree mount, but if this update is from JS thread, it takes some time to reach mounting layer, at the same time UI thread can still be doing more direct animation updates, and once the corrected change gets there it's already stale.

In this diff I added mechanism to keep track of direct manipulation props (or "synchronous mount props" to match the naming of java function `synchronouslyUpdateView...`) and use it to correct what reaches host view. `SurfaceMountingManager.updateProps()` is called by both regular mount and direct manipulation and it's always called on UI thread, so it could be a good candidate to synchronize these 2 scenarios

Reviewed By: sammy-SC

Differential Revision: D81611823

fbshipit-source-id: 638a59bcd94b3d7e8bab68defd472b2b482dc92f
2025-09-05 09:18:50 -07:00
Zeya PengandFacebook GitHub Bot 5774bd105d create FeatureFlag overrideBySynchronousMountPropsAtMountingAndroid (#53603)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53603

## Changelog:

[General] [Added] - create FeatureFlag overrideBySynchronousMountPropsAtMountingAndroid

Reviewed By: rshest

Differential Revision: D81690079

fbshipit-source-id: cb381004135ef9cd072c6f99703d9e7f4a40dd6a
2025-09-05 09:18:50 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 3a3f3a417d Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages [B] (#53611)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53611

Reviewed By: rshest

Differential Revision: D81699709

fbshipit-source-id: 6f512fcc01e3f1d33b4e94c4766ee3ab759463e5
2025-09-05 06:37:04 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 71edbe1548 Make feature flag "enableViewRecyclingForScrollView" true by default
Summary:
## Changelog:
[Internal] -

Noticed that the default value for this one is inconsistent with all the other similar ones, which can cause confusion during setting up the experiment, fixing it.

Note that top level view recycling is still controlled via `enableViewRecycling`, which will also disable all the other ones when false (which it is by default).

bypass-github-export-checks

Reviewed By: lenaic

Differential Revision: D81766029

fbshipit-source-id: df4a260b9bde20d1c85b7786df00fa91298a27b7
2025-09-05 06:01:47 -07:00
generatedunixname89002005287564andFacebook GitHub Bot f6a4f24090 Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages [A] (#53612)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53612

Reviewed By: rshest

Differential Revision: D81699159

fbshipit-source-id: b711e066b206d70ec40570b63dd1290d800e531f
2025-09-05 03:05:35 -07:00
Jakub PiaseckiandFacebook GitHub Bot 1be852781d Add tests for isHermesV1Enabled (#53601)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53601

Changelog: [Internal]

Adds tests covering the `isHermesV1Enabled` utility function.

Reviewed By: cortinico

Differential Revision: D81681635

fbshipit-source-id: c2c50db65f93b8b58ce1730ccfdf4367a024ce7b
2025-09-04 23:31:08 -07:00
Tim YungandFacebook GitHub Bot a50ddf3d8e JS: Upgrade to signedsource@2.0.0 (#53606)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53606

Upgrades projects to `signedsource@2.0.0`, which includes a critical bug fix to the `isSigned` and `signFile` functions:

```lang=diff
isSigned(data) {
-  return !PATTERN.exec(data);
+  return PATTERN.exec(data) != null;
},
```

Changelog:
[Internal]

Reviewed By: bvanderhoof, jehartzog

Differential Revision: D81723007

fbshipit-source-id: 0606eef35df1e5ec988b537aa012bc2c6d3c2d3a
2025-09-04 19:12:08 -07:00
Sam ZhouandFacebook GitHub Bot 020c92efac Deploy 0.281.0 to xplat (#53607)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53607

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D81728906

fbshipit-source-id: 161eb62d7520398c97f05db40676e1ea2ac4d0a9
2025-09-04 16:51:26 -07:00
Gang ZhaoandFacebook GitHub Bot d7315563fe Allow ReactInstance to evaluate SH unit when possible (#53471)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53471

When IHermes::getSHUnitCreator() returns non-null pointer, call
`evaluateSHUnit()` on that instead of `evaluateJavaScript()`.

Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D80916868

fbshipit-source-id: 9c1e2327b720cab4b374d4752a9c64f87c592ad6
2025-09-04 16:27:46 -07:00
Moti ZilbermanandFacebook GitHub Bot 1f57ae5249 Distribute React Native DevTools binaries via GitHub Releases (#52930)
Summary:
bypass-github-export-checks

OSS release infrastructure for the (experimental) React Native DevTools standalone shell.

Currently, binaries are built continuously on Meta infra and served from the Meta CDN using fbcdn.net URLs checked into a DotSlash file in the repo, e.g.:

https://github.com/facebook/react-native/blob/15373218ec572c0e43325845b80a849ad5174cc3/packages/debugger-shell/bin/react-native-devtools#L9-L18

For open source releases we want to primarily distribute the binaries as GitHub release assets, while keeping the Meta CDN URLs as a secondary option. This PR makes the necessary changes to the release workflows to support this:

* `workflows/create-release.yml` (modified): As part of the release commit, rewrite the DotSlash file to include the release asset URLs.
  * **NOTE:** After this commit, **the new URLs don't work yet**, because they refer to a release that hasn't been published. Despite this, the DotSlash file remains valid and usable (because DotSlash will happily fall back to the Meta CDN URLs, which are still in the file).
* `workflows/create-draft-release.yml` (modified): After creating a draft release, fetch the binaries from the Meta CDN and reupload them to GitHub as release assets. This is based on the contents of the DotSlash file rewritten by `create-release.yml`.
* `workflows/validate-dotslash-artifacts.yml` (new): After the release is published, all URLs referenced by the DotSlash (both Meta CDN URL and GH release asset URLs) should be valid and refer to the same artifacts. This workflow checks that this is the case.
  * If this workflow fails on a published release, the release may need to be burned or a hotfix release may be necessary - as the release will stop working correctly once the Meta CDN stops serving the assets.
  * This workflow will also be running continuously on `main`. If it fails on a commit in `main`, there might be a connectivity issue between the GHA runner and the Meta CDN, or there might be an issue on the Meta side.

NOTE: These changes to the release pipeline are generic and reusable; if we later add another DotSlash-based tool whose binaries need to be mirrored as GitHub release assets, we just need to add it to the `FIRST_PARTY_DOTSLASH_FILES` array.

## Changelog:

[Internal] Mirror React Native DevTools binaries in GitHub Releases

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

Test Plan:
### Step 0: Unit tests

I've added unit tests for `dotslash-utils`, `curl-utils`, and for the majority of the logic that makes up the new release scripts (`write-dotslash-release-assets-urls`, `upload-release-assets-for-dotslash`, `validate-dotslash-artifacts`).

### Step 1: Test release commit

Created a test branch and draft PR: https://github.com/facebook/react-native/pull/53147.

Locally created a release commit, simulating the create-release GH workflow:

```
node scripts/releases/create-release-commit.js --reactNativeVersion 0.82.0-20250903-0830 --no-dry-run
```

This updated the DotSlash file in the branch: https://github.com/facebook/react-native/pull/53147/commits/2deeb7e70376ee80b99f27bea4825789f22a89a3#diff-205a9ff6005e30be061eaa64b9cb50b15b0e909dd188e0866189e952655a3483

NOTE: I've also ensured that the `create-release-commit` script correctly updates the DotSlash file when running from a branch that already has a release commit - see screenshot:
<img width="1483" height="587" alt="image" src="https://github.com/user-attachments/assets/1ffd859b-e02b-483d-8067-9cc9116829a4" />

### Step 2: Test draft release

Enabled testing the create-draft-release GH workflow in the test branch using these temporary hacks:

* https://github.com/facebook/react-native/pull/53147/commits/81f334eac5147d4dbf5f6d7d627ddfa52cd197be
* https://github.com/facebook/react-native/pull/53147/commits/6d8851657629de7e0b710ed8f5dd7d0f7b9847cc
* https://github.com/facebook/react-native/pull/53147/commits/1428a8da8b9fb29c45fc33d79f311dd1fe273433

Workflow run: https://github.com/facebook/react-native/actions/runs/17426711373/job/49475327346
Draft release: https://github.com/facebook/react-native/releases/tag/untagged-c6a62a58e5baa37936e1
Draft release screenshot for posterity (since we'll likely delete the draft release after landing this):

<img width="1024" height="814" alt="image" src="https://github.com/user-attachments/assets/1900da15-48f6-4274-b29c-0ac2019d92c0" />

### Step 3: Test post-release validation script

For obvious reasons, I've avoided actually publishing the above draft release. But I have run the `validate-dotslash-artifacts` workflow on the *current* branch to ensure that the logic is correct: https://github.com/motiz88/react-native/actions/runs/17426885205/job/49475888486

Running `node scripts/releases/validate-dotslash-artifacts.js` in the release branch (without publishing the release first) fails, as expected:

<img width="1105" height="748" alt="image" src="https://github.com/user-attachments/assets/ed23a2e2-7a31-42eb-a324-f1d50eafe2fb" />

## Next steps

This PR is all the infra needed ahead of the 0.82 ~~branch cut~~ infra freeze to support the React Native DevTools standalone shell, at least on the GitHub side. ~~Some minor infra work remains on the Meta side, plus some product/logic changes to the React Native DevTools standalone shell that I'm intending to finish in time for 0.82 (for an experimental rollout).~~ EDIT: All the planned work has landed; the feature is code-complete on `main` as well as in `0.82-stable` (apart from this infra change).

As a one-off, once we've actually published 0.82.0-rc.1, we'll want to have a human look at the published artifacts and CI workflow logs to ensure everything is in order. (I'll make sure to communicate this to the 0.82 release crew.) Afterwards, the automation added in this PR should be sufficient.

Reviewed By: huntie

Differential Revision: D81578704

Pulled By: motiz88

fbshipit-source-id: 6a4a48c3713221a89dd5fc88851674c1ddc6bb10
2025-09-04 11:25:39 -07:00
Vitali ZaidmanandFacebook GitHub Bot 47f32ffae0 add comments regarding RCTPackagerConnection's reconnect (#53558)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53558

Changelog: [Internal]
Got confused regarding why "reconnect" does not actually trigger a reconnect. It turns out, it only triggers a reconnect if the URL has changed.

Reviewed By: cipolleschi, huntie

Differential Revision: D80629308

fbshipit-source-id: 098ef5e91f3748deb9bc707b79bc0395d2442ca4
2025-09-04 10:00:18 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 0a3b3fcd18 Add RN feature flag for Image view recycling (#53600)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53600

# Changelog:
[Internal] -

Adds the corresponding feature flag, similarly as it's done for other component types.

The flag is used in the next diff.

Reviewed By: mdvacca

Differential Revision: D81681404

fbshipit-source-id: f9f155379034695f5df6cc4f0d3787ff4c69df7f
2025-09-04 09:47:15 -07:00
Vitali ZaidmanandFacebook GitHub Bot 2b4c48ae47 export Logger type from dev-middleware (#53586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53586

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D81588537

fbshipit-source-id: e6537dd831cfb73ce93326e2e0c0a2bcd3929caa
2025-09-04 08:13:04 -07:00
Jakub PiaseckiandFacebook GitHub Bot 2e0bd13a25 Use hermesc from node_modules when consuming prebuilt hermes (#53581)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53581

Changelog: [General][Changed] - Changed the source of hermesc binary to be an npm package

Reviewed By: cipolleschi, cortinico

Differential Revision: D81224001

fbshipit-source-id: 552d0e66fb891974d7b688bfc0bec95e19345d86
2025-09-04 07:42:12 -07:00
Jakub PiaseckiandFacebook GitHub Bot 3e9990f860 Allow to opt-in to use the new Hermes on Android (#53580)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53580

Changelog: [ANDROID][ADDED] Added opt-in to use the new Hermes

Reviewed By: cortinico

Differential Revision: D81035114

fbshipit-source-id: d01e44190941d161cf641ec4e03ed487aff18dd8
2025-09-04 07:42:12 -07:00
Jakub PiaseckiandFacebook GitHub Bot e9cdc308b4 Allow to opt-in to use the new Hermes on iOS (#53579)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53579

Changelog: [IOS][ADDED] Added opt-in to use the new Hermes

Reviewed By: cipolleschi

Differential Revision: D81035113

fbshipit-source-id: b12ca68824ec4e736edd4393a93c28803312eb32
2025-09-04 07:42:12 -07:00
Jakub PiaseckiandFacebook GitHub Bot 30432addfb Gate legacy debugger behind a preprocessor directive (#53578)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53578

Changelog: [Internal]

Adds a new preprocessor directive which should be set when the new Hermes is being used. This directive will disable the legacy debugger which isn't supported by it.

Reviewed By: cipolleschi, cortinico

Differential Revision: D81035112

fbshipit-source-id: b30ae348b3419ec2d064dfe7f91c9d664a66f5cf
2025-09-04 07:42:12 -07:00
Andrew DatsenkoandFacebook GitHub Bot 10a46f7b52 Add support for JS coverage (#53410)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53410

Changelog: [Internal]
Adding babel-istanbul-plugin to instrument bundle code with coverage reporting.
Metro will transform source code only when coverage flag is set up globally in jest.
Coverage map is then provided by runner as part of test result.

Reviewed By: sammy-SC

Differential Revision: D80716433

fbshipit-source-id: 3831f227f8793f874f0d2366759bb6916e747c72
2025-09-04 07:19:56 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8d33e1c205 Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53593)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53593

Reviewed By: rshest

Differential Revision: D81573635

fbshipit-source-id: a367572b7d2b3a9422e47fa05d3c001e607ec0e3
2025-09-04 04:01:12 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 95b187bb37 Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53596)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53596

Reviewed By: rshest

Differential Revision: D81574342

fbshipit-source-id: 9423d3341a9c349d7e7519b5acb7ee41f6ceb2b3
2025-09-04 03:56:08 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 7a4d5ad644 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateAutolinkingNewArchitecturesFileTaskTest.kt (#53597)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53597

Reviewed By: cortinico

Differential Revision: D81662100

fbshipit-source-id: f41c89a059dd0d8e312e5edc07172e1d8cac6597
2025-09-04 03:49:37 -07:00
generatedunixname89002005287564andFacebook GitHub Bot b0db8aa26b Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53592)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53592

Reviewed By: rshest

Differential Revision: D81569365

fbshipit-source-id: 88ec1b964a37774f29df9cbabca3c0e2c5ee4c53
2025-09-04 03:47:53 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 4553f87489 Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53591)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53591

Reviewed By: rshest

Differential Revision: D81571883

fbshipit-source-id: 479a0764eabeac968028814ec6aafa32687b0905
2025-09-04 03:13:49 -07:00
Gang ZhaoandFacebook GitHub Bot 863184fcf8 Move dumpOpcodeStats() to jsi::Instrumentation, remove IHermesExtra (#53475)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53475

This is cleanup of IHermesExtra. Move the last method in IHermesExtra,
dumpOpcodeStats(), to jsi::Instrumentation, since other profile stats
dumping methods live in that interface as well.

Changelog: [Internal]

Reviewed By: tsaichien

Differential Revision: D81087047

fbshipit-source-id: e145aafea7459a161fca04ffc30f0838ee6c03c6
2025-09-04 03:06:33 -07:00
Gang ZhaoandFacebook GitHub Bot 8c9f366bdc Move methods from IHermesExtra to IHermes (#53473)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53473

This is a cleanup of IHermesExtra:
1. Move dumpSampledTraceToProfile() and debugJavasScript() to IHermes.
I'm still keeping the empty DebugFlags, since changing that requires
more changes. It's also possible that we may need it in the future.
2. Remove `dumpBasicBlockProfileTrace`. Use
writeBasicBlockProfileTraceToFile` if users need to dump the profile.

Changelog: [Internal]

Reviewed By: tsaichien

Differential Revision: D81075460

fbshipit-source-id: b81005e531809cfd870fd9bdb5c0e17864ed92fb
2025-09-04 03:06:33 -07:00
Gang ZhaoandFacebook GitHub Bot 89d9533a97 getSHUnitCreator() to IHermes (#53419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53419

By default, this function returns nullptr. User can pass a preprocessor
definition "-DHERMES_SH_UNIT_FN=sh_export_<unit_name>" (where
<unit_name> is the name passed to shermesc when compiling the JS
input), so that this function returns the function pointer, which can
be passed to `evaluateSHUnit` for evaluation.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D80747463

fbshipit-source-id: a798a7a572679444fca111c34674fd7ced9311f3
2025-09-04 03:06:33 -07:00
Gang ZhaoandFacebook GitHub Bot 48998b4c11 Move IHermes to jsi/hermes.h (#53418)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53418

Expose these methods so that we can access from RN code. To minimize
the change, a few methods that depend on other headers or preprocessor
flags are wrapped into IHermesExtra in hermes/API/hermes.h.

Changelog: [Internal]

Reviewed By: tsaichien

Differential Revision: D80740969

fbshipit-source-id: 79565d851bc1b0833931f4fe7fb62d89d3d669ef
2025-09-04 03:06:33 -07:00
Christoph PurrerandFacebook GitHub Bot 5d65794ee4 Don't crash on reload (#53590)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53590

Changelog: [General][Fixed] ReactCxxPlatform] Don't crash on reload

Reviewed By: shwanton

Differential Revision: D81626640

fbshipit-source-id: 31016c67a1913a8be8578848e756e0447b802484
2025-09-03 19:01:15 -07:00
Christoph PurrerandFacebook GitHub Bot 43ad2c0abb Remove contextContainer !=. nullptr check in ImageFetcher (#53574)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53574

Changelog: [Internal]

This field is always non nullptr

Reviewed By: javache

Differential Revision: D81556283

fbshipit-source-id: d75b9cf9730f47c3d2d1ef028c2e738eda3dd785
2025-09-03 15:39:45 -07:00
Pieter De BaetsandFacebook GitHub Bot 9a95e19b36 Simplify BridgelessReactStateTracker (#53577)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53577

Simplify the API to keep all formatting inside of ReactHostStateTracker and remove the `bridgeless` part of the name. Bit more efficient binary-size wise.

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D81445833

fbshipit-source-id: 5bc8bc9e3de326f23e95e01e889b4e2806438c06
2025-09-03 13:51:37 -07:00
Ruslan LesiutinandFacebook GitHub Bot f9cecc5f00 fix: correctly assign name to both begin and end events for measures (#53588)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53588

# Changelog: [Internal]

Since the `name` was already moved for the begin event, there is nothing to be moved for `end` event. Instead, we will be creating a copy for the `begin` event.

This was actually affecting some entries on a timeline, like component triggers (yellow ones).

Reviewed By: vzaidman

Differential Revision: D81589847

fbshipit-source-id: 3b7d801d3429217ce279ed7de41c40c3838a5f37
2025-09-03 10:11:41 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 8d8452173a Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53584)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53584

Reviewed By: rshest

Differential Revision: D81565980

fbshipit-source-id: e9c7eeb3219ee56b693583a6cf8a7905ac360324
2025-09-03 08:12:28 -07:00
generatedunixname89002005287564andFacebook GitHub Bot e41dce3b4e Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53583)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53583

Reviewed By: rshest

Differential Revision: D81575288

fbshipit-source-id: 0315c0ac759799dc9a84e68fa8d957b5547b1682
2025-09-03 07:59:56 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 2cd06ad69a Fix CQS signal readability-implicit-bool-conversion in xplat/js/react-native-github/packages (#53582)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53582

Reviewed By: rshest

Differential Revision: D81567762

fbshipit-source-id: af4e8cc78675b0941a3fb41a7c0eb6f08dc728c1
2025-09-03 07:38:09 -07:00
Christian KruseandFacebook GitHub Bot cc83f6e84a Fix extra semi colon (#53483)
Summary:
Changelog: [Internal]
Fix extra semi colon warning

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

Reviewed By: cortinico, kuwerty

Differential Revision: D81032496

fbshipit-source-id: da7d6f8355fd6ae228033a380d38d677632bafaf
2025-09-03 07:11:08 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 3a0c402d26 fix(iOS): modal swipe dismissal works only for the first time (#53499)
Summary:
This PR fixes swipe dismissal to work each time the modal is shown. Previously modalInPresentation was set on the view controller which gets destroyed every time user dismisses the modal. This makes sure that modal in presentation is correctly preserved when showing multiple modals.

https://github.com/user-attachments/assets/c7f140e5-1c4f-4809-8453-148d4becc9eb

## Changelog:

[IOS] [FIXED] - modal swipe dismissal works only for the first time

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

Test Plan:
1. Open RN Tester
2. Check allow swipe dismissal
3. Check closing it multiple times

Reviewed By: javache

Differential Revision: D81312918

Pulled By: cipolleschi

fbshipit-source-id: 4f7cc60762660e5d5310f4973fe8df340c1ba52b
2025-09-03 07:07:39 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 87a1b510b7 Fix build with Cocopaods and Dynamic frameworks (#53367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53367

We are missing a dependency in the React-jsinspector podspec that prevents React Native from building with dynamic frameworks.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D80619664

fbshipit-source-id: 1c87ef4d3614ceea3a23196831479ecae0a5acc8
2025-09-03 06:24:23 -07:00
Pieter De BaetsandFacebook GitHub Bot 2ed6a08ef3 Mark JavaTimerManager idle callback methods as @LegacyArchitecture (#53570)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53570

Idle callbacks are implemented as a C++ module in the new architecture, this code should not be used.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D81485912

fbshipit-source-id: 18103bb96441880ff3de423aa6c03a176f6ff5de
2025-09-03 06:17:35 -07:00
Pieter De BaetsandFacebook GitHub Bot dc54eaebac Decouple TimerExecutor creation from ReactInstance (#53569)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53569

Simplify construction to save a JNI call, slightly more efficient on binary size too (1KiB hah)

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81445834

fbshipit-source-id: b0ec84d5e04d364e34eef4c3b712c62f878325cf
2025-09-03 06:17:35 -07:00
Phil PluckthunandFacebook GitHub Bot f170db412b Use autolinking react-native-config output in iOS artifacts generator (#53503)
Summary:
Resolves https://github.com/facebook/react-native/issues/53501

This is a pretty major oversight of (presumably) the old autolinking refactor. The iOS autolinking's second stage, invoked in `use_react_native!` does not accept the `react-native-config` sub-command's `react-native-config` output. This is only invoked and used in the prior step, `use_native_modules`.

The second step instead invokes old code that does something _similar_ to the new autolinking in `scripts/generate-artifacts-executor`, and happens to align in most cases. (But it does "autolinking" from scratch). tl;dr: When the results don't match up, things go wrong.

Instead, we now write the autolinking (react native config) results to a file, then read the output back in the second step.

This doesn't affect Android/Gradle, which are implemented correctly.

## Changelog:

[IOS] [FIXED] - Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source

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

Test Plan:
- See https://github.com/facebook/react-native/issues/53501 for failing repro
- Clone for working repro: https://github.com/byCedric/react-native-codegen-ios-autolinking/tree/fix-54503
  - Note: Contains this PR's changes as a patch
  - `bun install`
  - `bun expo run:ios`

Reviewed By: cortinico

Differential Revision: D81490755

Pulled By: cipolleschi

fbshipit-source-id: eefe786a116404f4ed24bd7125dfb108a811f71e
2025-09-03 05:34:11 -07:00
Samuel SuslaandFacebook GitHub Bot 3895831c2b ship releaseImageDataWhenConsumed (#53576)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53576

## Changelog:

[iOS] [Fixed] - Images are removed from memory more aggressively to prevent OOMs

Reviewed By: rshest

Differential Revision: D81490116

fbshipit-source-id: d6b12af2d80e1c0a9ab3c624a549088b300feb3e
2025-09-03 04:41:32 -07:00
Nicola CortiandFacebook GitHub Bot 9fbce3eff1 Fix build from source for 0.82 due to Gradle 9.0 (#53560)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53560

Since Gradle 9.0, all the projects in the path must have an existing folder.
As we build :packages:react-native:ReactAndroid, we need to declare the folders
for :packages and :packages:react-native as well as otherwise the build from
source will fail with a missing folder exception.

Changelog:
[Android] [Fixed] - Fix build from source due to missing folder error on Gradle 9.0

Reviewed By: fabriziocucci

Differential Revision: D81482789

fbshipit-source-id: 609b503755486e10060a0f321bd0a38bd71864a1
2025-09-03 03:55:49 -07:00
Alex HuntandFacebook GitHub Bot 7aef79bd78 Remove UNSAFE-ALLOW-SUBPATHS exports condition (#53566)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53566

TLDR; we never advertised this and it's not in use. We have an updated incoming plan for exposing internal private code to Expo / other frameworks.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D81490655

fbshipit-source-id: f3d64582f5e6092e4928865d868ea26867ee7e47
2025-09-03 03:05:31 -07:00
Christoph PurrerandFacebook GitHub Bot 9ef0d21344 Pass surfaceId to imageRequest (#53572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53572

Changelog: [Internal]

Code refactoring to pass actual `surfaceid` to PrefetchResourcesMountItem

Reviewed By: andrewdacenko

Differential Revision: D81506929

fbshipit-source-id: 6c1cb91180cc23930986b258e2a8842560c0851a
2025-09-03 00:07:26 -07:00
Sam ZhouandFacebook GitHub Bot 4365c1c9f7 Cleanup codeless suppressions in xplat/js (#53573)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53573

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81552699

fbshipit-source-id: 71b104174a8ad7fbf360cdd87109ce034f49ec70
2025-09-02 21:56:09 -07:00
Christoph PurrerandFacebook GitHub Bot f33a1cd260 Android: Schedule image prefetching on tree commit (#53555)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53555

Changelog: [Internal]

## TLDR;
We run the `ReactVitoImageManager.kt` on the Java Message Queue Thread (`mqt`) > Maybe running it on the `UiThread` (as Android view creation) solves the QE reegressions

## Issue
> Your experiment [qe:enable_image_prefetching_android_v4] is significantly moving important metric(s)

T235749297 > e.g negatively impact `sp_core` (Scroll Performance Core)

https://fburl.com/deltoid3/ef2fd92e

{F1981479985}

## Observation

After adding Perfetto traces in D80717558 and building a `automation_fbandroid_art_arm64_for_perftest_profileable` build > I see 'larger amounts' of `experimental_prefetchResource` on the JavaScript Message Queue Thread

 {F1981479808}

We do run this entire logic on the JavaScript Message Queue Thread

https://www.internalfb.com/code/fbsource/[368503303835439955d87d79439a3d19d979cd40]/fbandroid/java/com/facebook/fresco/vito/rn/ReactVitoImageManager.kt?lines=253-260

However when normally `mounting` Shadow Nodes in RN Android we jump from the  JavaScript Message Queue Thread to the Android UI Thread

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp?lines=626%2C638

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp?lines=690%2C701%2C872-883

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java?lines=897%2C943

->

https://www.internalfb.com/code/fbsource/[68603b276cb9de1ae2ecb83ec4a789ae3db3b051]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java?lines=938-946

## Idea

Run `imagePrefetcher?.prefetchResource` also on the UI thread

## Resources

### :: GDoc
- Image Prefetching for Android https://docs.google.com/document/d/1Yc5G5vuollx0I4tdXpE8Hgwn2DuIhJKwOTHak3g4Gu8/edit?fbclid=IwY2xjawLjgcBleHRuA2FlbQIxMQBicmlkETFra3N5WHg3OGV6UndYUmVTAR5KiXIDgrH2FW4HEBdezFBr2NqX4KPT6FzYQXD1sBRjEfq8d_x0JwQfeL_TXg_aem_ZqWb9dAJ59pHFfoHsrzwbw&pli=1&tab=t.0#heading=h.udv4z3lhwhf7
- React Field of View https://docs.google.com/document/d/1gHLF3oAv9JhKKcztM56iZZUPPWp0mBbjqDlosBkL1kE/edit?tab=t.0#heading=h.36p5puf8ufz7

### :: Fb4A (Facebook for Android)
The debug package name for fb4a `com.facebook.katana` is typically `com.facebook.wakizashi`

### :: Links
- How to Perfetto profile fb4a https://www.internalfb.com/wiki/Luna_Wei/Building_a_fb4a_Profile_Build/
- Building Catalyst Profile Build https://www.internalfb.com/wiki/Luna_Wei/Building_Catalyst_Profile_Build/
- Marketplace QE Regression Guide https://www.internalfb.com/intern/staticdocs/marketplace/performance/my-experiment-is-regressing-perf/
- Install for Profileable build https://www.internalfb.com/wiki/Metatrace/Metatrace-install_for_Profileable_build/
- Metatrace https://www.internalfb.com/wiki/Metatrace/

### Android Java Debug
https://www.internalfb.com/wiki/Platfrom_Health_Learnings/Onboarding_Material_or_New-hired_Engineers/How_to_Debug_FB4A_0/

```
arc focus clean --invalidate-caches-only
arc focus --targets <YOUR_TARGET> --open
```
in this case
```
arc focus --targets fb4a --open
```
It creates a `monoproject` now

 {F1981501090}

Reviewed By: javache

Differential Revision: D80950423

fbshipit-source-id: 5f1c4c096adab218a2d765d262901521bab2e6b3
2025-09-02 17:48:39 -07:00
Tim YungandFacebook GitHub Bot d6ed32f8d6 VirtualView: Configurable Hidden Layout (#53571)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53571

Changes `VirtualView` so that its layout when hidden can be configured by call sites.

Previously, it was hardcoded to only retain the last known height. However, this logic only works for `VirtualView` children oriented in a column layout.

This change enables the use of `VirtualView` in more flexible abstractions that require different hidden styles (e.g. row or grid orientations).

Also, this changes the default behavior to set `minWidth` and `minHeight`, so that the default behavior is more general and more likely to work in a reasonable manner in more use cases.

NOTE: Ideally, we would be able to default to using `flexBasis` instead. However, the `hiddenStyle` function receives a `Rect` and does not know whether the parent's flex direction is row or column to influence whether to use `targetRect.width` or `targetRect.height`. This is an opportunity for future improvement.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D81344126

fbshipit-source-id: 33d9e81601b671059f97b4590816243cbd24734a
2025-09-02 16:28:02 -07:00
Tim YungandFacebook GitHub Bot 1604232e8d VirtualView: Create Experimental Feature Flag (#53533)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53533

Creates a new `enableVirtualViewExperimental` feature flag that determines whether `VirtualView` uses the old or new implementation.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D81340963

fbshipit-source-id: f550fe4e4573e080eb8668077d0ad3ca53cd4d33
2025-09-02 16:28:02 -07:00
generatedunixname537391475639613andFacebook GitHub Bot c1320eb2e1 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt (#53559)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53559

Reviewed By: cortinico

Differential Revision: D81476261

fbshipit-source-id: f3f38664a7dc63a11b027ab2b6a5a65ca374ebaa
2025-09-02 14:58:53 -07:00
Oskar KwaśniewskiandFacebook GitHub Bot 05c4321b19 fix: fallback alert controller to UIScreen size (#53500)
Summary:
This PR falls back to UIScreen when windowScene is not available.

<img width="500" alt="CleanShot 2025-08-28 at 14 30 59@2x" src="https://github.com/user-attachments/assets/9dda3153-dfe7-48a5-9d0e-5416c2e34c64" />

## Changelog:

[IOS] [FIXED] - Simplify RCTAlertController, don't create additional UIWindow

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

Test Plan:
Open the alert multiple times to check if everything works as expected.

Rollback Plan:

Reviewed By: javache

Differential Revision: D81410450

Pulled By: cipolleschi

fbshipit-source-id: c27ea98d9e811c2f259f0ff3c6689482d116c418
2025-09-02 11:19:42 -07:00
Christoph PurrerandFacebook GitHub Bot 61deab7f94 Add feature flag to trigger Android image prefetch request on the UI thread (#53554)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53554

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D81468680

fbshipit-source-id: 9da40feaf90756645d2aed5c051dc137d7a90534
2025-09-02 10:44:59 -07:00
Jorge Cabiedes AcostaandFacebook GitHub Bot e1071ce683 Clean up legacy CSSBackgroundDrawable.java and enablNewBackgroundAndBorderDrawables featureflag (#53534)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53534

BackgroundDrawable and BorderDrawable have already substituted CSSBackgroundDrawable en every Android surface.
- Deleting CSSBackgroundDrawable.java and its callsites
- Deleting enableNewBackgroundAndDrawable featureflag

Just cleaning up what at this point is just dead code.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D81330969

fbshipit-source-id: bcf66ec8d3225802432ae1d93a2b26ea65cfcda0
2025-09-02 10:19:57 -07:00
generatedunixname537391475639613andFacebook GitHub Bot b2b992c5bb xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt (#53545)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53545

Reviewed By: cortinico

Differential Revision: D81428987

fbshipit-source-id: 7bd04528384bd96f659cf969806d367296665d97
2025-09-02 08:11:47 -07:00
Zeya PengandFacebook GitHub Bot 716cbae68d support ObjectAnimatedNode (#53517)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53517

## Changelog:

[Internal] [Added] - support ObjectAnimatedNode

Reviewed By: christophpurrer, fabriziocucci

Differential Revision: D81260836

fbshipit-source-id: 82bdda59d54140189684003adfb1adf5c8e2904d
2025-09-02 07:06:09 -07:00
Vitali ZaidmanandFacebook GitHub Bot 5128d35e69 changelog/v0.82.0-rc.0 (#53562)
Summary:
Changelog: [Internal] changelog for v0.82.0-rc.0

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

Reviewed By: fabriziocucci, cortinico

Differential Revision: D81483668

Pulled By: vzaidman

fbshipit-source-id: 6f044ce9918f147d981f87c9988e27600cac0ab7
2025-09-02 06:11:26 -07:00
Nick LefeverandFacebook GitHub Bot 8f0713fd4b Add test for empty layout culling skip (#53551)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53551

See title.

Follow up on D81044841

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81447133

fbshipit-source-id: 7e6ca4523401c30c4861606c795f306193d97a15
2025-09-02 03:25:54 -07:00
Vitali ZaidmanandFacebook GitHub Bot 6e47c953d3 fix release script testing artifact for rntester (#53552)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53552

Changelog: [Internal]

Reviewed By: fabriziocucci, cortinico, hoxyq

Differential Revision: D81452967

fbshipit-source-id: 3032b49b6c7fd49901b8f47886084c98479b368f
2025-09-02 03:01:57 -07:00
Phil PluckthunandFacebook GitHub Bot 9731e8ebc5 Replace execSync with spawnSync for tarball extraction paths that need to be escaped (#53540)
Summary:
Follow-up to https://github.com/facebook/react-native/issues/53194

This wasn't previously visible in testing without prebuilds and without a release build. This doesn't show up in debug builds.

When testing more against paths that contain spaces, I noticed that release builds can still run into trouble due to the use of `execSync` without escaping paths. While, in other scripts that aren't used in user-projects (afaict), we often escape with quotes and rely on `execSync` calling the shell (due to its `shell: true` default), in some scripts we don't have quote escapes.

That said, since paths could in theory contain quotes, adding quotes wouldn't be sufficient. Instead, since the affected `tar` calls are really trivial, we can instead use `spawnSync` with the `shell: false` default, which escapes arguments automatically.

## Changelog:

[IOS] [FIXED] - fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces

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

Test Plan: - Create a project in a folder `with spaces` and build a release build

Reviewed By: cipolleschi, cortinico

Differential Revision: D81406841

Pulled By: robhogan

fbshipit-source-id: 08bb06b2cd2b15dc17c2f95fab9024129deca6f3
2025-09-01 13:32:10 -07:00
Rubén NorteandFacebook GitHub Bot 727caca09c Set up modern performance APIs if the native module is available (#53431)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53431

Changelog: [internal]

This renames `setUpPerformanceObserver` as `setUpPerformanceModern` and removes the need to call it manually. If the native module is defined, we define the whole new API.

Reviewed By: javache

Differential Revision: D80803626

fbshipit-source-id: ef41cb9aa959ee898d32724c102d7597e6bee84e
2025-09-01 09:18:19 -07:00
Rubén NorteandFacebook GitHub Bot 1716b3ca5c Implement private constructors for Performance APIs (#53430)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53430

Changelog: [internal]

This fixes the spec-compliance of several classes in the Performance API by not allowing userland code to instantiate them directly.

This also exposes some missing interfaces from the Performance API in the global scope.

Reviewed By: rshest

Differential Revision: D80800076

fbshipit-source-id: f6439b9c7914817ef552e78fd61646ccab1e1de2
2025-09-01 09:18:19 -07:00
Rubén NorteandFacebook GitHub Bot bb508a4d94 Refactor PerformanceEntry and subclasses to use interfaces for initialization (#53429)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53429

Changelog: [internal]

This is a refactor of the types in `PerformanceEntry` and subclasses to accept interfaces instead of objects. This allows us to pass down the init object from subclasses to the superclass without having to create intermediate objects.

Additionally, this is also more semantically correct, as existing APIs don't need those options to be own properties of the init object.

Existing benchmark for Performance doesn't show any significant impact.

Reviewed By: rshest

Differential Revision: D80800075

fbshipit-source-id: ab439d70f4db9ce60e3089d89ccb105a91e7ef48
2025-09-01 09:18:19 -07:00
Rubén NorteandFacebook GitHub Bot 81f8b0a6bf Implement PerformanceObserver.takeRecords() (#53428)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53428

Changelog: [internal]

This is the last method in `PerformanceObserver` to implement. For some reason we never added it, even though it was trivial.

Reviewed By: rshest

Differential Revision: D80717237

fbshipit-source-id: ae3bd243d0f3f0fe4f0705437d78d14c532515f7
2025-09-01 09:18:19 -07:00
Rubén NorteandFacebook GitHub Bot 8ed0fa8dda Remove unnecessary references to internal types in performance tests (#53427)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53427

Changelog: [internal]

Migrate the imported types to the globally defined ones, so we follow the good practice of only accessing the public API in Fantom tests.

Reviewed By: rshest

Differential Revision: D80807160

fbshipit-source-id: 77d792b56b53c8da8409dd9133cd111afb8084f1
2025-09-01 09:18:19 -07:00
Rubén NorteandFacebook GitHub Bot 05be3742d4 Define Flow types for Performance APIs (#53433)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53433

Changelog: [internal]

This adds the definitions for the Web Performance APIs in the global scope.

Reviewed By: zeyap

Differential Revision: D80811659

fbshipit-source-id: a81117a27a480ba03f8feb2e813a3a66a10307f9
2025-09-01 09:18:19 -07:00
Alex HuntandFacebook GitHub Bot 0a0b48b5ff Expose ListViewToken type as root export (#53539)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53539

Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-14190663.

Changelog:
[General][Added] - `ListViewToken` is now exposed when using `"react-native-strict-api"`

Reviewed By: rshest

Differential Revision: D81380882

fbshipit-source-id: 1da5c50eaec2f8dc4a8cde60e7441249556053a8
2025-09-01 08:39:22 -07:00
Pieter De BaetsandFacebook GitHub Bot 46278e30e3 Dedupe Accessibility enum string conversions (#53550)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53550

Noticed some duplication between `getDiffProps` and `accessibilityPropsConversion`

Changelog: [Internal]

Reviewed By: lenaic, rshest

Differential Revision: D81435037

fbshipit-source-id: b2701f1aec5e647c165a0212f6180edba90fd9f9
2025-09-01 08:38:27 -07:00
Ruslan LesiutinandFacebook GitHub Bot e64dce582a Set threshold for a number of unique nodes in ProfileChunk (#53536)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53536

# Changelog: [Internal]

For every chunk, we already have a threshold for the number of samples captured in this chunk.

There could be really tall call stacks, where we could record hundreds of unique nodes, which makes the chunk already big enough for a CDP traffic on android.

We are adding a threshold for a number of unique nodes in a single chunk. If the chunk has a greater number of nodes recorded, it will be dispatched over CDP.

Reviewed By: huntie

Differential Revision: D81339677

fbshipit-source-id: 388d14c64c4c3f60918a8526025f79d19d397cb4
2025-09-01 07:12:55 -07:00
Ruslan LesiutinandFacebook GitHub Bot 8eea1660f4 Add support for recording Runtime Profiles for multiple JavaScript threads (#53535)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53535

# Changelog: [Internal]

This primarily addressed the case when we have captured a Runtime Profile during the app startup. The Hermes Runtime is created on the main thread, so the first few samples will be recorded there, but then it will be moved to JavaScript thread.

Reviewed By: huntie

Differential Revision: D81339676

fbshipit-source-id: 8202ca03df54134330aa921a9a0a97816c51cea5
2025-09-01 07:12:55 -07:00
Pieter De BaetsandFacebook GitHub Bot bae99efc26 Add test for aria-hidden to View (#53548)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53548

Add tests to View similar to D81043503, and clarify why `accessibilityElementsHidden` does not show up in the rendered component tree (because Fantom uses the Android platform for bundling, and Android does not have accessibilityElementsHidden in its BaseViewConfig.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D81437063

fbshipit-source-id: aa10573aee686d1d650b152365607877f34f8508
2025-09-01 06:31:04 -07:00
Maciej JastrzębskiandFacebook GitHub Bot 0f39fc3000 fix(a11y): aria-hidden support for Text, non-editable TextInput and Image (#53364)
Summary:
Fixes https://github.com/facebook/react-native/issues/53350

This PR adds support for missing `aria-hidden` prop handling on:
- `Text`
- non-editable `TextInput`
- `Image`

The changes are pretty simple and analogous to `View` logic:
- iOS: setting `accessibilityElementsHidden`, `accessible` (for `Image`)
- Android: setting `importantForAccessibility="no-hide-descendents"

Note: [according to MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-hidden) `aria-hidden` should not be used on focusable elements, which excludes editable `TextInput`

## Changelog:

[GENERAL] [FIXED] `aria-hidden` support for `Text`, non-editable `TextInput` and `Image`

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

Test Plan:
Added new section to RN Tester (APIs => Accessibility => aria-hidden

### After (iOS/Android)

https://github.com/user-attachments/assets/c62f8beb-7cb1-4919-833d-3fb906309cac

https://github.com/user-attachments/assets/78ca5e28-a858-4fd6-ac1c-5ec87872f3fc

### Before (iOS/Android)

https://github.com/user-attachments/assets/84560373-4b31-4793-8997-ee14daa77990

https://github.com/user-attachments/assets/b20074c9-f021-4a90-bce5-75e440a4bbc3

Reviewed By: rshest

Differential Revision: D81043503

Pulled By: javache

fbshipit-source-id: 26b2660a75afcdedba07bee980d8c7f154087ae2
2025-09-01 06:05:43 -07:00
Nicola CortiandFacebook GitHub Bot 2246e2b82c Fix wrong default for jsBundleAssetPath on DefaultReactHost (#53546)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53546

The default for `DefaultReactHost.getDefaultReactHost(...,jsBundleAssetPath,...)` is wrong.
The default should be `index.android.bundle`.

That's the same value we had for the same field in ReactNativeHost:
https://www.internalfb.com/code/fbsource/[76a814c7d27036f7056c9f2c7e1370746ed4ccd4]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java?lines=225-227

Having just `index` as default cause the app to instacrash on release because the bundle can't be found.

Reviewed By: fabriziocucci

Differential Revision: D81435921

fbshipit-source-id: ea871f771fd61e9d838a800e988f2edc308ec8ea
2025-09-01 04:49:17 -07:00
Moti ZilbermanandFacebook GitHub Bot 529fd97c62 Changelog for 0.81.1 (#53527)
Summary:
Changelog:
[Internal]

TSIA

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

Reviewed By: cortinico

Differential Revision: D81312343

Pulled By: motiz88

fbshipit-source-id: 37cb37002d4af0c851416d6b8a0ac310153bd68e
2025-09-01 03:13:42 -07:00
Alex HuntandFacebook GitHub Bot 024d25794a Expose Animated.CompositeAnimation type (#53538)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53538

Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-14190598.

Changelog:
[General][Added] - `Animated.CompositeAnomation` is now exposed when using `"react-native-strict-api"`

Reviewed By: rshest

Differential Revision: D81380950

fbshipit-source-id: f90f175cfd6f34c6a9564a8e340156103887d710
2025-09-01 02:57:25 -07:00
Christoph PurrerandFacebook GitHub Bot 544f3b345d Android: Schedule image prefetching on tree commit (#53491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53491

Changelog: [Internal]

Reviewed By: lenaic, cipolleschi

Differential Revision: D81106112

fbshipit-source-id: b06643312836bd018bfc9a1565b76976cd55dac9
2025-08-31 08:32:54 -07:00
Alex HuntandFacebook GitHub Bot 83e19813ff Deprecate StyleSheet.absoluteFillObject (#53530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53530

Deprecate the `StyleSheet.absoluteFillObject` API in favour of `StyleSheet.absoluteFill` (functionally identical).

Secondly, refine the type definitions in our source code (and Strict TS API) from `any` → `AbsoluteFillStyle` — resolves https://github.com/facebook/react-native/issues/53470.

This will be followed with updates to our docs.

Changelog:
[General][Deprecated] - `StyleSheet.absoluteFillObject` is deprecated in favor of `StyleSheet.absoluteFill` (equivalent).

Reviewed By: yungsters

Differential Revision: D81327548

fbshipit-source-id: 2bcf14694dc1bd959419629ce717760086b80ec3
2025-08-30 03:58:51 -07:00
Christoph PurrerandFacebook GitHub Bot e30f34eda6 Android: Image Prefetching send ImageResizeMode as enum value (#53516)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53516

Changelog: [General][Breaking] Android: Image Prefetching send ImageResizeMode as enum value

Idea: Reduce JNI payload by sending int values instead of strings

Reviewed By: lenaic

Differential Revision: D81252246

fbshipit-source-id: 7ba128725900422f8654b3019014fd49ec8152b6
2025-08-29 22:33:49 -07:00
generatedunixname537391475639613andFacebook GitHub Bot d1c5dae2e6 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.cpp (#53525)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53525

Reviewed By: rshest

Differential Revision: D81217006

fbshipit-source-id: 8c156b24438f8427a5ce953ebdcdf7d223bf1b60
2025-08-29 22:25:30 -07:00
Intl SchedulerandFacebook GitHub Bot d3574313c8 translation auto-update for batch 0/60 on master
Summary:
Chronos Job Instance ID: 1125907998678314
Sandcastle Job Instance ID: 36028799140146546

Processed xml files:
android_res/com/facebook/common/util/res/values/strings.xml
android_res/com/oculus/auth/authenticator/meta/res/values/strings.xml
android_res/com/oculus/os/q4b/mma/res/values/strings.xml
android_res/com/oculus/horizon/common/res/values/strings.xml
android_res/com/oculus/horizon/platformplugin/res/values/strings.xml
android_res/com/oculus/horizon/try_before_you_buy/res/values/strings.xml
android_res/com/oculus/horizon/mediaupload/res/values/strings.xml
android_res/com/oculus/horizon/linkedaccounts/res/values/strings.xml
android_res/com/oculus/auth/authenticator/work/res/values/strings.xml
android_res/com/oculus/auth/authenticator/oculus/res/values/strings.xml
android_res/com/oculus/auth/authenticator/instagramsso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/horizonworldsplatform/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebooksso/res/values/strings.xml
android_res/com/oculus/auth/authenticator/facebook/res/values/strings.xml
android_res/com/oculus/demoapp/res/values/strings.xml
apps/fblite/xMob-android/scripts/strings/values/strings.xml
apps/fblite/xMob-android/res/values/strings.xml
android_res/com/facebook/resources/res/values/strings.xml
android_res/com/facebook/liblite/res/values/strings.xml
android_res/com/facebook/iorg/common/upsell/res/values/strings.xml
android_res/com/facebook/iorg/common/res/values/strings.xml
android_res/com/facebook/iorg/lib/res/values/strings.xml
android_res/com/facebook/iorg/app/res/values/strings.xml
android_res/rendercore/res/values/strings.xml
android_res/com/facebook/content/res/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml
../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/devsupport/values/strings.xml
android_res/com/facebook/common/i18n/res/values/strings.xml
android_res/com/facebook/common/timeformat/res/values/strings.xml
android_res/com/facebook/common/strings/external/res/values/strings.xml
android_res/com/facebook/common/strings/res/values/strings.xml
android_res/com/facebook/fbui/widget/pagerindicator/res/values/strings.xml
android_res/com/facebook/fbui/widget/contentview/res/values/strings.xml
android_res/com/facebookpay/widget/res/values/strings.xml
android_res/com/facebookpay/ecpexception/res/values/strings.xml
android_res/com/facebookpay/expresscheckout/res/values/strings.xml
android_res/com/fbpay/auth/res/values/strings.xml
android_res/com/facebook/widget/res/values/strings.xml
android_res/com/facebook/config/appspecific/res/values/strings.xml
android_res/com/facebook/ui/mainview/res/values/strings.xml
android_res/com/facebook/audience/stories/storysurface/activity/main/res/values/strings.xml
android_res/com/facebook/ui/emoji/res/values/strings.xml
android_res/com/facebook/ui/emoji/common/res/values/strings.xml
android_res/com/facebook/nativetemplates/res/values/strings.xml
android_res/com/facebook/dialtone/res/values/strings.xml
android_res/com/facebook/zero/messenger/semi/res/values/strings.xml
android_res/com/facebook/zero/res/values/strings.xml
android_res/com/facebook/zero/common/res/values/strings.xml
android_res/com/facebook/widget/facepile/res/values/strings.xml
android_res/com/facebook/tabbar/res/values/strings.xml
android_res/com/facebook/ui/toolbar/res/values/strings.xml
android_res/com/facebook/dialtone/messenger/res/values/strings.xml
android_res/com/facebook/feedback/reactions/res/values/strings.xml
android_res/com/facebook/ufiservices/res/values/strings.xml
android_res/com/facebook/ui/edithistory/res/values/strings.xml
android_res/com/facebook/pages/common/userinviter/res/values/strings.xml
android_res/com/facebook/pages/common/bannedusers/res/values/strings.xml
android_res/com/facebook/friending/common/res/values/strings.xml
android_res/com/facebook/messaging/ui/stickerstore/res/values/strings.xml
android_res/com/facebook/stickers/res/values/strings.xml
android_res/com/facebook/messaging/shared/res/values/strings.xml
android_res/com/facebook/caspian/res/values/strings.xml
android_res/com/facebook/timeline/widget/actionbar/res/values/strings.xml
android_res/com/facebook/showpages/res/values/strings.xml
android_res/com/facebook/nux/res/values/strings.xml
android_res/com/facebook/facecast/common/badge/res/values/strings.xml
android_res/com/facebook/feedbase/res/values/strings.xml
android_res/com/facebook/feedback/ui/res/values/strings.xml
android_res/com/facebook/video/player/res/values/strings.xml
android_res/com/facebook/spherical/res/values/strings.xml
android_res/com/facebook/saved/common/res/values/strings.xml
android_res/com/facebook/video/comments/res/values/strings.xml
android_res/com/facebook/messaging/media/picker/res/values/strings.xml
android_res/com/facebook/messaging/media/res/values/strings.xml
android_res/com/facebook/messaging/res/values/strings.xml
android_res/com/facebook/ui/media/contentsearch/res/values/strings.xml
android_res/com/facebook/transliteration/res/values/strings.xml
android_res/com/facebook/bookmark/res/values/strings.xml
android_res/com/facebook/orca/res/values/strings.xml
android_res/com/facebook/workshared/userstatus/donotdisturb/res/values/strings.xml
android_res/com/facebook/widget/tokenizedtypeahead/res/values/strings.xml
android_res/com/facebook/widget/refreshableview/res/values/strings.xml
android_res/com/facebook/rtc/common/res/values/strings.xml
android_res/com/facebook/payments/ui/res/values/strings.xml
android_res/com/facebook/fig/mediagrid/res/values/strings.xml
android_res/com/facebook/pages/app/clicktomessengerads/messagesuggestion/ui/res/values/strings.xml
android_res/com/facebook/messagingneue/res/values/strings.xml
android_res/com/facebook/messaging/widget/toolbar/res/values/strings.xml
android_res/com/facebook/messaging/users/username/res/values/strings.xml
android_res/com/facebook/messaging/tincan/messenger/res/values/strings.xml
android_res/com/facebook/messaging/threadview/quickpromotion/res/values/strings.xml
android_res/com/facebook/messaging/threadview/message/res/values/strings.xml
android_res/com/facebook/messaging/threadview/games/res/values/strings.xml
android_res/com/facebook/messaging/xma/res/values/strings.xml
android_res/com/facebook/messaging/threadview/admin/res/values/strings.xml
android_res/com/facebook/messaging/reactions/res/values/strings.xml
android_res/com/facebook/messaging/threadview/attachment/video/res/values/strings.xml
android_res/com/facebook/messaging/settings/res/values/strings.xml
android_res/com/facebook/messaging/searchnullstate/res/values/strings.xml

allow-large-files
ignore-conflict-markers
opt-out-review
drop-conflicts

Differential Revision: D81370215

fbshipit-source-id: 3263546330d3930944d0666759960859918c4a7e
2025-08-29 18:51:42 -07:00
Ramanpreet NaraandFacebook GitHub Bot 9539cd2626 both: Deprecate c++ legacy core classes (#53454)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53454

Let's deprecate all the classes that aren't used by interop or the new architecture.

Changelog: [General][Deprecated] - Deprecate all the c++ classes not used by interop, or the new architecture.

Reviewed By: arushikesarwani94

Differential Revision: D80575767

fbshipit-source-id: 1d485300cbe24260d77bbeac75fe5b839121b6c8
2025-08-29 17:54:23 -07:00
Chi TsaiandFacebook GitHub Bot 028e582043 Make jsi::Object constructor explicit (#53521)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53521

Make `jsi::Object` constructor explicit, so its creation is explicit and
intentional. This prevents any sad foot-gun of constructing an Object
implicitly from a Runtime, which is certainly not a JS object.

Changelog: [Internal]

Reviewed By: avp

Differential Revision: D81274439

fbshipit-source-id: 5a9d9907f9deff7625dcff9c1072eb135ab7840e
2025-08-29 12:46:38 -07:00
Alan LeeandFacebook GitHub Bot 1ad2ec099a replace getWindowDisplayMetrics with getScreenDisplayMetrics (#53523)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53523

update `DisplayMetricsHolder.getWindowDisplayMetrics()` to `getScreenDisplayMetrics()`.

Where window width and height is not needed, prefer to use `screenDisplayMetrics` as with upcoming diff `windowDisplayMetrics` initialization only happen using UiContext and have potential to cause more issues if used unnecessarily.

Changelog: [Internal] Update `DisplayMetricsHolder.getWindowDisplayMetrics()` to use `.getScreenDisplayMetrics()`

 ---

Reviewed By: mlord93

Differential Revision: D81270196

fbshipit-source-id: 5b392d67449ddceebbc0fe81db15fa61ae44108f
2025-08-29 12:21:57 -07:00
Alex HuntandFacebook GitHub Bot a4581ecd8b Fix/simplify invariant for ColorSchemeName, align manual typedef (#53397)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53397

This is a runtime behaviour fix and an API change to `Appearance.setColorScheme`, motivated by a user report where providing `'unspecified'` (valid) to this function would trigger an incorrect invariant throw. Furthermore, there is already a [first party use](https://github.com/facebook/react-native/blob/aec35b896053d9372ccdaf67c939b2eb216d3455/packages/react-native/Libraries/Utilities/Appearance.js#L101) where we call `Appearance.setColorScheme('unspecified')`.

**Changes**

- `Appearance.d.ts` (current public API, manual types): Fix `ColorSchemeName` type to include `'unspecified'` value, and narrow to remove nullability — aligning with existing Flow source for this type in `NativeAppearance`.
- `Appearance.js` (implementation): Fix the invariant throw by **removing it**, and instead narrowing the input type to non-nullable. Redundant work in `getState` and `getColorScheme` is removed.

Changelog: [General][Breaking] `Appearance.setColorScheme` no longer accepts a nullable value

Reviewed By: andrewdacenko

Differential Revision: D80705652

fbshipit-source-id: cf221a33447606653050d471ca2d0347ab30db81
2025-08-29 11:42:14 -07:00
Andrew DatsenkoandFacebook GitHub Bot b7e64bea29 Ignore unusually early timestamps (#53514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53514

Changelog: [Internal]
Add a way to ignore unusually early timestamps, in our example those are artificial marks to create web tracks in correct order, coming from console.timeStamp via React. These markers are ignore in RNDT on Chrome, but not excluded in perfetto.

Reviewed By: hoxyq

Differential Revision: D81246527

fbshipit-source-id: d3342036698d1607c98e5bb4273ea1a3716fcb03
2025-08-29 11:30:34 -07:00
Christoph PurrerandFacebook GitHub Bot 0121208a96 Simplify ImageRequest conversion (#53492)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53492

Changelog: [Internal]

Goal is to simplify code and to lower the JNI payload

- Send values as `int` instead of `Double` if they are converted to `int` on the Java side
- We only have 2 optional values - all others are mandatory

Reviewed By: lenaic

Differential Revision: D81202196

fbshipit-source-id: df8b7d9e6a98e7c919de9be6a277876684f0383c
2025-08-29 10:03:16 -07:00
Sam ZhouandFacebook GitHub Bot 6c7c518d42 Turn on experimental.natural_inference.local_object_literals.followup_fix in xplat (#53528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53528

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81289138

fbshipit-source-id: 05e2f5ad337f616a92df97ea52af8891448e122f
2025-08-29 06:25:57 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 8f8d6f0689 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.kt (#53524)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53524

Reviewed By: rshest

Differential Revision: D81210918

fbshipit-source-id: 9c68952d658b846194fbcb0ccf79d3dc6878ef2b
2025-08-29 03:36:29 -07:00
Devan BuggayandFacebook GitHub Bot 52937337c3 Remove legacy perf overlay from DevMenu (#53328)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53328

Disables the legacy performance overlay toggle from the Android DevMenu to make way for V2.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D79791703

fbshipit-source-id: c99ac95e2907ce978ef0c2711ad304c9a3f278ec
2025-08-29 03:14:56 -07:00
Devan BuggayandFacebook GitHub Bot 6a0b9d135d Add Analyze Performance option to DevMenu (#53334)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53334

Adds background performance tracing options to the DevMenu based on the current background tracing state. Analyzing a trace will automatically open dev tools, navigate to the performance tab, and show the last 20 seconds of recorded performance data.

Changelog: [Internal]

Reviewed By: javache

Differential Revision: D79714164

fbshipit-source-id: 72ad4be4604c5f4e304b49877b2699be36562655
2025-08-29 03:14:56 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 84472d9ebc Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D81253369

fbshipit-source-id: fa6c5fca5e865c787434c1466574aad5acc15a61
2025-08-29 02:11:12 -07:00
Pieter De BaetsandFacebook GitHub Bot b02251e7f5 Simplify RawValue container type checks (#53508)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53508

Simplify the expressions for checking a type of a container by always returning instead of falling through and returning.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D81230049

fbshipit-source-id: 02fd827462c9acf05a83bf88ed6bd0e6db55ebc8
2025-08-29 00:49:21 -07:00
Pieter De BaetsandFacebook GitHub Bot a44c5a0dbf Use uint32_t as internal Color representation (#53507)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53507

We need this to be an unsigned value everywhere but all the API's and interfaces described this a signed number. While this doesn't make a difference in practice, it's better to explicit.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D81230050

fbshipit-source-id: 1eb914a79b9b94654cfa54c20a81ce689f79dcb9
2025-08-29 00:49:21 -07:00
Christoph PurrerandFacebook GitHub Bot 5858c8309d Don't prefetch Android res images with int ids (#53493)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53493

Changelog: [Internal]

Don't prefetch local images shipped with the app

Reviewed By: lenaic

Differential Revision: D81200872

fbshipit-source-id: 8578b1be2d92e88a618dac5f2a27ba7c4484fa88
2025-08-28 23:31:24 -07:00
Christoph PurrerandFacebook GitHub Bot a2c6a3e246 Preparation to prefetch image requests in batch mode (#53490)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53490

Changelog: [Internal]

Sending individual image prefetch request on Android over JNI is causing measurable performance regression. The idea here is batch all image prefetch request for a given shadowNodeTree and then flush it all at once - **DONE** in the next change.

Another optimization we should consider is to execute the batch on `n imagePrefetchRequest` off the JavaScript thread `mqt_v_js` and instead on e.g. the UiThread (on which currently Android Image UI initiates image resource downloads)

Reviewed By: lenaic

Differential Revision: D81186916

fbshipit-source-id: f8b24e70f2ded237be96bdb973b72acbbb8b1c20
2025-08-28 21:03:56 -07:00
Chi TsaiandFacebook GitHub Bot b2d25c8731 Add Value override for has/get/setProperty (#52910)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52910

For `get/has/setProperty`, we should also be able to take in a generic
JS Value as the property key. This change adds the Value overload for
these APIs.

The default implementation will use `Reflect.get`, `Reflect.has`, and
`Reflect.set`.

Changelog: [Internal]

Reviewed By: lavenzg

Differential Revision: D79120823

fbshipit-source-id: 7e2e5ff1ca93397c549e7dd922797fe77aa97940
2025-08-28 19:21:27 -07:00
Tim YungandFacebook GitHub Bot f06f9c9be6 RN: Remove Feature Flag Override Argument (#53513)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53513

D62853299 introduced the `defaultValue` argument to feature flag override functions, with the intent of enabling override functions to do something like this:

```
myFeatureFlag: (defaultValueForFlag) => someCondition ? value : defaultValueForFlag
```

However, there are no current use cases for this. This particular use case can also be solved by expanding support for override functions to return `null` or `undefined` which falls back to using the default value.

Furthermore, the type system has a difficult time representing the constraints when there are non-boolean JavaScript-only overrides (which was introduced recently).

This diff removes the argument and adds support for override functions to return `null` or `undefined`.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D81163557

fbshipit-source-id: 38876c83d51d857dbea889928248410041c5d6d7
2025-08-28 14:48:25 -07:00
Luna WeiandFacebook GitHub Bot 41a1467db3 Fix VirtualViewExperimental alignment for empty cases (#53519)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53519

Changelog: [Internal] - Remove empty checks on the target rects and early return for empty ScrollView rects -- aligning the implementation with v1 of VirtualView

Reviewed By: yungsters

Differential Revision: D81247994

fbshipit-source-id: 4fda9f90e18d736944fe4236a4b79f0681e1564c
2025-08-28 14:34:49 -07:00
Luna WeiandFacebook GitHub Bot 09be5d91c6 Listen to onSizeChanged and update debugLogs (#53518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53518

Changelog: [Internal] - Listen to `onSizeChanged` for VirtualViewExperimental and VirtualViewContainer (ScrollView) and add more debug logs and format the virtualViewID consistently for easier grepping

Reviewed By: yungsters

Differential Revision: D81184013

fbshipit-source-id: a4314ab0f94a87e97a7d9b74696726803525c698
2025-08-28 14:34:49 -07:00
Christoph PurrerandFacebook GitHub Bot 0808af3724 Use RuntimeSchedulerKey instead of stringly typed name (#53509)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53509

Changelog : [Internal]

Reviewed By: lenaic

Differential Revision: D81206776

fbshipit-source-id: e71842e50da71ff27fbcd37faf28d883ec0f809a
2025-08-28 14:07:40 -07:00
Joe VilchesandFacebook GitHub Bot dae87c484e Use designated initializer list in ScrollViewShadowNode (#53512)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53512

Noticed a lint for this so decided to change

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D81159958

fbshipit-source-id: c0b4b73055de26ea089e3cdb4edb7f073bd751d5
2025-08-28 13:26:26 -07:00
Alex HuntandFacebook GitHub Bot 9dba7112cf Consolidate API changes to openDebugger (#53502)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53502

Follows D81138169.

- This simplifies the total changes needed on implementing DevSupport classes.
- Widen outer API to accept any `String` panel name (futureproofing).
- Also add a complete set of supported values `DebuggerFrontendPanelName`.

Changelog:
[Android][Changed] - DevSupport `openDebugger()` methods now accept a `panel: String?` param. Frameworks directly implementing `DevSupportManager` will need to adjust call signatures.

Reviewed By: hoxyq, cortinico

Differential Revision: D81227870

fbshipit-source-id: 57b73703557971332e05076fb4ccac218079652a
2025-08-28 11:32:13 -07:00
Moti ZilbermanandFacebook GitHub Bot 9d3bcb4404 Auto-hide main menu on Windows/Linux (#53511)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53511

Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D81237715

fbshipit-source-id: 79dac7424e925539ba39706710c743c22d094976
2025-08-28 11:14:59 -07:00
Ramanpreet NaraandFacebook GitHub Bot 5e80d5c76f ios: Deprecate legacy core components (#53455)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53455

All these components have fabric replacements.

Let's deprecate them, so we can remove them eventually.

Changelog: [iOS][Deprecated] Deprecate all the legacy core components that have replacement implementations in fabric.

Reviewed By: cipolleschi

Differential Revision: D80973216

fbshipit-source-id: 2b20da0800f099244b4813abf9d8af175627a445
2025-08-28 11:13:17 -07:00
Ramanpreet NaraandFacebook GitHub Bot 70f53ac4ea ios: Deprecate objc legacy core classes (#53453)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53453

Let's deprecate all the classes that aren't used by interop, or the new architecture.

Changelog: [iOS][Deprecated] Deprecate all the objc classes not used by interop, or the new architecture.

Reviewed By: javache

Differential Revision: D80575768

fbshipit-source-id: ad12e4b639c21d608636eedbc7cd502fa9d7f461
2025-08-28 11:13:17 -07:00
Tiangong LiandFacebook GitHub Bot 79f0466b45 Suppress a kotlin 2.2.0 bug of IDENTITY_SENSITIVE_OPERATIONS_WITH_VALUE_TYPE (#53489)
Summary:
Changelog: [Internal]

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

For error
```
Identity-sensitive operation on an instance of value type 'Int?' may cause unexpected behavior or errors.
```
due to https://youtrack.jetbrains.com/issue/KT-78352/

Reviewed By: cortinico

Differential Revision: D81174630

fbshipit-source-id: c68e3a348e75b7bceb183b77a45b2729f1e70bcd
2025-08-28 10:58:59 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 0e1b1ad469 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareGlogTaskTest.kt (#53506)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53506

Reviewed By: javache

Differential Revision: D81222404

fbshipit-source-id: 514cbe3689a6e71d08266cdab33b8f84f318c118
2025-08-28 10:48:59 -07:00
Moti ZilbermanandFacebook GitHub Bot d1a99907cb Work around Electron Windows command-line args quirk (#53510)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53510

Changelog: [Internal]

Electron imposes a [strange undocumented limitation](https://github.com/electron/electron/pull/13039) on the format of command-line arguments, which for some reason only affects Windows. Basically, the command line is truncated after the first argument that looks like a URL.

Electron's recommendation for avoiding this is to prefix the argument list with `--`,  but I prefer switching to a different arg format (`--x=y` instead of `--x y`) that will prevent us from ever running into this issue.

NOTE: I will follow up with a diff to harden arg parsing in our Electron code so that it only accepts the `--x=y` format.

Reviewed By: huntie

Differential Revision: D81237713

fbshipit-source-id: a255dc63b6486b96d9f7ccf780d1b09bc4ddf7e0
2025-08-28 10:27:22 -07:00
Pieter De BaetsandFacebook GitHub Bot 31b9f10364 Fix int overflow in useRawPropsJsiValue (#53504)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53504

Casting directly from double to int loses precision. Instead, match the (accidental) behaviour of the folly version, which always access the value as an int64_t first.

```
double value = 4294967040
(int)value = 2147483647 (overflow)
(int)(int64_t)value = -256 (signed version of 4294967040)
```

Changelog: [General][Fixed] Casting rawValue to int was incorrectly truncating

Reviewed By: zeyap, sammy-SC

Differential Revision: D81228983

fbshipit-source-id: d68d4e63d7c7bc9a9226592756a1e53666d58978
2025-08-28 10:04:07 -07:00
Christoph PurrerandFacebook GitHub Bot c05f39ec3e Remove duplicated to_underlying helper method (#53494)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53494

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D81203760

fbshipit-source-id: 185d6b3a6cd06d58c770dd04c68cc707a7621f08
2025-08-28 09:48:57 -07:00
SimekandFacebook GitHub Bot 830bc8c77e upgrade jest-junit to remove old Jest dependencies (#53444)
Summary:
When aligning Jest versions recently I have spotted that some old Jest (v24) dependencies are still fetched. After looking at lock the traces lead to outdated `jest-junit` dependency.

This PR updates the `jest-junit` package to get rid of those old Jest dependencies. I have went through [the release changelogs](https://github.com/jest-community/jest-junit/releases) to make sure there are no breaking changes with the current setup.

## Changelog:

[INTERNAL][CHANGED] - upgrade `jest-junit` to remove old Jest dependencies from the workspace

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

Test Plan: I have made sure that `test-ci` tests are passing, and correct `junit.xml` is generated locally after the run.

Reviewed By: cortinico, christophpurrer

Differential Revision: D80904710

Pulled By: robhogan

fbshipit-source-id: 9b4c65e2fd370bbdb429fb628f79f94698e9c4c2
2025-08-28 08:10:23 -07:00
generatedunixname537391475639613andFacebook GitHub Bot daecb7a059 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTask.kt (#53497)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53497

Reviewed By: cortinico

Differential Revision: D81219754

fbshipit-source-id: a1798365904da1c94d913017950cd5d0469d11a2
2025-08-28 06:56:39 -07:00
generatedunixname537391475639613andFacebook GitHub Bot abb310e089 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt (#53498)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53498

Reviewed By: cortinico

Differential Revision: D81218257

fbshipit-source-id: ccb912733e9d3f393e06aad6d38ac1809aa62218
2025-08-28 04:30:16 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot be78564820 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D81155400

fbshipit-source-id: b9aa0b10abe4e89e27746862d7631a66286eac66
2025-08-28 03:46:05 -07:00
Pieter De BaetsandFacebook GitHub Bot fafbee2402 Remove CxxSharedModuleWrapper from open-source (#52672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52672

This was used internally to work around some limitations of the bridge lifecycle. Given that we now have C++ TurboModules which are much more versatile, let's remove unnecessary concepts externally, as we move towards deprecating legacy C++ modules entirely.

Changelog: [General][Breaking] Removed CxxSharedModuleWrapper

Reviewed By: rshest

Differential Revision: D78484221

fbshipit-source-id: 95ed46b597dac55d823b70abe196264ce5b326ab
2025-08-28 03:39:42 -07:00
Tim YungandFacebook GitHub Bot 72158fc13a VirtualView: Create Activity Experiment (#53488)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53488

Creates a new feature flag to experiment with `Activity` in `VirtualView`.

The feature flag enables the following treatments:

- `no-activity` is the same as what we currently do — no `Activity` and we render `null` for hidden elements.
- `activity-without-mode` wraps the children in `Activity` but does not set `mode` and still renders `null` for hidden elements.
- `activity-with-hidden-mode` wraps the children in `Activity` and sets `mode="hidden"` and continues providing `children` (not `null`) for hidden elements.

Changelog:
[Internal]

Reviewed By: rickhanlonii

Differential Revision: D81149561

fbshipit-source-id: ea2c319139962de30836d80a2492d8147cbe82ba
2025-08-27 21:26:52 -07:00
Sam ZhouandFacebook GitHub Bot 502325fbce Turn on flags that will be on by default in 0.281 in oss projects
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D81190534

fbshipit-source-id: 83be2aed3d13e225bfc9c07c57da22324c04ce77
2025-08-27 19:15:07 -07:00
Kaining ZhongandFacebook GitHub Bot a03780d279 fix: use the first available locale to decide directionality on Android (#53417)
Summary:
On iOS, if the default locale is not supported in the app, it will fall back to the first available locale to decide if RTL layout should be enabled or not; however on Android, we use the default locale. So if the first locale is a RTL locale and not supported by the app on Android, the app will fall back to the first available locale which might not be RTL, but the layout would be decided as RTL according to the default locale.

## Changelog:

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

Pick one each for the category and type tags:

[ANDROID] [FIXED] - use the first available locale instead of the default one to decide `isDevicePreferredLanguageRTL`

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

[ANDROID] [FIXED] - use the first available locale instead of the default one to decide `isDevicePreferredLanguageRTL`

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

Test Plan:
I set my phone's locale to this order: Hebrew, English and enabled RTL layout:
```
import { I18nManager } from 'react-native';

I18nManager.allowRTL(true);
I18nManager.swapLeftAndRightInRTL(true);
```

Prior to my PR, the app would use RTL layout with English on Android which doesn't make much sense (iOS is LTR + English). With my PR Android app will behave exactly the same as the iOS app.

Reviewed By: rshest

Differential Revision: D80821903

Pulled By: zeyap

fbshipit-source-id: c1bd9b45341c344833a8fdfacc2c786ee8437415
2025-08-27 18:15:36 -07:00
Sam ZhouandFacebook GitHub Bot 09312027db Require error code in suppressions, and kill $FlowIssue and $FlowIgnore in react-native (#53487)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53487

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81150232

fbshipit-source-id: 23320495061c7c78ced8f95db90101c4b55d9690
2025-08-27 13:14:20 -07:00
Moti ZilbermanandFacebook GitHub Bot adf1b62c76 Normalise shell name/version strings, add commit hash when prebuilt (#53480)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53480

Changelog: [Internal]

Improves the way `--version` and the User-Agent header work in `debugger-shell`.

* The same app name and version string format will be used across the `dev` and `prebuilt` flavours. Previously, `dev` would report itself as being `Electron v37.2.6` while `prebuilt` would report `react-native/debugger-shell v0.82.0-main`.
* `prebuilt` now also reports the original Meta-internal commit hash as a suffix `-rFBS..........` added to the semver string taken from `package.json`, while `dev` will have a `-dev` suffix in the same place.
  * We do **not** modify the version in `package.json` during the build, nor do we pass the commit hash to `electron/packager`, because this would impose inconvenient platform-specific restrictions on the version string's format.

Reviewed By: huntie

Differential Revision: D81120181

fbshipit-source-id: e730dd35da78dfbb8de326f9a3ab76b747fdb0b3
2025-08-27 11:05:02 -07:00
Alex HuntandFacebook GitHub Bot 7eb3536728 Add openDebugger overload with target panel name (#53485)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53485

Adds new `openDebugger(panel)` overload on `DevSupportManager` (following D79329081).

Changelog:
[Android][Added] - `DevSupportManager::openDebugger` now supports an optional `panel` param

Reviewed By: hoxyq

Differential Revision: D81138169

fbshipit-source-id: 282da9fbc055fa4ce94cd2d0790ca4d29c55bfa8
2025-08-27 10:38:42 -07:00
Sam ZhouandFacebook GitHub Bot 1618a8ed4f Deploy 0.280.0 to xplat (#53486)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53486

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D81138527

fbshipit-source-id: c17ba243ef18cb4f9e107b717c6875b2868fea45
2025-08-27 10:18:17 -07:00
Alex HuntandFacebook GitHub Bot 63948350e0 Clear XHRExampleFetch interval on unmount (#53481)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53481

Small fix to this RNTester example to clean up hanging `setInterval` side effect making repeat network fetches.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D81127809

fbshipit-source-id: 6036dd254888eb6160d2b1e116bbce63e5fd9328
2025-08-27 09:46:15 -07:00
Riccardo CipolleschiandFacebook GitHub Bot d503ea4efc Add deprecation for legacy arch APIs (#53368)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53368

This change introduces deprecation messages for several APIs used by the legacy arch in the RCTAppDelegate Library

## Changelog:
[iOS][Added] - Add deprecation message for RCTAppdelegate APIs

Reviewed By: cortinico

Differential Revision: D80618102

fbshipit-source-id: db77f8602a521557ed26822f27d54c6fc70c49bf
2025-08-27 08:12:21 -07:00
Christian FalchandFacebook GitHub Bot e723ca4d6b Support dynamic static linkage with prebuilts (#53432)
Summary:
To be able to handle cocoapods USE_FRAMEWORKS with both dynamic/static linkage and precompiled we needed a common way to resolve this.

The issue was that when using precompiled and USE_FRAMEWORKS our precompiled framework caused the resulting Pods project to only include header files - hence there where no need to change the header_mappings_dir which a lot of the podspecs did.

When using precompiled and building with frameworks (USE_FRAMEWORKS) we need to explicitly add the correct path to ReactCodegen when calling `create_header_search_path_for_frameworks` to ensure libraries can access their codegen files.

- Added method that handles this in a generic way
- Replaced logic for resolving header mappings and module name using the new method `resolve_use_frameworks` in all podspecs.
- Add an explicit check to make sure we add the correct path when using frameworks and the pod is ReactCodegen.
- Added includes in the NativeCXXModuleExample.cpp file to test this.

## Changelog:

[IOS] [FIXED] - Fixed using USE_FRAMEWORKS (static/dynamic) with precompiled binaries

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

Test Plan:
Build RN-Tester with USE_FRAMEWORKS static and dynamic

### Tests ran:

  Build with source and no USE_FRAMEWORKS
  Build with source and USE_FRAMEWORKS = static
 🔴 Build with source and USE_FRAMEWORKS = dynamic

 Undefined symbols for architecture arm64:
   "facebook::react::oscompat::getCurrentProcessId()", referenced from:

Reviewed By: motiz88

Differential Revision: D81127796

Pulled By: cipolleschi

fbshipit-source-id: 1f55bf31240ac93cb8b93751b3e37ff6d517f49b
2025-08-27 08:12:07 -07:00
Moti ZilbermanandFacebook GitHub Bot 111187f6a4 Document unstable_experiments.enableStandaloneFuseboxShell (#53482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53482

Changelog: [Internal]

TSIA

Reviewed By: huntie

Differential Revision: D81127995

fbshipit-source-id: cad5720b41ce409e9db1972bea3844ff0e0724ce
2025-08-27 08:11:51 -07:00
Christian KruseandFacebook GitHub Bot 9240b78a34 Fix extra semi colon (#53461)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53461

Changelog: [Internal]

Reviewed By: mamun4122

Differential Revision: D81032488

fbshipit-source-id: 5d22b43be44c5f1461f9101aa090cde3ce3dd41c
2025-08-27 08:08:52 -07:00
Zeya PengandFacebook GitHub Bot d9d9a49e18 allow calling createAnimatedNode without batching (#53476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53476

## Changelog:

[General] [Added] - allow calling createAnimatedNode without batching

Enable setting `nativeCreateUnbatched` config on an AnimatedNode, when it's true, the call to Animated nativeModule's createAnimatedNode will skip signal batching (will call over JSI before React rendering is finished) and batching in c++, and the creation will be executed at next UI thread render.

This will only make AnimatedNodes creation happen early, but node/view connections, node deletion or event drivers will still be batched like before

Reviewed By: yungsters

Differential Revision: D80968512

fbshipit-source-id: afb607410a174fb85107ef270b9d6f3d61617daf
2025-08-27 08:08:45 -07:00
Samuel SuslaandFacebook GitHub Bot 79a8354c59 attempt to fix maintain visible content position prop with view culling (#53472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53472

changelog: [internal]

I am looking into stalls when View Culling is turned on together with immediate state updates. This is one of the places where stalls are concentrated and this seems like a possible culprit:
When view is moved outside of the viewport, it is immediately reused. Therefore, we must check view's identity to make sure it is the same view before and after transaction.

Reviewed By: lenaic

Differential Revision: D81044328

fbshipit-source-id: 796b71219e5fc94c1f98319b73f4655b9c13000f
2025-08-27 05:58:06 -07:00
Moti ZilbermanandFacebook GitHub Bot 37b61aca1b Drop mention of Chrome/Edge if standalone shell enabled (#53464)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53464

Changelog: [Internal]

Minor followup from D78351937 - the Fusebox console notice still mentions that RNDT requires Chrome or Edge. Let's remove this mention for users opted into the standalone shell experiment.

Reviewed By: huntie

Differential Revision: D81040965

fbshipit-source-id: a290d3164261f8a1087229edfe3f69a2a9b49960
2025-08-27 05:09:30 -07:00
Moti ZilbermanandFacebook GitHub Bot ab1af2844b Support Fusebox shell experiment in OSS without a custom BrowserLauncher (#53435)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53435

Changelog: [Internal] Support setting `enableStandaloneFuseboxShell: true` in OSS with no custom `BrowserLauncher`

Makes it possible for frameworks to enable the React Native DevTools standalone shell in open source by passing `unstable_experiments: {enableStandaloneFuseboxShell: true}` to `createDevMiddleware()`.

When this experiment is enabled:

* The RNDT shell binary will be prefetched in the background as soon as the dev server starts (into a local cache managed by [DotSlash](https://dotslash-cli.com/)).
* If prefetching is successful, then "Open DevTools" actions will be handled by launching the RNDT frontend in the standalone shell, instead of in Chrome/Edge.
* If prefetching is not successful, then we'll notify the user about the error, and "Open DevTools" will continue to be handled by Chrome/Edge, as before.
* If the user attempts to open DevTools more than once for the same app, the standalone shell will reuse the existing window (as opposed to the current behaviour of always creating a new Chrome/Edge window).
* The appropriate DevTools window will automatically foreground itself upon pausing on a breakpoint.

Reviewed By: huntie

Differential Revision: D78351937

fbshipit-source-id: 6d5baa8fa866760f1d527108cd3c42bcab68cf57
2025-08-27 05:09:30 -07:00
generatedunixname537391475639613andFacebook GitHub Bot f215d4c797 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/GenerateCodegenArtifactsTaskTest.kt (#53479)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53479

Reviewed By: javache

Differential Revision: D81024444

fbshipit-source-id: 6b39f1c915f1340cb985c4a74d3ec1adfd8324d8
2025-08-27 04:45:02 -07:00
Moti ZilbermanandFacebook GitHub Bot ba24f5f903 Demote electron to devDependency (#53438)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53438

Changelog: [Internal]

Makes `flavor: 'prebuilt'` the default mode of launching the RNDT standalone shell, and the *only* mode supported in the published version of the package. See D78351931 for more context.

With this, we can demote `electron` from `dependencies` to `devDependencies`. This makes it possible to make `debugger-shell` a dependency of `dev-middleware` (and thus of all major frameworks) without significantly impacting `npm install` times. We'll add this dependency on `debugger-shell` in an upcoming diff (D78351937).

We also stop publishing the `dist/electron` subdirectory (and `src/electron` for good measure) since the corresponding code will always be bundled into the prebuilt binary instead.

Reviewed By: huntie

Differential Revision: D78351934

fbshipit-source-id: 2a4b03e852c4d0330250567c41dca09d1c4f3abd
2025-08-27 02:50:05 -07:00
Moti ZilbermanandFacebook GitHub Bot b5dfb32ed3 Support preparing debugger shell ahead of "open DevTools" (#53437)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53437

Changelog: [Internal]

The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff adds support in dev-middleware for a new `BrowserLauncher.unstable_prepareFuseboxShell` method that integrations can use to kick off the download early. Integrations are expected to implement this by calling the `unstable_prepareDebuggerShell` function (added to the `debugger-shell` package in D78413091).

If `BrowserLauncher.unstable_prepareFuseboxShell` returns an error, dev-middleware will fall back to the browser-based launch flow, even for users opted into the `enableStandaloneFuseboxShell` experiment.

Reviewed By: huntie

Differential Revision: D78413092

fbshipit-source-id: 6868bf07e16353fcd83337ae54c87c5a641a0f99
2025-08-27 02:50:05 -07:00
Moti ZilbermanandFacebook GitHub Bot 7046c24702 Expose DotSlash prefetching as unstable_prepareDebuggerShell (#53434)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53434

Changelog: [Internal]

The React Native DevTools standalone shell is distributed as a DotSlash file that downloads the required binaries lazily. This diff gives integrations a mechanism for kicking off the download early (but without slowing down `npm install react-native`). This will be integrated into dev-middleware in an upcoming diff.

Reviewed By: huntie

Differential Revision: D78413091

fbshipit-source-id: caf2010edd1bcdd139d37d7849212cd1cbb64f46
2025-08-27 02:50:05 -07:00
Moti ZilbermanandFacebook GitHub Bot 0f4e5c382e Provisionally support using prebuilt shell binaries via DotSlash (#53436)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53436

Changelog: [Internal]

Adds a `flavor` option to `unstable_spawnDebuggerShellWithArgs` to select between two modes:

1. `flavor: 'dev'` (current behaviour) - launching a stock Electron binary (from the `electron` package) and pointing it directly at the shell code from the `src/electron` directory.
2. `flavor: 'prebuilt'` (new in this diff) - launching the prebuilt React Native DevTools binary included in the package (built continuously at Meta and committed as a DotSlash file in automated diffs e.g. D79836825). Note that this binary includes Electron *and* a frozen version of the shell code from `src/electron`.

Going forward, `'dev'` will only be used when developing the package (e.g. in D78351934 we will move `electron` to `devDependencies`). The published version of the package is only intended to work with `flavor: 'prebuilt'`.

Reviewed By: huntie

Differential Revision: D78351931

fbshipit-source-id: d0e66b54c142dc2910619ba3d6d149d88324c872
2025-08-27 02:50:05 -07:00
Ruslan LesiutinandFacebook GitHub Bot 5e74dc7fca Use panel query param instead of landingView (#53468)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53468

# Changelog: [Internal]

I've just discovered today that Chrome DevTools has a native support for `panel` query parameter, we don't need a custom one.

Reviewed By: alanleedev

Differential Revision: D81052828

fbshipit-source-id: 6f8ef5b576dbff70cabd6ab792bc0f6e615928e7
2025-08-26 19:14:12 -07:00
Sam ZhouandFacebook GitHub Bot c120587fe5 Add annotations to fix future natural inference errors in xplat/js: 4/n (#53469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53469

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D81067843

fbshipit-source-id: f75116da9be89d35c5befb4c90272ecc67d52caf
2025-08-26 16:42:25 -07:00
Samuel SuslaandFacebook GitHub Bot d0d853b252 add option to disable prop scrollView.maintainVisibleContentPosition (#53465)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53465

changelog: [internal]

I am debugging an issue with Fabric View Culling + immediate state update.
The problem appears to be in logic handling `maintainVisibleContentPosition`. I want to try to disable the prop to see if the problem goes away.

Reviewed By: rshest

Differential Revision: D81030436

fbshipit-source-id: 8efeb1151ad3e12b812cafd073348502510ef01d
2025-08-26 15:12:41 -07:00
Nick LefeverandFacebook GitHub Bot 2b99204e06 Fix culling of views having no layout breaking embedded Text event handlers (#53466)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53466

This is a follow-up on D80631997. When enabling View Culling on Android, wrapped Text components would lead to event handlers set by the inner Text component not being set on the attributed string.

```
<Paragraph>
  <Text onPress={myHandler}>  <- This handler is not set
    <RawText/>
  </Text>
</Paragraph>
```

This was due to the inner Text component having no size and hence being culled by the View Culling algorithm.

This diff disables view culling for views having no size, since no layout means no valid decision can be made as to the visibility of the component within the viewport.

It also removes the change made by D80631997. This means Text views with a layout size set can be culled again.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D81044841

fbshipit-source-id: e9b01dcb8030b271876329b9b2c5bda36ba2b87a
2025-08-26 12:54:54 -07:00
Christoph PurrerandFacebook GitHub Bot a4bf14a9af imagemanager / primitives > avoid copy of debug string (#53451)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53451

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D80946627

fbshipit-source-id: c7604366f97b1b8336f3792d434d5873c810cec7
2025-08-26 10:55:00 -07:00
Zeya PengandFacebook GitHub Bot 7ea7c40e32 Add missing node null check in AnimationDriver (#53462)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53462

## Changelog:

[Internal] [Chanaged] - Add missing node null check in AnimationDriver

Reviewed By: lenaic

Differential Revision: D80949230

fbshipit-source-id: b08258671fbf0a011aa6a48501fdd83a706b1f1f
2025-08-26 09:27:49 -07:00
Christian KruseandFacebook GitHub Bot b7de7abd80 Fix extra semi colon (#53459)
Summary:
X-link: https://github.com/facebook/hermes/pull/1770

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

Changelog: [Internal]
This is preventing enabling arfx_cxx_extra_semi_error

Reviewed By: cortinico

Differential Revision: D80532814

fbshipit-source-id: 61f5ad356180485498d652337754285453118542
2025-08-26 08:00:40 -07:00
Vitali ZaidmanandFacebook GitHub Bot c9573dad52 removed reconnect logic that is never reached (#53369)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53369

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D80541401

fbshipit-source-id: 0816b71e8dfe2a86f6fe5af049fbabff68b13940
2025-08-26 06:46:31 -07:00
generatedunixname537391475639613andFacebook GitHub Bot b7ac655a11 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tests/TaskTestUtils.kt (#53458)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53458

Reviewed By: rshest

Differential Revision: D80931289

fbshipit-source-id: 5da865e62ae5d4ef248d7e7f17357386f0b2b9b4
2025-08-26 05:23:42 -07:00
Moti ZilbermanandFacebook GitHub Bot 4831314c1b Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D80804474

fbshipit-source-id: 74aa1542b8cfb55cea414f1cacbffb8d04a31c7d
2025-08-26 03:43:22 -07:00
Christian FalchandFacebook GitHub Bot 939a75b5ce add SWIFT_ENABLE_EXPLICIT_MODULES to xcode 26 (#53457)
Summary:
XCode 26 introduces building explicit swift modules turned on (SWIFT_ENABLE_EXPLICIT_MODULES). This breaks building with precompiled binaries.

This commit fixes this by adding a step when not building from source where we explicitly set the `SWIFT_ENABLE_EXPLICIT_MODULES` flag to `NO`.

## Changelog:

[IOS] [FIXED] - Added setting SWIFT_ENABLE_EXPLICIT_MODULES=NO when using precompiled to support Xcode 26

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

Test Plan:
```bash
npx react-native-community/cli init MyApp --version nightly --skip-install
cd MyApp
yarn
cd ios
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
```

Build above app with Xcode 26 and verify that it no longer fails

Reviewed By: motiz88

Differential Revision: D81025367

Pulled By: cipolleschi

fbshipit-source-id: 1db7c4d7de07d62f43b355aa784d7d9de478023c
2025-08-26 03:39:49 -07:00
generatedunixname537391475639613andFacebook GitHub Bot ec1ee19cda xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt (#53358)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53358

Reviewed By: cortinico, cipolleschi

Differential Revision: D80605883

fbshipit-source-id: cf576ee6e6c941eaef25ebf835c771e9bb3d5669
2025-08-25 18:37:02 -07:00
Luna WeiandFacebook GitHub Bot 792e450aff Introduce hysteresis window (#53345)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53345

Changelog: [Internal] - Introduce hysteresis window that is nested between the prerender and hidden window sizes. Currently set to enlargening the prerender window by hysteresis ratio

When a VirtualView intersects with the hysteresis window, it mode remains unchanged.

This prevents us dispatch mode changes for things like overscroll.

I put the hysteresis between prerender and hidden because we already avoid dispatching mode changes from visible -> prerender. For prerender -> visible, we use renderState

Reviewed By: yungsters

Differential Revision: D80511627

fbshipit-source-id: cd14256abc898e7120705e277147d52a06c865a9
2025-08-25 12:58:22 -07:00
Pieter De BaetsandFacebook GitHub Bot 870836ff84 Namespace Perfetto usage (#53424)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53424

Use the namespaced version of these macros to avoid symbol conflicts when multiple instances of `PERFETTO_DEFINE_CATEGORIES` are in the same binary.

The current macro is effectively deprecated: https://github.com/a6f/perfetto_protos/blob/master/CHANGELOG#L691-L696

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D80697205

fbshipit-source-id: 713fec4d41137ddd2f025c7e7130dc44c5a3a656
2025-08-25 11:16:51 -07:00
Andrew DatsenkoandFacebook GitHub Bot 42b94fc709 Add babel-plugin-istanbul for code covearage (#53413)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53413

Changelog: [Internal]
Add dependency on istanbul plugin so we can collect code coverage.

Reviewed By: christophpurrer

Differential Revision: D80723825

fbshipit-source-id: bf0ac0e49e12ea1b01f72c11362019ef68e09ff9
2025-08-25 10:45:16 -07:00
Pieter De BaetsandFacebook GitHub Bot 8881faa7ec Rollout useRawPropsJsiValue (#53426)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53426

Experiment review for this was completed internally, and we can now change the default behaviour to no longer allocate an intermediate folly::dynamic when parsing props.

RawValue will continue supporting a folly::dynamic constructor as some paths go through code path (eg animations)

There should be no user-visible difference in parsing behaviour.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D80799833

fbshipit-source-id: 8eeae656157757eb38f69a2af14409da23b510c8
2025-08-25 07:09:34 -07:00
Phil PluckthunandFacebook GitHub Bot b054540092 Mark @react-native/metro-config as optional peer to fix warning (#53314)
Summary:
The `react-native/metro-config` peer was added in https://github.com/facebook/react-native/commit/fe2bcbf4ba7ce983fac0cd09727c165517b6337f / https://github.com/facebook/react-native/issues/51836 by robhogan

Side-note: It's pulled in via `react-native/community-cli-plugin` which is a direct dependency of `react-native` for the `scripts/bundle.js` script. While, for expo, we'd love to find a way to make this an optional dependency (to avoid excessive deps that `expo` replaces otherwise), for now, it's a direct dependency.

The problem here is that this isn't optional, which means:
- with auto-installing peer dependencies it is directly fulfilled (while `react-native-community/cli` is already marked as optional and skipped)
- with legacy/non-auto peer-dependencies it is flagged as missing, but in an Expo project it wouldn't make sense to install directly

This causes a **package manager regression in the form of either a peer dependency warning**, that shouldn't be fulfilled in an Expo project, or (in the best case scenario) pulls in dependencies [that a user does not need](https://npmgraph.js.org/?q=%40react-native%2Fmetro-config#zoom=w&select=exact%3A%40react-native%2Fmetro-config%400.81.0).

An error message is already in place to inform the user of this being missing when it's not installed, so marking it as optional seems appropriate.

## Changelog:

[INTERNAL] [FIXED] Mark added `react-native/metro-config` peer dependency as optional

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

Test Plan:
Warnings like the following won't occur in fresh Expo (54/preview/`next`) projects
```
warning "workspace-aggregator-484d9ec3-587b-43cb-97de-4dcce3876578 > microfoam-mobile > react-native > react-native/community-cli-plugin@0.81.0" has unmet peer dependency "react-native/metro-config@*".
```

Reviewed By: cortinico

Differential Revision: D80450287

Pulled By: robhogan

fbshipit-source-id: c622fd4c24025676c0ec74de826f863f1e291669
2025-08-24 14:18:42 -07:00
Tim YungandFacebook GitHub Bot bf12e30cb7 VirtualView: Remove Unnecessary ?. in updateClippingRect() (#53442)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53442

Refactors `VirtualView` to remove this unnecessary `?.` in `updateClippingRect()`.

Changelog:
[Internal]

Reviewed By: lunaleaps

Differential Revision: D80600713

fbshipit-source-id: 1a11b302f069e3b35db70831fd4f7a9bd7471cc6
2025-08-22 17:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot ec1e97342a View recycling for ScrollView native component on Android (#53395)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53395

# Changelog
[Internal] -

This enables view recycling for both ScrollView and HorizontalScrollView on Android.

The feature is gated by the corresponding RN feature flag, `enableViewRecyclingForScrollView` (which is false by default for now, will be enabled in an experiment).

Reviewed By: lenaic

Differential Revision: D80611087

fbshipit-source-id: b3026affc0ea61bc7739126d6529c83f2a653183
2025-08-22 13:54:51 -07:00
Nicola CortiandFacebook GitHub Bot cf528526cc Remove dead Inspector.kt/JInspector.h/.cpp code (#53403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53403

This code is Legacy and totally unused. It should be safe to remove it altogether.
This class is public but no one is using it in OSS + no one should be using it, so I don't think we'll need the full deprecation cycle for it.

Changelog:
[Android] [Removed] - Removed unused `Inspector` public class from React Android

Reviewed By: cipolleschi

Differential Revision: D80711515

fbshipit-source-id: 83134851877fcbccd50f7a5b75b2ab8906b3416a
2025-08-22 11:13:31 -07:00
Sam ZhouandFacebook GitHub Bot 0530ea3349 Migrate to suppression with error code in xplat: 1/n (#53439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53439

Changelog: [Internal]

Reviewed By: panagosg7

Differential Revision: D80809220

fbshipit-source-id: 6f432d8302934b9fee9780ac1d6ba6c87c0b3899
2025-08-22 10:35:39 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 56ab2e72b2 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [A] [A] (#53401)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53401

Reviewed By: cipolleschi

Differential Revision: D80713611

fbshipit-source-id: 73dc034d966eea5b388a51ab84da2416531c7376
2025-08-22 07:02:13 -07:00
generatedunixname89002005287564andFacebook GitHub Bot e60ddf0adb Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [B] [B] (#53425)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53425

Reviewed By: javache

Differential Revision: D80619000

fbshipit-source-id: d012c170ed366904b39ef335fea5241b604461ec
2025-08-22 05:52:14 -07:00
Ruslan LesiutinandFacebook GitHub Bot 4b34be445d Release PerfMetricsBinding to avoid memory leak (#53420)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53420

# Changelog: [Internal]

HostRuntimeBinding owns a connection, which is stored as a session on HostTarget, so we need to release it first in order to satifsy the assertion in the destructor.

Reviewed By: huntie

Differential Revision: D80778273

fbshipit-source-id: be7bf085fadd8808fd5e5c621c3990a5e7e0186d
2025-08-22 05:07:02 -07:00
Ruslan LesiutinandFacebook GitHub Bot 8d8245123e Create endpoints for tracing and stashing on Bridgeless Android ReactHost (#53416)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53416

# Changelog: [Internal]

Creates methods on Bridgeless Android Host for starting / stopping tracing and implements logic for storing the recording that will be transferred to `jsinspector-modern` stack via HostTargetDelegate when CDP session is created.

Reviewed By: sbuggay

Differential Revision: D79725161

fbshipit-source-id: f3e3b39f6d94a6548cf227394f7328f6913c33e4
2025-08-22 04:12:22 -07:00
Ruslan LesiutinandFacebook GitHub Bot 80f340e81c Send custom CDP Event to Frontend to prepare for displaying a trace (#53079)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53079

# Changelog: [Internal]

We need this to notify Frontend, so it updates the local state before receiving `Tracing.dataCollected` events.

Corresponding change in CDT fork - https://github.com/facebook/react-native-devtools-frontend/pull/199.

Reviewed By: sbuggay

Differential Revision: D79672598

fbshipit-source-id: b2928cb3942e34a1f4723516ecdf5062d4331591
2025-08-22 04:12:22 -07:00
Ruslan LesiutinandFacebook GitHub Bot e1b76ab2d5 Add a mechanism for emitting stashed trace recording (#53078)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53078

# Changelog: [Internal]

When CDP session is created via `HostTarget::connect`, it will ask `HostTargetDelegate` is there is a previously recorded trace that Host wants to display in the Frontend.

`TracingAgent` will serialize and send the recording at the initialization time in constructor.

Reviewed By: huntie

Differential Revision: D79672597

fbshipit-source-id: 241c9d367ab65ef1e95c62d5025b3bc14bf42608
2025-08-22 04:12:22 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 5848252ee2 xplat/js/react-native-github/packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PreparePrefabHeadersTaskTest.kt (#53423)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53423

Reviewed By: rshest

Differential Revision: D80786149

fbshipit-source-id: 81df8592b142df2f9d9178c13a9480a7186c2604
2025-08-22 04:12:06 -07:00
Moti ZilbermanandFacebook GitHub Bot 33be0606c1 Always reload the frontend when launching, even in an existing window (#53407)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53407

Changelog: [Internal]

## Context

Upon receiving a launch command, the RNDT shell either:

1. Creates a new window and navigates to the requested frontend URL.
2. Brings an existing window to the foreground *with no further navigation*.

In the happy path, (2) is a pretty nice experience: it preserves all prior UI state in the frontend and leaves the user with an instantly responsive debugger - this can be quite a bit faster than (1) because of the overhead of loading and parsing source maps for example. However, this breaks down if the frontend is not in a usable state to begin with. This is, sadly, a frequent-enough occurrence that we must account for it: the CDP connection may have been lost, the frontend app itself might have failed to load the last time, etc.

Preserving everything that's nice about (2) while also making it fully reliable - incrementally bringing the frontend to the state specified by a new URL - would require delicate engineering across the shell and frontend codebases, which is an amount of complexity I would like to sidestep for now.

NOTE: The more complex solution **is 100% worth implementing in the long term,** as it has tangible benefits for the user, and matches Chrome best.

## This diff

Here we take a much cheaper approach than the one described above: the shell will *always* initiate navigation to the new frontend URL, regardless of whether it does so in a new window or a previously opened one. This will consistently bring the user to a state where the frontend is open and working (although it will reset any ephemeral UI state in the process, and typically take a noticeable amount of time to load).

Even with this simplified approach, the standalone shell still offers a better experience than launching in a browser (if only because it is zero-install and avoids the "dead tab spam" problem).

Reviewed By: huntie

Differential Revision: D80711185

fbshipit-source-id: 8f376ccf1717c48a1742c798da3171ac6d2f8af0
2025-08-22 04:03:08 -07:00
Christian FalchandFacebook GitHub Bot a843119ff1 Fix copy symbol files in RNDeps precompile (#53353)
Summary:
Symbol files wasn't copied correctly when building - as with bundles we did overwrite the files and ended up with only the last symbol file.

This commit fixes this by mapping the framework build folder architecture type to the xcframework slices creating the correct file structure under the Symbols folder.

- Each slice gets a folder with the architecture name under Symbols containing the dSym folder for that slice
- Refactored getting correct architecture folder into a separate function.
- Refactored target folder lookup in copyBundles
- Removed unused async modifier on function

## Changelog:

[IOS] [FIXED] - Fixed how we copy and build the Symbols folder when precompiling ReactNativeDependencies

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

Test Plan: Run nightlies and verify that ReactNativeDependencies.framework.dSym files contains symbol files for all architectures.

Reviewed By: cortinico

Differential Revision: D80692019

Pulled By: cipolleschi

fbshipit-source-id: 77983bc29d1965edf3bc0fcbd9cb3177071991d3
2025-08-22 03:26:54 -07:00
Christian FalchandFacebook GitHub Bot 8c444f773a aligned symbol folders with RNdeps (#53354)
Summary:
After fixing an isssue with ReactnativeDependencies and how it built symbols (https://github.com/facebook/react-native/issues/53353) this commit will align the output of the Symbols folder for the two frameworks.

Previously we had an output in the Symbols folder that looked like this (from a local build on my machine)

- catalyst
- iphone
- iphonesimulator

After this we now have the more correct arcitecture names on these folders:

- ios-arm64
- ios-arm64_x86_64-simulator
- ios-arm64_x86_64-maccatalyst

This is in line with how the ReactNativeDependencies Symbol folder is set up.

## Changelog:

[IOS] [FIXED] - Aligned Symbols folder in React.xcframework symbols with ReactNativeDependencies.xcframework symbols.

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

Test Plan: Nightlies

Reviewed By: cortinico

Differential Revision: D80692098

Pulled By: cipolleschi

fbshipit-source-id: e952b087d5dbdeb929b45d9e6d3d7e077c9d05cc
2025-08-22 03:23:24 -07:00
Alex HuntandFacebook GitHub Bot 3292cb1dc9 Fix incorrectly hardcoded landingView for open debugger action (#53400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53400

In D79329081, we accidentally hardcoded the `landingView` parameter in the default Dev Menu handler to open React Native DevTools. Reset this.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D80710487

fbshipit-source-id: 9066ffafcb17a6ff46650f7081d9a662f186d995
2025-08-22 03:09:50 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot d0744f7e59 Use Map as recyclable views container (#53394)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53394

# Changelog:
[Internal] -

This just fixes a linter warning I noticed when working on related code.

Reviewed By: cortinico

Differential Revision: D80702545

fbshipit-source-id: fecfed9e9946b971864706306b03b57cd3111aee
2025-08-22 01:35:18 -07:00
Chi TsaiandFacebook GitHub Bot 646945c2f2 Add deleteProperty API (#52911)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52911

Add a new `deleteProperty` API to JSI. As the name implies, allows users
to delete properties from Objects through JSI.

The default implementation uses `Reflect.deleteProperty.` For the
`PropNameID` overload, convert the propNameID to a String and pass into
the `deleteProperty` function.

Changelog: [Internal]

Reviewed By: dannysu

Differential Revision: D79120814

fbshipit-source-id: e30f383247d94bb5971e4909f004c75e8165adda
2025-08-21 17:35:55 -07:00
Marco WangandFacebook GitHub Bot da9136f587 Turn on null strict comparison check for xplat js (#53379)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53379

X-link: https://github.com/facebook/react/pull/34240

Changelog: [Internal]

Reviewed By: SamChou19815

Differential Revision: D80648362

fbshipit-source-id: cc47ae207f29a3ddb68bc0e029b8773f89503c52
2025-08-21 16:46:23 -07:00
Nikita LutsenkoandFacebook GitHub Bot ffe52b75a3 xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp (#53412)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53412

Changelog:
[General][Internal] - Encapsulated internal class into anonymous namespace to ensure no collisions with public symbols.

Differential Revision: D80689084

fbshipit-source-id: 53ebd8a16a3c217efead0bfe91f66bd50bb6dd2f
2025-08-21 14:59:24 -07:00
Ruslan LesiutinandFacebook GitHub Bot a2a73739d8 fix: use ThreadId when event is captured, not when transformed (#53411)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53411

# Changelog: [Internal]

This regressed after D80263154, when we introduced a local struct for PerforamanceTracerEvent.

We should use id of the thread where event was captured (registered), not where the transform to TraceEvent happened.

This makes sure that events like Event Loop tick or Microtasks phase tick are correctly point to JavaScript thread, not the thread where the transform could've taken place.

Reviewed By: sbuggay

Differential Revision: D80728931

fbshipit-source-id: d3af16e68adece9ebc37368fec2b8a17c1293b4b
2025-08-21 14:18:27 -07:00
Nicola CortiandFacebook GitHub Bot 046ff8e58b Make OnBatchCompleteListener interface internal (#53409)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53409

This interface is public and is part of Legacy Architecture.

Having this interface as `public` was a mistake, as users can't really do much with it.
There is only one old library that is going to be affected by this change:
https://github.com/spoke-ph/react-native-threads
The library appears unmaintained since RN 0.69 + no NewArch support so I won't consider this a breaking change
given this will land in 0.82.

I'm making it internal so we can remove it more easily later.

Changelog:
[Android] [Changed] - Make OnBatchCompleteListener interface internal

Differential Revision: D80715625

fbshipit-source-id: 94fe80eeba95222deab7ca89c5fcafca8fcee0b7
2025-08-21 14:05:47 -07:00
Nicola CortiandFacebook GitHub Bot fb114da8a4 Remove unused internal UIManagerModuleListener (#53404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53404

This interface is part of Legacy Architecture. No one is using it either internally or externally,
so it's safe to remove now. Interface was also `internal` so this is not a breaking change.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80714721

fbshipit-source-id: 82cc6152af7d7980119d2eda704ae50d8e81fd2b
2025-08-21 12:25:38 -07:00
Umar MohammadandFacebook GitHub Bot 191ddc1ec7 Fix React Native Commands Export Validation in Coverage Mode (#53381)
Summary:
Changelog: [GENERAL] [FIXED] - Fixed babel plugin validation error when coverage instrumentation is enabled

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

### Problem

[Workplace post](https://fb.workplace.com/groups/235694244595999/permalink/1278937163605030/)

React Native tests were failing **only when coverage collection was enabled** with the error:

`'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.`

### Root Cause

The React Native Babel plugin's `codegenNativeCommands` validation logic only handled direct `CallExpression` AST nodes. When coverage instrumentation was enabled, it transformed:

**Normal code:**

`export const Commands = codegenNativeCommands<NativeCommands>({...})`

**With coverage:**

`export const Commands = (cov_xxx().s[0]++, codegenNativeCommands<NativeCommands>({...}))`

The plugin failed to recognize the valid `codegenNativeCommands` call wrapped in a `SequenceExpression` by coverage instrumentation.

### **Solution**

Added `isCodegenNativeCommandsDeclaration` function to handle:

1.  **Coverage instrumentation**: `SequenceExpression` nodes containing the function call
2.  **Flow type casts**: `TypeCastExpression` and `AsExpression`
3.  **TypeScript assertions**: `TSAsExpression`
4.  **Direct calls**: Original `CallExpression` (backward compatibility)

Reviewed By: andrewdacenko

Differential Revision: D80572666

fbshipit-source-id: 465f4312a0229d8a92e495c685f46b607ce326e4
2025-08-21 11:33:52 -07:00
Nicola CortiandFacebook GitHub Bot aaa7ba4ab3 HelloWorld should not use ReactNativeHost (#53399)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53399

We currently create application template that are still using `ReactNativeHost`.
As this is a legacy arch class, we should remove it from the template ASAP so that
users can organically migrate away from it.

I will also update https://github.com/react-native-community/template with
the same changes I'm applying here.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80708461

fbshipit-source-id: e0d4a1f817e6fdddd93405decf77fd115956ec51
2025-08-21 11:16:20 -07:00
Nicola CortiandFacebook GitHub Bot 2689d4d372 RNTester should not use ReactNativeHost (#53398)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53398

ReactNativeHost is a legacy architecture class.
This migrates the app away from it and converts it to use DefaultReactHost instead.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80708460

fbshipit-source-id: 7d88c440414c979a2968fc9c910e828f5851195c
2025-08-21 11:16:20 -07:00
Nicola CortiandFacebook GitHub Bot d35ddb5e59 Delete unused DefaultReactHost.getDefaultReactHost() overload (#53396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53396

This overload for `getDefaultReactHost` is missing the last 2 parameters
and provides the same default as the full method.

In OSS is unused as we used the one with `ReactNativeHost`.
I'm removing it as it's causing an overload resolution failure internally.

This won't be a breaking change for Kotlin users are the signatures are compatibles,
but it will be breaking for Java users. I've verified that there are no OSS users.

Developers should use Kotlin default parameters + the method `getDefaultReactHost()`
with all the params + defaults for ease of use of this API.

Changelog:
[Android] [Removed] - Delete unused `DefaultReactHost.getDefaultReactHost()` overload

Reviewed By: mdvacca

Differential Revision: D80704987

fbshipit-source-id: 0b3a61aad3f18cde77bac78e3ba413d7f9166ede
2025-08-21 11:16:20 -07:00
Nicola CortiandFacebook GitHub Bot 8e514a8a10 Annotate ReactNativeJNISoLoader as InteropLegacyArchitecture (#53406)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53406

The `ReactNativeJNISoLoader` class (previously called BridgeSoLoader)
is actually a Legacy Architecture class.
However is used by `CxxModuleWrapperBase` which is needed by interop, so we need to keep it around.
I'm adding the annotation so we won't forget about it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80710951

fbshipit-source-id: ed353e2b14c742b25962f0b81beba6dc90157709
2025-08-21 10:52:56 -07:00
Nicola CortiandFacebook GitHub Bot e28784d4b6 Remove unnecessary NativeArgumentsParseException (#53408)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53408

This class is internal + legacy arch so can safely be removed now.
I've replaced the throw/catch site with the superclass of this exception.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80710950

fbshipit-source-id: 96615835588ce409de40d31ee83b82c88d3a07a0
2025-08-21 10:52:56 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 28275a0f7b Fix Crash when rendering Switch component (#53393)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53393

When implementing the changes for the Switch component for iOS 26, I didn't realize that the code in [`RCTIntance.mm`](https://www.internalfb.com/code/fbsource/[a54514baccf4e1f828ef46af8180555754c405d8]/xplat/js/react-native-github/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm?lines=344-375) was running behind a feature flag.
This means that all the users not in the experiment where the feature flag is turned on will experience a crash as soon as they navigate to a React Native screen that contains a Switch.

This change fixes the problem by adding a jump to the right queue and it also fixes a measurement issue with the Switch.

## Changelog:
[iOS][Fixed] - Fixed a crash when rendering the Switch component

bypass-github-export-checks

Reviewed By: GijsWeterings

Differential Revision: D80702245

fbshipit-source-id: 480ea061233d35e31679b4b30758dbc133ff0a77
2025-08-21 10:13:22 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot bcf76e8bb0 Add RN feature flag for ScrollView view recycling (#53373)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53373

# Changelog:
[Internal] -

Creates a RN feature flag for enabling/disabling view recycling for ScrollView native component on Android.

Reviewed By: lenaic

Differential Revision: D80625656

fbshipit-source-id: 23eae07512e0ba2ea014404e7afa19db900f7c47
2025-08-21 09:47:23 -07:00
Lauren TanandFacebook GitHub Bot c2d96d3a5b Add flow suppression for Constant Condition rollout (#34243)
Summary: DiffTrain build for [83c7379b9601f25463826449256f0cd3d283702d](https://github.com/facebook/react/commit/83c7379b9601f25463826449256f0cd3d283702d)

Reviewed By: marcoww6

Differential Revision: D80661139

fbshipit-source-id: 8ccf2dccba9a07ffd38f50da2c1ded8ebfa78c89
2025-08-21 09:35:19 -07:00
Nicola CortiandFacebook GitHub Bot c557311ed8 Ship useNativeEqualsInNativeReadableArrayAndroid and useNativeTransformHelperAndroid to stable (#53372)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53372

We verified that those feature flags are not regressing the experience + we got confirmation from Software Mansion that the fix
is effectively mitigating the regression on Android mounting.

Hence we can ship this to production.

Fixes: https://github.com/facebook/react-native/issues/51869

Changelog:
[Android] [Fixed] - Fix mounting is very slow on Android by shipping native transform optimizations

Reviewed By: javache

Differential Revision: D80624739

fbshipit-source-id: 2e185434f08b5ea0339d59a6ea006017e5abeff2
2025-08-21 09:32:21 -07:00
Nicola CortiandFacebook GitHub Bot 3f74a87027 Reland: Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1 & 2
Summary:
This is a reland of D80622058 + D80623826 + fixes for all the apps.

This method was deprecated in React Native 0.79. We should be able to remove it without impact in 0.82.
I also verified that there are no users of this API in OSS.

There is also a 1:1 replacement for this API which is the other non-deprecated `getDefaultReactHost()` method.

bypass-github-export-checks

Changelog:
[Internal] - Skipping changelog as main already contains a changelog entry

Reviewed By: javache

Differential Revision: D80704320

fbshipit-source-id: c9aa26b83dbd9f4bf97d0a9e9c6dcaa6eb0afdca
2025-08-21 09:31:30 -07:00
Christoph PurrerandFacebook GitHub Bot 9793542555 Align ImageManager and ImageFetcher requestImage API (#53382)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53382

changelog: [internal]

Reviewed By: rshest

Differential Revision: D80679608

fbshipit-source-id: 1a9b5f6a82b1f46e006983f5013272fca4e931bb
2025-08-21 08:46:32 -07:00
Rubén NorteandFacebook GitHub Bot b899e18d1c Do not report mount for mount items with empty surfaceId (#53391)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53391

Changelog: [internal]

Some mount items dispatched to Fabric don't have an associated surface ID (they use -1), which causes some log spam when we try to validate that the surface ID exist when we report mount for those surfaces.

This checks if the surface ID has a valid surface ID before adding it to the list of surfaces to report mount.

Reviewed By: rshest

Differential Revision: D80698363

fbshipit-source-id: 63dc13d53b8bbc2742171b1f444c80ce867e2351
2025-08-21 07:54:00 -07:00
Juan PenalozaandFacebook GitHub Bot aec35b8960 Revert D80622058: Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1
Differential Revision:
D80622058

Original commit changeset: 4667683be151

Original Phabricator Diff: D80622058

fbshipit-source-id: c6c119df3b4f849a5c66fbbb619017ae837260c8
2025-08-21 06:26:35 -07:00
Juan PenalozaandFacebook GitHub Bot 3c79d7c18d Revert D80623826: Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 2
Differential Revision:
D80623826

Original commit changeset: f201e99f7cd4

Original Phabricator Diff: D80623826

fbshipit-source-id: 006bef0883f8cc82b333a68b9260b77afaae060f
2025-08-21 06:26:35 -07:00
Jakub PiaseckiandFacebook GitHub Bot 7f051c5470 Change leftover references to hermes.framework (#53390)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53390

Changelog: [General][Fixed] - Change leftover references to `hermes.framework` to `hermesvm.framework`

Reviewed By: cipolleschi

Differential Revision: D80701257

fbshipit-source-id: 9c0e8e49e50f515941e48de2219fb7730d8896bd
2025-08-21 06:24:32 -07:00
Nicola CortiandFacebook GitHub Bot 8bdb34732b Delete internal ReactPackageLogger as no longer necessary (#53387)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53387

This interface was internal and legacy arch only, so it can safely be removed.
I've also removed the logic inside `ReactInstanceManager` that was using it as no longer necessary.

Changelog:
[Internal] [Changed] -

Reviewed By: mdvacca

Differential Revision: D80626639

fbshipit-source-id: b173e71b92e29cebbfc5ed589e01ac295eda2bf0
2025-08-21 05:31:55 -07:00
Nicola CortiandFacebook GitHub Bot 4583fbe052 Deprecate BridgelessReactContext.getCatalystInstance() (#53388)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53388

This method is deprecated and should not be invoked in NewArch, therefore I'm deprecating it now.

Changelog:
[Android] [Deprecated] - Deprecate `BridgelessReactContext.getCatalystInstance()` method

Reviewed By: cipolleschi

Differential Revision: D80626638

fbshipit-source-id: d4ed26021c376f54c732154c153bf60fea2bf5e3
2025-08-21 05:31:55 -07:00
Nicola CortiandFacebook GitHub Bot fbef891573 Fix build race condition with preparePrefab missing 3p headers (#53384)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53384

Occasionally, the `preparePrefab` task might run before other tasks that
are responsible of populating the 3p headers, such as `prepareNative3pDependencies`.

This was evident in the latest nightly which is missing the fast_float headers in the
Android prefab.

Adding a dependsOn fixes it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80695212

fbshipit-source-id: 6e0dd17e5cf8c33d14812e5cb8fdc8b800897816
2025-08-21 05:31:40 -07:00
Nicola CortiandFacebook GitHub Bot bda6acf3b0 Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 2 (#53374)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53374

This method was deprecated in React Native 0.79. We should be able to remove it without impact in 0.82.
I also verified that there are no users of this API in OSS.

There is also a 1:1 replacement for this API which is the other non-deprecated getDefaultReactHost() method.

Changelog:
[Android] [Removed] - Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 2

Reviewed By: mdvacca

Differential Revision: D80623826

fbshipit-source-id: f201e99f7cd437a47919c36eced5637481151822
2025-08-21 04:51:13 -07:00
Nicola CortiandFacebook GitHub Bot 474f455a75 Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1 (#53371)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53371

This method was deprecated in React Native 0.79. We should be able to remove it without impact in 0.82.
I also verified that there are no users of this API in OSS.

There is also a 1:1 replacement for this API which is the other non-deprecated `getDefaultReactHost()` method.

Changelog:
[Android] [Removed] - Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1

Reviewed By: mdvacca

Differential Revision: D80622058

fbshipit-source-id: 4667683be151bc7ef1926a21306e088185695369
2025-08-21 04:51:13 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 2ad87cdc50 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] [B] (#53385)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53385

Reviewed By: rshest

Differential Revision: D80617317

fbshipit-source-id: b06cb66d93b90c571f17184fa78a54f79f43b8a3
2025-08-21 04:32:52 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 5d41129ce1 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages [A] [A] (#53386)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53386

Reviewed By: rshest

Differential Revision: D80617203

fbshipit-source-id: c38c3e69eda4d09b416270d4a672cc087b203b6a
2025-08-21 04:23:44 -07:00
Jakub PiaseckiandFacebook GitHub Bot 776fca1e7c Change hermes atrifact names (#53094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53094

Changelog: [General][Changed] - Changed names of hermes binaries

Reviewed By: cipolleschi, cortinico

Differential Revision: D79163127

fbshipit-source-id: 54be34ba1f6ce90067768394ca9a6e9c4048be90
2025-08-21 04:00:04 -07:00
Alex HuntandFacebook GitHub Bot 3d1d81cddc Remove Perf Monitor hooks from DevSupport API (#53349)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53349

Follows feedback on D78904767, refactoring how we pass data to `PerfMonitorOverlayViewManager` to avoid API additions on `DevSupport`.

New interfaces under `com.facebook.react.devsupport.perfmonitor`:

- `PerfMonitorUpdateListener` is implemented by the view class to receive updates from the C++ `HostTargetDelegate`.
- `PerfMonitorInspectorTargetBinding` exposes an API on `ReactHostInspectorTarget` to send CDP actions down to C++ (stub for now).
- `PerfMonitorDevHelper` allows us to use the internal `ReactHostImplDevHelper` to expose the `ReactHostInspectorTarget` instance from the runtime.

Changelog: [Internal]

Reviewed By: cortinico, rshest

Differential Revision: D80464093

fbshipit-source-id: b88e270c0211e4adf52c015ac700df7f44945a5a
2025-08-21 03:06:52 -07:00
Alex HuntandFacebook GitHub Bot 62b8a7b4ef Switch Perf Monitor metric to Long Tasks (#53297)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53297

Pivots our display metric for the V2 Perf Monitor experiment by switching to Long Tasks.

- Implements a new "__ReactNative__LongTask" metrics event (note: prefixed, since this sits outside the Web Vitals spec).

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D79556595

fbshipit-source-id: 239cf44884f67bf62295b92e2262ae1811d17e4a
2025-08-21 03:06:52 -07:00
Nick LefeverandFacebook GitHub Bot 70d5c97ab4 Make Text shadow nodes uncullable on Android (#53376)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53376

When encountering embedded <Text> components, with the parent <Text> component setting event handlers, culling away the child <Text> components will break the assignment of the event handlers to the text spans on Android.

This diff disables view culling on <Text> components so that event handlers would be correctly assigned to the text fragments once rendered.

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D80631997

fbshipit-source-id: f835a249fef1b448b884999ccd75ee06041eca70
2025-08-20 17:35:00 -07:00
Sam ZhouandFacebook GitHub Bot 0ef21bf8ad Update prettier-plugin-hermes-parser in fbsource to 0.32.0 (#53380)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53380

Bump prettier-plugin-hermes-parser to 0.32.0.

Changelog: [internal]

Reviewed By: gkz

Differential Revision: D80644889

fbshipit-source-id: 2d3904db1a4d3952e34267cdb748eef021f93a7b
2025-08-20 16:37:19 -07:00
Sam ZhouandFacebook GitHub Bot b23c558a20 Kill $FlowExpectedError as a type across fbsource (#53378)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53378

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80573556

fbshipit-source-id: 4d8fc85d563977deb83abdd278175c960f54fd13
2025-08-20 13:35:28 -07:00
Sam ZhouandFacebook GitHub Bot 89fd398342 Update hermes-parser and related packages in fbsource to 0.32.0 (#53377)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53377

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

Changelog: [internal]

Reviewed By: gkz

Differential Revision: D80622389

fbshipit-source-id: d35ad5179eacbc83132517e6b9c9436fda972d28
2025-08-20 11:45:16 -07:00
Joe VilchesandFacebook GitHub Bot 9f2389f074 Move enableAccessibilityOrder feature flag to experimental (#53375)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53375

We have seen sufficient internal signal to be confident that we can move this to the experimental release channel. Soon I will publish some experimental documentation and let folks in OSS know about this.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D80560366

fbshipit-source-id: 6a8cce39f823dfa313c8c51090eb88c31f1f9fd3
2025-08-20 10:35:11 -07:00
nishan (o^▽^o)andFacebook GitHub Bot 6da351a5ed fix(iOS)(Fabric) inline view alignment inside of a Text with line height (#53341)
Summary:
Addresses - https://github.com/facebook/react-native/issues/53092

Fixes inline `View` frame calculation that is nested inside of a `Text` with a `lineHeight`. The calculation for inline view frame is correct on [Paper](https://github.com/facebook/react-native/blob/25104de5c47845c0edbdfb38df30f8c406da832e/packages/react-native/Libraries/Text/Text/RCTTextShadowView.mm#L338). This PR uses the same calculation as Paper (use glyph height instead of baseline from layout manager).

jest_e2e[run_all_tests]

## Changelog:

[IOS] [FIXED] - Inline `View` alignment with `lineHeight` in Text

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

Test Plan:
Make sure Text render is consistent on iOS and android and the View aligns with Text baseline with the provided [repro](https://github.com/facebook/react-native/issues/53092)

<img width="400" height="766" alt="Screenshot 2025-08-19 at 4 55 01 AM" src="https://github.com/user-attachments/assets/bc4e7473-8fe9-4596-a9ea-fd1204e4b3a3" />

Rollback Plan:

Reviewed By: christophpurrer

Differential Revision: D80525760

Pulled By: cipolleschi

fbshipit-source-id: 0152c35c56d8631942c0186f5dbe33c4a20a48c4
2025-08-20 07:40:54 -07:00
Rubén NorteandFacebook GitHub Bot 2ad845ccb2 Ship DOM APIs to stable (#53360)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53360

Changelog: [General][Breaking] -  Enable DOM APIs in host component refs

This ships DOM APIs to stable now that we have a cohesive API and it's been stable at Meta for a while.

This changes the `HostInstance` type (exported from the `react-native` package and used by all host components) from being an interface to being a class (`ReactNativeElement`).

**The API is backwards compatible** but given we're changing the definition of `HostInstance` from an interface to a class, this can be considered a **breaking change for TypeScript** (not at runtime).

## Previous API

- [`measure`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measurecallback)
- [`measureInWindow`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measureinwindowcallback)
- `measureLayout`
- [`setNativeProps`](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture#setnativeprops-to-edit-textinput-value)

## New API

From [`HTMLElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement):

- Properties
  - [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight)
  - [`offsetLeft`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft)
  - [`offsetParent`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent)
  - [`offsetTop`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop)
  - [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth)
- Methods
  - [`blur`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur).
    - This method was also [available](/docs/next/legacy/direct-manipulation#blur) in the legacy architecture.
  - [`focus`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus).
    - This method was also [available](/docs/next/legacy/direct-manipulation#focus) in the legacy architecture.
    - The `options` parameter is not supported.

From [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element):

- Properties
  - [`childElementCount`](https://developer.mozilla.org/en-US/docs/Web/API/Element/childElementCount)
  - [`children`](https://developer.mozilla.org/en-US/docs/Web/API/Element/children)
  - [`clientHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight)
  - [`clientLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft)
  - [`clientTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop)
  - [`clientWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth)
  - [`firstElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild)
  - [`id`](https://developer.mozilla.org/en-US/docs/Web/API/Element/id)
    - Returns the value of the `id` or `nativeID` props.
  - [`lastElementChild`](https://developer.mozilla.org/en-US/docs/Web/API/Element/lastElementChild)
  - [`nextElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nextElementSibling)
  - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeName)
  - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeType)
  - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Element/nodeValue)
  - [`previousElementSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Element/previousElementSibling)
  - [`scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight)
  - [`scrollLeft`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft)
    - For built-in components, only `ScrollView` instances can return a value other than zero.
  - [`scrollTop`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop)
    - For built-in components, only `ScrollView` instances can return a value other than zero.
  - [`scrollWidth`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth)
  - [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName)
    - Returns a normalized native component name prefixed with `RN:`, like `RN:View`.
  - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Element/textContent)
- Methods
  - [`getBoundingClientRect`](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect)
  - [`hasPointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture)
  - [`setPointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture)
  - [`releasePointerCapture`](https://developer.mozilla.org/en-US/docs/Web/API/Element/releasePointerCapture)

From [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node):

- Properties
  - [`childNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes)
  - [`firstChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/firstChild)
  - [`isConnected`](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected)
  - [`lastChild`](https://developer.mozilla.org/en-US/docs/Web/API/Node/lastChild)
  - [`nextSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nextSibling)
  - [`nodeName`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeName)
  - [`nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType)
  - [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue)
  - [`ownerDocument`](https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument)
    - Will return the [document instance](/docs/next/document-instances) where this component was rendered.
  - [`parentElement`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentElement)
  - [`parentNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode)
  - [`previousSibling`](https://developer.mozilla.org/en-US/docs/Web/API/Node/previousSibling)
  - [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)
- Methods
  - [`compareDocumentPosition`](https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition)
  - [`contains`](https://developer.mozilla.org/en-US/docs/Web/API/Node/contains)
  - [`getRootNode`](https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode)
  - [`hasChildNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Node/hasChildNodes)

### Legacy API

- [`measure`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measurecallback)
- [`measureInWindow`](https://reactnative.dev/docs/the-new-architecture/layout-measurements#measureinwindowcallback)
- `measureLayout`
- [`setNativeProps`](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture#setnativeprops-to-edit-textinput-value)

### New APIs

Additionally, this exposes access to document nodes and text nodes that were not available before.

This will be properly documented on the website at part of the release of 0.82, that will contain this changes.

Reviewed By: GijsWeterings

Differential Revision: D78562721

fbshipit-source-id: 139aee6969f3ecdc65cffcd31cd1754f367d9122
2025-08-20 07:18:00 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e04bbf0497 Fix E2E Tests by configuring git (#53357)
Summary:
E2E tests on iOS started failing yesterday because of some permission model that has changed in Github.

When creating a new app from the template, we initialize a git repository. The initialization started failing with the error:
```
debug Could not create an empty Git repository, error: , Error: Command failed with exit code 128: git commit -m Initial commit

Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'runner@sat12-jr314_3f88162a-0f3d-4d26-80dc-58f431cca4c6-9A2607311B51.(none)')
```

This change fixes it by setting a default identity for git in the CI jobs that requires it.

## Changelog:
[Internal] -

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

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D80612345

Pulled By: cipolleschi

fbshipit-source-id: 85816057d910ed3619c5f683fdad724c3df8046b
2025-08-20 06:58:36 -07:00
Rubén NorteandFacebook GitHub Bot 78f089906c Use React Native built-in definitions for Event and EventTarget in Fantom (#53362)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53362

Changelog: [internal]

This just replaces the polyfills for `Event` and `EventTarget` that we're defining inline in Fantom with the implementations that already exist in RN.

Reviewed By: javache

Differential Revision: D80612067

fbshipit-source-id: 047c8f12cbb1f4afea2d05a5a1235d9dff2e25f9
2025-08-20 06:01:22 -07:00
Nicola CortiandFacebook GitHub Bot 8480386d50 Disable running ktfmtCheck due to diverging ktfmt versions (#53359)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53359

A new version of ktfmt broke the OSS CI build for React Native.
That's due to us running still on the older version of ktfmt, as the newer version hasn't been released yet.

I'm temporarly disabling the `ktfmtCheck` jobs because we primarly check formatting from within fbsource.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80610450

fbshipit-source-id: 846249780f979788356404205d8b8e37fc54a255
2025-08-20 05:42:32 -07:00
Rubén NorteandFacebook GitHub Bot 9910981d3a Simplify RendererImplementation (#53351)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53351

Changelog: [internal]

This refactors `RendererImplementation` to reduce boilerplate code from exporting existing methods from Fabric or Paper.

Reviewed By: lenaic

Differential Revision: D80532479

fbshipit-source-id: ae70bb50f0d2fbf7aee95efd39d9716f0c3a8a90
2025-08-20 03:53:44 -07:00
Nivaldo BondançaandFacebook GitHub Bot d1a1020a4a Codemod format for trailing commas change
Reviewed By: VladimirMakaev

Differential Revision: D80576929

fbshipit-source-id: 1310f77f5d9d489b780b14875454ebda7f7adfc9
2025-08-19 18:15:18 -07:00
David VaccaandFacebook GitHub Bot fb84932e48 Deprecate ReactInstanceManager and ReactInstanceManagerBuilder (#53150)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53150

ReactInstanceManager and ReactInstanceManagerBuilder are legacy architecture classes that will be deleted in the future, in this diff we are deprecating them

changelog: [Android][Changed] Deprecate legacy architecture classes ReactInstanceManager and ReactInstanceManagerBuilder, these classes will be deleted in a future release

Reviewed By: mlord93

Differential Revision: D79677828

fbshipit-source-id: 2d79736d94a55e44dd24056985f358e3650ddf6c
2025-08-19 16:51:43 -07:00
Alex HuntandFacebook GitHub Bot 3f848e7a54 Fix test setup for flag used early in HostTarget, restore value (#53355)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53355

Follows D80000286, where this flag was forcibly disabled to fix tests.

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D80545210

fbshipit-source-id: 585122ff73e4979c398be6eb03000936d6bd5ce1
2025-08-19 11:40:24 -07:00
Alex HuntandFacebook GitHub Bot df748ba083 Implement Perf Monitor event scoring and display timeout (#53169)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53169

Improves the experimental Perf Monitor UI sufficient for the initial MVP.

- Sets minimum duration threshold to display an event to 10ms.
- Impelements [responsiveness scoring](https://web.dev/articles/inp#good-score) linked to UI colour and display timeout.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D79359131

fbshipit-source-id: f08d2b595e885342d841c3a02b9e02456502c926
2025-08-19 11:19:09 -07:00
generatedunixname89002005287564andFacebook GitHub Bot defefb19e3 Fix CQS signal modernize-use-designated-initializers in xplat/js/react-native-github/packages (#53352)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53352

Reviewed By: cipolleschi

Differential Revision: D80516836

fbshipit-source-id: 28d10e5d1b9d476924c8e73526e164ff98e12be1
2025-08-19 09:53:13 -07:00
Riccardo CipolleschiandFacebook GitHub Bot ba51aeaa90 Fix Switch layout with iOS26 (#53247)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53247

Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements.
This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823).

The `<Switch>` component was using hardcoded values for its size.
This change fixes the problem by:
- Using codegen for interface only
- Implementing a custom Sadow Node to ask the platform for the Switch measurements
- Updating the JS layout to wrap the size around the native component.

## Changelog:

[iOS][Fixed] - Fix Switch layout to work with iOS26

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

Test Plan:
Tested locally with RNTester.

| iOS Version | Before | After |
| --- | --- | --- |
| < iOS 26 | https://github.com/user-attachments/assets/91d73ea3-30ba-4a5c-948e-ea5c63aa7c6d | https://github.com/user-attachments/assets/76061bc8-0f14-412a-a8fb-d1c3951772e6 |
| >= iOS 26 | https://github.com/user-attachments/assets/1abc477f-bc0a-4762-938e-98814fb2a054 | https://github.com/user-attachments/assets/77e562e1-b803-46ac-9cf6-102f062a1cd4 |

Rollback Plan:

Reviewed By: sammy-SC

Differential Revision: D79653120

Pulled By: cipolleschi

fbshipit-source-id: d99b353b7b7b5496b148779de4abe3e57dd38156
2025-08-19 06:53:44 -07:00
Rubén NorteandFacebook GitHub Bot 24657ad5c4 Optimize DOM APIs (#53332)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53332

Changelog: [internal]

This implements several optimizations to speed up DOM traversal APIs.

The main changes are:
1. Better caching of renderer methods in `RendererImplementation`.
2. Faster access to public instances from instance handles (avoids `instanceof` checks if the nodes are `ReactNativeElement`, which is the most common case).
3. Avoiding unnecessary function calls in `NativeDOM` but removing the proxy object.
4. Removal of private fields from `HTMLCollection` and `NodeList`, and reuse the object to define object properties.
5. Avoiding unnecessary array copies in `getChildNodes`.

Results:

| Property / method               | Latency before (ns) | Latency after (ns) | Difference |
| ----------------------- | ------------------------- | ------------------------ | ---------- |
| parentNode              | 3996                      | 2203                     | -44.87%   |
| parentElement           | 4347                      | 2524                     | -41.94%   |
| childNodes              | 6590                      | 3886                     | -41.03%   |
| children                | 6950                      | 4126                     | -40.63%   |
| firstChild              | 5008                      | 2975                     | -40.60%   |
| firstElementChild       | 5408                      | 3215                     | -40.55%   |
| lastChild               | 5048                      | 2974                     | -41.09%   |
| lastElementChild        | 5448                      | 3215                     | -40.99%   |
| childElementCount       | 5378                      | 3175                     | -40.96%   |
| previousSibling         | 12118                     | 6780                     | -44.05%   |
| previousElementSibling  | 12148                     | 6850                     | -43.61%   |
| nextSibling             | 12139                     | 6800                     | -43.98%   |
| nextElementSibling      | 12119                     | 6830                     | -43.64%   |
| offsetParent            | 5097                      | 3725                     | -26.92%   |
| isConnected             | 2774                      | 1733                     | -37.53%   |
| ownerDocument           | 691                       | 681                      | -1.45%    |
| getRootNode()           | 3195                      | 2154                     | -32.58%   |
| hasChildNodes()         | 4997                      | 2854                     | -42.89%   |

Reviewed By: mdvacca

Differential Revision: D80449030

fbshipit-source-id: 6b3abecbbf6aa23bc99ab65cf22ed33721dc5459
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot b7b83cda0a Remove nullability from NativeDOM.setNativeProps (#53331)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53331

Changelog: [internal]

This change was shipped 3 months ago so we can assume the native method will always have this method and don't need to keep backwards compatibility.

Reviewed By: rshest

Differential Revision: D80449031

fbshipit-source-id: 4ff11b81478701ad712b4e097625e569829f6480
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot 9301badec1 Remove nullability from NativePerformance module methods (#53330)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53330

Changelog: [internal]

These methods have been defined for a month, so it's safe to make then non-nullable already.

Reviewed By: GijsWeterings

Differential Revision: D80453413

fbshipit-source-id: 3fde076622dc9d510bad144300364401f2319507
2025-08-19 06:06:52 -07:00
Rubén NorteandFacebook GitHub Bot 14718b20c6 Prepare Flow types for change in HostInstance (#53318)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53318

Changelog: [internal]

This prepares the codebase for an eventual migration of `HostInstance` to `ReactNativeElement`, so the actual migration doesn't need to adjust so much existing code.

Reviewed By: rshest

Differential Revision: D80399739

fbshipit-source-id: 441d3e92ef6dff253343d1058b2027698e8ecb22
2025-08-19 06:06:35 -07:00
Andrew DatsenkoandFacebook GitHub Bot e7d89fa53a Add support for perfetto on Windows tracing (#53340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53340

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D80471173

fbshipit-source-id: 54f24c9c6868dae2042d324c8aed87726ede05a8
2025-08-19 05:38:12 -07:00
Samuel SuslaandFacebook GitHub Bot 8197399e43 ship fix to a crash in differentiator (#53346)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53346

changelog: [internal]

ship fix for a rare crash in differentiator.

Reviewed By: rshest

Differential Revision: D80459923

fbshipit-source-id: 308f513fca4787a01250ba25d8ce73db84fa83a5
2025-08-19 04:39:04 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 4a48364639 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt (#53348)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53348

Reviewed By: cortinico, rshest

Differential Revision: D80443954

fbshipit-source-id: 4a45508aa0249b86adc96b1ebd62f2e409b3aac2
2025-08-19 04:31:16 -07:00
Christian FalchandFacebook GitHub Bot e3adf47214 fixed copying bundles correctly (#53325)
Summary:
When copying bundle files from the platform folders in the .build output, the script had a bug where all bundles were copied - meaning that only the last one would be in the resulting xcframework output.

This caused an issue when we tried to publish an app built with precompiled binaries to AppStore where the field `CFBundleSupportedPlatforms` was wrong and caused the submission to be rejected. This was caused by the script copying the wrong bundle file into the final xcframework outputs.

This issue is described here:
https://github.com/react-native-community/discussions-and-proposals/discussions/923#discussioncomment-14089245

This commit fixes the above error by using the iOS 15 `vtool` to show the actual platform for a given framework and then making sure we don't copy bundles in the wrong way.

Testing this on my local machine for iOS/iOS-simulator/MacOS/catalyst yields the following results (before/after this fix):

**Before:**

```bash
Copying bundles to the framework...
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
```

  **After:**

```bash
  Copying bundles to the framework...
  ../.build/Build/Products/Debug/ReactNativeDependencies_glog.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_boost.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug/ReactNativeDependencies_folly.bundle → macos-arm64_x86_64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_glog.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_boost.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphoneos/ReactNativeDependencies_folly.bundle → ios-arm64
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-iphonesimulator/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-simulator
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_glog.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_boost.bundle → ios-arm64_x86_64-maccatalyst
  ../.build/Build/Products/Debug-maccatalyst/ReactNativeDependencies_folly.bundle → ios-arm64_x86_64-maccatalyst
```

## Changelog:

[IOS] [FIXED] - Fixed copying bundles correctly to xcframeworks when precompiling ReactNativeDependencies.xcframework

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

Test Plan: Ensure that the info.plist files in the nightlies for the ReactNativeDepdendencies.xcframework has the correct bundles for its targets.

Reviewed By: andrewdacenko

Differential Revision: D80457335

Pulled By: cipolleschi

fbshipit-source-id: aeb4166f66218f72bdd29b6fc579fcc7b6d12844
2025-08-19 02:47:40 -07:00
Nicola CortiandFacebook GitHub Bot 59cc1738d7 Add missing headers from react_performance_cdpmetrics to prefab (#53304)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53304

The headers from `react_performance_cdpmetrics` are currently missing in the libreactnative.so prefab.

They're actually references from `Scheduler.h` and this is causing `react-native-screens` to fail compiling
with:

```
  In file included from /tmp/RNApp/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:3:
  /home/runner/.gradle/caches/8.14.3/transforms/97716233b9aa00728d9cac038eecaf3d/transformed/react-android-0.82.0-nightly-20250815-41029d8e9-SNAPSHOT-debug/prefab/modules/reactnative/include/react/renderer/scheduler/Scheduler.h:13:10: fatal error: 'react/performance/cdpmetrics/CdpMetricsReporter.h' file not found
     13 | #include <react/performance/cdpmetrics/CdpMetricsReporter.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  [4/6] Building CXX object CMakeFiles/rnscreens.dir/tmp/RNApp/node_modules/react-native-screens/cpp/RNSScreenRemovalListener.cpp.o
  [5/6] Building CXX object CMakeFiles/rnscreens.dir/src/main/cpp/OnLoad.cpp.o
```

See here https://github.com/react-native-community/nightly-tests/actions/runs/16991637594/job/48172255960
I saw this was added on D78904748

Here I'm exposing the headers from `react_performance_cdpmetrics` to the prefab API so users in OSS can
access those headers as well.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80344762

fbshipit-source-id: 29b09b94370b71a16ecf12d4cca9cd571c588e5c
2025-08-19 02:34:22 -07:00
Marco WangandFacebook GitHub Bot 8351a5d186 Pre-Suppress errors for xplat/js for general strict comparison in non-generated files (#53342)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53342

Commands

```
scripts/flow/tool add-comments --comment 'Error discovered during Constant Condition roll out. See https://fburl.com/workplace/4oq3zi07.' .
```
```
arc f
```

drop-conflicts

Reviewed By: SamChou19815

Differential Revision: D80487235

fbshipit-source-id: 9e7c1a2641ddc0da0400fa1aff598b112a0434d5
2025-08-19 01:09:22 -07:00
Luna WeiandFacebook GitHub Bot 25104de5c4 Return ScrollView clipping rect (#53289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53289

Changelog: [Internal] - Support subview clipping for VirtualView

Reviewed By: yungsters

Differential Revision: D80145954

fbshipit-source-id: f7886440c4aecd8d50141e78f1050e94c2d7230a
2025-08-18 13:59:47 -07:00
Luna WeiandFacebook GitHub Bot 21008c9992 Dispatch mode changes on onSizeChanged (#53339)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53339

Changelog: [Internal] - onSizeChanged can be called independent of onLayoutChange. Right now this hasn't affeced anything because VirtualViews are visible by default.

Reviewed By: yungsters

Differential Revision: D80357397

fbshipit-source-id: 06b174791dec0d19da6bbe1a8144d35b93b8f6c1
2025-08-18 13:59:47 -07:00
Alex HuntandFacebook GitHub Bot bda85b8244 Bump Electron to 37.2.6 (#53337)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53337

Bump for security update.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D80462100

fbshipit-source-id: 4dff6b17337e031321d6549c86ca2cecec742acc
2025-08-18 13:19:47 -07:00
Devan BuggayandFacebook GitHub Bot 32d37f03ad Long press back to open DevMenu (#53189)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53189

In addition to the menu button and long pressing fast forward option, adds long pressing back as an option to open DevTools for devices like the Chromecast remote.

Changelog:
[Android][Added] - Add long-press back as an option to open the DevMenu for devices that lack menu & fast-forward.

{F1981060943}

Reviewed By: alanleedev

Differential Revision: D79923779

fbshipit-source-id: b758d591ebe3b8e601dbf704212123451e3c32e1
2025-08-18 12:18:59 -07:00
generatedunixname89002005287564andFacebook GitHub Bot 1d4c9f96e4 Fix CQS signal readability-static-definition-in-anonymous-namespace in xplat/js/react-native-github/packages (#53327)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53327

Reviewed By: rshest

Differential Revision: D80441223

fbshipit-source-id: 0d4dc19a5e0a2c1babf20a4a46aeb88950d0d5b9
2025-08-18 11:49:03 -07:00
Devan BuggayandFacebook GitHub Bot b1642ad5b6 Scope HighContrastText to correct Settings namespace (#53219)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53219

`ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED_CONSTANT` is a `Secure` setting, not a `Global` one:

See fbandroid/java/com/facebook/fbreact/libraries/accessibilityinfosync/ReactAccessibilityInfoSync.kt

Changelog: [Internal]

Reviewed By: alanleedev

Differential Revision: D77977362

fbshipit-source-id: 2268e2fd8b966a02bcfac67e21b5c23cc76a3b95
2025-08-18 11:14:29 -07:00
Nivaldo BondançaandFacebook GitHub Bot 2b190f2029 Codemod format for trailing commas incoming change [300/n] (#53338)
Summary:
X-link: https://github.com/facebook/yoga/pull/1848

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

Adding trailing commas to folders:
- xplat/js/react-native-github/packages/react-native
- xplat/kotlin/ast_tools/core/src
- xplat/kotlin_compiler_plugins/template/src/main
- xplat/kotlin/kotlin_multiplatform_template/src/commonMain
- xplat/libraries/bloks/bloks-debugging/src
- xplat/libraries/bloks/bloks-lispy/src
- xplat/libraries/bloks/bloks-step-debugger/src
- xplat/mdv/uifiddle-prototype/android-server/playground
- xplat/mdv/uifiddle-prototype/android-server/server
- xplat/oxygen/common/src/test
- xplat/oxygen/mpts/src/main
- xplat/oxygen/mpts/src/test
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaAccessoryTest
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaWearableSDKSampleApp
- xplat/prototypes/smartglasses/AndroidStudioProjects/MetaWearableSDK
- xplat/prototypes/smartglasses/AndroidStudioProjects/Voice
- xplat/ReactNative/react-native-cxx/react/renderer
- xplat/rtc/media/tools/audio
- xplat/security/prodsec/android/codetransparency
- xplat/security/prodsec/siggy/java
- xplat/simplesql/codegen/java/com
- xplat/sonar/android/plugins/jetpack-compose
- xplat/sonar/android/plugins/leakcanary2
- xplat/sonar/android/plugins/litho
- xplat/sonar/android/plugins/retrofit2-protobuf
- xplat/sonar/android/sample/src
- xplat/sonar/android/src/facebook

Reviewed By: dtolnay

Differential Revision: D80452590

fbshipit-source-id: 2bc79edba21e913f6121a25a269c1a4258f5f31c
2025-08-18 10:24:50 -07:00
Devan BuggayandFacebook GitHub Bot 775daf5972 Remove "bridgeless" from React Native Dev Menu (#53336)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53336

No longer needed as bridgeless is enabled everywhere.

Changelog:
[iOS][Deprecated] Remove bridge mode title and description from React Native Dev Menu title

Reviewed By: christophpurrer

Differential Revision: D80457504

fbshipit-source-id: bf21e44ed925f4777d0190313c6e4aad774abe42
2025-08-18 10:22:12 -07:00
Devan BuggayandFacebook GitHub Bot 1c838f32a9 Remove "bridgeless" from React Native Dev Menu (#53335)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53335

No longer needed as bridgeless is enabled everywhere.

Changelog:
[Android][Deprecated] Remove bridge mode string from React Native Dev Menu title

Reviewed By: christophpurrer

Differential Revision: D80457625

fbshipit-source-id: 4cf602a90f29d5495a5e8a4ccaf49abb96e85f94
2025-08-18 10:22:12 -07:00
Devan BuggayandFacebook GitHub Bot 635c707eec Wire through landingView parameter (#52947)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52947

Wires up a `landingView` parameter to be passed to rn_fusebox.html that we can use to focus an arbitrary view on launch. Used from the new perf analyze scenario to open devtools on the performance panel.

Changelog:
[Android][Added] - Adds a landing view parameter to opening RNDT, enabling arbitrary view focus on launch.

Reviewed By: hoxyq

Differential Revision: D79329081

fbshipit-source-id: b1513a803f4add803100cebd08f53e59a08e64d4
2025-08-18 10:20:43 -07:00
Sam ZhouandFacebook GitHub Bot cf664c65e2 Standardize subtyping error code into incompatible-type in react native and metro (#53312)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53312

Changelog: [Internal]

Reviewed By: jbrown215

Differential Revision: D80400976

fbshipit-source-id: 196af69c0b9621b2a2675b232406639773e04933
2025-08-18 09:04:31 -07:00
Rubén NorteandFacebook GitHub Bot ffac8f8ef0 Add benchmark for traversal methods in ReactNativeElement (#53329)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53329

Changelog: [internal]

This adds an initial set of benchmarks for the traversal methods in the DOM API.

Baseline:

| (index) | Task name                | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | ------------------------ | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                   | '366.76 ± 0.26%' | '351.00 ± 10.00' | '2766891 ± 0.08%'      | '2849003 ± 83548'      | 50000   |
| 1       | 'parentNode'             | '4158.1 ± 0.08%' | '4126.0 ± 50.00' | '241467 ± 0.04%'       | '242365 ± 2913'        | 50000   |
| 2       | 'parentElement'          | '4372.6 ± 0.08%' | '4336.0 ± 51.00' | '229603 ± 0.04%'       | '230627 ± 2690'        | 50000   |
| 3       | 'childNodes'             | '6698.5 ± 1.17%' | '6550.0 ± 71.00' | '151718 ± 0.04%'       | '152672 ± 1673'        | 50000   |
| 4       | 'children'               | '7134.4 ± 0.70%' | '6980.0 ± 80.00' | '141984 ± 0.05%'       | '143266 ± 1643'        | 50000   |
| 5       | 'firstChild'             | '5141.7 ± 1.29%' | '5038.0 ± 70.00' | '197249 ± 0.04%'       | '198491 ± 2720'        | 50000   |
| 6       | 'firstElementChild'      | '5508.1 ± 0.90%' | '5408.0 ± 70.00' | '183835 ± 0.04%'       | '184911 ± 2425'        | 50000   |
| 7       | 'lastChild'              | '5121.7 ± 0.93%' | '5038.0 ± 70.00' | '197432 ± 0.04%'       | '198491 ± 2720'        | 50000   |
| 8       | 'lastElementChild'       | '5519.5 ± 1.17%' | '5409.0 ± 71.00' | '183799 ± 0.04%'       | '184877 ± 2459'        | 50000   |
| 9       | 'childElementCount'      | '5492.0 ± 1.41%' | '5369.0 ± 69.00' | '185136 ± 0.04%'       | '186254 ± 2363'        | 50000   |
| 10      | 'previousSibling'        | '12558 ± 0.61%'  | '12059 ± 101.00' | '80927 ± 0.08%'        | '82926 ± 700'          | 50000   |
| 11      | 'previousElementSibling' | '12246 ± 0.74%'  | '12059 ± 101.00' | '82377 ± 0.03%'        | '82926 ± 700'          | 50000   |
| 12      | 'nextSibling'            | '12170 ± 0.44%'  | '12028 ± 91.00'  | '82707 ± 0.03%'        | '83139 ± 627'          | 50000   |
| 13      | 'nextElementSibling'     | '12213 ± 0.67%'  | '12048 ± 100.00' | '82543 ± 0.03%'        | '83001 ± 683'          | 50000   |
| 14      | 'offsetParent'           | '5197.5 ± 0.85%' | '5138.0 ± 60.00' | '193768 ± 0.04%'       | '194628 ± 2300'        | 50000   |
| 15      | 'isConnected'            | '2857.8 ± 2.84%' | '2794.0 ± 41.00' | '356463 ± 0.04%'       | '357910 ± 5198'        | 50000   |
| 16      | 'ownerDocument'          | '714.65 ± 0.15%' | '711.00 ± 20.00' | '1407540 ± 0.04%'      | '1406470 ± 40350'      | 50000   |
| 17      | 'getRootNode()'          | '3297.7 ± 2.26%' | '3235.0 ± 50.00' | '307892 ± 0.04%'       | '309119 ± 4853'        | 50000   |
| 18      | 'hasChildNodes()'        | '5005.9 ± 0.85%' | '4898.0 ± 61.00' | '202735 ± 0.05%'       | '204165 ± 2575'        | 50000   |

Reviewed By: andrewdacenko

Differential Revision: D80449032

fbshipit-source-id: c9e72a5144b0664dae776101fe18899203b9735b
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 2726c1ab7c Make benchmark for ReactFabricPublicInstance more accurate (#53319)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53319

Changelog: [internal]

We have a microbenchmark for `ReactFabricHostComponent` vs. `ReactNativeElement` but the test code itself is so fast that a big part of its duration is just calling the test function (a noop is 300-500ns, while the duration of these benchmarks is between 800 and 1400ns).

Note that this affects all tests the same way, so the absolute difference in execution time in both tests was still accurate.

This changes how we execute the benchmarks so the test function runs the code under test multiple times and we then report the average of all the runs using the new `overriddenDuration` option.

Before:

| (index) | Task name                  | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                     | '353.83 ± 0.03%' | '350.00 ± 10.00' | '2856842 ± 0.01%'      | '2857143 ± 84034'      | 2826221 |
| 1       | 'ReactNativeElement'       | '1393.8 ± 1.15%' | '1332.0 ± 20.00' | '745853 ± 0.01%'       | '750751 ± 11444'       | 717480  |
| 2       | 'ReactFabricHostComponent' | '884.92 ± 0.59%' | '871.00 ± 21.00' | '1144283 ± 0.01%'      | '1148106 ± 27029'      | 1130046 |

After:

| (index) | Task name                  | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | -------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'noop'                     | '400.11 ± 0.30%' | '391.00 ± 10.00' | '2532882 ± 0.07%'      | '2557545 ± 67127'      | 50000   |
| 1       | 'ReactNativeElement'       | '868.04 ± 0.04%' | '859.39 ± 4.41'  | '1153974 ± 0.03%'      | '1163616 ± 6002'       | 50000   |
| 2       | 'ReactFabricHostComponent' | '388.79 ± 0.08%' | '384.18 ± 1.91'  | '2579763 ± 0.03%'      | '2602947 ± 13006'      | 50000   |

Reviewed By: rshest

Differential Revision: D80404122

fbshipit-source-id: 7dc6ad34b2e8aa3cb6d62008f97d1c44e325ab27
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 6b4af382c2 Apply better default options in benchmarks (#53320)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53320

Changelog: [internal]

This improves the defaults the options related to minimum number of iterations and test duration in benchmarks.

If you indicate a minimum duration, we set the minimum number of iterations so the duration is honored. We do the same if what's specified is the number of iterations.

This is useful when you want to make sure all the tests in a benchmark suite use the same number of iterations without having to explicitly set the time to 0 in all of them.

It also changes the default for warmup iterations to be just 1 (that's enough to load all modules and all the code into memory).

Reviewed By: rshest

Differential Revision: D80405287

fbshipit-source-id: 41a61c4d1979db6a25dd30f0c84b5de319416885
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 219fc99e99 Rename minDuration as minTestExecutionTime for clarity (#53321)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53321

Changelog: [internal]

Just a rename to make it easier to understand.

Reviewed By: rshest

Differential Revision: D80404378

fbshipit-source-id: 3d7e89797be3b92599e07b4b64d2a720756a4f3b
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 6c37b5b682 Improve typing of benchmark functions (#53322)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53322

Changelog: [internal]

This changes the types for benchmark functions to improve safety:
1. It makes the return object be an object instead of an interface, to catch when `overriddenDuration` is misspelled.
2. It makes the function always synchronous, as asynchronous tests aren't supported in Fantom (even though they are in `tinybench`).

Reviewed By: rshest

Differential Revision: D80404121

fbshipit-source-id: c0e2fb9f67174432f50e31c399f5b10cfe098ae6
2025-08-18 08:57:52 -07:00
Rubén NorteandFacebook GitHub Bot 180996683b Print information about benchmark duration (#53323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53323

Changelog: [internal]

This just makes it easier to understand when the benchmark itself has started running and how long the benchmark itself took to run.

Reviewed By: rshest

Differential Revision: D80400268

fbshipit-source-id: b447c4c389d563f7b2b1cbe82822d5d3a93272da
2025-08-18 08:57:52 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 47a9a2b44f Fix recording for Maestro E2E tests on iOS (#53333)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53333

As per title, the recordings of iOS E2E tests are broken because we are creating a file that contains the js engine in the name, but we are trying to store a file without the js engine in the name.

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D80454067

fbshipit-source-id: e4eee86793eb36f9ec9643cba7b65de75e30cbe7
2025-08-18 08:18:03 -07:00
Jakub PiaseckiandFacebook GitHub Bot 686d14f1d1 Enable enableFontScaleChangesUpdatingLayout by default (#53324)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53324

Changelog: [General][Changed] - Enabled `enableFontScaleChangesUpdatingLayout` feature flag by default

Reviewed By: cipolleschi

Differential Revision: D80452649

fbshipit-source-id: da4d19068036340855569f5fd555121bf646bbca
2025-08-18 07:34:56 -07:00
SimekandFacebook GitHub Bot f9b1b2eb1d Workspace: deduplicate lock after recent bumps (#53244)
Summary:
Run `update-lock` script to use `yarn-deduplicate` tool to collocate and reduce the amount of dependencies fetched when working with a workspace.

## Changelog:

[INTERNAL] Deduplicate workspace lock after recent bumps

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

Test Plan: Running `yarn build`, `yarn prettier`, `yarn lint-ci`, `yarn test-ci` and `yarn flow-check` does not yield any errors.

Reviewed By: rshest, cortinico

Differential Revision: D80170594

Pulled By: robhogan

fbshipit-source-id: 5cbbde832539e89cb3b9937eacf03215942bc237
2025-08-18 06:14:32 -07:00
Rubén NorteandFacebook GitHub Bot e5c05ccbc1 Migrate LogBox Fantom test to use new document APIs (#53269)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53269

Changelog: [internal]

Just a small refactor of the tests for LogBox to take advantage of the new `document.getElementById` API in RN.

Reviewed By: rshest

Differential Revision: D69528892

fbshipit-source-id: 807f03364e260baa9c3a94cfb1831b7eb24e0d26
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot a902267563 Implement ReactNativeDocument.prototype.getElementById (#53270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53270

Changelog: [internal]

(Marked as internal because the DOM APIs haven't been released yet).

This implements `getElementById` in the DOM document API.

Reviewed By: rshest

Differential Revision: D69307133

fbshipit-source-id: 0c1454ae42fad92cddc705877b26052e887185bd
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot d55bbfedff Do not reference DOM types in public API for VirtualView (#53272)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53272

Changelog: [internal]

`VirtualView` has been exposed as an unstable API in the `react-native` package but its public API is referencing the DOM APIs, which forces their definitions to also be public (but shouldn't because they haven't been released yet).

This replaces the reference with a reference to `HostInstance`, which will be updated to reference the DOM APIs when ready.

Reviewed By: yungsters

Differential Revision: D80254442

fbshipit-source-id: 254779c97c116ba08b6cc0c185906617ffd1269f
2025-08-18 05:42:51 -07:00
Rubén NorteandFacebook GitHub Bot f9a49e5c56 Improve performance of performance.mark, performance.measure and console.timeStamp while tracing with RNDT (#53295)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53295

Changelog: [internal]

This refactors `PerformanceTracer` to use an intermediate representation for trace events instead of the format expected by Chrome, which improves performance by removing the need to create `folly::dynamic` objects when enqueueing entries (that's moved to the trace processing stage).

`performance.mark` and `performance.measure` are only slightly improved because we still need to synchronously create `folly::dynamic` objects when enqueueing entries because we need to get the data from JSI.

I made the existing benchmark for the Performance API accurately measure the performance while tracing by forcing enabling the inspector in Fantom and setting the `tracingAtomic_` value to `true`.

## Highlights

* `console.timeStamp` (defaults): 1002ns → 580ns (**-42%**)
* `console.timeStamp` (all options): 1552ns → 821ns (**-47%**)
* `performance.mark` (with custom startTime): 2203ns → 2074ns (-5.8%)
* `performance.measure` (with start and end timestamps): 2474ns → 2283ns (-7.7%)

## Full results

### When inspector not used (in "production") (**same before and after**)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '1864.5 ± 7.22%' | '1773.0 ± 29.00' | '559978 ± 0.04%'       | '564016 ± 9077'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '1780.0 ± 4.31%' | '1723.0 ± 30.00' | '577496 ± 0.04%'       | '580383 ± 9932'        | 50000   |
| 2       | 'measure (default)'                                       | '1906.0 ± 3.87%' | '1852.0 ± 29.00' | '537780 ± 0.04%'       | '539957 ± 8590'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '1986.3 ± 3.25%' | '1933.0 ± 30.00' | '514216 ± 0.04%'       | '517331 ± 7906'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2208.7 ± 4.72%' | '2103.0 ± 40.00' | '471058 ± 0.05%'       | '475511 ± 8876'        | 50000   |
| 5       | 'clearMarks'                                              | '665.41 ± 0.17%' | '651.00 ± 20.00' | '1515507 ± 0.06%'      | '1536098 ± 48688'      | 50000   |
| 6       | 'clearMeasures'                                           | '745.87 ± 0.19%' | '721.00 ± 30.00' | '1356547 ± 0.07%'      | '1386963 ± 60215'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2223.9 ± 1.84%' | '2174.0 ± 39.00' | '456311 ± 0.04%'       | '459982 ± 8106'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2461.0 ± 2.85%' | '2374.0 ± 41.00' | '418624 ± 0.04%'       | '421230 ± 7403'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '2466.5 ± 3.36%' | '2384.0 ± 50.00' | '416618 ± 0.04%'       | '419463 ± 8986'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '395.25 ± 0.25%' | '391.00 ± 20.00' | '2554687 ± 0.06%'      | '2557545 ± 137873'     | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '426.06 ± 0.23%' | '421.00 ± 20.00' | '2369918 ± 0.06%'      | '2375297 ± 118469'     | 50000   |

### When tracing (before)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '2456.2 ± 6.45%' | '2254.0 ± 41.00' | '432571 ± 0.09%'       | '443656 ± 8220'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '2354.7 ± 3.39%' | '2203.0 ± 41.00' | '443719 ± 0.09%'       | '453926 ± 8394'        | 50000   |
| 2       | 'measure (default)'                                       | '2661.5 ± 3.30%' | '2414.0 ± 50.00' | '399165 ± 0.11%'       | '414250 ± 8762'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '2679.1 ± 1.61%' | '2474.0 ± 41.00' | '389798 ± 0.11%'       | '404204 ± 6811'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2850.0 ± 0.99%' | '2644.0 ± 60.00' | '364185 ± 0.11%'       | '378215 ± 8392'        | 50000   |
| 5       | 'clearMarks'                                              | '687.71 ± 0.43%' | '671.00 ± 20.00' | '1479109 ± 0.05%'      | '1490313 ± 43135'      | 50000   |
| 6       | 'clearMeasures'                                           | '702.69 ± 0.34%' | '691.00 ± 20.00' | '1440497 ± 0.05%'      | '1447178 ± 40708'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2865.4 ± 1.96%' | '2694.0 ± 50.00' | '363008 ± 0.09%'       | '371195 ± 7020'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '3076.2 ± 1.19%' | '2855.0 ± 51.00' | '337615 ± 0.10%'       | '350263 ± 6371'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '3087.4 ± 0.88%' | '2894.0 ± 60.00' | '334838 ± 0.10%'       | '345543 ± 7316'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '1203.9 ± 0.60%' | '1002.0 ± 29.00' | '930592 ± 0.18%'       | '998004 ± 28072'       | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '1885.7 ± 0.44%' | '1552.0 ± 50.00' | '582549 ± 0.20%'       | '644330 ± 21449'       | 50000   |

### When tracing (after)

| (index) | Task name                                                 | Latency avg (ns) | Latency med (ns) | Throughput avg (ops/s) | Throughput med (ops/s) | Samples |
| ------- | --------------------------------------------------------- | ---------------- | ---------------- | ---------------------- | ---------------------- | ------- |
| 0       | 'mark (default)'                                          | '2336.9 ± 8.49%' | '2123.0 ± 41.00' | '458093 ± 0.10%'       | '471032 ± 9045'        | 50000   |
| 1       | 'mark (with custom startTime)'                            | '2229.0 ± 3.55%' | '2074.0 ± 41.00' | '467941 ± 0.10%'       | '482160 ± 9724'        | 50000   |
| 2       | 'measure (default)'                                       | '2367.5 ± 1.85%' | '2233.0 ± 41.00' | '435994 ± 0.09%'       | '447828 ± 8168'        | 50000   |
| 3       | 'measure (with start and end timestamps)'                 | '2427.0 ± 2.38%' | '2283.0 ± 39.00' | '426361 ± 0.09%'       | '438020 ± 7542'        | 50000   |
| 4       | 'measure (with mark names)'                               | '2560.9 ± 0.18%' | '2453.0 ± 50.00' | '397989 ± 0.09%'       | '407664 ± 8309'        | 50000   |
| 5       | 'clearMarks'                                              | '677.59 ± 0.20%' | '671.00 ± 20.00' | '1488235 ± 0.05%'      | '1490313 ± 45785'      | 50000   |
| 6       | 'clearMeasures'                                           | '682.91 ± 0.19%' | '671.00 ± 20.00' | '1476825 ± 0.05%'      | '1490313 ± 43135'      | 50000   |
| 7       | 'mark + clearMarks'                                       | '2665.7 ± 1.31%' | '2524.0 ± 50.00' | '386476 ± 0.09%'       | '396197 ± 7696'        | 50000   |
| 8       | 'measure + clearMeasures (with start and end timestamps)' | '2855.4 ± 2.22%' | '2684.0 ± 41.00' | '363742 ± 0.09%'       | '372578 ± 5780'        | 50000   |
| 9       | 'measure + clearMeasures (with mark names)'               | '2808.1 ± 0.16%' | '2704.0 ± 50.00' | '361794 ± 0.08%'       | '369822 ± 6967'        | 50000   |
| 10      | 'console.timeStamp (defaults)'                            | '656.87 ± 0.64%' | '580.00 ± 20.00' | '1669646 ± 0.15%'      | '1724138 ± 60244'      | 50000   |
| 11      | 'console.timeStamp (all options)'                         | '914.16 ± 0.54%' | '821.00 ± 30.00' | '1173803 ± 0.14%'      | '1218027 ± 46196'      | 50000   |

Reviewed By: rshest

Differential Revision: D80263154

fbshipit-source-id: f9e67162a3911a939693fd872bab72a41bc2637f
2025-08-18 04:49:33 -07:00
Rubén NorteandFacebook GitHub Bot 55fa36173b Add benchmarks for console.timeStamp (#53294)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53294

Changelog: [internal]

Just adding a benchmark for `console.timeStamp`, which in normal circumstances will just measure a no-op. We can force installing the inspector and simulate that we're profiling in Fantom to force `console.timeStamp` to go through the tracing paths for the benchmark.

Reviewed By: rshest

Differential Revision: D80272873

fbshipit-source-id: 1e404525bb3390b96fae982c543478a26535a393
2025-08-18 04:49:33 -07:00
Samuel SuslaandFacebook GitHub Bot 3a3e3b884c Move C++ Animated to ReactCommon (#53278)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53278
changelog: [internal]

C++ Animated should be in ReactCommon, it is code shared across all platforms.

Reviewed By: christophpurrer, zeyap

Differential Revision: D80261447

fbshipit-source-id: 8ad5d0bb65c9b499b1d9f60fc8babef8d4d90078
2025-08-18 04:13:13 -07:00
Alex HuntandFacebook GitHub Bot 40ebcef183 Use taskEndTime to report either InteractionEntry or INP metric events (#53296)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53296

Following D79894702, update `__chromium_devtools_metrics_reporter` to correctly differentiate `InteractionEntry` and `INP` metrics, based on synchronisation with start of paint.

Changelog: [Internal]

Reviewed By: vzaidman

Differential Revision: D79898177

fbshipit-source-id: 92e805fc15b6c8bf3342f62914cca1b377b58397
2025-08-18 03:49:31 -07:00
YangJHandFacebook GitHub Bot 6caf2dfa38 refactor(react-native): fix condition (#53311)
Summary:
Fixed a typo in Performance.js where `measureName === 'string'` should be `typeof measureName === 'string'` for proper type checking.

## Changelog:

[GENERAL] [FIXED] - Fix typo in Performance.js type checking condition

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

Test Plan: The change fixes a logical error where the condition was comparing the variable value to the string 'string' instead of checking its type. This ensures proper type checking for `measureName` parameter.

Reviewed By: rshest

Differential Revision: D80403225

Pulled By: rubennorte

fbshipit-source-id: 134920b2f95e997007d41451a8f8ad5fb8592d73
2025-08-18 03:21:54 -07:00
George ZaharievandFacebook GitHub Bot c7591d9b40 Update hermes-parser and related packages in fbsource to 0.31.2 (#53313)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53313

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

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D80408745

fbshipit-source-id: 38aff450c0e44db23624f4769f1c7856440fb785
2025-08-17 21:45:53 -07:00
Marco WangandFacebook GitHub Bot 0e6b94f4ab Deploy 0.279.0 to xplat (#53308)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53308

[changelog](https://github.com/facebook/flow/blob/main/Changelog.md)
Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80365942

fbshipit-source-id: 097eee50914f1d14391ada61c7e4176c4a70779e
2025-08-15 17:29:05 -07:00
Christoph PurrerandFacebook GitHub Bot 9f2fbc23e4 Fix memory leak in TestCallInvoker (#53287)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53287

Changelog: [General][Fixed] Fix memory leak in TestCallInvoker

This fixes leaks in TestCallInvoker holding onto the jsi::Runtime

Reviewed By: lenaic

Differential Revision: D80295420

fbshipit-source-id: b14368ccfa86b3bf24b1f84613ec07931bd71a43
2025-08-15 11:43:41 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot c23e84ae9f Factor out "common props" testing and add testID test for Text (#53292)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53292

# Changelog:
[Internal] -

Adds a `testID` test for the Text component, by means of extracting and reusing already existing one for Image.

Reviewed By: andrewdacenko

Differential Revision: D80332473

fbshipit-source-id: 8e8bc2eae12f5f340817f3788f320aad3a6fff45
2025-08-15 09:35:44 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 63335e5913 Refactor accessibility tests and add proper Role types (#53222)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53222

# Changelog:
[Internal] -

This factors out bits of the previously existing "Text.role" prop testing into the general accessibility props tests, so those can be reused, also making sure that we use correct types for both `.role` prop (`Role` type) and `.accessibilityRole prop (`AccessibilityRole`, correspondingly).

Note that the test suite for the `role` prop is a separate one, as `role` is only defined on the native side for certain component types (including `Text`), but not all.

Also, in the existing suite we weren't really testing `role`, but instead running the same test twice for `accessibilityRole`, that is corrected as well.

Reviewed By: andrewdacenko

Differential Revision: D80084731

fbshipit-source-id: 545f01c00e9ea5ca53f664888b9bb7b24ded315e
2025-08-15 09:35:44 -07:00
Nicola CortiandFacebook GitHub Bot 0ac41fa386 Further nightlies cleanup (#53302)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53302

Those files can also go as they've been moved to
https://github.com/react-native-community/nightly-tests

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80342950

fbshipit-source-id: 0b5cc8f424eefa00c48377fe2fbc2cca5e7ef48d
2025-08-15 08:19:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot e3183739bb Options to run Fantom with address and thread sanitizers enabled (#53300)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53300

# Changelog:
[Internal] -

This adds two new modes to Fantom, allowing to run the native (C++) side with enabling either:
* Address sanitizer, which would detect memory overwrites
* Thread sanitizer, which can detect potential threading issues, such  as race conditions

This are opt-in for now.

Currently, both modes already detect different errors, which have a high chance to be real issues and have to be fixed.

Reviewed By: lenaic

Differential Revision: D80339524

fbshipit-source-id: 784ddb9f0af79a04b074e107e4955724d54d5685
2025-08-15 08:12:04 -07:00
zhongwuzwandFacebook GitHub Bot f936780cd5 Expose NativeComponentRegistry API as JavaScript root export (#52999)
Summary:
Resolves https://github.com/react-native-community/discussions-and-proposals/discussions/893#discussioncomment-13449739

Expose NativeComponentRegistry as a root export on index.js.

## Changelog:

[General][Added] - Expose NativeComponentRegistry API as JavaScript root export

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

Test Plan: Can import NativeComponentRegistry from root exort

Reviewed By: cortinico, cipolleschi

Differential Revision: D79721243

Pulled By: huntie

fbshipit-source-id: 77d94fb22255de020009ffe0e54d5030213519e2
2025-08-15 04:02:26 -07:00
Ash WuandFacebook GitHub Bot e89df6410f Fix typo in hermes-utils.rb (#53290)
Summary:
Fix minor typo.

## Changelog:

[Internal] [Fixed] - Fix typo in hermes-utils.rb

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

Reviewed By: NoamPaz

Differential Revision: D80329212

Pulled By: rshest

fbshipit-source-id: 40963362a4336b393e716dc2f999a7f47970387c
2025-08-15 03:17:55 -07:00
Alex HuntandFacebook GitHub Bot 9a4df1cdc6 Add initial UI for Perf Monitor V2 prototype (#52971)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52971

Wires up the initial pass of the experimental V2 Perf Monitor UI.

Limitations:
- Does not yet clear last interaction.
- Only lightly tested.

Changelog: [Internal]

Reviewed By: rubennorte

Differential Revision: D78904767

fbshipit-source-id: c51c5f51d9267ec971c17dce465775a2a3e6cb2c
2025-08-15 02:45:29 -07:00
David VaccaandFacebook GitHub Bot 41029d8e91 Align APIs ReactSurfaceImpl.view with ReactSurfaceImpl.attachView() (#53288)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53288

This diff aligns the APIs ReactSurfaceImpl.view and ReactSurfaceImpl.attachView() to make sure they receive and return the same type

changelog: [Android][Changed] Changed return type of ReactSurfaceImpl.view to ReactSurfaceView to align with parameter recived by ReactSurfaceImpl.attachView()

Reviewed By: sammy-SC

Differential Revision: D80289764

fbshipit-source-id: cfd598a42298f56b6b8871611662fbfa5599a3d3
2025-08-14 18:51:43 -07:00
Christoph PurrerandFacebook GitHub Bot ee5f229a4a Add MakeAsyncCallback utility function to TurboModuleTestFixture.h (#53284)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53284

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D80280615

fbshipit-source-id: eca82072fdfa74e70e9c327f9a1379f0ddf9a8c4
2025-08-14 18:13:28 -07:00
Sam ZhouandFacebook GitHub Bot a8bc74c009 Add annotations to fix future natural inference errors in xplat/js: 3/n (#53285)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53285

Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D80279967

fbshipit-source-id: 60a32d1c8161103723d237c682ad6c8a95cf0e6b
2025-08-14 13:33:18 -07:00
Derek SargentandFacebook GitHub Bot 8702b09bcc Fix spelling of Objective-C in warning message (#53283)
Summary:
Warning logs with correct spelling and formatting improve the developer experience.

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

[IOS] [FIXED] - Spelling and formatting of warning log related to Objective-C methods and their signatures.

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

Test Plan: Change is messaging (text) only.

Reviewed By: jorge-cab

Differential Revision: D80267373

Pulled By: rshest

fbshipit-source-id: a07a6f685f14507578ced00d45f7ef0a3c69f23d
2025-08-14 10:36:49 -07:00
Nicola CortiandFacebook GitHub Bot 7f93b664b4 Gradle to 9.0 (#53281)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53281

This is still a of bumping Gradle to the latest Major (9.0)
Full list of changes is here: https://gradle.org/whats-new/gradle-9/

I don't expect any breaking changes for React Native users.

Changelog:
[Android] [Breaking] - **deps:** Gradle to 9.0

Reviewed By: cipolleschi

Differential Revision: D79445941

fbshipit-source-id: 0af495a2cc6bb4cca1e37d5f0693b77e42010df2
2025-08-14 09:42:56 -07:00
Nicola CortiandFacebook GitHub Bot f502cae9b5 Move all the infrastructure to test nightlies out of facebook/react-native (#53280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53280

I've moved a lot of the nightly testing infrastructure on a RNC repo here:
https://github.com/react-native-community/nightly-tests/

This allows us to iterate faster without having to wait for diffs to be
imported and test inside fbsource.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D80262856

fbshipit-source-id: dc2dfe75901ac78ec9f6e940540102276d34acdf
2025-08-14 09:41:52 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 9ca43e4095 Changelog for 0.79.6 (#53279)
Summary:
Changelog for 0.79.6

## Changelog:
[Internal] -

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

Test Plan: N/A

Reviewed By: cortinico

Differential Revision: D80262341

Pulled By: cipolleschi

fbshipit-source-id: 51cc1e6faaa271f1ab1a734f7578e88c73de2042
2025-08-14 09:36:04 -07:00
riteshshukla04andFacebook GitHub Bot f6ba2dbf3b Add types for platform in React native web (#53216)
Summary:
This PR fixes https://github.com/facebook/react-native/issues/52356.

As per discussion here https://github.com/facebook/react-native/pull/52360 . We have changed the implementation in React native web in this PR https://github.com/necolas/react-native-web/pull/2791.
As discussed with cortinico , Now web returns a hardcoded string "0.0.0" for `platform.version`.
 We can safely change this to string now.

## 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
-->
[GENERAL][CHANGED] Update types for Platform.version

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

Test Plan: N/A

Reviewed By: christophpurrer

Differential Revision: D80173301

Pulled By: necolas

fbshipit-source-id: 750aae2427a6c36a068346a9722d9734d9906b58
2025-08-14 09:02:43 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 56ad53cb14 Fix maxLength default value when null is passed (#53273)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53273

In [c5956da8c0](https://github.com/facebook/react-native/commit/c5956da8c0b735d47761af51019ed25b49001c00) we landed a change of the default value of `maxLength`.

While doing that, we missed the case where the app is explicitly passing `null` for a value for `maxLength`. When this happens, the props parsing was initializing the `maxLength` to 0, making not possible to input any value.

This change fixes the issue by ensuring that the default value set when `null` is consistent with the default value when nothing is passed.

## Changelog:
[iOS][Fixed] - Fixed TextInput behavior when `maxLength={null}` is passed

Reviewed By: GijsWeterings

Differential Revision: D80255637

fbshipit-source-id: a0d1956e1d51dbfedd27dafabf60ffa9344358d3
2025-08-14 08:43:04 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot d2df64d2fc Don't populate default Image prop values on JS side (Android only) (#53225)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53225

# Changelog:
[Internal] -

Similarly to how it was done for View and Text components ( https://github.com/facebook/react-native/pull/53059), this adds an option to only populate non-default props for Image component.

**This gives up to 50% performance improvement on the benchmark test**, so looks promising.

Reviewed By: rubennorte

Differential Revision: D80090241

fbshipit-source-id: 7dfa6573408794535555e43580e32952fb1d1990
2025-08-14 07:55:37 -07:00
generatedunixname537391475639613andFacebook GitHub Bot 1d86fb67ee xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp (#53275)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53275

Reviewed By: rshest

Differential Revision: D80160594

fbshipit-source-id: bbc425e6610d1ea8f65582ea5801ddc52b19ec4b
2025-08-14 07:43:12 -07:00
Mateo GuzmánandFacebook GitHub Bot 4d5caef76b Migrate YogaConfig to Kotlin
Summary:
Migrate com.facebook.yoga.YogaConfig to Kotlin.

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

Reviewed By: rshest

Differential Revision: D79897694

Pulled By: cortinico

fbshipit-source-id: 0eff36f47bbb8da6a91087f2ea69bc4e40a732ac
2025-08-14 07:29:26 -07:00
Nivaldo BondançaandFacebook GitHub Bot 2ab6f22f26 Codemod format for trailing commas incoming change [5/n] (#53260)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53260

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

Adding trailing commas.

Reviewed By: cortinico

Differential Revision: D80174965

fbshipit-source-id: 5438fa9ebce13525b1286dd30704138ef99703cb
2025-08-14 07:24:42 -07:00
Christian FalchandFacebook GitHub Bot 8a2e7efe01 Use correct version of jsi.cpp (#53266)
Summary:
When building the xcframeworks on iOS we're including the file `jsi/jsi.cpp` in the Swift Package. This file is also included in Hermes and React Native should use the hermes version of these symbols. This is even described (but overlooked) in the React-jsi podspec file.

This causes the error seen in the bug addressed by this commit.

The fix is to exclude the `jsi/jsi.cpp` file from the jsi target in our swift package.

Fixes https://github.com/facebook/react-native/issues/53257

## Changelog:

[IOS] [FIXED] - Fixed wrong jsi symbols in use when using React.xcframework

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

Test Plan: Tested using a precompiled xcframework in the reproduction repository.

Reviewed By: rshest

Differential Revision: D80252131

Pulled By: cipolleschi

fbshipit-source-id: 915e94a1d80c2f45575e58d8054239484e861285
2025-08-14 07:06:48 -07:00
Rubén NorteandFacebook GitHub Bot 38e1e0de53 Use string references in Fantom native module (#53274)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53274

Changelog: [internal]

Minor refactor

Reviewed By: rshest

Differential Revision: D80255982

fbshipit-source-id: 703f32a1edf5c225b0b07b3c519932ebe167b2c8
2025-08-14 06:19:00 -07:00
Rubén NorteandFacebook GitHub Bot 256565cb11 Add initial Fantom test for the basic global environment setup (#53268)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53268

Changelog: [internal]

Adds tests for the global environment setup in RN.

Reviewed By: rshest

Differential Revision: D78415432

fbshipit-source-id: 8fdafee93ddbdf17770f3cb2069bf4834bb43dac
2025-08-14 04:41:13 -07:00
Rubén NorteandFacebook GitHub Bot f9c2aaf3e7 Rename setUpDefaultReactNativeEnvironment to scope it better (#53267)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53267

Changelog: [internal]

Test files that verify the behavior of the global setup can only have a single test, as we can't really reset it across tests. Because of that, I'm renaming the current one to make the behavior under test more explicit.

Reviewed By: rshest

Differential Revision: D80177333

fbshipit-source-id: df9eeba15906bc6071940824dad9e576a267f499
2025-08-14 04:41:13 -07:00
Liam JonesandFacebook GitHub Bot 614231d4df Remove reference to react-native upgrade (#53265)
Summary:
This command doesn't exist anymore.

Remove reference to `react-native upgrade` as the command doesn't exist anymore.

## 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] [CHANGED] - Removed reference to removed `react native upgrade` in `Libraries/Renderer/README.md`

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

Test Plan: N/A

Reviewed By: cipolleschi

Differential Revision: D80251577

Pulled By: cortinico

fbshipit-source-id: 9eab037af6769f0d1f78f65bc795d285dc3d8320
2025-08-14 04:06:52 -07:00
Vitali ZaidmanandFacebook GitHub Bot 856f52a6f0 Update debugger-frontend from 9215667...e87564a (#53256)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53256

Changelog: [Internal] - Update `react-native/debugger-frontend` from 9215667...e87564a

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

### Changelog

| Commit | Author | Date/Time | Subject |
| ------ | ------ | --------- | ------- |
| [e87564a24](https://github.com/facebook/react-native-devtools-frontend/commit/e87564a24) | Vitali Zaidman (vzaidman@gmail.com) | 2025-08-06T12:11:08+01:00 | [prevent stack trace entries in console UI from being inline so a new line is always added between them and other printed elements (#198)](https://github.com/facebook/react-native-devtools-frontend/commit/e87564a24) |

Reviewed By: robhogan

Differential Revision: D80181542

fbshipit-source-id: 517425504251441703b9b96fdeb6956f4db7d53b
2025-08-14 01:44:22 -07:00
Devan BuggayandFacebook GitHub Bot 22a4f79224 Fix LogBox dealloc crashing Mac Catalyst (#53259)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53259

delegate.window is not supported in Mac Catalyst, causing a crash in various scenarios such as Metro refresh.

Changelog: [Internal]

Reviewed By: shwanton

Differential Revision: D80189486

fbshipit-source-id: d0e8156f8f95769c114b497f53731876478fb1f4
2025-08-13 21:56:03 -07:00
Sam ZhouandFacebook GitHub Bot 94d260ee6a Unbreak RN CI (#53261)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53261

Replace type annotation with comment syntax

Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D80231004

fbshipit-source-id: a863091bec8b5521bc998b57ef08d892823238e6
2025-08-13 20:53:12 -07:00
Sam ZhouandFacebook GitHub Bot 35bee1a857 Add annotations to fix future natural inference errors in xplat/js
Summary: Changelog: [Internal]

Reviewed By: marcoww6

Differential Revision: D80207164

fbshipit-source-id: e9a786c83f89a97db8b383812767978c47d9536c
2025-08-13 18:15:27 -07:00
Zeya PengandFacebook GitHub Bot dd0008fee9 test all props FlatList inherited from ScrollView & are propagated to mounting layer (#53187)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53187

## Changelog:

[Internal] [Changed] - test all props FlatList inherited from ScrollView & are propagated to mounting layer

Reviewed By: rshest

Differential Revision: D79917024

fbshipit-source-id: c248f629f27b224e70a588cfb491cd17618594de
2025-08-13 17:36:06 -07:00
Zeya PengandFacebook GitHub Bot 81abd306bb test FlatList props: data, renderItem, horizontal, inverted, scrollEnabled (#53186)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53186

## Changelog:

[Internal] [Changed] - test FlatList props: data, renderItem, horizontal, inverted, scrollEnabled

uncovered one bug in `getDebugProps()`

Reviewed By: rshest

Differential Revision: D79895309

fbshipit-source-id: 0644cf9877620a7787ee085a8e934f462e5de3ef
2025-08-13 17:36:06 -07:00
Mateo GuzmánandFacebook GitHub Bot 4340dcbae8 Migrate YogaValue to Kotlin
Summary:
Migrate com.facebook.yoga.YogaValue to Kotlin.

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

Reviewed By: rshest

Differential Revision: D79897668

Pulled By: cortinico

fbshipit-source-id: dffe2b29087c35e4797f46dea756c51f841590d8
2025-08-13 16:45:06 -07:00
Luna WeiandFacebook GitHub Bot 3d12d81126 VirtualViewExperimental - opt out of update if no rect changes (#53255)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53255

Avoid updates to VirtualViewContainer if the rect dimensions haven't changed.

This is an attempt to simulate what ReactVirtualView does with `checkRectChange`.

Changelog:
[Internal]

Reviewed By: yungsters

Differential Revision: D80182750

fbshipit-source-id: f0f45ac508c1f93e6dbb64ea11c0b44b80d6c3b3
2025-08-13 15:45:52 -07:00
Christoph PurrerandFacebook GitHub Bot b75031f3dd Add WebSocketClient implementation for ReactCxxPlatform (#53233)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53233

Changelog: [Internal]

This is needed for RN Fantom

Reviewed By: rshest

Differential Revision: D80115098

fbshipit-source-id: 03036dda311527ac27d12656d9b92c609e0b9ee2
2025-08-13 14:43:43 -07: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
Riccardo CipolleschiandFacebook GitHub Bot 85b47afb48 Check delegate for getModuleForClass and getModuleInstanceFromClass (#53207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53207

When restructuring the RCTReactNativeFactory, we forgot to add a couple of methods to check whether the delegate was implementing the RCTTurboModuleManager delegate methods.

This has been reported [here](https://github.com/react-native-community/discussions-and-proposals/issues/916)

This change fixes it.

## Changelog:
[iOS][Fixed] - Ask the delegate for `getModuleForClass` and `getModuleInstanceFromClass`

Reviewed By: cortinico

Differential Revision: D79998104

fbshipit-source-id: 68069a9f93182d4fa416b5799bf4eec4d107552b
2025-08-11 08:51:01 -07:00
Mateo GuzmánandFacebook GitHub Bot 9c9a39b58e Migrate YogaLogger to Kotlin
Summary:
Migrate com.facebook.yoga.YogaLogger to Kotlin.

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

Reviewed By: rshest

Differential Revision: D79897742

Pulled By: cortinico

fbshipit-source-id: 79b926a7abadce9038fc55ad0f608e92bc77a55a
2025-08-11 08:47:34 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 0af4a1c71f Set up Switch Fantom test (#53134)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53134

This change sets up the Fanto test for the Switch component

## Changelog:
[Internal] -

Reviewed By: rubennorte

Differential Revision: D79719683

fbshipit-source-id: d8a5d127296e3448faf5f841baa98bc34f4f43cb
2025-08-11 08:17:48 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 749dbe0840 Add test for Text.adjustsFontSizeToFit (#53210)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53210

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D80001500

fbshipit-source-id: ab5564b0e9ab728f0825aec9da24539c9e2c5290
2025-08-11 08:14:15 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1c33774990 Remove setup-xcode-build-cache action (#53177)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53177

This action is used only when running tests for RNTester. Now that we are using prebuilds, this is a liability, because Cocoapods and Xcode would not update the binary if a new one is provided.

With prebuild, this caching does not provide a lot of benefits, so we can remove it.

## Changelog
[Internal] -

Reviewed By: cortinico

Differential Revision: D79893870

fbshipit-source-id: 0773f910f418cf9ebd5d557d563160993084e83a
2025-08-11 08:07:43 -07:00
Peter AbbondanzoandFacebook GitHub Bot 07835d3d67 xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.java (#53116)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53116

Converts ReactAccessibilityDelegate to Kotlin

Changelog: [Internal]

Reviewed By: andrewdacenko

Differential Revision: D79749812

fbshipit-source-id: bdfbd61f61339d8332a4fa3f5cc4ccd4b4355323
2025-08-11 07:54:09 -07:00
Vojtech NovakandFacebook GitHub Bot 4c570b5d31 fix cp command in ReactNativeDependencies.podspec (#53136)
Summary:
When running `RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 pod install` I'm getting an error: `cp: framework/packages/react-native/..: File exists`

This is not seen consistently by everyone but I've seen in reported one more time at Expo. Could be related to running MacOS 26.

Somehow, apparently, the `..` is being treated as a literal directory name and cp is trying to create a directory named `..` inside `framework/packages/react-native/` which is not what we want. Using `/.` avoids that.

 ---
What also seemed to work(around) was to change `mkdir -p framework/packages/react-native` to `mkdir -p framework/packages/` and then `cp` can create the `framework/packages/react-native/..` folder. But this is definitely more confusing.

## Changelog:

Pick one each for the category and type tags:

[IOS] [FIXED] - fix "file exists" error in `ReactNativeDependencies.podspec`

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

Test Plan: tested locally, and in CI on older macOS: https://github.com/expo/expo/pull/38631 (the ios build succeeds)

Reviewed By: rshest

Differential Revision: D79990895

Pulled By: cipolleschi

fbshipit-source-id: 44ff9034800d3acd4e55ec39aabfb326382372cb
2025-08-11 06:36:15 -07:00
generatedunixname537391475639613andFacebook GitHub Bot fd600a24af xplat/js/react-native-github/packages/react-native/ReactCommon/react/renderer/components/scrollview/ScrollViewShadowNode.cpp (#53198)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53198

Reviewed By: rshest

Differential Revision: D79874231

fbshipit-source-id: 15b2a0c2330e6237b92db68094ce97f3e708f9a6
2025-08-11 06:31:16 -07:00
Rubén NorteandFacebook GitHub Bot 6b05a59a0d Extend PerformanceEventTiming with taskEndTime (#53199)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53199

Changelog: [internal]

This adds a new `taskEndTime` field in the internal C++ representation of `PerformanceEventTiming` so we can distinguish events that waited for mount (because they triggered changes) and events that didn't, so report INP correctly.

Reviewed By: rshest

Differential Revision: D79894702

fbshipit-source-id: f7472bfaecaa69f2126719d0dc3d3b251e3a8f68
2025-08-11 05:26:56 -07:00
Phil PluckthunandFacebook GitHub Bot 94623ca8ec Fix missing path escape patterns in Xcode scripts for projects with spaces (#53194)
Summary:
When running a project in a path that contains any spaces, the scripts have several escape patterns that don't handle this path correctly. For example, `"/absolute/path/with spaces"` may be rendered as `/absolute/path/with spaces` and this shows as an output error such as `No such file or directory /absolute/path/with`

This was likely a longstanding issue, but is unexpected for some beginners that first try out React Native. While it's not recommended to create a path like this, it's certainly not hard to make this mistake.

## Changelog:

[IOS] [FIXED] - fix scripts for paths containing whitespaces

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

Test Plan: tested locally; create a React Native or Expo project in a folder containing a space (e.g. `/my/path/with spaces/new-app` and build the project. With changes applied, the build should succeed. (There's related failures in `expo/expo` that need fixing too)

Reviewed By: robhogan

Differential Revision: D79993537

Pulled By: cipolleschi

fbshipit-source-id: b32697ce2405c403c410b3ceaed7e161e4a48537
2025-08-11 05:12:43 -07:00
David VaccaandFacebook GitHub Bot d3bbbd893a Deprecate com/facebook/react Legacy Architecture classes (#53104)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53104

Deprecate com/facebook/react Legacy Architecture classes

changelog: [Android][Changed] Depreacate CoreModulesPackage and NativeModuleRegistryBuilder legacy architecture classes, these classes unused in the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676942

fbshipit-source-id: a2c447bee251fdac79d3dc81a17851eaf5271413
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot da74d5da2c Deprecate Legacy Architecture ViewManagers (#53107)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53107

Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future

Reviewed By: shwanton

Differential Revision: D79676585

fbshipit-source-id: 72cb6fe0bbe666cfa317cf28d6aec475f1c38c35
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 07091a9ae8 Deprecate custom ShadowNode classes included in React Native (#53192)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53192

In this diff I'm deprecating ShadowNode classes included in React Native library

These classes are part of the legacy architecture and will be deleted in the future

changelog: [Android][Changed] Deprecate LegacyArchitecture ShadowNode classes included in React Native

Reviewed By: mlord93

Differential Revision: D79676584

fbshipit-source-id: a39267e6e430fcf4f6a73c96cd28d02eafc88a32
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot c1f7c5e321 Depreacte remaining LegacyArchitecture classes from the bridge package (#53191)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53191

Depreacte remaining LegacyArchitecture classes from the bridge package

changelog: [Android][Changed] Depreacte all LegacyArchitecture classes from the bridge package

Reviewed By: mlord93

Differential Revision: D79674635

fbshipit-source-id: 6a873d05157e17ef0434821e1c8a77959d7f079a
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot b29b86f275 Deprecate LegacyArchitecture class UIManagerProvider (#53190)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53190

Deprecate LegacyArchitecture class UIManagerProvider

changelog: [Android][Changed] Deprecate LegacyArchitecture class UIManagerProvider

Reviewed By: mlord93

Differential Revision: D79674639

fbshipit-source-id: 6802a35c4bd643f138a54b4f22f3804743f89249
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 25c011eb4d Deprecate BridgeDevSupportManager and JSInstance (#53108)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53108

Deprecate BridgeDevSupportManager and JSInstance

changelog: [Android][Changed] Deprecate BridgeDevSupportManager and JSInstance

Reviewed By: mlord93

Differential Revision: D79674636

fbshipit-source-id: c34c4ed386ab6c130fc12e03659fe2d15b42658d
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 3306cdbbe9 Update deprecation message for BridgeReactContext class (#53110)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53110

Update deprecation message for BridgeReactContext class

changelog: [internal] internal

Reviewed By: mlord93

Differential Revision: D79674637

fbshipit-source-id: 0942b0c8479cd1eba8e29bd9dcfc4547790910f1
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 22e4c25211 Deprecate NativeModuleRegistry Legacy Architecture class (#53123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53123

Deprecate NativeModuleRegistry Legacy Architecture class

changelog: [Android][Changed] Deprecate NativeModuleRegistry Legacy Architecture class

Reviewed By: mlord93

Differential Revision: D79674638

fbshipit-source-id: 7791ceb53545aa456e92f051ed4c1f070305b5fc
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 78a3ff81eb Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge (#53106)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53106

Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

changelog: [Android][Changed] Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge

Reviewed By: mlord93

Differential Revision: D79674640

fbshipit-source-id: 58b8fde8bed739fd04272215e399cfbed7a0188a
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 25f466cc4d Deprecate FrescoBasedReactTextInlineImageShadowNode (#53121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53121

Deprecate FrescoBasedReactTextInlineImageShadowNode

changelog: [Android][Changed] Deprecate LegacyArchitecture class FrescoBasedReactTextInlineImageShadowNode

Reviewed By: mlord93

Differential Revision: D79672291

fbshipit-source-id: 482939981b735e7f96d7cde874430e2895c0d10c
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 718126fcf0 Deprecate Legacy Architecture class CallbackImpl (#53105)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53105

Deprecate Legacy Architecture class CallbackImpl

changelog: [Android][Changed] Deprecate Legacy Architecture class CallbackImpl

Reviewed By: mlord93

Differential Revision: D79672292

fbshipit-source-id: d35ae53093f464f2bb088a8247dbbde8591572c6
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 19a99dd088 Deprecate JavaMethodWrapper (#53124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53124

Deprecate LegacyArchitecture class JavaMethodWrapperchagelog:

changelog: [Android][Changed] Deprecate LegacyArchitecture class JavaMethodWrapper

Reviewed By: mlord93

Differential Revision: D79672296

fbshipit-source-id: 05432263c4452294c667226cb8e062c50f036931
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot c4715886a9 Deprecate Legacy Architecture ShadowNode classes
Summary:
Deprecate Legacy Architecture ShadowNode classes

Changelog: [Android][Changed] Deprecate Legacy Architecture ShadowNode classes

Reviewed By: mlord93

Differential Revision: D79672295

fbshipit-source-id: e510debd3718e6bc9e42c9b61d6a63858970077d
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot 1a85185cfc Deprecate ShadowNodes on the codegen (#53184)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53184

Deprecate ShadowNodes on the codegen

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79911692

fbshipit-source-id: ad24488d186fd5b82c3953a75f52be03e4770cc2
2025-08-09 04:39:35 -07:00
David VaccaandFacebook GitHub Bot d2912e7997 EZ fix naming in kotlin file (#53109)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53109

EZ fix naming in kotlin file

changelog: [internal] internal

Reviewed By: cortinico, shwanton, mlord93

Differential Revision: D79735705

fbshipit-source-id: b1061a9aa0f245de29efb1b0f3d6c9ada9c43660
2025-08-08 16:43:31 -07:00
Ramanpreet NaraandFacebook GitHub Bot 7d6d0a7735 native modules: Show message in redundant rejection redbox (#53152)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53152

When a redundant reject is called, show the rejection message in the redbox. This can help us pin down the error we need to elminiate in production.

Changelog: [Internal]

Reviewed By: sanjay-io

Differential Revision: D79837541

fbshipit-source-id: 879b5dc42980867051cfab6ccb575304a4a9c4c6
2025-08-08 14:39:42 -07:00
Ramanpreet NaraandFacebook GitHub Bot dc879950d1 native modules: Guard against concurrent resolve/reject calls (#53151)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53151

If the native module calls the resolve/reject, resolve/resolve, reject/resolve, reject/reject concurrently, the turbomodule infra could run into a null pointer exception. This diff mitigates that problem.

Changelog: [iOS][Fixed] - Fix concurrent calls into resolve/reject inside native modules

Reviewed By: sanjay-io

Differential Revision: D79824319

fbshipit-source-id: 675264781f303d12fc1eb9649ecdc78601b7720b
2025-08-08 14:39:42 -07:00
Calix TangandFacebook GitHub Bot e0ea781908 Basic Fantom Tests for Pressable (#53181)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53181

Adds basic Fantom tests for the <Pressable> React Native component.

Following T233710053, adds tests for some of the listed props and refs.

Covered props:
* children
* disabled
* onPress
* style

Ref:
* Pressable is a Native Component and has the correct tag

I did not cover the rest of the listed props due to Fantom not having suitable events to trigger to test them and/or inease of implementing functionality to do so.

## Changelog:

[Internal]

Reviewed By: andrewdacenko

Differential Revision: D79745215

fbshipit-source-id: 26caaabf72ea7ffff3e652616dfd9f0cf7fc2020
2025-08-08 12:56:58 -07:00
Luna WeiandFacebook GitHub Bot b3f397f343 VirtualViewExperimental on iOS (#52852)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52852

Changelog: [Internal] - Implementation of ScrollView-managed VirtualViews for iOS

In previous diffs we've introduced a "VirtualViewExperimental" which is a clone of VirtualView. This diff updates the experimental version to move interection logic (whether something is visible, in prerender-space, etc.) to the ScrollView so there are less listeners. We now use 1 scroll listener vs. N

Reviewed By: philIip

Differential Revision: D78825701

fbshipit-source-id: d515e3cb2dae53d779b5d3f4c317a2c7a6b25857
2025-08-08 11:12:12 -07:00
Zeya PengandFacebook GitHub Bot 5517c046ab Cache result when RenderOutput::render() is called (#53112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53112

## Changelog:

[Internal] [Changed] - Cache result when RenderOutput::render() is called

Rreviously, root.getRenderedOutput in fantom doesn't really reflect the result of direct manipulation from native animated (see the test case added here). This stack is enabling it.

* make RenderOutput an instance owned by TestMountingManager that can cache render result
  * why is this needed - native animation's direct manipulation should modify the render result (analog to directly manipulating host views on a platform) instead of props on a StubView
* here i also make sure that `RenderOutput::render()` will only re calculate the render result for a tree after StubViewTree::mutate is called

Reviewed By: andrewdacenko

Differential Revision: D79737991

fbshipit-source-id: ee2193b708e319c1519b06bc672054c4f7105da1
2025-08-08 10:54:05 -07:00
Mateo GuzmánandFacebook GitHub Bot 8ccfff9a46 Migrate ReactBaseTextShadowNode to Kotlin (#52449)
Summary:
Migrate com.facebook.react.views.text.ReactBaseTextShadowNode to Kotlin.

## Changelog:

[Android][Changed] - Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: mdvacca

Differential Revision: D79341403

Pulled By: cortinico

fbshipit-source-id: ff5dd7a8c3e0220812dd3a214d8d680ccd83f4d8
2025-08-08 10:36:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 0aeb26bdfc e2e test for Text.role (#53176)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53176

# Changelog:
[Internal] -

As in the title

Reviewed By: andrewdacenko

Differential Revision: D79891116

fbshipit-source-id: 13042a9b82373b8e0073c8421e532e6e463d60f8
2025-08-08 10:02:57 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 3d37d2d2ce Add test for Text.maxFontSizeMultiplier (#53171)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53171

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79888839

fbshipit-source-id: 52964ce9484c51dc5ff1065343ef9d2f829425c9
2025-08-08 10:02:57 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5a38948034 e2e test for Text.id/nativeID (#53170)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53170

# Changelog:
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79887689

fbshipit-source-id: a8a6a16a0fbf3f1481758a2d91c7813d51a4d9d1
2025-08-08 10:02:57 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 1a58fdf172 Add tests for Modal.animiated prop (#53174)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53174

Add Fantom tests for Modal.animiated prop

Notice that animated is deprecated and ignored when rendering.

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79888036

fbshipit-source-id: aa9003d376f356e9934a61a7cfc958b44d9892eb
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 618254d8e9 Add tests for Modal.allowSwipeDismissal prop (#53173)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53173

Add Fantom tests for Modal.allowSwipeDismissal prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79885004

fbshipit-source-id: 9db4bc38c739223a36180d09397bad09ecc67d86
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 01e3f8d75e Add tests for Modal.visible prop (#53172)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53172

Add Fantom tests for Modal.visible prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79884676

fbshipit-source-id: 7c3ca4e16596022096a634a7232b616cf15c79c4
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 2812e20ecc Add tests for Modal.hardwareAccelerated prop (#53162)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53162

Add Fantom tests for Modal.hardwareAccelerated prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881565

fbshipit-source-id: 80aaeb0659883d536c37996e86231c9d1d9eff49
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 674fd79eaf Add tests for Modal.navigationBarTranslucent prop (#53157)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53157

Add Fantom tests for Modal.navigationBarTranslucent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881358

fbshipit-source-id: 75816bf9bb18dc2115477965953fcd88a65d5be5
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot de76f3436c Add tests for Modal.statusBarTranslucent prop (#53158)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53158

Add Fantom tests for Modal.statusBarTranslucent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79881104

fbshipit-source-id: 9ee9edbff67059eeb815be2a7a095eac91ec7420
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 99ae977345 Add tests for Modal.transparent prop (#53159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53159

Add Fantom tests for Modal.transparent prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79880909

fbshipit-source-id: f597decb29f578433d6c7ac594327b6130945a8e
2025-08-08 08:52:46 -07:00
Riccardo CipolleschiandFacebook GitHub Bot fee81401d7 Add tests for Modal.presentationStyle prop (#53160)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53160

Add Fantom tests for Modal.presentationStyle prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79880310

fbshipit-source-id: fda68a481b85e58e5f94d012c71a55cf51b9c8df
2025-08-08 08:52:46 -07:00
Nicola CortiandFacebook GitHub Bot ec9f62865c Update firebase DB url. (#53166)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53166

Our DB doesn't have that suffix, so I'm removing it.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79883740

fbshipit-source-id: a52ab275129807cbb6e066baefccd71a8ac7398d
2025-08-08 08:05:54 -07:00
Nicola CortiandFacebook GitHub Bot e16def43c9 Reland: Add tests for DisplayMetricsHolder (#53165)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53165

This is a re-land of D78981753
Those tests were OOM-ing because we were using a old version of robolectric.
I've bumped it and this should fix it.

Changelog:
[Internal] [Changed] -

Reviewed By: lenaic

Differential Revision: D79883742

fbshipit-source-id: 4c2c640d6b601ec07d0a4a12cd7b86a879740a41
2025-08-08 07:09:32 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot afb6294335 Add Fantom test for Text.selectable (#53168)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53168

# Changelog:
[Internal]-
Adds Fantom test for `Text.selectable` prop.

Reviewed By: andrewdacenko

Differential Revision: D79885301

fbshipit-source-id: d66895397ee0bbcfedc3f744ae8138d2741b2b1e
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5b9063ed70 E2E test for numberOfLines prop in Text (#53167)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53167

# Changelog
[Internal] -

As in the title.

Reviewed By: andrewdacenko

Differential Revision: D79884649

fbshipit-source-id: fa2d0be9d455449d5a806b06c0480dcefdaaae3e
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 404c975ff2 Prop test for Text.allowFontScaling
Summary:
# Changelog:
[Internal] -

Adds Fantom test for `Text.allowFontScaling`.

Reviewed By: andrewdacenko

Differential Revision: D79882955

fbshipit-source-id: b1426c1e7f2667c2db017d749710320ec1e6aadd
2025-08-08 06:49:05 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 91f9ff042d Create e2e test for Text.ellipsizeMode prop (#53163)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53163

# Changelog:
[Internal] -

Adds a Fantom test that tests the `Text.ellipsizeMode` prop.

It also adds a test for the `<Text/>` component without any props

Reviewed By: andrewdacenko

Differential Revision: D79882336

fbshipit-source-id: f938c85092325374f562d610432781e2d412b88e
2025-08-08 06:49:05 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 20c91f2bd4 Add tests for Modal.animationStyle prop (#53141)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53141

Add Fantom tests for Modal.animationStyle prop

## Changelog:
[Internal] -

Reviewed By: andrewdacenko, rubennorte

Differential Revision: D79808162

fbshipit-source-id: 36ba61bf741dc7cfa7a736fd83a824285304d5b2
2025-08-08 06:47:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot 7035391b04 Add basic test for Modal (#53140)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53140

As per title, this change adds the boilerplate code for a Fantom test on Modal

## Changelog:
[Internal] -

Reviewed By: andrewdacenko

Differential Revision: D79805808

fbshipit-source-id: c8c77e576a09b346cf29b290d68c75e540d5f146
2025-08-08 06:47:23 -07:00
Riccardo CipolleschiandFacebook GitHub Bot e547f466ee Improve codegen to add getDebugProps to components (#53135)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53135

Our Codegenerated components are not generating code for `getDebugProps`. This change modifies Codegen to add those functions for all the codegen components.

## Changelog:
[General][Added] - Added getDebugProps to codegen

## Facebook:
`getDebugProps` are required by Fantom to write tests. However, we can't generate these function for third party components, because codegen can generate arbitrary structs and we don't have a generic `toString()` method that can be used or automatically generated by C++.

By generating this function only for Core Components, we can ensure that we can write Fantom tests without breaking all the users of React Native.

Reviewed By: rubennorte

Differential Revision: D79805145

fbshipit-source-id: 0e41c65fc30eaa886a05557ca233fb0a9cb18a71
2025-08-08 06:47:23 -07:00
Andrew DatsenkoandFacebook GitHub Bot 8363a4c515 Add static methods tests (#53087)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53087

Changelog: [Internal]
As title

Reviewed By: lenaic

Differential Revision: D79665922

fbshipit-source-id: 024c10960a59e1332aacf2411a68ca85c17142db
2025-08-08 06:00:58 -07:00
generatedunixname89002005287564andFacebook GitHub Bot ec3d9c60f1 Fix CQS signal readability-container-size-empty in xplat/js/react-native-github/packages (#53155)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/53155

Reviewed By: rshest

Differential Revision: D79788547

fbshipit-source-id: a18465d5c16ab1822c4e9f6302767505fe6f5ee5
2025-08-08 04:24:03 -07:00
Rubén NorteandFacebook GitHub Bot 2f33eece41 Fix retry logic in Fantom when requesting bundles from Metro (#53161)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53161

Changelog: [internal]

This fixes a bug in the retry logic in Fantom when requesting bundles from Metro, where we cache the error from a previous attempt and use it to determine we didn't succeed after the attemps.

Reviewed By: rshest

Differential Revision: D79881488

fbshipit-source-id: 566b2d700db2f9653b9ea9acd577d7eb03770b76
2025-08-08 04:22:16 -07:00
generatedunixname1395667395051502andFacebook GitHub Bot 81fdb9dd93 Update React Native DevTools binaries
Summary:
Automated update of React Native DevTools binaries
bypass-github-export-checks
Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D79836825

fbshipit-source-id: 82484ab99d7813b79bfb75a6c3ad3bd9863f8856
2025-08-08 04:11:28 -07:00
Andrew DatsenkoandFacebook GitHub Bot d4ea32493e Revert resizeMode to Stretch as unset (#53144)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53144

Changelog: [Internal]
This is a fix to "unset" prop value for Image.
In my previous diff D79600137 I have changed this behaviour to have Cover as a default, but it is not "default" value, but rather "unset" value.

Reviewed By: rshest

Differential Revision: D79813759

fbshipit-source-id: cc6d43742e51fb2087d6023bd0ff50a3d54eed49
2025-08-08 03:43:06 -07:00
Nicola CortiandFacebook GitHub Bot ba518bbb30 RNGP - Make sure the newArchEnabled is set to true for all the libs (#53138)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53138

Without this patch, library could break if the user removes the `newArchEnabled=`
property from the `gradle.properties` file.

With this patch instead we hardcode the property to true, so all the libraries can consume
it if they wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D79805857

fbshipit-source-id: 88dda707a0d80ac79e96c955ded2ef0823f3d3ff
2025-08-08 03:42:35 -07:00
David VaccaandFacebook GitHub Bot 85610c8b43 Deprecate Legacy Architecture UIManagerModules class (#53122)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53122

Deprecate LegacyArchitecture UIManagerModules class

changelog: [Android][Changed] Deprecate LegacyArchitecture UIManagerModules class

Reviewed By: mlord93

Differential Revision: D79672294

fbshipit-source-id: 8a22df4a4341a2ab501fc003ee213fb0047847fc
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 7f5b2b8f84 Deprecate Legacy Architecture classes belonging to com/facebook/react/uimanager (#53102)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53102

Deprecate large subset of Legacy Architecture classes belonging to com/facebook/react/uimanager

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from com/facebook/react/uimanager

Reviewed By: mlord93

Differential Revision: D79672293

fbshipit-source-id: 2d32eb885af3ec2928510608330740229abf93db
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 39d24bade3 Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager (#53120)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53120

Deprecate com.facebook.react.uimanager classes

changelog: [Android][Changed] Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager

Reviewed By: mlord93

Differential Revision: D79660036

fbshipit-source-id: 981f7938e54e40f810caec72fa485cc4a00029f6
2025-08-08 02:52:36 -07:00
David VaccaandFacebook GitHub Bot 9831b03860 Rename BridgeSoLoader -> ReactNativeJNISoLoader (#53153)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53153

In this diff I'm renaming BridgeSoLoader -> ReactNativeJNISoLoader and removing LegacyArchitecture becuase this class loads jni classes that are required in new architecture

changelog: [internal] internal

Reviewed By: RSNara

Differential Revision: D79827295

fbshipit-source-id: 2d02fa1de49b2e4ee838f14e976ae3ab2ca98aef
2025-08-08 01:20:42 -07:00
Alan LeeandFacebook GitHub Bot f21a89078c Revert D79571226: replace getWindowDisplayMetrics with getScreenDisplayMetrics
Differential Revision:
D79571226

Original commit changeset: d90fca36c119

Original Phabricator Diff: D79571226

fbshipit-source-id: 670ae66f9db758d29673134adbac44780569771b
2025-08-08 00:48:14 -07:00
Alan LeeandFacebook GitHub Bot 352e440459 Back out "Fix Dimensions window values on Android < 15" (#53149)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53149

Reverting PR https://github.com/facebook/react-native/pull/52738

Changelog: [Internal]
reverting D78738516

Original commit changeset: fdb22f3cc76b

Original Phabricator Diff: D78738516

Reviewed By: mdvacca, lenaic, Abbondanzo

Differential Revision: D79835424

fbshipit-source-id: 44b5ee34b4df6752e5a6f959a54e104eef20ffca
2025-08-08 00:40:42 -07:00
David VaccaandFacebook GitHub Bot aaf471278c Back out "Add tests for DisplayMetricsHolder" (#53148)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53148

Reverting D78981753 because it's causing tests to OOM
https://github.com/facebook/react-native/commit/384677f58ea0af498f548a043be86e6876af58b1

changelog: [internal] internal

Reviewed By: shwanton

Differential Revision: D79828375

fbshipit-source-id: 3de01dca3d9a9fc4530c84855049eb4ec132a485
2025-08-07 14:33:33 -07:00
Nicola CortiandFacebook GitHub Bot 384677f58e Add tests for DisplayMetricsHolder (#52946)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52946

This just add a set of unit tests for `DisplayMetricsHolder` as I'm working on this class recently.

Changelog:
[Internal] [Changed] -

Reviewed By: rshest, mdvacca

Differential Revision: D78981753

fbshipit-source-id: 5800d44d3131a58770a0049eb2d08306874b7183
2025-08-07 11:01:37 -07:00
Nicola CortiandFacebook GitHub Bot 2e76fc8e8e Correctly create the first modal state (#52835)
Summary:
There is currently a bug with Modals with New Architecture where the first frame is rendered incorrectly, specifically not accounting for all the vertical insets (only the status bar). This fixes it.

Specifically:
1. I've removed the caching of the statusbar height from `ReactModalHostView` as that was not working correctly. Sometimes the value returned `0` meaning that it was not yet computed when Fabric was asking for it. In the updated implementation we now query `FabricUIManager` given the `surfaceId` of the modal.
2. I've modified the logic to account for all the vertical insets, not just the status bar.

## Changelog:

[ANDROID] [FIXED] - Correctly account for insets on first render of Modals on New Arch

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

Test Plan:
Tested on Marketplace Location Picker and the picker is still working correctly:

 https://pxl.cl/7NjtJ

Reviewed By: mdvacca

Differential Revision: D78975126

Pulled By: cortinico

fbshipit-source-id: d7afb4fa5d2f43a7e33da3860432fa6dfe0dc8d7
2025-08-07 11:01:37 -07:00
Ruslan ShestopalyukandFacebook GitHub Bot 5fc23d7c62 Add type-safe API for passing around benchmark results (#53143)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53143

# Changelog:
[Internal] -

This refactors the way Fantom benchmark test results are passed to the top level, making it type safe and more maintainable.

Reviewed By: andrewdacenko

Differential Revision: D79812707

fbshipit-source-id: d8bfef7e1b0c11b277a08f5e4c810f8c1efd7f89
2025-08-07 10:46:26 -07:00
Nicola CortiandFacebook GitHub Bot e92da16a9b Migrate ClipboardModuleTest to use BridgelessReactContext (#53131)
Summary:
This test was still using the old `BridgeReactContext`, I'm migrating it to `BridgelessReactContext`.

## Changelog:

[INTERNAL] -

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

Test Plan: CI

Reviewed By: mdvacca

Differential Revision: D79801564

Pulled By: cortinico

fbshipit-source-id: 9bb96185505703a773597aeadfeeaeeb194532de
2025-08-07 10:42:26 -07:00
Ruslan LesiutinandFacebook GitHub Bot ae5df7ee35 Bump Electron to 37.2.4 (#53145)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53145

# Changelog: [Internal]

See attached tasks.

Reviewed By: motiz88

Differential Revision: D79563948

fbshipit-source-id: a95b4e63d3a7d0d456c89ec7361e58fea0f5fb66
2025-08-07 10:40:57 -07:00
Sharif MahmoudandFacebook GitHub Bot dacd8f26fd Fix HEADER_SEARCH_PATHS for RuntimeExecutor when USE_FRAMEWORKS is enabled (#53099)
Summary:
`#include <ReactCommon/RuntimeExecutor.h>` stopped working in react-native 0.81 when using frameworks because it is not part of ReactCommon anymore when the split happened for iOS.

to fix this I am including RuntimeExecutor in search headers same way we include ReactCommon.

## Changelog:

[IOS] [FIXED] - Fix import RuntimeExecutor.h with USE_FRAMEWORKS

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

Test Plan:
You can enable USE_FRAMEWORKS and do `#include <react/renderer/uimanager/UIManager.h>` (which react-native-reanimated is doing).
Build will fail complaining that it can't find ReactCommon/RuntimeExecutor.h which is included in UIManager.h
Add my patch, it will work and build successfully

Reviewed By: cortinico

Differential Revision: D79796637

Pulled By: cipolleschi

fbshipit-source-id: f8bb669cfb9f4414653655ed98d2cc6bb431a3e5
2025-08-07 10:12:51 -07:00
Nicola CortiandFacebook GitHub Bot ede037ade7 Cleanup heightOfTallestInlineImage field (#52978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52978

This field is never written anywhere (neither in the internal codebase, nor in OSS).
I'm cleaning this us and simplifying the logic:
- Deprecating `effectiveLineHeight`
- Replacing all the usage of `effectiveLineHeight` with just `lineHeight`

Changelog:
[Android] [Changed] - Deprecate the field `TextAttributeProps.effectiveLineHeight`. This field was public but never used in OSS.

Reviewed By: mdvacca

Differential Revision: D79442393

fbshipit-source-id: c424a6def0257264cd160a2d7be48c2d0f47135e
2025-08-07 09:49:46 -07:00
Mateo GuzmánandFacebook GitHub Bot fa921b3c7b Migrate TextAttributeProps to Kotlin (#52452)
Summary:
Migrate com.facebook.react.views.text.TextAttributeProps to Kotlin.

## Changelog:

[Android][Changed] - Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation.

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

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

Reviewed By: rshest

Differential Revision: D79341238

Pulled By: cortinico

fbshipit-source-id: 455c7b48f47a0cf240aaf330e1fa3674798e7237
2025-08-07 09:49:46 -07:00
2677 changed files with 92396 additions and 59881 deletions
+3
View File
@@ -35,6 +35,9 @@ module.exports = {
// Flow handles these checks for us, so they aren't required
'no-undef': 'off',
'no-unreachable': 'off',
// Throwing from function or rejecting promises with non-error values could result in unclear error stack traces and lead to harder debugging
'prefer-promise-reject-errors': 'error',
'no-throw-literal': 'error',
},
},
{
+2 -4
View File
@@ -69,14 +69,12 @@ munge_underscores=true
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/packages/react-native/index.js'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-native/\1'
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\|ktx\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
module.system.haste.module_ref_prefix=m#
react.runtime=automatic
suppress_type=$FlowFixMe
ban_spread_key_props=true
[lints]
@@ -100,4 +98,4 @@ untyped-import
untyped-type-import
[version]
^0.278.0
^0.289.0
+3
View File
@@ -17,6 +17,9 @@ runs:
- name: Install node dependencies
uses: ./.github/actions/yarn-install
- name: Set React Native Version
# We don't want to set the version for stable branches, because this has been
# already set from the 'create release' commits on the release branch.
if: ${{ !endsWith(github.ref_name, '-stable') }}
shell: bash
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
- name: Setup gradle
@@ -1,103 +0,0 @@
name: build-apple-slices-hermes
description: This action builds hermesc for Apple platforms
inputs:
hermes-version:
required: true
description: The version of Hermes
react-native-version:
required: true
description: The version of Hermes
slice:
required: true
description: The slice of hermes you want to build. It could be iphone, iphonesimulator, macos, catalyst, appletvos, appletvsimulator, xros, or xrossimulator
flavor:
required: true
description: The flavor we want to build. It can be Debug or Release
runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore HermesC Artifact
uses: actions/download-artifact@v4
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Restore Slice From Cache
id: restore-slice-cache
uses: actions/cache/restore@v4
with:
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }}
key: v6-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.slice }}-${{ inputs.flavor }}
- name: Build the Hermes ${{ inputs.slice }} frameworks
shell: bash
run: |
cd ./packages/react-native/sdks/hermes || exit 1
SLICE=${{ inputs.slice }}
FLAVOR=${{ inputs.flavor }}
FINAL_PATH=build_"$SLICE"_"$FLAVOR"
echo "Final path for this slice is: $FINAL_PATH"
if [[ -d "$FINAL_PATH" ]]; then
echo "[HERMES] Skipping! Found the requested slice at $FINAL_PATH".
exit 0
fi
if [[ "$ARTIFACTS_EXIST" ]]; then
echo "[HERMES] Skipping! Artifacts exists already."
exit 0
fi
export RELEASE_VERSION=${{ inputs.react-native-version }}
# HermesC is used to build hermes, so it has to be executable
chmod +x ./build_host_hermesc/bin/hermesc
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
chmod +x ./utils/build-mac-framework.sh
BUILD_TYPE="${{ inputs.flavor }}" ./utils/build-mac-framework.sh
else
echo "[HERMES] Building Hermes for iOS: $SLICE"
chmod +x ./utils/build-ios-framework.sh
BUILD_TYPE="${{ inputs.flavor }}" ./utils/build-ios-framework.sh "$SLICE"
fi
echo "Moving from build_$SLICE to $FINAL_PATH"
mv build_"$SLICE" "$FINAL_PATH"
# check whether everything is there
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework" ]]; then
echo "Successfully built hermes.framework for $SLICE in $FLAVOR"
else
echo "Failed to built hermes.framework for $SLICE in $FLAVOR"
exit 1
fi
if [[ -d "$FINAL_PATH/API/hermes/hermes.framework.dSYM" ]]; then
echo "Successfully built hermes.framework.dSYM for $SLICE in $FLAVOR"
else
echo "Failed to built hermes.framework.dSYM for $SLICE in $FLAVOR"
echo "Please try again"
exit 1
fi
- name: Compress slices to preserve Symlinks
shell: bash
run: |
cd ./packages/react-native/sdks/hermes
tar -czv -f build_${{ matrix.slice }}_${{ matrix.flavor }}.tar.gz build_${{ matrix.slice }}_${{ matrix.flavor }}
- name: Upload Artifact for Slice (${{ inputs.slice }}, ${{ inputs.flavor }}}
uses: actions/upload-artifact@v4.3.4
with:
name: slice-${{ inputs.slice }}-${{ inputs.flavor }}
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }}.tar.gz
- name: Save slice cache
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
uses: actions/cache/save@v4
with:
path: ./packages/react-native/sdks/hermes/build_${{ inputs.slice }}_${{ inputs.flavor }}
key: v6-hermes-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ inputs.SLICE }}-${{ inputs.FLAVOR }}
@@ -1,227 +0,0 @@
name: build-hermes-macos
description: This action builds hermesc for Apple platforms
inputs:
hermes-version:
required: true
description: The version of Hermes
react-native-version:
required: true
description: The version of React Native
flavor:
required: true
description: The flavor we want to build. It can be Debug or Release
runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4
with:
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}
path: |
/tmp/hermes/osx-bin/${{ inputs.flavor }}
/tmp/hermes/dSYM/${{ inputs.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.flavor }}.tar.gz
- name: Check if the required artifacts already exist
id: check_if_apple_artifacts_are_there
shell: bash
run: |
FLAVOR="${{ inputs.flavor }}"
echo "Flavor is $FLAVOR"
OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR"
DSYM="/tmp/hermes/dSYM/$FLAVOR"
HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz"
if [[ -d "$OSX_BIN" ]] && \
[[ -d "$DSYM" ]] && \
[[ -f "$HERMES" ]]; then
echo "Artifacts are there!"
echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV
echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT
fi
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Yarn- Install Dependencies
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: ./.github/actions/yarn-install
- name: Slice cache macosx
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-macosx-${{ inputs.flavor }}
- name: Slice cache iphoneos
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-iphoneos-${{ inputs.flavor }}
- name: Slice cache iphonesimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-iphonesimulator-${{ inputs.flavor }}
- name: Slice cache appletvos
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-appletvos-${{ inputs.flavor }}
- name: Slice cache appletvsimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-appletvsimulator-${{ inputs.flavor }}
- name: Slice cache catalyst
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-catalyst-${{ inputs.flavor }}
- name: Slice cache xros
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-xros-${{ inputs.flavor }}
- name: Slice cache xrsimulator
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
uses: actions/download-artifact@v4
with:
path: ./packages/react-native/sdks/hermes/
name: slice-xrsimulator-${{ inputs.flavor }}
- name: Unzip slices
shell: bash
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
run: |
cd ./packages/react-native/sdks/hermes
ls -l .
tar -xzv -f build_catalyst_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_iphoneos_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_iphonesimulator_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_appletvos_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_appletvsimulator_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_macosx_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_xros_${{ matrix.flavor }}.tar.gz
tar -xzv -f build_xrsimulator_${{ matrix.flavor }}.tar.gz
- name: Move back build folders
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
shell: bash
run: |
ls -l ./packages/react-native/sdks/hermes
cd ./packages/react-native/sdks/hermes || exit 1
mv build_macosx_${{ inputs.flavor }} build_macosx
mv build_iphoneos_${{ inputs.flavor }} build_iphoneos
mv build_iphonesimulator_${{ inputs.flavor }} build_iphonesimulator
mv build_appletvos_${{ inputs.flavor }} build_appletvos
mv build_appletvsimulator_${{ inputs.flavor }} build_appletvsimulator
mv build_catalyst_${{ inputs.flavor }} build_catalyst
mv build_xros_${{ inputs.flavor }} build_xros
mv build_xrsimulator_${{ inputs.flavor }} build_xrsimulator
- name: Prepare destroot folder
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
shell: bash
run: |
cd ./packages/react-native/sdks/hermes || exit 1
chmod +x ./utils/build-apple-framework.sh
. ./utils/build-apple-framework.sh
prepare_dest_root_for_ci
- name: Create fat framework for iOS
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
shell: bash
run: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
chmod +x ./utils/build-ios-framework.sh
./utils/build-ios-framework.sh build_framework
chmod +x ./destroot/bin/hermesc
- name: Package the Hermes Apple frameworks
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
shell: bash
run: |
BUILD_TYPE="${{ inputs.flavor }}"
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
TARBALL_OUTPUT_DIR=$(mktemp -d /tmp/hermes-tarball-output-XXXXXXXX)
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
echo "Packaging Hermes Apple frameworks for $BUILD_TYPE build type"
TARBALL_OUTPUT_PATH=$(node ./packages/react-native/scripts/hermes/create-tarball.js \
--inputDir ./packages/react-native/sdks/hermes \
--buildType "$BUILD_TYPE" \
--outputDir $TARBALL_OUTPUT_DIR)
echo "Hermes tarball saved to $TARBALL_OUTPUT_PATH"
mkdir -p $HERMES_TARBALL_ARTIFACTS_DIR
cp $TARBALL_OUTPUT_PATH $HERMES_TARBALL_ARTIFACTS_DIR/.
mkdir -p /tmp/hermes/osx-bin/${{ inputs.flavor }}
cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ inputs.flavor }}
ls -lR /tmp/hermes/osx-bin/
- name: Create dSYM archive
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
shell: bash
run: |
FLAVOR=${{ inputs.flavor }}
WORKING_DIR="/tmp/hermes_tmp/dSYM/$FLAVOR"
mkdir -p "$WORKING_DIR/macosx"
mkdir -p "$WORKING_DIR/catalyst"
mkdir -p "$WORKING_DIR/iphoneos"
mkdir -p "$WORKING_DIR/iphonesimulator"
mkdir -p "$WORKING_DIR/appletvos"
mkdir -p "$WORKING_DIR/appletvsimulator"
mkdir -p "$WORKING_DIR/xros"
mkdir -p "$WORKING_DIR/xrsimulator"
cd ./packages/react-native/sdks/hermes || exit 1
DSYM_FILE_PATH=API/hermes/hermes.framework.dSYM
cp -r build_macosx/$DSYM_FILE_PATH "$WORKING_DIR/macosx/"
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
cp -r build_appletvos/$DSYM_FILE_PATH "$WORKING_DIR/appletvos/"
cp -r build_appletvsimulator/$DSYM_FILE_PATH "$WORKING_DIR/appletvsimulator/"
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
mkdir -p "$DEST_DIR"
mv "hermes.framework.dSYM" "$DEST_DIR"
- name: Upload hermes dSYM artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-dSYM-${{ inputs.flavor }}
path: /tmp/hermes/dSYM/${{ inputs.flavor }}
- name: Upload hermes Runtime artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-darwin-bin-${{ inputs.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.flavor }}.tar.gz
- name: Upload hermes osx artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-osx-bin-${{ inputs.flavor }}
path: /tmp/hermes/osx-bin/${{ inputs.flavor }}
- name: Upload Hermes Artifacts
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v4-hermes-artifacts-${{ inputs.flavor }}-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}
path: |
/tmp/hermes/osx-bin/${{ inputs.flavor }}
/tmp/hermes/dSYM/${{ inputs.flavor }}
/tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ inputs.flavor }}.tar.gz
@@ -1,39 +0,0 @@
name: build-hermesc-apple
description: This action builds hermesc for Apple platforms
inputs:
hermes-version:
required: true
description: The version of Hermes
react-native-version:
required: true
description: The version of React Native
runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Hermes apple cache
uses: actions/cache/restore@v4
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
- name: Build HermesC Apple
shell: bash
run: |
cd ./packages/react-native/sdks/hermes || exit 1
. ./utils/build-apple-framework.sh
build_host_hermesc_if_needed
- name: Upload HermesC Artifact
uses: actions/upload-artifact@v4.3.4
with:
name: hermesc-apple
path: ./packages/react-native/sdks/hermes/build_host_hermesc
- name: Cache hermesc apple
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
path: ./packages/react-native/sdks/hermes/build_host_hermesc
key: v2-hermesc-apple-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
enableCrossOsArchive: true
@@ -1,53 +0,0 @@
name: build-hermesc-linux
description: This action builds hermesc for linux platforms
inputs:
hermes-version:
required: True
description: The version of Hermes
react-native-version:
required: True
description: The version of React Native
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y git openssh-client build-essential \
libreadline-dev libicu-dev jq zip python3
# Install cmake 3.28.3-1build7
sudo apt-get install cmake=3.28.3-1build7
sudo ln -sf /usr/bin/cmake /usr/local/bin/cmake
- name: Restore Hermes workspace
uses: ./.github/actions/restore-hermes-workspace
- name: Linux cache
uses: actions/cache@v4
with:
key: v1-hermes-${{ github.job }}-linux-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
path: |
/tmp/hermes/linux64-bin/
/tmp/hermes/hermes/destroot/
- name: Set up workspace
shell: bash
run: |
mkdir -p /tmp/hermes/linux64-bin
- name: Build HermesC for Linux
shell: bash
run: |
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
else
cd /tmp/hermes
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
cmake --build build --target hermesc -j 4
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
fi
- name: Upload linux artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-linux-bin
path: /tmp/hermes/linux64-bin
@@ -1,86 +0,0 @@
name: build-hermesc-windows
description: This action builds hermesc for Windows platforms
inputs:
hermes-version:
required: True
description: The version of Hermes
react-native-version:
required: True
description: The version of React Native
runs:
using: composite
steps:
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
name: hermes-workspace
path: 'C:\tmp\hermes'
- name: Set up workspace
shell: powershell
run: |
mkdir -p C:\tmp\hermes\osx-bin
mkdir -p .\packages\react-native\sdks\hermes
cp -r -Force C:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\.
cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\.
- name: Windows cache
uses: actions/cache@v4
with:
key: v3-hermes-${{ github.job }}-windows-${{ inputs.hermes-version }}-${{ inputs.react-native-version }}
path: |
C:\tmp\hermes\win64-bin\
C:\tmp\hermes\hermes\icu\
C:\tmp\hermes\hermes\deps\
C:\tmp\hermes\hermes\build_release\
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.3.2
- name: Set up workspace
shell: powershell
run: |
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\icu
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\deps
New-Item -ItemType Directory -ErrorAction SilentlyContinue $Env:HERMES_WS_DIR\win64-bin
- name: Downgrade CMake
shell: powershell
run: choco install cmake --version 3.31.6 --force
- name: Build HermesC for Windows
shell: powershell
run: |
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
$progressPreference = 'silentlyContinue'
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
Expand-Archive -Path "icu.zip" -DestinationPath "."
cd $Env:HERMES_WS_DIR
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
# Include MSVC++ 2015 redistributables
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
cmake -S hermes -B build_release -G 'Visual Studio 17 2022' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
if (-not $?) { throw "Failed to configure Hermes" }
echo "Running windows build..."
cd build_release
cmake --build . --target hermesc --config Release
if (-not $?) { throw "Failed to build Hermes" }
echo "Copying hermesc.exe to win64-bin"
cd $Env:HERMES_WS_DIR
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
# Include Windows runtime dependencies
Copy-Item -Path "deps\*" -Destination "win64-bin"
}
else {
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
}
- name: Upload windows artifacts
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-win64-bin
path: C:\tmp\hermes\win64-bin\
@@ -4,9 +4,6 @@ inputs:
release-type:
required: true
description: The type of release we are building. It could be nightly, release or dry-run
hermes-ws-dir:
required: 'true'
description: The workspace for hermes
gha-npm-token:
required: false
description: The GHA npm token, required only to publish to npm
@@ -20,87 +17,6 @@ runs:
- name: Setup git safe folders
shell: bash
run: git config --global --add safe.directory '*'
- name: Create /tmp/hermes/osx-bin directory
shell: bash
run: mkdir -p /tmp/hermes/osx-bin
- name: Download osx-bin release artifacts
uses: actions/download-artifact@v4
with:
name: hermes-osx-bin-Release
path: /tmp/hermes/osx-bin/Release
- name: Download osx-bin debug artifacts
uses: actions/download-artifact@v4
with:
name: hermes-osx-bin-Debug
path: /tmp/hermes/osx-bin/Debug
- name: Download darwin-bin release artifacts
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-Release
path: /tmp/hermes/hermes-runtime-darwin
- name: Download darwin-bin debug artifacts
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-Debug
path: /tmp/hermes/hermes-runtime-darwin
- name: Download hermes dSYM debug artifacts
uses: actions/download-artifact@v4
with:
name: hermes-dSYM-Debug
path: /tmp/hermes/dSYM/Debug
- name: Download hermes dSYM release vartifacts
uses: actions/download-artifact@v4
with:
name: hermes-dSYM-Release
path: /tmp/hermes/dSYM/Release
- name: Download windows-bin artifacts
uses: actions/download-artifact@v4
with:
name: hermes-win64-bin
path: /tmp/hermes/win64-bin
- name: Download linux-bin artifacts
uses: actions/download-artifact@v4
with:
name: hermes-linux-bin
path: /tmp/hermes/linux64-bin
- name: Show /tmp/hermes directory
shell: bash
run: ls -lR /tmp/hermes
- name: Copy Hermes binaries
shell: bash
run: |
mkdir -p ./packages/react-native/sdks/hermesc ./packages/react-native/sdks/hermesc/osx-bin ./packages/react-native/sdks/hermesc/win64-bin ./packages/react-native/sdks/hermesc/linux64-bin
# When build_hermes_macos runs as a matrix, it outputs
if [[ -d ${{ inputs.hermes-ws-dir }}/osx-bin/Release ]]; then
cp -r ${{ inputs.hermes-ws-dir }}/osx-bin/Release/* ./packages/react-native/sdks/hermesc/osx-bin/.
elif [[ -d ${{ inputs.hermes-ws-dir }}/osx-bin/Debug ]]; then
cp -r ${{ inputs.hermes-ws-dir }}/osx-bin/Debug/* ./packages/react-native/sdks/hermesc/osx-bin/.
else
ls ${{ inputs.hermes-ws-dir }}/osx-bin || echo "hermesc macOS artifacts directory missing."
echo "Could not locate macOS hermesc binary."; exit 1;
fi
# Sometimes, GHA creates artifacts with lowercase Debug/Release. Make sure that if it happen, we uppercase them.
if [[ -f "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-debug.tar.gz" ]]; then
mv "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-debug.tar.gz" "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-Debug.tar.gz"
fi
if [[ -f "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-release.tar.gz" ]]; then
mv "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-release.tar.gz" "${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-Release.tar.gz"
fi
cp -r ${{ inputs.hermes-ws-dir }}/win64-bin/* ./packages/react-native/sdks/hermesc/win64-bin/.
cp -r ${{ inputs.hermes-ws-dir }}/linux64-bin/* ./packages/react-native/sdks/hermesc/linux64-bin/.
# Make sure the hermesc files are actually executable.
chmod -R +x packages/react-native/sdks/hermesc/*
mkdir -p ./packages/react-native/ReactAndroid/external-artifacts/artifacts/
cp ${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-Debug.tar.gz ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-ios-debug.tar.gz
cp ${{ inputs.hermes-ws-dir }}/hermes-runtime-darwin/hermes-ios-Release.tar.gz ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-ios-release.tar.gz
cp ${{ inputs.hermes-ws-dir }}/dSYM/Debug/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-debug.tar.gz
cp ${{ inputs.hermes-ws-dir }}/dSYM/Release/hermes.framework.dSYM ./packages/react-native/ReactAndroid/external-artifacts/artifacts/hermes-framework-dSYM-release.tar.gz
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
@@ -1,99 +0,0 @@
name: prepare-hermes-workspace
description: This action prepares the hermes workspace with the right hermes and react-native versions.
inputs:
hermes-ws-dir:
required: true
description: The hermes dir we need to use to setup the workspace
hermes-version-file:
required: true
description: the path to the file that will contain the hermes version
outputs:
hermes-version:
description: the version of Hermes tied to this run
value: ${{ steps.hermes-version.outputs.VERSION }}
react-native-version:
description: the version of React Native tied to this run
value: ${{ steps.react-native-version.outputs.VERSION }}
runs:
using: composite
steps:
- name: Setup hermes version
shell: bash
id: hermes-version
run: |
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
if [ -f "${{ inputs.hermes-version-file }}" ]; then
echo "Hermes Version file found! Using this version for the build:"
echo "VERSION=$(cat ${{ inputs.hermes-version-file }})" >> "$GITHUB_OUTPUT"
else
echo "Hermes Version file not found!!!"
echo "Using the last commit from main for the build:"
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
echo "VERSION=$HERMES_TAG_SHA" >> "$GITHUB_OUTPUT"
fi
echo "Hermes commit is $HERMES_TAG_SHA"
- name: Get react-native version
shell: bash
id: react-native-version
run: |
VERSION=$(cat packages/react-native/package.json | jq -r '.version')
# Save the react native version we are building in an output variable so we can use that file as part of the cache key.
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
echo "React Native Version is $VERSION"
- name: Cache hermes workspace
id: restore-hermes
uses: actions/cache/restore@v4
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
enableCrossOsArchive: true
# It happened while testing that a cache was created from the right folders
# but those folders where empty. Thus, the next check ensures that we can work with those caches.
- name: Check if cache was meaningful
id: meaningful-cache
shell: bash
run: |
if [[ -d /tmp/hermes/hermes ]] && [[ -n "$(ls -A /tmp/hermes/hermes)" ]]; then
echo "Found a good hermes cache"
echo "HERMES_CACHED=true" >> "$GITHUB_OUTPUT"
fi
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Yarn- Install Dependencies
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
uses: ./.github/actions/yarn-install
- name: Download Hermes tarball
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
shell: bash
run: |
node packages/react-native/scripts/hermes/prepare-hermes-for-build ${{ github.event.pull_request.html_url }}
cp packages/react-native/sdks/download/* ${{ inputs.hermes-ws-dir }}/download/.
cp -r packages/react-native/sdks/hermes/* ${{ inputs.hermes-ws-dir }}/hermes/.
echo ${{ steps.hermes-version.outputs.version }}
- name: Upload Hermes artifact
uses: actions/upload-artifact@v4.3.4
with:
name: hermes-workspace
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
- name: Cache hermes workspace
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode.
with:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ steps.hermes-version.outputs.version }}
enableCrossOsArchive: true
@@ -1,16 +0,0 @@
name: restore-hermes-workspace
description: "Restore hermes workspace that has been created in Prepare Hermes Workspace"
runs:
using: composite
steps:
- name: Download Previous Artifacts
uses: actions/download-artifact@v4
with:
name: hermes-workspace
path: /tmp/hermes
- name: Set up workspace
shell: bash
run: |
mkdir -p $HERMES_OSXBIN_ARTIFACTS_DIR ./packages/react-native/sdks/hermes
cp -r $HERMES_WS_DIR/hermes/* ./packages/react-native/sdks/hermes/.
cp -r ./packages/react-native/sdks/hermes-engine/utils ./packages/react-native/sdks/hermes/.
@@ -1,32 +0,0 @@
name: setup-xcode-build-cache
description: Add caching to iOS jobs to speed up builds
inputs:
hermes-version:
description: The version of hermes
required: true
flavor:
description: The flavor that is going to be built
default: Debug
use-frameworks:
description: Whether we are bulding with DynamicFrameworks or StaticLibraries
default: StaticLibraries
ruby-version:
description: The ruby version we are going to use
default: 2.6.10
runs:
using: composite
steps:
- name: See commands.yml with_xcodebuild_cache
shell: bash
run: echo "See commands.yml with_xcodebuild_cache"
- name: Cache podfile lock
uses: actions/cache@v4
with:
path: packages/rn-tester/Podfile.lock
key: v13-podfilelock-${{ github.job }}-NewArch-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
- name: Cache cocoapods
uses: actions/cache@v4
with:
path: packages/rn-tester/Pods
key: v15-cocoapods-${{ github.job }}-NewArch-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
+22
View File
@@ -5,6 +5,10 @@ inputs:
description: 'The xcode version to use'
required: false
default: '16.2.0'
platform:
description: 'The platform to use. Valid values are: ios, ios-simulator, macos, mac-catalyst, tvos, tvos-simulator, xros, xros-simulator'
required: false
default: 'macos'
runs:
using: "composite"
steps:
@@ -12,3 +16,21 @@ runs:
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
with:
xcode-version: ${{ inputs.xcode-version }}
- name: Setup Platform ${{ inputs.platform }}
if: ${{ inputs.platform != 'macos' && inputs.platform != 'mac-catalyst' }}
shell: bash
run: |
# https://github.com/actions/runner-images/issues/12541
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
# Install platform based on the platform
if [[ "${{ inputs.platform }}" == "xros" || "${{ inputs.platform }}" == "xros-simulator" ]]; then
sudo xcodebuild -downloadPlatform visionOS
elif [[ "${{ inputs.platform }}" == "tvos" || "${{ inputs.platform }}" == "tvos-simulator" ]]; then
sudo xcodebuild -downloadPlatform tvOS
else
sudo xcodebuild -downloadPlatform iOS
fi
sudo xcodebuild -runFirstLaunch
+8 -31
View File
@@ -10,36 +10,27 @@ inputs:
flavor:
description: The flavor of the build. Must be one of "Debug", "Release".
default: Debug
hermes-version:
description: The version of hermes
required: true
react-native-version:
description: The version of react-native
required: true
runs:
using: composite
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
platform: ios
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Create Hermes folder
shell: bash
run: mkdir -p "$HERMES_WS_DIR"
- name: Download Hermes
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-${{ inputs.flavor }}
path: /tmp/hermes/hermes-runtime-darwin/
- name: Print Downloaded hermes
shell: bash
run: ls -lR "$HERMES_WS_DIR"
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Set nightly Hermes versions
shell: bash
run: |
node ./scripts/releases/use-hermes-nightly.js
- name: Run yarn install again, with the correct hermes version
uses: ./.github/actions/yarn-install
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
@@ -66,20 +57,6 @@ runs:
args+=(--frameworks dynamic)
fi
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
# Let's ensure that the tarballs have the right names
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
fi
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
fi
BUILD_TYPE="${{ inputs.flavor }}"
TARBALL_FILENAME=$(node ../../packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
+9 -61
View File
@@ -10,18 +10,9 @@ inputs:
run-unit-tests:
description: whether unit tests should run or not.
default: "false"
hermes-tarball-artifacts-dir:
description: The directory where the hermes tarball artifacts are stored
default: /tmp/hermes/hermes-runtime-darwin
flavor:
description: The flavor of the build. Must be one of "Debug", "Release".
default: Debug
hermes-version:
description: The version of hermes
required: true
react-native-version:
description: The version of react-native
required: true
run-e2e-tests:
description: Whether we want to run E2E tests or not
required: false
@@ -32,60 +23,25 @@ runs:
steps:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
platform: ios
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn
uses: ./.github/actions/yarn-install
- name: Download Hermes
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-${{ inputs.flavor }}
path: ${{ inputs.hermes-tarball-artifacts-dir }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
- name: Set nightly Hermes versions
shell: bash
run: |
node ./scripts/releases/use-hermes-nightly.js
- name: Run yarn install again, with the correct hermes version
uses: ./.github/actions/yarn-install
- name: Prepare IOS Tests
if: ${{ inputs.run-unit-tests == 'true' }}
uses: ./.github/actions/prepare-ios-tests
- name: Set HERMES_ENGINE_TARBALL_PATH envvar if Hermes tarball is present
shell: bash
run: |
HERMES_TARBALL_ARTIFACTS_DIR=${{ inputs.hermes-tarball-artifacts-dir }}
if [ ! -d $HERMES_TARBALL_ARTIFACTS_DIR ]; then
echo "Hermes tarball artifacts dir not present ($HERMES_TARBALL_ARTIFACTS_DIR). Build Hermes from source."
exit 0
fi
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ inputs.flavor }}")
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
echo "$TARBALL_PATH"
if [ ! -f $TARBALL_PATH ]; then
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
exit 0
fi
echo "Found Hermes tarball at $TARBALL_PATH"
echo "HERMES_ENGINE_TARBALL_PATH=$TARBALL_PATH" >> $GITHUB_ENV
- name: Print Hermes version
shell: bash
run: |
HERMES_TARBALL_ARTIFACTS_DIR=${{ inputs.hermes-tarball-artifacts-dir }}
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ inputs.flavor }}")
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
if [[ -e $TARBALL_PATH ]]; then
tar -xf $TARBALL_PATH
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
chmod +x ./destroot/bin/hermes
./destroot/bin/hermes test.js
rm test.js
rm -rf destroot
else
echo 'No Hermes tarball found.'
fi
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
@@ -102,17 +58,9 @@ runs:
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Setup xcode build cache
uses: ./.github/actions/setup-xcode-build-cache
with:
hermes-version: ${{ inputs.hermes-version }}
use-frameworks: ${{ inputs.use-frameworks }}
flavor: ${{ inputs.flavor }}
ruby-version: ${{ inputs.ruby-version }}
- name: Install CocoaPods dependencies
shell: bash
run: |
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
@@ -123,7 +71,7 @@ runs:
cd packages/rn-tester
bundle install
bundle exec pod install
bundle exec pod update hermes-engine --no-repo-update
- name: Build RNTester
shell: bash
run: |
@@ -1,52 +0,0 @@
name: test-library-on-nightly
description: Tests a library on a nightly
inputs:
library-npm-package:
description: The library npm package to add
required: true
platform:
description: whether we want to build for iOS or Android
required: true
runs:
using: composite
steps:
- name: Create new app
shell: bash
run: |
cd /tmp
npx @react-native-community/cli init RNApp --skip-install --version nightly
- name: Add library
shell: bash
run: |
cd /tmp/RNApp
yarn add ${{ inputs.library-npm-package }}
# iOS
- name: Setup xcode
if: ${{ inputs.platform == 'ios' }}
uses: ./.github/actions/setup-xcode
- name: Build iOS
shell: bash
if: ${{ inputs.platform == 'ios' }}
run: |
cd /tmp/RNApp/ios
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
xcodebuild build \
-workspace RNApp.xcworkspace \
-scheme RNApp \
-sdk iphonesimulator
# Android
- name: Setup Java for Android
if: ${{ inputs.platform == 'android' }}
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
- name: Build Android
shell: bash
if: ${{ inputs.platform == 'android' }}
run: |
cd /tmp/RNApp/android
./gradlew assembleDebug
@@ -121,7 +121,7 @@ describe('Create Draft Release', () => {
});
describe('#_computeBody', () => {
it('computes body for release', async () => {
it('computes body for release when no hermes versions are passed', async () => {
const version = '0.77.1';
const changelog = `## v${version}
### Breaking Changes
@@ -134,20 +134,83 @@ describe('Create Draft Release', () => {
#### iOS
- [PR #3436](https://github.com/facebook/react-native/pull/3436) - Some other change
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change`;
const body = _computeBody(version, changelog);
const body = _computeBody(changelog, version);
expect(body).toEqual(`${changelog}
---
Hermes dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-release.tar.gz)
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${version}/hermes-ios-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${version}/hermes-ios-${version}-hermes-framework-dSYM-release.tar.gz)
Hermes V1 dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${version}/hermes-ios-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${version}/hermes-ios-${version}-hermes-framework-dSYM-release.tar.gz)
ReactNativeDependencies dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-release.tar.gz)
ReactNative Core dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-release.tar.gz)
---
You can file issues or pick requests against this release [here](https://github.com/reactwg/react-native-releases/issues/new/choose).
---
To help you upgrade to this version, you can use the [Upgrade Helper](https://react-native-community.github.io/upgrade-helper/) ⚛️.
---
View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/react-native/blob/main/CHANGELOG.md).`);
});
it('computes body for release when hermes versions are passed', async () => {
const version = '0.77.1';
const hermesVersion = '0.15.0';
const hermesV1Version = '250829098.0.2';
const changelog = `## v${version}
### Breaking Changes
- [PR #9012](https://github.com/facebook/react-native/pull/9012) - Some other change
#### Android
- [PR #3456](https://github.com/facebook/react-native/pull/3456) - Some other change
- [PR #3457](https://github.com/facebook/react-native/pull/3457) - Some other change
#### iOS
- [PR #3436](https://github.com/facebook/react-native/pull/3436) - Some other change
- [PR #3437](https://github.com/facebook/react-native/pull/3437) - Some other change`;
const body = _computeBody(
changelog,
version,
hermesVersion,
hermesV1Version,
);
expect(body).toEqual(`${changelog}
---
Hermes dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesVersion}/hermes-ios-${hermesVersion}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesVersion}/hermes-ios-${hermesVersion}-hermes-framework-dSYM-release.tar.gz)
Hermes V1 dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesV1Version}/hermes-ios-${hermesV1Version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesV1Version}/hermes-ios-${hermesV1Version}-hermes-framework-dSYM-release.tar.gz)
ReactNativeDependencies dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-release.tar.gz)
ReactNative Core dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-release.tar.gz)
---
You can file issues or pick requests against this release [here](https://github.com/reactwg/react-native-releases/issues/new/choose).
@@ -188,6 +251,7 @@ View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/
status: 201,
json: () =>
Promise.resolve({
id: 1,
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
}),
@@ -208,9 +272,11 @@ View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/
body: fetchBody,
},
);
expect(response).toEqual(
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
);
expect(response).toEqual({
id: 1,
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
});
});
it('creates a draft release for prerelease on GitHub', async () => {
@@ -238,6 +304,7 @@ View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/
status: 201,
json: () =>
Promise.resolve({
id: 1,
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
}),
@@ -258,9 +325,11 @@ View the whole changelog in the [CHANGELOG.md file](https://github.com/facebook/
body: fetchBody,
},
);
expect(response).toEqual(
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
);
expect(response).toEqual({
id: 1,
html_url:
'https://github.com/facebook/react-native/releases/tag/v0.77.1',
});
});
it('throws if the post failes', async () => {
@@ -1,897 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
} = require('../firebaseUtils');
describe('FirebaseClient', () => {
const originalFetch = global.fetch;
const originalEnv = process.env;
beforeEach(() => {
global.fetch = jest.fn();
process.env = {
...originalEnv,
FIREBASE_APP_EMAIL: 'test@example.com',
FIREBASE_APP_PASS: 'testpassword',
FIREBASE_APP_APIKEY: 'test-api-key',
FIREBASE_APP_PROJECTNAME: 'test-project',
};
jest.spyOn(console, 'log').mockImplementation(() => {});
jest.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
global.fetch = originalFetch;
process.env = originalEnv;
jest.restoreAllMocks();
});
describe('constructor', () => {
it('should initialize with environment variables', () => {
const client = new FirebaseClient();
expect(client.email).toBe('test@example.com');
expect(client.password).toBe('testpassword');
expect(client.apiKey).toBe('test-api-key');
expect(client.projectId).toBe('test-project');
expect(client.databaseUrl).toBe(
'test-project-default-rtdb.firebaseio.com',
);
expect(client.idToken).toBeNull();
});
});
describe('authenticate', () => {
it('should authenticate successfully', async () => {
const mockResponse = {
idToken: 'mock-id-token',
refreshToken: 'mock-refresh-token',
};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResponse)),
});
const client = new FirebaseClient();
await client.authenticate();
expect(client.idToken).toBe('mock-id-token');
expect(global.fetch).toHaveBeenCalledWith(
'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=test-api-key',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'test@example.com',
password: 'testpassword',
returnSecureToken: true,
}),
},
);
});
it('should throw error when email is missing', async () => {
delete process.env.FIREBASE_APP_EMAIL;
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'Firebase credentials not found in environment variables',
);
});
it('should throw error when password is missing', async () => {
delete process.env.FIREBASE_APP_PASS;
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'Firebase credentials not found in environment variables',
);
});
it('should handle authentication failure', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 400,
text: jest.fn().mockResolvedValueOnce(
JSON.stringify({
error: {message: 'Invalid credentials'},
}),
),
});
const client = new FirebaseClient();
await expect(client.authenticate()).rejects.toThrow(
'HTTP 400: Invalid credentials',
);
});
});
describe('makeRequest', () => {
it('should make successful GET request', async () => {
const mockData = {test: 'data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
const result = await client.makeRequest('example.com', '/test', 'GET');
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith('https://example.com/test', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
});
it('should make successful POST request with data', async () => {
const mockData = {success: true};
const postData = {test: 'post data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
const result = await client.makeRequest(
'example.com',
'/test',
'POST',
postData,
);
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith('https://example.com/test', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(postData),
});
});
it('should handle non-JSON response', async () => {
const textResponse = 'plain text response';
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(textResponse),
});
const client = new FirebaseClient();
const result = await client.makeRequest('example.com', '/test', 'GET');
expect(result).toBe(textResponse);
});
it('should handle HTTP error with JSON error message', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce(
JSON.stringify({
error: {message: 'Not found'},
}),
),
});
const client = new FirebaseClient();
await expect(
client.makeRequest('example.com', '/test', 'GET'),
).rejects.toThrow('HTTP 404: Not found');
});
it('should handle HTTP error with plain text error message', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
});
const client = new FirebaseClient();
await expect(
client.makeRequest('example.com', '/test', 'GET'),
).rejects.toThrow('HTTP 500: Internal Server Error');
});
});
describe('makeDatabaseRequest', () => {
it('should make database request with existing token', async () => {
const mockData = {test: 'data'};
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockData)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.makeDatabaseRequest('2023-12-01', 'GET');
expect(result).toEqual(mockData);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
},
);
});
it('should authenticate before making request if no token exists', async () => {
const authResponse = {idToken: 'new-token'};
const dataResponse = {test: 'data'};
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(authResponse)),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(dataResponse)),
});
const client = new FirebaseClient();
const result = await client.makeDatabaseRequest('2023-12-01', 'GET');
expect(result).toEqual(dataResponse);
expect(global.fetch).toHaveBeenCalledTimes(2);
expect(client.idToken).toBe('new-token');
});
it('should make PUT request with data', async () => {
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const testData = [{library: 'test', status: 'success'}];
await client.makeDatabaseRequest('2023-12-01', 'PUT', testData);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(testData),
},
);
});
});
describe('storeResults', () => {
it('should store results successfully', async () => {
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = [{library: 'test', status: 'success'}];
await client.storeResults('2023-12-01', results);
expect(global.fetch).toHaveBeenCalledWith(
'https://test-project-default-rtdb.firebaseio.com/nightly-results/2023-12-01.json?auth=existing-token',
{
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(results),
},
);
expect(console.log).toHaveBeenCalledWith(
'Successfully stored results for 2023-12-01',
);
});
});
describe('getResults', () => {
it('should retrieve results successfully', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = await client.getResults('2023-12-01');
expect(results).toEqual(mockResults);
});
it('should return null for 404 errors', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const results = await client.getResults('2023-12-01');
expect(results).toBeNull();
});
it('should throw error for non-404 HTTP errors', async () => {
global.fetch.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
await expect(client.getResults('2023-12-01')).rejects.toThrow(
'HTTP 500: Internal Server Error',
);
});
});
describe('getLatestResults', () => {
it('should authenticate before making requests if no token exists', async () => {
const authResponse = {idToken: 'new-token'};
const mockResults = [{library: 'test', status: 'success'}];
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(authResponse)),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
const result = await client.getLatestResults('2023-12-15', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-12-14',
});
expect(client.idToken).toBe('new-token');
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-14 (1 days back)',
);
});
it('should find results from the previous day', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-14',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-14 (1 days back)',
);
});
it('should find results from several days back', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock 404 responses for first 2 days, then success on 3rd day
global.fetch
.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
})
.mockResolvedValueOnce({
ok: false,
status: 404,
text: jest.fn().mockResolvedValueOnce('Not Found'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-12',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-13 (2 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-12 (3 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-12 (3 days back)',
);
});
it('should skip empty results and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock empty array for first day, then valid results on second day
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify([])),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-14 (1 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-13 (2 days back)...',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-13 (2 days back)',
);
});
it('should return null when no results found within maxDaysBack', async () => {
// Mock 404 responses for all days
global.fetch.mockResolvedValue({
ok: false,
status: 404,
text: jest.fn().mockResolvedValue('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 3);
expect(result).toEqual({
results: null,
date: null,
});
expect(console.log).toHaveBeenCalledWith(
'No previous results found within the last 3 days',
);
expect(global.fetch).toHaveBeenCalledTimes(3);
});
it('should use default maxDaysBack of 7 when not specified', async () => {
// Mock 404 responses for all days
global.fetch.mockResolvedValue({
ok: false,
status: 404,
text: jest.fn().mockResolvedValue('Not Found'),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15');
expect(result).toEqual({
results: null,
date: null,
});
expect(console.log).toHaveBeenCalledWith(
'No previous results found within the last 7 days',
);
expect(global.fetch).toHaveBeenCalledTimes(7);
});
it('should handle non-404 errors and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock 500 error for first day, then success on second day
global.fetch
.mockResolvedValueOnce({
ok: false,
status: 500,
text: jest.fn().mockResolvedValueOnce('Internal Server Error'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
expect(console.log).toHaveBeenCalledWith(
'No results found for 2023-12-14: HTTP 500: Internal Server Error',
);
expect(console.log).toHaveBeenCalledWith(
'Found results from 2023-12-13 (2 days back)',
);
});
it('should handle date boundaries correctly', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
// Test month boundary
const result = await client.getLatestResults('2023-12-01', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-11-30',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-11-30 (1 days back)...',
);
});
it('should handle year boundary correctly', async () => {
const mockResults = [{library: 'test', status: 'success'}];
global.fetch.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
// Test year boundary
const result = await client.getLatestResults('2024-01-01', 1);
expect(result).toEqual({
results: mockResults,
date: '2023-12-31',
});
expect(console.log).toHaveBeenCalledWith(
'Checking for results on 2023-12-31 (1 days back)...',
);
});
it('should handle null results and continue searching', async () => {
const mockResults = [{library: 'test', status: 'success'}];
// Mock null for first day, then valid results on second day
global.fetch
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce('null'),
})
.mockResolvedValueOnce({
ok: true,
text: jest.fn().mockResolvedValueOnce(JSON.stringify(mockResults)),
});
const client = new FirebaseClient();
client.idToken = 'existing-token';
const result = await client.getLatestResults('2023-12-15', 7);
expect(result).toEqual({
results: mockResults,
date: '2023-12-13',
});
});
});
});
describe('compareResults', () => {
it('should handle null previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, null);
expect(result).toEqual({
broken: [],
recovered: [],
newFailures: [{library: 'lib1', platform: 'iOS', status: 'failed'}],
});
});
it('should handle undefined previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
];
const result = compareResults(currentResults, undefined);
expect(result).toEqual({
broken: [],
recovered: [],
newFailures: [{library: 'lib1', platform: 'iOS', status: 'failed'}],
});
});
it('should identify broken tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([]);
});
it('should identify recovered tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'failed',
currentStatus: 'success',
},
]);
});
it('should identify both broken and recovered tests', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
{library: 'lib3', platform: 'iOS', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'failed'},
{library: 'lib3', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([
{
library: 'lib2',
platform: 'Android',
previousStatus: 'failed',
currentStatus: 'success',
},
]);
});
it('should handle tests that are not in previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'failed',
},
]);
expect(result.recovered).toEqual([]);
});
it('should handle empty current results', () => {
const currentResults = [];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([]);
});
it('should handle empty previous results', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'failed'},
];
const previousResults = [];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([]);
expect(result.recovered).toEqual([]);
// When previousResults is an empty array (not null/undefined),
// the function doesn't return newFailures property
expect(result.newFailures).toBeUndefined();
});
it('should handle different status values', () => {
const currentResults = [
{library: 'lib1', platform: 'iOS', status: 'timeout'},
{library: 'lib2', platform: 'Android', status: 'success'},
];
const previousResults = [
{library: 'lib1', platform: 'iOS', status: 'success'},
{library: 'lib2', platform: 'Android', status: 'error'},
];
const result = compareResults(currentResults, previousResults);
expect(result.broken).toEqual([
{
library: 'lib1',
platform: 'iOS',
previousStatus: 'success',
currentStatus: 'timeout',
},
]);
expect(result.recovered).toEqual([
{
library: 'lib2',
platform: 'Android',
previousStatus: 'error',
currentStatus: 'success',
},
]);
});
});
describe('getYesterdayDate', () => {
it("should return yesterday's date in YYYY-MM-DD format", () => {
const mockDate = new Date('2023-12-15T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-12-14');
global.Date.mockRestore();
});
it('should handle month boundary correctly', () => {
const mockDate = new Date('2023-12-01T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-11-30');
global.Date.mockRestore();
});
it('should handle year boundary correctly', () => {
const mockDate = new Date('2024-01-01T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getYesterdayDate();
expect(result).toBe('2023-12-31');
global.Date.mockRestore();
});
});
describe('getTodayDate', () => {
it("should return today's date in YYYY-MM-DD format", () => {
const mockDate = new Date('2023-12-15T10:30:00Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getTodayDate();
expect(result).toBe('2023-12-15');
global.Date.mockRestore();
});
it('should handle different times of day correctly', () => {
const mockDate = new Date('2023-12-15T23:59:59Z');
jest.spyOn(global, 'Date').mockImplementation(() => mockDate);
const result = getTodayDate();
expect(result).toBe('2023-12-15');
global.Date.mockRestore();
});
});
@@ -1,189 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const {
prepareFailurePayload,
sendMessageToDiscord,
} = require('../notifyDiscord');
describe('prepareFailurePayload', () => {
it('should handle undefined failures', () => {
const message = prepareFailurePayload(undefined);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should handle empty failures array', () => {
const message = prepareFailurePayload([]);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should format a single failure correctly', () => {
const failures = [
{
library: 'react-native-reanimated',
platform: 'iOS',
},
];
const message = prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] react-native-reanimated',
});
});
it('should sort multiple failures by platform and library name', () => {
const failures = [
{
library: 'react-native-reanimated',
platform: 'iOS',
},
{
library: 'react-native-gesture-handler',
platform: 'Android',
},
{
library: 'react-native-screens',
platform: 'iOS',
},
{
library: 'react-native-svg',
platform: 'Android',
},
];
const message = prepareFailurePayload(failures);
// The failures should be sorted: first Android (alphabetically), then iOS
// Within each platform, libraries should be sorted alphabetically
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [Android] react-native-gesture-handler\n❌ [Android] react-native-svg\n❌ [iOS] react-native-reanimated\n❌ [iOS] react-native-screens',
});
});
it('should handle failures with missing properties', () => {
const failures = [
{
// Missing library
platform: 'iOS',
},
{
library: 'react-native-gesture-handler',
// Missing platform
},
{
// Both missing
},
];
const message = prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] Unknown\n❌ [Unknown] react-native-gesture-handler\n❌ [Unknown] Unknown',
});
});
});
describe('sendMessageToDiscord', () => {
// Store the original fetch function
const originalFetch = global.fetch;
// Setup and teardown for each test
beforeEach(() => {
// Mock the global fetch function
global.fetch = jest.fn();
// Silence console logs during tests
jest.spyOn(console, 'log').mockImplementation(() => {});
jest.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
// Restore the original fetch function
global.fetch = originalFetch;
// Restore console functions
jest.restoreAllMocks();
});
it('should throw an error if webhook URL is missing', async () => {
await expect(sendMessageToDiscord(null, {})).rejects.toThrow(
'Discord webhook URL is missing',
);
});
it('should send a message successfully', async () => {
// Mock a successful response
global.fetch.mockResolvedValueOnce({
ok: true,
status: 200,
});
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).resolves.not.toThrow();
// Verify fetch was called with the right arguments
expect(global.fetch).toHaveBeenCalledWith(webhook, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(message),
});
// Verify console.log was called
expect(console.log).toHaveBeenCalledWith(
'Successfully sent message to Discord',
);
});
it('should throw an error if the response is not ok', async () => {
// Mock a failed response
global.fetch.mockResolvedValueOnce({
ok: false,
status: 400,
text: jest.fn().mockResolvedValueOnce('Bad Request'),
});
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).rejects.toThrow(
'HTTP status code: 400',
);
// Verify console.error was called
expect(console.error).toHaveBeenCalledWith(
'Failed to send message to Discord: 400 Bad Request',
);
});
it('should throw an error if fetch fails', async () => {
// Mock a network error
const networkError = new Error('Network error');
global.fetch.mockRejectedValueOnce(networkError);
const webhook = 'https://discord.com/api/webhooks/123/abc';
const message = {content: 'Test message'};
await expect(sendMessageToDiscord(webhook, message)).rejects.toThrow(
'Network error',
);
});
});
@@ -1,174 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
const fs = require('fs');
const path = require('path');
const {
prepareFailurePayload,
prepareComparisonPayload,
sendMessageToDiscord,
} = require('./notifyDiscord');
const {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
} = require('./firebaseUtils');
function readOutcomes() {
const baseDir = '/tmp';
let outcomes = [];
fs.readdirSync(baseDir).forEach(file => {
const fullPath = path.join(baseDir, file);
if (fullPath.endsWith('outcome') && fs.statSync(fullPath).isDirectory) {
fs.readdirSync(fullPath).forEach(subFile => {
const subFullPath = path.join(fullPath, subFile);
if (subFullPath.endsWith('outcome')) {
const [library, status] = String(fs.readFileSync(subFullPath, 'utf8'))
.trim()
.split(':');
const platform = subFile.includes('android') ? 'Android' : 'iOS';
console.log(
`[${platform}] ${library} completed with status ${status}`,
);
outcomes.push({
library: library.trim(),
platform,
status: status.trim(),
});
}
});
} else if (fullPath.endsWith('outcome')) {
const [library, status] = String(fs.readFileSync(fullPath, 'utf8'))
.trim()
.split(':');
const platform = file.includes('android') ? 'Android' : 'iOS';
console.log(`[${platform}] ${library} completed with status ${status}`);
outcomes.push({
library: library.trim(),
platform,
status: status.trim(),
});
}
});
return outcomes;
}
function printFailures(outcomes) {
console.log('Printing failures...');
let failedLibraries = [];
outcomes.forEach(entry => {
if (entry.status !== 'success') {
console.log(
`❌ [${entry.platform}] ${entry.library} failed with status ${entry.status}`,
);
failedLibraries.push({
library: entry.library,
platform: entry.platform,
});
}
});
return failedLibraries;
}
/**
* Sends a message to Discord with the list of failures.
* @param {string} webHook - The Discord webhook URL
* @param {Array<Object>} failures - List of failures to report
* @returns {Promise<void>} - A promise that resolves when the message is sent
*/
async function notifyDiscord(webHook, failures) {
if (!webHook) {
console.error('Discord webhook URL is missing');
return;
}
if (!failures || failures.length === 0) {
console.log('No failures to report to Discord');
return;
}
try {
// Use the prepareFailurePayload function to format the message
const message = prepareFailurePayload(failures);
// Use the sendMessageToDiscord function to send the message
await sendMessageToDiscord(webHook, message);
} catch (error) {
console.error('Error in notifyDiscord function:', error);
throw error;
}
}
async function collectResults(discordWebHook) {
const outcomes = readOutcomes();
const failures = printFailures(outcomes);
// Send failure notification if there are current failures
if (failures.length > 0) {
if (discordWebHook) {
console.log('Sending current failures to Discord...');
await notifyDiscord(discordWebHook, failures);
} else {
console.log('Discord webhook not set');
}
}
// Initialize Firebase client
const firebaseClient = new FirebaseClient();
const today = getTodayDate();
try {
// Store today's results in Firebase
console.log(`Storing results for ${today} in Firebase...`);
await firebaseClient.storeResults(today, outcomes);
// Get the most recent previous results for comparison
console.log(`Looking for most recent previous results before ${today}...`);
const {results: previousResults, date: previousDate} =
await firebaseClient.getLatestResults(today);
let broken = [];
let recovered = [];
if (previousResults) {
console.log(`Comparing with results from ${previousDate}`);
// Compare results and identify broken/recovered jobs
const comparison = compareResults(outcomes, previousResults);
broken = comparison.broken;
recovered = comparison.recovered;
console.log(
`Found ${broken.length} newly broken jobs and ${recovered.length} recovered jobs compared to ${previousDate}`,
);
} else {
console.log(
'No previous results found for comparison - this might be the first run or no recent data available',
);
}
// Send comparison message to Discord if there are changes
if (discordWebHook && (broken.length > 0 || recovered.length > 0)) {
console.log('Sending comparison results to Discord...');
const comparisonMessage = prepareComparisonPayload(broken, recovered);
await sendMessageToDiscord(discordWebHook, comparisonMessage);
}
console.log('✅ All tests passed!');
} catch (error) {
console.error('Error in collectResults:', error);
// If Firebase fails but there are no test failures, don't fail the workflow
console.log('⚠️ Firebase operations failed, but all tests passed');
}
}
module.exports = {
collectResults,
notifyDiscord,
};
+28 -7
View File
@@ -40,19 +40,29 @@ function _extractChangelog(version) {
return changelog.slice(changelogStarts, changelogEnds).join('\n').trim();
}
function _computeBody(version, changelog) {
function _computeBody(changelog, version, hermesVersion, hermesV1Version) {
hermesVersion = hermesVersion ?? version;
hermesV1Version = hermesV1Version ?? version;
return `${changelog}
---
Hermes dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-hermes-framework-dSYM-release.tar.gz)
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesVersion}/hermes-ios-${hermesVersion}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesVersion}/hermes-ios-${hermesVersion}-hermes-framework-dSYM-release.tar.gz)
Hermes V1 dSYMS:
- [Debug](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesV1Version}/hermes-ios-${hermesV1Version}-hermes-framework-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/${hermesV1Version}/hermes-ios-${hermesV1Version}-hermes-framework-dSYM-release.tar.gz)
ReactNativeDependencies dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-dependencies-dSYM-release.tar.gz)
ReactNative Core dSYMs:
- [Debug](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-debug.tar.gz)
- [Release](https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/${version}/react-native-artifacts-${version}-reactnative-core-release.tar.gz)
---
You can file issues or pick requests against this release [here](https://github.com/reactwg/react-native-releases/issues/new/choose).
@@ -101,7 +111,11 @@ async function _createDraftReleaseOnGitHub(version, body, latest, token) {
}
const data = await response.json();
return data.html_url;
const {html_url, id} = data;
return {
html_url,
id,
};
}
function moveToChangelogBranch(version) {
@@ -109,7 +123,13 @@ function moveToChangelogBranch(version) {
run(`git checkout -b changelog/v${version}`);
}
async function createDraftRelease(version, latest, token) {
async function createDraftRelease(
version,
latest,
token,
hermesVersion,
hermesV1Version,
) {
if (version.startsWith('v')) {
version = version.substring(1);
}
@@ -117,14 +137,15 @@ async function createDraftRelease(version, latest, token) {
_verifyTagExists(version);
moveToChangelogBranch(version);
const changelog = _extractChangelog(version);
const body = _computeBody(version, changelog);
const body = _computeBody(changelog, version, hermesVersion, hermesV1Version);
const release = await _createDraftReleaseOnGitHub(
version,
body,
latest,
token,
);
log(`Created draft release: ${release}`);
log(`Created draft release: ${release.html_url}, ID ${release.id}`);
return release;
}
module.exports = {
-261
View File
@@ -1,261 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
// We connect to firebase using a plain HTTP request because we don't want to
// add yet another devDependency to the react-native monorepo.
class FirebaseClient {
constructor() {
this.email = process.env.FIREBASE_APP_EMAIL;
this.password = process.env.FIREBASE_APP_PASS;
this.apiKey = process.env.FIREBASE_APP_APIKEY;
this.projectId = process.env.FIREBASE_APP_PROJECTNAME;
this.databaseUrl = `${this.projectId}-default-rtdb.firebaseio.com`;
this.idToken = null;
}
async authenticate() {
if (!this.email || !this.password) {
throw new Error(
'Firebase credentials not found in environment variables',
);
}
const authData = {
email: this.email,
password: this.password,
returnSecureToken: true,
};
const response = await this.makeRequest(
'identitytoolkit.googleapis.com',
`/v1/accounts:signInWithPassword?key=${this.apiKey}`,
'POST',
authData,
);
this.idToken = response.idToken;
return;
}
/**
* Make a database request for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @param {string} method - HTTP method
* @param {*} data - Data to send (optional)
* @returns {Promise<*>} - Response data
*/
async makeDatabaseRequest(date, method, data = null) {
if (!this.idToken) {
await this.authenticate();
}
const path = `/nightly-results/${date}.json?auth=${this.idToken}`;
return this.makeRequest(this.databaseUrl, path, method, data);
}
/**
* Store test results for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @param {Array<Object>} results - Array of test results
* @returns {Promise<void>}
*/
async storeResults(date, results) {
await this.makeDatabaseRequest(date, 'PUT', results);
console.log(`Successfully stored results for ${date}`);
}
/**
* Retrieve test results for a specific date
* @param {string} date - Date in YYYY-MM-DD format
* @returns {Promise<Array<Object>|null>} - Array of test results or null if not found
*/
async getResults(date) {
try {
return await this.makeDatabaseRequest(date, 'GET');
} catch (error) {
if (error.message.includes('404')) {
return null; // No results found for this specific date.
}
throw error;
}
}
/**
* Find the most recent available job results before the given date
* @param {string} currentDate - Current date in YYYY-MM-DD format
* @param {number} maxDaysBack - Maximum number of days to look back (default: 7)
* @returns {Promise<{results: Array<Object>|null, date: string|null}>} - Most recent results and their date
*/
async getLatestResults(currentDate, maxDaysBack = 7) {
if (!this.idToken) {
await this.authenticate();
}
const currentDateObj = new Date(currentDate);
for (let daysBack = 1; daysBack <= maxDaysBack; daysBack++) {
const checkDate = new Date(currentDateObj);
checkDate.setDate(checkDate.getDate() - daysBack);
const checkDateStr = checkDate.toISOString().split('T')[0];
console.log(
`Checking for results on ${checkDateStr} (${daysBack} days back)...`,
);
try {
const results = await this.getResults(checkDateStr);
if (results && results.length > 0) {
console.log(
`Found results from ${checkDateStr} (${daysBack} days back)`,
);
return {results, date: checkDateStr};
}
} catch (error) {
console.log(`No results found for ${checkDateStr}: ${error.message}`);
continue;
}
}
console.log(
`No previous results found within the last ${maxDaysBack} days`,
);
return {results: null, date: null};
}
async makeRequest(hostname, path, method, data = null) {
const url = `https://${hostname}${path}`;
const options = {
method,
headers: {
'Content-Type': 'application/json',
},
};
if (data) {
options.body = JSON.stringify(data);
}
const response = await fetch(url, options);
const responseText = await response.text();
if (!response.ok) {
let errorMessage;
try {
const parsedError = JSON.parse(responseText);
errorMessage = parsedError.error?.message || responseText;
} catch {
errorMessage = responseText;
}
throw new Error(`HTTP ${response.status}: ${errorMessage}`);
}
try {
return JSON.parse(responseText);
} catch {
return responseText;
}
}
}
/**
* Compare current results with previous day's results
* @param {Array<Object>} currentResults - Today's test results
* @param {Array<Object>} previousResults - Yesterday's test results
* @returns {Object} - Object containing broken and recovered tests
*/
function compareResults(currentResults, previousResults) {
if (!previousResults) {
return {
broken: [],
recovered: [],
newFailures: currentResults.filter(result => result.status !== 'success'),
};
}
// Create maps for easier lookup
const currentMap = new Map();
const previousMap = new Map();
currentResults.forEach(result => {
const key = `${result.library}-${result.platform}`;
currentMap.set(key, result);
});
previousResults.forEach(result => {
const key = `${result.library}-${result.platform}`;
previousMap.set(key, result);
});
const broken = [];
const recovered = [];
// Check for broken tests (was success, now failed)
for (const [key, currentResult] of currentMap) {
const previousResult = previousMap.get(key);
if (previousResult) {
if (
previousResult.status === 'success' &&
currentResult.status !== 'success'
) {
broken.push({
library: currentResult.library,
platform: currentResult.platform,
previousStatus: previousResult.status,
currentStatus: currentResult.status,
});
}
}
}
// Check for recovered tests (was failed, now success)
for (const [key, currentResult] of currentMap) {
const previousResult = previousMap.get(key);
if (previousResult) {
if (
previousResult.status !== 'success' &&
currentResult.status === 'success'
) {
recovered.push({
library: currentResult.library,
platform: currentResult.platform,
previousStatus: previousResult.status,
currentStatus: currentResult.status,
});
}
}
}
return {broken, recovered};
}
/**
* Get yesterday's date in YYYY-MM-DD format
* @returns {string} - Yesterday's date
*/
function getYesterdayDate() {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
return yesterday.toISOString().split('T')[0];
}
/**
* Get today's date in YYYY-MM-DD format
* @returns {string} - Today's date
*/
function getTodayDate() {
const today = new Date();
return today.toISOString().split('T')[0];
}
module.exports = {
FirebaseClient,
compareResults,
getYesterdayDate,
getTodayDate,
};
+3 -3
View File
@@ -87,11 +87,11 @@ async function launchAppOnSimulator(appId, udid, isDebug) {
function startVideoRecording(jsengine, currentAttempt) {
console.log(
`Start video record using pid: video_record_${jsengine}_${currentAttempt}.pid`,
`Start video record using pid: video_record_${currentAttempt}.pid`,
);
const recordingArgs =
`simctl io booted recordVideo video_record_${jsengine}_${currentAttempt}.mov`.split(
`simctl io booted recordVideo video_record_${currentAttempt}.mov`.split(
' ',
);
const recordingProcess = childProcess.spawn('xcrun', recordingArgs, {
@@ -162,7 +162,7 @@ async function main() {
console.info(`WORKING_DIRECTORY: ${WORKING_DIRECTORY}`);
console.info('==============================\n');
const simulatorName = 'iPhone 15 Pro';
const simulatorName = 'iPhone 16 Pro';
launchSimulator(simulatorName);
installAppOnSimulator(APP_PATH);
const udid = extractSimulatorUDID();
-136
View File
@@ -1,136 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/**
* Sends a message to Discord using the webhook URL.
* @param {string} webHook - The Discord webhook URL
* @param {Object} message - The message to send
* @returns {Promise<void>} - A promise that resolves when the message is sent
*/
async function sendMessageToDiscord(webHook, message) {
if (!webHook) {
throw new Error('Discord webhook URL is missing');
}
// Send the request using fetch
const response = await fetch(webHook, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(message),
});
// Handle the response
if (response.ok) {
console.log('Successfully sent message to Discord');
return;
} else {
const errorText = await response.text();
console.error(
`Failed to send message to Discord: ${response.status} ${errorText}`,
);
throw new Error(`HTTP status code: ${response.status}`);
}
}
/**
* Sorts jobs by platform first, then by library name.
* @param {Array<Object>} jobs - Array of jobs with platform and library properties
* @returns {Array<Object>} - Sorted array of jobs
*/
function sortResultsByPlatformAndLibrary(jobs) {
return [...jobs].sort((a, b) => {
// First sort by platform
const platformA = a.platform || 'Unknown';
const platformB = b.platform || 'Unknown';
if (platformA !== platformB) {
return platformA.localeCompare(platformB);
}
// Then sort by library name
const libraryA = a.library || 'Unknown';
const libraryB = b.library || 'Unknown';
return libraryA.localeCompare(libraryB);
});
}
/**
* Prepares a formatted Discord message payload from a list of failures.
* @param {Array<Object>} failures - List of failures to format
* @returns {Object} - The formatted Discord message payload
*/
function prepareFailurePayload(failures) {
if (!failures || failures.length === 0) {
return {
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
};
}
// Sort failures by platform and then by library name
const sortedFailures = sortResultsByPlatformAndLibrary(failures);
// Format the failures into a message
const formattedFailures = sortedFailures
.map(failure => {
const library = failure.library || 'Unknown';
const platform = failure.platform || 'Unknown';
return `❌ [${platform}] ${library}`;
})
.join('\n');
return {
content: `⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n${formattedFailures}`,
};
}
/**
* Prepares a formatted Discord message payload for broken and recovered nightly jobs.
* @param {Array<Object>} broken - List of newly broken jobs
* @param {Array<Object>} recovered - List of recovered jobs
* @returns {Object} - The formatted Discord message payload
*/
function prepareComparisonPayload(broken, recovered) {
let content = '📊 **React Native Nightly Integration Status Update** 📊\n\n';
if (broken.length === 0 && recovered.length === 0) {
content +=
'No changes from yesterday - all nightly jobs maintained their previous status.';
} else {
if (broken.length > 0) {
content += '🔴 **Newly Broken Jobs:**\n';
const sortedBroken = sortResultsByPlatformAndLibrary(broken);
sortedBroken.forEach(job => {
content += `❌ [${job.platform}] ${job.library} (was ${job.previousStatus}, now ${job.currentStatus})\n`;
});
content += '\n';
}
if (recovered.length > 0) {
content += '🟢 **Recovered Jobs:**\n';
const sortedRecovered = sortResultsByPlatformAndLibrary(recovered);
sortedRecovered.forEach(job => {
content += `✅ [${job.platform}] ${job.library} (was ${job.previousStatus}, now ${job.currentStatus})\n`;
});
}
}
return {content};
}
// Export the functions using CommonJS syntax
module.exports = {
prepareFailurePayload,
prepareComparisonPayload,
sendMessageToDiscord,
};
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.2.0'
platform: 'ios'
- name: Extract branch name
run: |
TAG="${{ github.ref_name }}";
-38
View File
@@ -1,38 +0,0 @@
# This jobs runs every day 2 hours after the nightly job and its purpose is to report
# a failure in case the nightly failed to be published. We are going to hook this to an internal automation.
name: Check Nightlies
on:
workflow_dispatch:
# nightly build @ 4:15 AM UTC
schedule:
- cron: '15 4 * * *'
jobs:
check-nightly:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check nightly
run: |
TODAY=$(date "+%Y%m%d")
echo "Checking nightly for $TODAY"
NIGHTLY="$(npm view react-native | grep $TODAY)"
if [[ -z $NIGHTLY ]]; then
echo 'Nightly job failed.'
exit 1
else
echo 'Nightly Worked, All Good!'
fi
test-libraries:
uses: ./.github/workflows/test-libraries-on-nightlies.yml
needs: check-nightly
secrets:
discord_webhook_url: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }}
firebase_app_email: ${{ secrets.FIREBASE_APP_EMAIL }}
firebase_app_pass: ${{ secrets.FIREBASE_APP_PASS }}
firebase_app_projectname: ${{ secrets.FIREBASE_APP_PROJECTNAME }}
firebase_app_apikey: ${{ secrets.FIREBASE_APP_APIKEY }}
+25 -1
View File
@@ -2,6 +2,15 @@ name: Create Draft Release
on:
workflow_call:
inputs:
hermesVersion:
required: false
type: string
description: The version of Hermes to use for this release (eg. 0.15.0). If not specified, it will use React Native Version
hermesV1Version:
required: false
type: string
description: The version of Hermes V1 to use for this release (eg. 250829098.0.2). If not specified, it will use React Native Version
jobs:
create-draft-release:
@@ -21,9 +30,24 @@ jobs:
git config --local user.name "React Native Bot"
- name: Create draft release
uses: actions/github-script@v6
id: create-draft-release
with:
script: |
const {createDraftRelease} = require('./.github/workflow-scripts/createDraftRelease.js');
const version = '${{ github.ref_name }}';
const {isLatest} = require('./.github/workflow-scripts/publishTemplate.js');
await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}');
return (await createDraftRelease(version, isLatest(), '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}', ${{ inputs.hermesVersion }}, ${{ inputs.hermesV1Version }})).id;
result-encoding: string
- name: Upload release assets for DotSlash
uses: actions/github-script@v6
env:
RELEASE_ID: ${{ steps.create-draft-release.outputs.result }}
with:
script: |
const {uploadReleaseAssetsForDotSlashFiles} = require('./scripts/releases/upload-release-assets-for-dotslash.js');
const version = '${{ github.ref_name }}';
await uploadReleaseAssetsForDotSlashFiles({
version,
token: '${{secrets.REACT_NATIVE_BOT_GITHUB_TOKEN}}',
releaseId: process.env.RELEASE_ID,
});
+1
View File
@@ -19,6 +19,7 @@ on:
jobs:
create_release:
if: github.repository == 'facebook/react-native'
runs-on: ubuntu-latest
steps:
- name: Checkout
+5 -120
View File
@@ -21,130 +21,21 @@ jobs:
echo "Setting release type to nightly"
echo "RELEASE_TYPE=nightly" >> $GITHUB_OUTPUT
prepare_hermes_workspace:
runs-on: ubuntu-latest
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
outputs:
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
build_hermesc_apple:
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Apple
uses: ./.github/actions/build-hermesc-apple
with:
hermes-version: ${{ needs.prepare_hermes_workspace.output.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.output.react-native-version }}
build_apple_slices_hermes:
runs-on: macos-14
needs: [build_hermesc_apple, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "15.1"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
slice: [macosx, iphoneos, iphonesimulator, appletvos, appletvsimulator, catalyst, xros, xrsimulator]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Slice
uses: ./.github/actions/build-apple-slices-hermes
with:
flavor: ${{ matrix.flavor }}
slice: ${{ matrix.slice}}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Hermes MacOS
uses: ./.github/actions/build-hermes-macos
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
if: github.repository == 'facebook/react-native'
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
with:
use-hermes-nightly: true
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Linux
uses: ./.github/actions/build-hermesc-linux
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Windows
uses: ./.github/actions/build-hermesc-windows
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
needs: [prebuild_apple_dependencies]
build_android:
runs-on: 8-core-ubuntu
if: github.repository == 'facebook/react-native'
needs: [set_release_type]
container:
image: reactnativecommunity/react-native-android:latest
@@ -169,10 +60,6 @@ jobs:
needs:
[
set_release_type,
prepare_hermes_workspace,
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
prebuild_react_native_core,
@@ -185,7 +72,6 @@ jobs:
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
env:
HERMES_WS_DIR: /tmp/hermes
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
@@ -197,7 +83,6 @@ jobs:
- name: Build and Publish NPM Package
uses: ./.github/actions/build-npm-package
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
+16 -30
View File
@@ -2,11 +2,16 @@ name: Prebuild iOS Dependencies
on:
workflow_call: # this directive allow us to call this workflow from other workflows
inputs:
use-hermes-nightly:
description: 'Whether to use the hermes nightly build or read the version from the versions.properties file'
type: boolean
required: false
default: false
jobs:
build-rn-slice:
runs-on: macos-14
runs-on: macos-15
strategy:
fail-fast: false
matrix:
@@ -32,39 +37,20 @@ jobs:
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.2.0'
platform: ${{ matrix.slice }}
- name: Yarn Install
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
- name: Download Hermes
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-${{ matrix.flavor }}
path: /tmp/hermes/hermes-runtime-darwin
- name: Extract Hermes
if: steps.restore-ios-slice.outputs.cache-hit != 'true'
- name: Set Hermes version
shell: bash
run: |
HERMES_TARBALL_ARTIFACTS_DIR=/tmp/hermes/hermes-runtime-darwin
if [ ! -d $HERMES_TARBALL_ARTIFACTS_DIR ]; then
echo "Hermes tarball artifacts dir not present ($HERMES_TARBALL_ARTIFACTS_DIR)."
exit 0
if [ "${{ inputs.use-hermes-nightly }}" == "true" ]; then
HERMES_VERSION="nightly"
else
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
fi
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ matrix.flavor }}")
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
echo "$TARBALL_PATH"
if [ ! -f $TARBALL_PATH ]; then
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
exit 0
fi
echo "Found Hermes tarball at $TARBALL_PATH"
echo "HERMES_ENGINE_TARBALL_PATH=$TARBALL_PATH" >> $GITHUB_ENV
echo "Using Hermes version: $HERMES_VERSION"
echo "HERMES_VERSION=$HERMES_VERSION" >> $GITHUB_ENV
- name: Download ReactNativeDependencies
uses: actions/download-artifact@v4
with:
@@ -123,7 +109,7 @@ jobs:
packages/react-native/.build/headers
compose-xcframework:
runs-on: macos-14
runs-on: macos-15
needs: [build-rn-slice]
strategy:
fail-fast: false
+18 -23
View File
@@ -7,7 +7,7 @@ on:
jobs:
prepare_workspace:
name: Prepare workspace
runs-on: macos-14
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -18,7 +18,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
- name: Yarn Install
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
@@ -40,13 +40,13 @@ jobs:
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
path: packages/react-native/third-party/
build-apple-slices:
name: Build Apple Slice
runs-on: macos-14
runs-on: macos-15
needs: [prepare_workspace]
strategy:
fail-fast: false
@@ -65,16 +65,17 @@ jobs:
uses: actions/checkout@v4
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
xcode-version: '16.1'
- name: Restore slice folder
id: restore-slice-folder
uses: actions/cache/restore@v4
with:
path: packages/react-native/third-party/.build/Build/Products
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
- name: Setup xcode
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
uses: ./.github/actions/setup-xcode
with:
platform: ${{ matrix.slice }}
- name: Yarn Install
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
uses: ./.github/actions/yarn-install
@@ -85,15 +86,8 @@ jobs:
name: ios-prebuilds-workspace
path: packages/react-native/third-party/
- name: Print third-party folder structure
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
run: ls -lR packages/react-native/third-party
- name: Install VisionOS
if: ${{ steps.restore-slice-folder.outputs.cache-hit != 'true' && (matrix.slice == 'xros' || matrix.slice == 'xros-simulator') }}
run: |
# https://github.com/actions/runner-images/issues/10559
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch
- name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }}
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }}
@@ -107,14 +101,14 @@ jobs:
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
with:
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
enableCrossOsArchive: true
path: |
packages/react-native/third-party/.build/Build/Products
create-xcframework:
name: Prepare XCFramework
runs-on: macos-14
runs-on: macos-15
needs: [build-apple-slices]
strategy:
fail-fast: false
@@ -138,7 +132,7 @@ jobs:
with:
path: |
packages/react-native/third-party/
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
# If cache hit, we already have our binary. We don't need to do anything.
- name: Yarn Install
if: steps.restore-xcframework.outputs.cache-hit != 'true'
@@ -179,8 +173,9 @@ jobs:
- name: Compress and Rename dSYM
if: steps.restore-xcframework.outputs.cache-hit != 'true'
run: |
tar -cz -f packages/react-native/third-party/Symbols/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz \
packages/react-native/third-party/Symbols/ReactNativeDependencies.framework.dSYM
cd packages/react-native/third-party/Symbols/
tar -cz -f ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz .
mv ../ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz ./ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
- name: Upload XCFramework Artifact
uses: actions/upload-artifact@v4
with:
@@ -199,4 +194,4 @@ jobs:
path: |
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
key: v3-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
@@ -9,6 +9,7 @@ on:
jobs:
publish_bumped_packages:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
env:
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
steps:
+21 -113
View File
@@ -19,136 +19,43 @@ jobs:
echo "Setting release type to release"
echo "RELEASE_TYPE=release" >> $GITHUB_OUTPUT
prepare_hermes_workspace:
set_hermes_versions:
runs-on: ubuntu-latest
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
if: github.repository == 'facebook/react-native'
outputs:
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
HERMES_VERSION: ${{ steps.set_hermes_versions.outputs.HERMES_VERSION }}
HERMES_V1_VERSION: ${{ steps.set_hermes_versions.outputs.HERMES_V1_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
- id: set_hermes_versions
run: |
echo "Setting hermes versions to latest"
hermes_version=$(grep -oE 'HERMES_VERSION_NAME=([0-9]+\.[0-9]+\.[0-9]+)' packages/react-native/sdks/hermes-engine/version.properties | cut -d'=' -f2)
hermes_v1_version=$(grep -oE 'HERMES_V1_VERSION_NAME=([0-9]+\.[0-9]+\.[0-9]+)' packages/react-native/sdks/hermes-engine/version.properties | cut -d'=' -f2)
build_hermesc_apple:
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Apple
uses: ./.github/actions/build-hermesc-apple
with:
hermes-version: ${{ needs.prepare_hermes_workspace.output.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.output.react-native-version }}
build_apple_slices_hermes:
runs-on: macos-14
needs: [build_hermesc_apple, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "15.1"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
slice: [macosx, iphoneos, iphonesimulator, appletvos, appletvsimulator, catalyst, xros, xrsimulator]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Slice
uses: ./.github/actions/build-apple-slices-hermes
with:
flavor: ${{ matrix.flavor }}
slice: ${{ matrix.slice}}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Hermes MacOS
uses: ./.github/actions/build-hermes-macos
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
echo "HERMES_VERSION=$hermes_version" >> $GITHUB_OUTPUT
echo "HERMES_V1_VERSION=$hermes_v1_version" >> $GITHUB_OUTPUT
- name: Print hermes versions
run: |
echo "HERMES_VERSION=${{ steps.set_hermes_versions.outputs.HERMES_VERSION }}"
echo "HERMES_V1_VERSION=${{ steps.set_hermes_versions.outputs.HERMES_V1_VERSION }}"
prebuild_apple_dependencies:
if: github.repository == 'facebook/react-native'
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Linux
uses: ./.github/actions/build-hermesc-linux
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermesc_windows:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Windows
uses: ./.github/actions/build-hermesc-windows
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
needs: [prebuild_apple_dependencies]
build_npm_package:
runs-on: 8-core-ubuntu
needs:
[
set_release_type,
prepare_hermes_workspace,
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
prebuild_apple_dependencies,
prebuild_react_native_core,
]
@@ -160,7 +67,6 @@ jobs:
# By default we only build ARM64 to save time/resources. For release/nightlies, we override this value to build all archs.
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
env:
HERMES_WS_DIR: /tmp/hermes
GHA_NPM_TOKEN: ${{ secrets.GHA_NPM_TOKEN }}
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
@@ -176,7 +82,6 @@ jobs:
- name: Build and Publish NPM Package
uses: ./.github/actions/build-npm-package
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gha-npm-token: ${{ env.GHA_NPM_TOKEN }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
@@ -234,6 +139,9 @@ jobs:
secrets: inherit
create_draft_release:
needs: generate_changelog
needs: [generate_changelog, set_hermes_versions]
uses: ./.github/workflows/create-draft-release.yml
secrets: inherit
with:
hermesVersion: ${{ needs.set_hermes_versions.outputs.HERMES_VERSION }}
hermesV1Version: ${{ needs.set_hermes_versions.outputs.HERMES_V1_VERSION }}
+1
View File
@@ -9,6 +9,7 @@ on:
jobs:
rerun:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- name: rerun ${{ inputs.run_id }}
env:
+35 -163
View File
@@ -11,6 +11,7 @@ on:
jobs:
set_release_type:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
outputs:
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
env:
@@ -32,101 +33,22 @@ jobs:
echo "Should I run E2E tests? ${{ inputs.run-e2e-tests }}"
prepare_hermes_workspace:
runs-on: ubuntu-latest
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion
outputs:
react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }}
hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Hermes Workspace
id: prepare-hermes-workspace
uses: ./.github/actions/prepare-hermes-workspace
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
build_hermesc_apple:
runs-on: macos-14
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Apple
uses: ./.github/actions/build-hermesc-apple
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_apple_slices_hermes:
runs-on: macos-14
needs: [build_hermesc_apple, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin
IOS_DEPLOYMENT_TARGET: "15.1"
XROS_DEPLOYMENT_TARGET: "1.0"
MAC_DEPLOYMENT_TARGET: "10.15"
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
slice: [macosx, iphoneos, iphonesimulator, appletvos, appletvsimulator, catalyst, xros, xrsimulator]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Slice
uses: ./.github/actions/build-apple-slices-hermes
with:
flavor: ${{ matrix.flavor }}
slice: ${{ matrix.slice}}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_hermes_macos:
runs-on: macos-14
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
continue-on-error: true
strategy:
fail-fast: false
matrix:
flavor: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Hermes MacOS
uses: ./.github/actions/build-hermes-macos
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
prebuild_apple_dependencies:
if: github.repository == 'facebook/react-native'
uses: ./.github/workflows/prebuild-ios-dependencies.yml
secrets: inherit
prebuild_react_native_core:
uses: ./.github/workflows/prebuild-ios-core.yml
with:
use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }}
secrets: inherit
needs: [prebuild_apple_dependencies, build_hermes_macos]
needs: [prebuild_apple_dependencies]
test_ios_rntester_ruby_3_2_0:
runs-on: macos-14
runs-on: macos-15
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
[prebuild_apple_dependencies, prebuild_react_native_core]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -134,17 +56,12 @@ jobs:
uses: ./.github/actions/test-ios-rntester
with:
ruby-version: "3.2.0"
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: Debug
test_ios_rntester:
runs-on: macos-14-large
runs-on: macos-15-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
[prebuild_apple_dependencies, prebuild_react_native_core]
continue-on-error: true
strategy:
fail-fast: false
@@ -158,17 +75,12 @@ jobs:
uses: ./.github/actions/test-ios-rntester
with:
use-frameworks: ${{ matrix.frameworks }}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
flavor: ${{ matrix.flavor }}
test_e2e_ios_rntester:
runs-on: macos-14-large
runs-on: macos-15-large
needs:
[test_ios_rntester]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
strategy:
fail-fast: false
matrix:
@@ -187,6 +99,8 @@ jobs:
run: ls -lR /tmp/RNTesterBuild
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
platform: ios
- name: Run E2E Tests
uses: ./.github/actions/maestro-ios
with:
@@ -196,11 +110,8 @@ jobs:
flavor: ${{ matrix.flavor }}
test_e2e_ios_templateapp:
runs-on: macos-14-large
runs-on: macos-15-large
needs: [build_npm_package, prebuild_apple_dependencies]
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
strategy:
fail-fast: false
matrix:
@@ -210,6 +121,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup xcode
uses: ./.github/actions/setup-xcode
with:
platform: ios
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn
@@ -218,11 +131,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
- name: Download Hermes
uses: actions/download-artifact@v4
with:
name: hermes-darwin-bin-${{matrix.flavor}}
path: /tmp/react-native-tmp
- name: Download React Native Package
uses: actions/download-artifact@v4
with:
@@ -246,14 +154,16 @@ jobs:
- name: Print ReactCore folder
shell: bash
run: ls -lR /tmp/ReactCore
- name: Configure git
shell: bash
run: |
git config --global user.email "react-native-bot@meta.com"
git config --global user.name "React Native Bot"
- name: Prepare artifacts
run: |
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
echo "React Native tgs is $REACT_NATIVE_PKG"
HERMES_PATH=$(find /tmp/react-native-tmp -type f -name "*.tar.gz")
echo "Hermes path is $HERMES_PATH"
# For stable branches, we want to use the stable branch of the template
# In all the other cases, we want to use "main"
BRANCH=${{ github.ref_name }}
@@ -268,8 +178,9 @@ jobs:
NEW_ARCH_ENABLED=1
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ matrix.flavor }}.xcframework.tar.gz"
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
# Disable prebuilds for now, as they are causing issues with E2E tests for 0.82-stable branch
# export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ matrix.flavor }}.xcframework.tar.gz"
RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
xcodebuild \
-scheme "RNTestProject" \
@@ -355,21 +266,6 @@ jobs:
flavor: ${{ matrix.flavor }}
working-directory: /tmp/RNTestProject
build_hermesc_linux:
runs-on: ubuntu-latest
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: /tmp/hermes
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Linux
uses: ./.github/actions/build-hermesc-linux
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
run_fantom_tests:
runs-on: 8-core-ubuntu
needs: [set_release_type]
@@ -389,25 +285,6 @@ jobs:
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
build_hermesc_windows:
runs-on: windows-2025
needs: prepare_hermes_workspace
env:
HERMES_WS_DIR: 'C:\tmp\hermes'
HERMES_TARBALL_ARTIFACTS_DIR: 'C:\tmp\hermes\hermes-runtime-darwin'
HERMES_OSXBIN_ARTIFACTS_DIR: 'C:\tmp\hermes\osx-bin'
ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
CMAKE_DIR: 'C:\Program Files\CMake\bin'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build HermesC Windows
uses: ./.github/actions/build-hermesc-windows
with:
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
build_android:
runs-on: 8-core-ubuntu
needs: [set_release_type]
@@ -462,10 +339,6 @@ jobs:
needs:
[
set_release_type,
prepare_hermes_workspace,
build_hermes_macos,
build_hermesc_linux,
build_hermesc_windows,
build_android,
prebuild_apple_dependencies,
prebuild_react_native_core,
@@ -475,15 +348,12 @@ jobs:
env:
TERM: "dumb"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
env:
HERMES_WS_DIR: /tmp/hermes
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build NPM Package
uses: ./.github/actions/build-npm-package
with:
hermes-ws-dir: ${{ env.HERMES_WS_DIR }}
release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
@@ -526,6 +396,12 @@ jobs:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Set nightly Hermes versions
shell: bash
run: |
node ./scripts/releases/use-hermes-nightly.js
- name: Run yarn install again, with the correct hermes version
uses: ./.github/actions/yarn-install
- name: Prepare the Helloworld application
shell: bash
run: node ./scripts/e2e/init-project-e2e.js --useHelloWorld --pathToLocalReactNative "$GITHUB_WORKSPACE/build/$(cat build/react-native-package-version)"
@@ -546,11 +422,10 @@ jobs:
compression-level: 0
test_ios_helloworld_with_ruby_3_2_0:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on: macos-15
needs: [prebuild_apple_dependencies, prebuild_react_native_core]
env:
PROJECT_NAME: iOSTemplateProject
HERMES_WS_DIR: /tmp/hermes
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
@@ -559,12 +434,10 @@ jobs:
with:
ruby-version: 3.2.0
flavor: Debug
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_helloworld:
runs-on: macos-14
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies, prebuild_react_native_core] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on: macos-15
needs: [prebuild_apple_dependencies, prebuild_react_native_core]
strategy:
matrix:
flavor: [Debug, Release]
@@ -575,7 +448,6 @@ jobs:
use_frameworks: StaticLibraries
env:
PROJECT_NAME: iOSTemplateProject
HERMES_WS_DIR: /tmp/hermes
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- name: Checkout
@@ -584,11 +456,10 @@ jobs:
with:
flavor: ${{ matrix.flavor }}
use-frameworks: ${{ matrix.use_frameworks }}
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_js:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
strategy:
fail-fast: false
matrix:
@@ -603,6 +474,7 @@ jobs:
lint:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
@@ -1,113 +0,0 @@
name: Test Libraries on Nightlies
on:
workflow_call:
secrets:
discord_webhook_url:
required: true
firebase_app_email:
required: true
firebase_app_pass:
required: true
firebase_app_apikey:
required: true
firebase_app_projectname:
required: true
# We use the matrix.library entry to specify the dependency we want to use
# The key is used directly as the <pkg> in the `yarn add <pkg>` command.
jobs:
runner-setup:
runs-on: ubuntu-latest
outputs:
runners: '{"ios":"macos-14-large", "android": "ubuntu-latest"}'
steps:
- run: echo no-op
test-library-on-nightly:
name: "[${{ matrix.platform }}] ${{ matrix.library }}"
needs: runner-setup
runs-on: ${{ fromJSON(needs.runner-setup.outputs.runners)[matrix.platform] }}
continue-on-error: true
strategy:
matrix:
library: [
"react-native-async-storage",
"react-native-blob-util",
"@react-native-clipboard/clipboard",
"@react-native-community/datetimepicker",
"react-native-gesture-handler",
"react-native-image-picker",
"react-native-linear-gradient",
"@react-native-masked-view/masked-view",
# "react-native-maps", React Native Maps with the New Arch support has a complex cocoapods setup for iOS. It needs a dedicated workflow.
"@react-native-community/netinfo",
"react-native-reanimated@nightly react-native-worklets@nightly", #reanimated requires worklet to be explicitly installed as a separate package
"react-native-svg",
"react-native-video",
"react-native-webview",
"react-native-mmkv",
"react-native-screens",
"react-native-pager-view",
"@react-native-community/slider",
# additional OSS libs used internally
"scandit-react-native-datacapture-barcode scandit-react-native-datacapture-core",
"react-native-contacts",
"react-native-device-info",
"react-native-email-link",
"@dr.pogodin/react-native-fs",
"react-native-permissions",
"react-native-vector-icons",
"react-native-masked-view",
"@react-native-community/image-editor",
]
platform: [ios, android]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: ./.github/actions/setup-node
- name: Test ${{ matrix.library }}
id: run-test
uses: ./.github/actions/test-library-on-nightly
with:
library-npm-package: ${{ matrix.library }}
platform: ${{ matrix.platform}}
- name: Save outcome
id: save-outcome
if: always()
run: |
LIB_FOLDER=$(echo "${{matrix.library}}" | tr ' ' '_' | tr '/' '_')
echo "${{matrix.library}}: ${{steps.run-test.outcome}}" > "/tmp/$LIB_FOLDER-${{ matrix.platform }}-outcome"
echo "lib_folder=$LIB_FOLDER" >> $GITHUB_OUTPUT
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: ${{ steps.save-outcome.outputs.lib_folder }}-${{ matrix.platform }}-outcome
path: /tmp/${{ steps.save-outcome.outputs.lib_folder }}-${{ matrix.platform }}-outcome
collect-results:
runs-on: ubuntu-latest
needs: [test-library-on-nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore outcomes
uses: actions/download-artifact@v4
with:
pattern: '*-outcome'
path: /tmp
- name: Collect failures
uses: actions/github-script@v6
env:
FIREBASE_APP_EMAIL: ${{ secrets.firebase_app_email }}
FIREBASE_APP_PASS: ${{ secrets.firebase_app_pass }}
FIREBASE_APP_APIKEY: ${{ secrets.firebase_app_apikey }}
FIREBASE_APP_PROJECTNAME: ${{ secrets.firebase_app_projectname }}
with:
script: |
const {collectResults} = require('./.github/workflow-scripts/collectNightlyOutcomes.js');
await collectResults('${{secrets.discord_webhook_url}}');
@@ -0,0 +1,49 @@
name: Validate DotSlash Artifacts
on:
workflow_dispatch:
release:
types: [published]
push:
branches:
- main
paths:
- packages/debugger-shell/bin/react-native-devtools
- "scripts/releases/**"
- package.json
- yarn.lock
pull_request:
branches:
- main
paths:
- packages/debugger-shell/bin/react-native-devtools
- "scripts/releases/**"
- package.json
- yarn.lock
# Same time as the nightly build: 2:15 AM UTC
schedule:
- cron: "15 2 * * *"
jobs:
validate-dotslash-artifacts:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Configure Git
shell: bash
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Validate DotSlash artifacts
uses: actions/github-script@v6
with:
script: |
const {validateDotSlashArtifacts} = require('./scripts/releases/validate-dotslash-artifacts.js');
await validateDotSlashArtifacts();
+1
View File
@@ -133,6 +133,7 @@ vendor/
# Swift Package build folder
/packages/react-native/.build
/packages/react-native/.swiftpm
/packages/react-native/React/includes/
# @react-native/codegen
/packages/react-native/React/FBReactNativeSpec/
+31
View File
@@ -1,5 +1,36 @@
# Changelog (pre 0.80)
## v0.79.7
### Fixed
#### Android specific
- **Layout:** Make missing parent view state in updateLayout a soft error ([56ad8d9bfd](https://github.com/facebook/react-native/commit/56ad8d9bfd08ea70bc6f5726a2b4a6afb6d2d7c2) by [@javache](https://github.com/javache))
- **Layout:** Make missing parent view state in updateLayout a soft error ([f2e47d8dab](https://github.com/facebook/react-native/commit/f2e47d8dabcd61621ea81c86cd1e2488948c4229) by [@cipolleschi](https://github.com/cipolleschi))
## v0.79.6
### Added
#### Android specific
- **RNGP** Add support for `exclusiveEnterpriseRepository` ([df5ac988ce](https://github.com/facebook/react-native/commit/df5ac988cec936c430d41b0fcc15181dc06e46a1) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- **Cocoapods:** Add the ENTERPRISE_REPOSITORY env var to let user consume artifacts from their personal maven mirror ([a74d930c93](https://github.com/facebook/react-native/commit/a74d930c93ffae8c02142e8cc016a4c390a5f784) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **Codegen:** Add missing Babel dependencies ([bf2c3af93b](https://github.com/facebook/react-native/commit/bf2c3af93b146943cb35866fa9badcd188e63f5b) by [@tido64](https://github.com/tido64))
#### Android specific
- **Legacy Arch:** Fix Legacy arch crashing or freezing upon reload ([db600b2e9e](https://github.com/facebook/react-native/commit/db600b2e9e87863cad6dd5ce262dc1f793bcaeb0) by [@robhogan](https://github.com/robhogan))
- **Modal:** Fix Modal first frame being rendered on top-left corner ([5a315f8d6b](https://github.com/facebook/react-native/commit/5a315f8d6b0ea54442c7ef94b7346b0c73fd0b4c) by [@cortinico](https://github.com/cortinico))
- **TurboModule:** Fix emitting event from turbo module crashes on 32bit android ([43bc43e5e8](https://github.com/facebook/react-native/commit/43bc43e5e85519d2924c4fc80765e66d0c48b1a9) by [@vladimirivanoviliev](https://github.com/vladimirivanoviliev))
## v0.79.5
### Fixed
+278 -53
View File
@@ -1,71 +1,276 @@
# Changelog
## v0.81.0-rc.5
### Fixed
#### Android specific
- **Runtime:** Fixed `ReactHostImpl.nativeModules` always returning an empty list ([2f46a49](https://github.com/facebook/react-native/commit/2f46a49b8d8a11d5cf4342eee83c469b545c6779) by [@lukmccall](https://github.com/lukmccall))
## v0.81.0-rc.4 - Burned
## v0.81.0-rc.3
### Changed
- **Metro:** Metro to ^0.83.1 ([e247be793c](https://github.com/facebook/react-native/commit/e247be793c70a374955d798d8cbbc6eba58080ec) by [@motiz88](https://github.com/motiz88))
## v0.82.1
### Fixed
#### Android specific
- **rngp:** Fix a race condition with codegen libraries missing sources ([9013a9e666](https://github.com/facebook/react-native/commit/9013a9e66629677c47e1b69703f9fc8f4cbc1c2c) by [@cortinico](https://github.com/cortinico))
- **API:** Make accessors inside HeadlessJsTaskService open again ([7ef57163cb](https://github.com/facebook/react-native/commit/7ef57163cb016317e43e563da7ea181989f6abca) by [@cortinico](https://github.com/cortinico))
## v0.81.0-rc.2
### Changed
- **API:** `NewAppScreen` no longer internally handles device safe area, use optional `safeAreaInsets` prop (aligned in 0.81 template) ([732bd12dc2](https://github.com/facebook/react-native/commit/732bd12dc21460641ef01b23f2eb722f26b060d5) by [@huntie](https://github.com/huntie))
- **Babel:** Added support to `react-native/babel-preset` for a `hermesParserOptions` option, that expects an object that enables overriding `hermes-parser` options. ([0508eddfe6](https://github.com/facebook/react-native/commit/0508eddfe60df60cb3bfa4074ae199bd0e492d5f) by [@yungsters](https://github.com/yungsters))
### Fixed
- Fixed representation of transforms when view is originally zero-sized ([a81e94a40c](https://github.com/facebook/react-native/commit/a81e94a40ca8dca9e57b562db21f8f235c5b25a0) by [@javache](https://github.com/javache))
#### iOS specific
- **Podspec:** Fixed issue with RNDeps release/debug switch failing ([4ee2b60a1e](https://github.com/facebook/react-native/commit/4ee2b60a1eacca744d58a7ad336ca9d3714289f6) by [@chrfalch](https://github.com/chrfalch))
- **Podspec:** Fixed missing script for resolving prebuilt xcframework when switching between release/debug ([2e55241a90](https://github.com/facebook/react-native/commit/2e55241a901b4cd95917de68ce9078928820a208) by [@chrfalch](https://github.com/chrfalch))
- Fixed issue when using gnu coreutils cp command when using precompiled binaries causing compilation error ([068ec39aea](https://github.com/facebook/react-native/commit/068ec39aea543617e5159fe22274b294bfb29026) by [@chrfalch](https://github.com/chrfalch))
## v0.81.0-rc.1
## v0.82.0
### Breaking
- **Appearance.setColorScheme:** `Appearance.setColorScheme` no longer accepts a nullable value ([a4581ecd8b](https://github.com/facebook/react-native/commit/a4581ecd8b6df5efa44dfe6d43708320209c900b) by [@huntie](https://github.com/huntie))
- **`CxxSharedModuleWrapper`:** Removed CxxSharedModuleWrapper ([fafbee2402](https://github.com/facebook/react-native/commit/fafbee240235ea0e63eb01abd31ce32d6a576429) by [@javache](https://github.com/javache))
- **DOM API:** Enable DOM APIs in host component refs ([2ad845ccb2](https://github.com/facebook/react-native/commit/2ad845ccb2fea277e05513dcf41407026a8224f0) by [@rubennorte](https://github.com/rubennorte))
- **Error Handling:** Unhandled promises are now handled by ExceptionsManager.handleException, instead of being swallowed as Logbox Warnings. ([c4082c9ce2](https://github.com/facebook/react-native/commit/c4082c9ce208a324c2d011823ca2ba432411aafc) by [@krystofwoldrich](https://github.com/krystofwoldrich))
- **InteractionManager:** InteractionManager has been deprecated and no longer respects interaction handles. Instead, it is now recommended to avoid executing long-running JavaScript tasks by breaking them up into smaller tasks and scheduling them using `requestIdleCallback()`. ([03d9f34a82](https://github.com/facebook/react-native/commit/03d9f34a8252456d389d9f9a3bd04b99a2828c16) by [@yungsters](https://github.com/yungsters))
- **`shouldEmitW3CPointerEvents`:** Migrate `shouldPressibilityUseW3CPointerEventsForHover` to common private feature flags and remove `shouldEmitW3CPointerEvents` flag. ([fb4587780e](https://github.com/facebook/react-native/commit/fb4587780e8d6111139d73598a9a26ff392dee28) by [@coado](https://github.com/coado))
- **TurboModuleUtils:** Remove unused ReactCommon/TurboModuleUtils functions #deepCopyJSIObject and #deepCopyJSIArray ([ead669ade3](https://github.com/facebook/react-native/commit/ead669ade31ee703c407f96c0ce98d8f2991bdc8) by [@christophpurrer](https://github.com/christophpurrer))
- **TurboModules:** Delete old location of CallbackWrapper.h / LongLivedObject.h by ([cb94e71](https://github.com/facebook/react-native/commit/cb94e71845259ae7fa823eb4d21cde74fccd7435) [@christophpurrer](https://github.com/christophpurrer))
#### Android specific
- **Deps:** Gradle to 9.0 ([7f93b664b4](https://github.com/facebook/react-native/commit/7f93b664b41ba11226aae7cca0e7c9b7f38a7d18) by [@cortinico](https://github.com/cortinico))
- **Image Prefetching:** Android: Image Prefetching send ImageResizeMode as enum value ([e30f34eda6](https://github.com/facebook/react-native/commit/e30f34eda689994cab8cd62aa38175238da8638b) by [@christophpurrer](https://github.com/christophpurrer))
- **New Architecture:** Remove possibility to newArchEnabled=false in 0.82 ([d5d21d0614](https://github.com/facebook/react-native/commit/d5d21d061493ee973c789a7c6ab8cceebc1f04f9) by [@cortinico](https://github.com/cortinico))
- **`reactNativeHost`:** Throw Exception if ReactApplication.reactNativeHost is not overriden ([0d3791ca0a](https://github.com/facebook/react-native/commit/0d3791ca0ab30d5a12881c9901f31291b3e998c6) by [@mdvacca](https://github.com/mdvacca))
- **ViewManagerInterfaces:** Migrate ViewManagerInterfaces to kotlin. Some types in code generated ViewManagerInterfaces might differ. e.g. this will start enforcing nullability in parameters of viewManagerInterface methods (e.g. String commands parameters are not nullable, view params are not nullable in any method, etc) ([79ca9036d3](https://github.com/facebook/react-native/commit/79ca9036d39c16cd115dc0427cb7092f358ac47e) by [@mdvacca](https://github.com/mdvacca))
#### iOS Specific
- **New Architecture:** Removed the opt-out from the New Architecture. ([83e6eaf693](https://github.com/facebook/react-native/commit/83e6eaf693f967b7870a5d4896cbb799206a14f0) by [@cipolleschi](https://github.com/cipolleschi))
### Added
#### iOS specific
- **CocoaPods** Add the `ENTERPRISE_REPOSITORY` env variable to cocoapods infra ([23f3bf9239](https://github.com/facebook/react-native/commit/23f3bf9239a849590f1c72b25732d0090780128c) by [@cipolleschi](https://github.com/cipolleschi))
- **Prebuild:** Add release/debug switch script for React-Core-prebuilt ([42d1a7934c](https://github.com/facebook/react-native/commit/42d1a7934cad4b2c92653e3fa7781c2af8f44df4) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Added support for using USE_FRAMEWORKS with prebuilt React Native Core ([40e45f5366](https://github.com/facebook/react-native/commit/40e45f53661ce80c3a6fbbf07f52dc900afcad52) by [@chrfalch](https://github.com/chrfalch))
### Changed
- **Metro:** Bump Metro to 0.83.0 ([6b9f5d622f](https://github.com/facebook/react-native/commit/6b9f5d622ffbe79da8f4e7b7d8094504a480425e) by [@robhogan](https://github.com/robhogan))
- **Animated:** `Animated.CompositeAnimation` is now exposed when using `"react-native-strict-api"` ([024d25794a](https://github.com/facebook/react-native/commit/024d25794a51c94c877c1dfa115a82ebbf559614) by [@huntie](https://github.com/huntie))
- **Animated:** Allow calling createAnimatedNode without batching ([d9d9a49e18](https://github.com/facebook/react-native/commit/d9d9a49e18f3c51caa18cf7da0a1fcd62f1ecf18) by [@zeyap](https://github.com/zeyap))
- **Animated:** Allow filter usage with native animated driver. ([138d0eb01d](https://github.com/facebook/react-native/commit/138d0eb01dbe597261459a37d364d1780c3ef228) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **API:** Expose NativeComponentRegistry API as JavaScript root export ([f936780cd5](https://github.com/facebook/react-native/commit/f936780cd5c0c17797f9d2bbc8f5cee81c2eefce) by [@zhongwuzw](https://github.com/zhongwuzw))
- **API:** Expose `ReactNativeVersion` API as JavaScript root export ([ec5638abd0](https://github.com/facebook/react-native/commit/ec5638abd0e872be62b6ea5d8df9bed6335c2191) by [@huntie](https://github.com/huntie))
- **Codegen:** Added getDebugProps to codegen ([e547f466ee](https://github.com/facebook/react-native/commit/e547f466ee41415a75ec6b6f910171285ee7bfc3) by [@cipolleschi](https://github.com/cipolleschi))
- **Hermes V1:** Added a dependency on hermes-compiler ([0caf8e70d5](https://github.com/facebook/react-native/commit/0caf8e70d53f611a73ad9b55879dfe0a5f036371) by [@j-piasecki](https://github.com/j-piasecki))
- **Pressable:** Allow setting `blockNativeResponder` on Pressable ([6e4d23ded2](https://github.com/facebook/react-native/commit/6e4d23ded2da4a717bafcc032e3d7a0a5fbe3731) by [@zeyap](https://github.com/zeyap))
- **Yoga/API:** Make yoga/Yoga.h an umbrell header ([8ed2cee80e](https://github.com/facebook/react-native/commit/8ed2cee80e0aaac2f2a6a897ba450888f274a5a4) by [@rudybear](https://github.com/rudybear))
#### Android specific
- **Gradle:** Gradle to 8.14.3 ([6892dde363](https://github.com/facebook/react-native/commit/6892dde36373bbef2d0afe535ae818b1a7164f08) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Expose `react_renderer_bridging` headers via prefab ([d1730ff960](https://github.com/facebook/react-native/commit/d1730ff960fcb9a01ee94b9e46e5a9fbb7d73f4a) by [@tomekzaw](https://github.com/tomekzaw))
- **Legacy Arch:** Introduce more deprecation warnings for Legacy Arch classes ([625f69f284](https://github.com/facebook/react-native/commit/625f69f284ddfd9c6beecaa4052a871d092053ef) by [@cortinico](https://github.com/cortinico))
### Fixed
- **Yoga:** Fixed nodes with `display: contents` set being cloned with the wrong owner ([d4b36b0300](https://github.com/facebook/react-native/commit/d4b36b03003eb2de9eaf5b57bb639bae8cc12f20) by [@j-piasecki](https://github.com/j-piasecki))
- **Build Type:** Create a `debugOptimized` `buildType` for Android ([eb2461c7c9](https://github.com/facebook/react-native/commit/eb2461c7c902ebed272bd2d22d6cff4d3c586da6) by [@cortinico](https://github.com/cortinico))
- **DevMenu:** Add long-press back as an option to open the DevMenu for devices that lack menu & fast-forward. ([32d37f03ad](https://github.com/facebook/react-native/commit/32d37f03ad05290205a4f04d756f6e1880c4ff89) by [@sbuggay](https://github.com/sbuggay))
- **DevTools:** `DevSupportManager::openDebugger` now supports an optional `panel` param determining the starting panel ([7eb3536728](https://github.com/facebook/react-native/commit/7eb3536728c4a20f7e51245f4f7b64aa505bd799) by [@huntie](https://github.com/huntie))
- **DevTools:** Adds a landing view parameter to opening RNDT, enabling arbitrary view focus on launch. ([635c707eec](https://github.com/facebook/react-native/commit/635c707eec18f6d2ceceac2dcee9f458f17f8aab) by [@sbuggay](https://github.com/sbuggay))
- **Hermes V1:** Added opt-in to use the new Hermes ([3e9990f860](https://github.com/facebook/react-native/commit/3e9990f860eb9380837ef431ca02def32c4261ad) by [@j-piasecki](https://github.com/j-piasecki))
- **HWInput:** Channel up/down hardware events. ([c2a3e4420e](https://github.com/facebook/react-native/commit/c2a3e4420e07147f9a040a665da98dbe22b87a2a) by [@sbuggay](https://github.com/sbuggay))
- **Manifest:** Add support to specify a single Manifest rather than 2 (main/debug) by using the `usesCleartextTraffic` manifest placeholder which is autoconfigured by RNGP. ([d89acc1596](https://github.com/facebook/react-native/commit/d89acc1596345534882938d2bbf40275a6cb89bd) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- **Podspec:** Fixed premature return in header file generation from podspec globs ([f2b064c2d4](https://github.com/facebook/react-native/commit/f2b064c2d40c39017ac2a31bf3caf8acef23038c) by [@chrfalch](https://github.com/chrfalch))
- **API:** Add deprecation message for RCTAppdelegate APIs ([d503ea4efc](https://github.com/facebook/react-native/commit/d503ea4efc84b6511cef2a46421a16e044862e88) by [@cipolleschi](https://github.com/cipolleschi))
- **Fabric:** Add invalidation callback for non-recycled component instances ([dc4a6d2c7e](https://github.com/facebook/react-native/commit/dc4a6d2c7e2ed421b61929896f60b1a864a60d97) by [@kkafar](https://github.com/kkafar))
- **Hermes V1:** Added opt-in to use the new Hermes ([e9cdc308b4](https://github.com/facebook/react-native/commit/e9cdc308b4c04753d85757e8877ac00c3c687b95) by [@j-piasecki](https://github.com/j-piasecki))
- **New Architecture:** Add warning if RCT_NEW_ARCH_ENABLED is set to 0 ([7d0bef2f25](https://github.com/facebook/react-native/commit/7d0bef2f25a206d917e7f5cc2b9a6c088f13a832) by [@cipolleschi](https://github.com/cipolleschi))
- **New Architecture:** Crash the app if they force the legacy architecture. ([dc132a4fd4](https://github.com/facebook/react-native/commit/dc132a4fd4ca8dc28dc7dbb2406ac67dac1a0ee7) by [@cipolleschi](https://github.com/cipolleschi))
### Changed
- **Font:** Enabled `enableFontScaleChangesUpdatingLayout` feature flag by default ([686d14f1d1](https://github.com/facebook/react-native/commit/686d14f1d16c2f02720104ddd395f7d27c908350) by [@j-piasecki](https://github.com/j-piasecki))
- **Hermes:** Changed names of hermes binaries ([776fca1e7c](https://github.com/facebook/react-native/commit/776fca1e7c978a2d8f817d042836073e4dcb4e0e) by [@j-piasecki](https://github.com/j-piasecki))
- **Hermes V1:** Changed the source of hermesc binary to be an npm package ([2e0bd13a25](https://github.com/facebook/react-native/commit/2e0bd13a2533fe7ab64125a95b9215b806018c6e) by [@j-piasecki](https://github.com/j-piasecki))
- **Metro:** Bump Metro to ^0.83.1 ([840fd6c83f](https://github.com/facebook/react-native/commit/840fd6c83f45326a796bf2823f8c2fa942aed06c) by [@robhogan](https://github.com/robhogan))
- **React:** Bumped React to 19.1.1 ([ec5a98b1f5](https://github.com/facebook/react-native/commit/ec5a98b1f5c2137f5f6ff5f5f6706f20384c44df) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** CDP backend now accepts `addBinding` and `removeBinding` methods earlier, before a Runtime exists. ([3271e57c75](https://github.com/facebook/react-native/commit/3271e57c751e7d1193c1e9f7b53e545231511b9d) by [@motiz88](https://github.com/motiz88))
- **Typing:** Update types for Platform.version ([f6ba2dbf3b](https://github.com/facebook/react-native/commit/f6ba2dbf3b4c85da1a7f9079fd366a41b160fa69) by [@riteshshukla04](https://github.com/riteshshukla04))
- **UIManager:** Avoid unnecessary copy of view props map in UIManager::updateShadowTree ([5b38bb4745](https://github.com/facebook/react-native/commit/5b38bb47457f853c2c3d5f275facbb9fbc150683) by [@zeyap](https://github.com/zeyap))
#### Android specific
- **AGP:** AGP to 8.12.0 ([742ef3d661](https://github.com/facebook/react-native/commit/742ef3d6615c8c1202e9f683e6127ac97d7a9e23) by [@cortinico](https://github.com/cortinico))
- **DevSupportManager:** DevSupport `openDebugger()` methods now accept a `panel: String?` param. Frameworks directly implementing `DevSupportManager` will need to adjust call signatures. ([9dba7112cf](https://github.com/facebook/react-native/commit/9dba7112cfd09b02300869a77dba3dca16f49a28) by [@huntie](https://github.com/huntie))
- **Kotlin:** Migrated TextAttributeProps to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([fa921b3c7b](https://github.com/facebook/react-native/commit/fa921b3c7b289800a79196468f993a0eb0bf693f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated ReactBaseTextShadowNode to Kotlin. You might need to update your property access to use camelCase instead of Hungarian notation. ([8ccfff9a46](https://github.com/facebook/react-native/commit/8ccfff9a46f317fd78f478c8b3f180441535d1ca) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrated com.facebook.react.bridge.Arguments to Kotlin. ([2534aeaddb](https://github.com/facebook/react-native/commit/2534aeaddb0490b69dfaba6b8d316616c7e10a9c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaConfig` to Kotlin ([4d5caef76b](https://github.com/facebook/react-native/commit/4d5caef76b83eb7e983364ecc81abb6027e5f98e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaValue` to Kotlin ([4340dcbae8](https://github.com/facebook/react-native/commit/4340dcbae8fc41cde844e805a1ebfc23d23d164f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaNative` to Kotlin ([bc54a06fcb](https://github.com/facebook/react-native/commit/bc54a06fcb5b5d1efd8996d8568733b657fc1b06) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaConfigFactory` to Kotlin ([33ca53d9db](https://github.com/facebook/react-native/commit/33ca53d9dbe53b92d65f82dbd53a2e9f23efd4f3) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `DoNotStrip` to Kotlin ([35d8086881](https://github.com/facebook/react-native/commit/35d8086881fac643b0ebc0d53aaf7e79b7ccd830) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaLayoutType` to Kotlin ([7e461003c6](https://github.com/facebook/react-native/commit/7e461003c6592c8c539960bd5e8169c48dd27f50) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `LayoutPassReason` to Kotlin ([db2a9c089c](https://github.com/facebook/react-native/commit/db2a9c089cd5802d99e0fc86e4dc0dbf7c888307) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaNodeFactory` to Kotlin ([40afa75a7c](https://github.com/facebook/react-native/commit/40afa75a7c816a5581223c7bcd1b65b8713edf47) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaMeasureOutput` to Kotlin ([453508ada8](https://github.com/facebook/react-native/commit/453508ada837554455733e3ca94440a7143f51b1) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaMeasureFunction` to Kotlin ([05eddd354e](https://github.com/facebook/react-native/commit/05eddd354e2e80ad3c95ed5a2199a59a77317891) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaStyleInputs` to Kotlin ([001736000f](https://github.com/facebook/react-native/commit/001736000f69ce98db86c17707408bbf3f0ae9a5) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaBaselineFunction` to Kotlin ([a2eb3b299d](https://github.com/facebook/react-native/commit/a2eb3b299dddea60c510821b662dfed55b334df7) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Kotlin:** Migrate `YogaLogger` to Kotlin ([9c9a39b58e](https://github.com/facebook/react-native/commit/9c9a39b58e12bc734c27a5d9306e792b0dcaf927) by [@mateoguzmana](https://github.com/mateoguzmana))
- **OnBatchCompleteListener:** Make OnBatchCompleteListener interface internal ([046ff8e58b](https://github.com/facebook/react-native/commit/046ff8e58bed5da0f19adc860b327c7248b19f48) by [@cortinico](https://github.com/cortinico))
- **ReactSurface:** Changed return type of ReactSurfaceImpl.view to ReactSurfaceView to align with parameter recived by ReactSurfaceImpl.attachView() ([41029d8e91](https://github.com/facebook/react-native/commit/41029d8e91492c34c377374b442b31755874618c) by [@mdvacca](https://github.com/mdvacca))
- **TextAttributeProps:** Deprecate the field `TextAttributeProps.effectiveLineHeight`. This field was public but never used in OSS. ([ede037ade7](https://github.com/facebook/react-native/commit/ede037ade795bd44725f9bd82cace193a74aa68d) by [@cortinico](https://github.com/cortinico))
- **ViewManagers:** Changed method arguments names for Core ViewManagers to match the names of ViewManagerInterfaces ([e7d9e0d197](https://github.com/facebook/react-native/commit/e7d9e0d1977c136a85b9a78ef36a258631d1e9ba) by [@mdvacca](https://github.com/mdvacca))
### Deprecated
- **APIs:** Deprecate legacy javascript react native apis ([e7aeea26bd](https://github.com/facebook/react-native/commit/e7aeea26bde6e9cda0a3a0a55fc2a0421fb0c0e5) by [@RSNara](https://github.com/RSNara))
- **StyleSheet:** `StyleSheet.absoluteFillObject` is deprecated in favor of `StyleSheet.absoluteFill` (equivalent). ([83e19813ff](https://github.com/facebook/react-native/commit/83e19813ff5498ab3497d97fe38dba63a5554425) by [@huntie](https://github.com/huntie))
- Deprecate all the c++ classes not used by interop, or the new architecture. ([9539cd2626](https://github.com/facebook/react-native/commit/9539cd26261aef646379104833c7f719e3d83d02) by [@RSNara](https://github.com/RSNara))
#### Android specific
- **DevMenu:** Remove bridge mode string from React Native Dev Menu title ([1c838f32a9](https://github.com/facebook/react-native/commit/1c838f32a9bcee3867ec0502b344889308302f26) by [@sbuggay](https://github.com/sbuggay))
- **New Architecture:** DefaultDevSupportManagerFactory.create() method used for Old Arch ([026e22bb8d](https://github.com/facebook/react-native/commit/026e22bb8d7b38b3bd66ffcc7d4ee446adfee943) by [@cortinico](https://github.com/cortinico))
- **New Architecture:** Deprecate `BridgelessReactContext.getCatalystInstance()` method ([4583fbe052](https://github.com/facebook/react-native/commit/4583fbe052924df1ad030e51ad80e8d754a4c5a4) by [@cortinico](https://github.com/cortinico))
- **New Architecture:** Deprecate legacy architecture classes ReactInstanceManager and ReactInstanceManagerBuilder, these classes will be deleted in a future release ([fb84932e48](https://github.com/facebook/react-native/commit/fb84932e4894a45c0a2725e1d665acdf7bcea435) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Depreacate `CoreModulesPackage` and `NativeModuleRegistryBuilder` legacy architecture classes, these classes unused in the new architecture and will be deleted in the future ([d3bbbd893a](https://github.com/facebook/react-native/commit/d3bbbd893acd500237ab4e1778c6a2e0fe1948a9) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate Legacy Architecture ViewManagers, these classes are not used as part of the new architecture and will be deleted in the future ([da74d5da2c](https://github.com/facebook/react-native/commit/da74d5da2cac5306e37368c65490c434e7ff9f4f) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture ShadowNode classes included in React Native ([07091a9ae8](https://github.com/facebook/react-native/commit/07091a9ae8d70a601d969d9def4952563d3b7bcf) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Depreacte all LegacyArchitecture classes from the bridge package ([c1f7c5e321](https://github.com/facebook/react-native/commit/c1f7c5e3217a7e8a77a859652aadff2a41e3ea58) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture class UIManagerProvider ([b29b86f275](https://github.com/facebook/react-native/commit/b29b86f27553eac50daa18ffb6bca07be3f24f25) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate BridgeDevSupportManager and JSInstance ([25c011eb4d](https://github.com/facebook/react-native/commit/25c011eb4d403040b57e338bec704769de20793c) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate NativeModuleRegistry Legacy Architecture class ([22e4c25211](https://github.com/facebook/react-native/commit/22e4c252116da1a6658b15a84720e0ee314dddd6) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate subset of LegacyArchitecture classes in com/facebook/react/bridge ([78a3ff81eb](https://github.com/facebook/react-native/commit/78a3ff81eb38ae26fb15106580de841477897101) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture class FrescoBasedReactTextInlineImageShadowNode ([25f466cc4d](https://github.com/facebook/react-native/commit/25f466cc4dd28c962b967475c04c284d26efb722) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate Legacy Architecture class CallbackImpl ([718126fcf0](https://github.com/facebook/react-native/commit/718126fcf0296969ee659c31fae51b4317c896d3) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture class JavaMethodWrapper ([19a99dd088](https://github.com/facebook/react-native/commit/19a99dd0882d786daea3db486fd3aed3c10419b5) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate Legacy Architecture ShadowNode classes ([c4715886a9](https://github.com/facebook/react-native/commit/c4715886a917eb3eb63aab366de5225090dff5a1) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture UIManagerModules class ([85610c8b43](https://github.com/facebook/react-native/commit/85610c8b43ea132154cddcfed973ee6ceb3e55b3) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture classes from com/facebook/react/uimanager ([7f5b2b8f84](https://github.com/facebook/react-native/commit/7f5b2b8f84d7941891a447978c6adc17929ef87f) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture classes from package com.facebook.react.uimanager ([39d24bade3](https://github.com/facebook/react-native/commit/39d24bade317920544a3715e3a1f131663d8cded) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** Deprecate LegacyArchitecture classes from LayoutAnimation package ([f67078df07](https://github.com/facebook/react-native/commit/f67078df07b6c9ad995eb43ff47fc4a43bb2eaee) by [@mdvacca](https://github.com/mdvacca))
- **New Architecture:** ReactPackageLogger is not supported in the new architecture and being deprecated ([65671108f6](https://github.com/facebook/react-native/commit/65671108f69d9b23a011841102e4141293581d9c) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **DevMenu:** Remove bridge mode title and description from React Native Dev Menu title ([775daf5972](https://github.com/facebook/react-native/commit/775daf597280db94354ed484f2ce81690f1eb7b0) by [@sbuggay](https://github.com/sbuggay))
- **New Architecture:** Deprecate all the objc classes not used by interop, or the new architecture. ([70f53ac4ea](https://github.com/facebook/react-native/commit/70f53ac4ea144020560906f5931e480ed4dee87c) by [@RSNara](https://github.com/RSNara))
### Removed
- **New Architecture:** Core: Remove legacy components ([9c8a4c2297](https://github.com/facebook/react-native/commit/9c8a4c22973c7ce6fcf6b5d22c6d5fd4c6dc0d92) by [@RSNara](https://github.com/RSNara))
#### Android specific
- **DefaultReactHost:** Delete unused `DefaultReactHost.getDefaultReactHost()` overload ([d35ddb5e59](https://github.com/facebook/react-native/commit/d35ddb5e59a8cb990dd61a154a8e15e9542f8b15) by [@cortinico](https://github.com/cortinico))
- **DefaultReactHost:** Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 2 ([bda6acf3b0](https://github.com/facebook/react-native/commit/bda6acf3b08779c0dae7bdadbc9913eea79acd0d) by [@cortinico](https://github.com/cortinico))
- **DefaultReactHost:** Remove deprecated DefaultReactHost.getDefaultReactHost() overload - part 1 ([474f455a75](https://github.com/facebook/react-native/commit/474f455a7591049382da0d0308ddd21589f0cc7e) by [@cortinico](https://github.com/cortinico))
- **Inspector:** Removed unused `Inspector` public class from React Android ([cf528526cc](https://github.com/facebook/react-native/commit/cf528526cc375f1003125cf63f66fbd88790ceae) by [@cortinico](https://github.com/cortinico))
- **JSONArguments:** Remove the `com.facebook.react.bridge.JSONArguments` class ([04ae15d99b](https://github.com/facebook/react-native/commit/04ae15d99bb2ee6f7987bbe8c3d7acfdd46a482f) by [@cortinico](https://github.com/cortinico))
- **MessageQueueThreadPerfStats:** Deprecated MessageQueueThreadPerfStats API and replaced with stub. ([3bf5cb3d0e](https://github.com/facebook/react-native/commit/3bf5cb3d0e7d9d1749ef19a8392b9bbd3ec7ab7d) by [@javache](https://github.com/javache))
### Fixed
- **Accessibility:** Fix for setting the default value for accessibility props ([586f5ba89c](https://github.com/facebook/react-native/commit/586f5ba89cc20a81a9e2d5d0f2708e9cd1b440c0) by Vineeth K)
- **Accessibility:** `aria-hidden` support for `Text`, non-editable `TextInput` and `Image` ([0f39fc3000](https://github.com/facebook/react-native/commit/0f39fc3000411a43711814e0ab9cca1f7093b625) by [@mdjastrzebski](https://github.com/mdjastrzebski))
- **Build:** Fixed babel plugin validation error when coverage instrumentation is enabled ([191ddc1ec7](https://github.com/facebook/react-native/commit/191ddc1ec72be6641ebb8b9cb729cf0e142fff55) by Umar Mohammad)
- **Casting:** Casting rawValue to int was incorrectly truncating ([31b9f10364](https://github.com/facebook/react-native/commit/31b9f103645e67586bdfc5c2f590c28c04ca3871) by [@javache](https://github.com/javache))
- **Codegen:** 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 ([739dfd2141](https://github.com/facebook/react-native/commit/739dfd2141015a8126448bda64a559f5bf22672e) by [@RakaDoank](https://github.com/RakaDoank))
- **Hermes:** Change leftover references to `hermes.framework` to `hermesvm.framework` ([7f051c5470](https://github.com/facebook/react-native/commit/7f051c54701b3585f76f63846abbf7e68e2688d2) by [@j-piasecki](https://github.com/j-piasecki))
- **Hermes V1:** Fixed coordinates for Hermes V1 artifacts ([674fb77d93](https://github.com/facebook/react-native/commit/674fb77d93dfe67a5fe90449dc71b195b1851e13) by [@j-piasecki](https://github.com/j-piasecki))
- **Performance Panel:** Fix typo in Performance.js type checking condition ([6caf2dfa38](https://github.com/facebook/react-native/commit/6caf2dfa382fd4f1184b8d21b030c36687a256e4) by [@YangJonghun](https://github.com/YangJonghun))
- **Performance Panel:** Add default cases to switch statements in headers ([323fe3a5d4](https://github.com/facebook/react-native/commit/323fe3a5d471ae5a2f94d5c2bd13cc97feffe0a5) by [@NSProgrammer](https://github.com/NSProgrammer))
- **ReactCommon:** Bring back ContextContainer::Shared = std::shared_ptr<const ContextContainer> alias ([daeb6e99ab](https://github.com/facebook/react-native/commit/daeb6e99abbca2b6395a9a703d2b0bb9e5091fb7) by [@christophpurrer](https://github.com/christophpurrer))
- **ReactCommon:** Bring back SharedImageManager = std::shared_ptr<ImageManager> alias ([4718b35259](https://github.com/facebook/react-native/commit/4718b35259135b3503033a0061ae84e15d4eb450) by [@christophpurrer](https://github.com/christophpurrer))
- **ReactCommon:** Fixed Type Conversion Error in DynamicEventPayload ([ff38d59cff](https://github.com/facebook/react-native/commit/ff38d59cff92e0a50f0dd70384fbc4dd11d969c4) by Harini Malothu)
- **ReactCommon:** Fixed Type Conversion Error in CSSHexColor ([2ca88a0069](https://github.com/facebook/react-native/commit/2ca88a0069969bf115da6f0ea9f2fbbae9c9226c) by [@anupriya13](https://github.com/anupriya13))
- **TestCallInvoker:** Fix memory leak in TestCallInvoker ([9f2fbc23e4](https://github.com/facebook/react-native/commit/9f2fbc23e48af9be56b3729d514fbb3fff4ba376) by [@christophpurrer](https://github.com/christophpurrer))
#### Android specific
- **Accessability:** Stabilize custom accessibility action IDs to prevent "incompatible action" errors in TalkBack. ([626568f9a3](https://github.com/facebook/react-native/commit/626568f9a3f956a52f6c55df1dc3bc5cd017e353) by [@leg234-png](https://github.com/leg234-png))
- **Build From Source:** Fix build from source due to missing folder error on Gradle 9.0 ([9fbce3eff1](https://github.com/facebook/react-native/commit/9fbce3eff18060f16e796badc415ba733ede19af) by [@cortinico](https://github.com/cortinico))
- **Determinism:** Turned off build IDs for native libraries, fixing issues with reproducibility ([4b8dbe7642](https://github.com/facebook/react-native/commit/4b8dbe7642be53d0ccfc68ca8c9b3f5e750a68c0) by [@Rexogamer](https://github.com/Rexogamer))
- **DevTools:** Fix stack trace linkifying failing when using Android emulator and other situations where the device and debugger have different bundle urls ([794df48ad6](https://github.com/facebook/react-native/commit/794df48ad6a259022e66de1a38ff54b5ec67c3e4) by [@vzaidman](https://github.com/vzaidman))
- **Edge to Edge:** Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled ([3b185e4bce](https://github.com/facebook/react-native/commit/3b185e4bcef24e0689cccd4cf250d469b114d4da) by [@zoontek](https://github.com/zoontek))
- **Fonts:** Update font scale when recreating `RootView` ([5cda3065ce](https://github.com/facebook/react-native/commit/5cda3065ce635460a7458cbab5c10e24bea3bfe2) by [@j-piasecki](https://github.com/j-piasecki))
- **Fonts:** Fix incorrect positioning of inline view at the end of string when RTL text in LTR container ([7f224941bb](https://github.com/facebook/react-native/commit/7f224941bb807919b487d8e1634dd2124f9258b8) by [@NickGerleman](https://github.com/NickGerleman))
- **Hermes V1:** Changed the coordinates of hermes artifacts when using Hermes V1 ([d0fb33822d](https://github.com/facebook/react-native/commit/d0fb33822de38183895c8b3421f46966909beaf3) by [@j-piasecki](https://github.com/j-piasecki))
- **Locale:** Use the first available locale instead of the default one to decide `isDevicePreferredLanguageRTL` ([a03780d279](https://github.com/facebook/react-native/commit/a03780d279d0944e0dcbbf5a93680775006598b0) by Kaining Zhong)
- **New Architecture:** Correctly account for insets on first render of Modals on New Arch ([2e76fc8e8e](https://github.com/facebook/react-native/commit/2e76fc8e8ea01fbce5bd131f675364e688f49088) by [@cortinico](https://github.com/cortinico))
- **Performance:** Fix mounting is very slow on Android by shipping native transform optimizations ([c557311ed8](https://github.com/facebook/react-native/commit/c557311ed836cded8548c5bca32f3eded0abc7ff) by [@cortinico](https://github.com/cortinico))
- **Scroll:** Fixed an issue where shadow tree and native tree layouts mismatch at the end of a scroll event ([1828c53f85](https://github.com/facebook/react-native/commit/1828c53f85faf599a485b3859f8b62586696265f) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Start up:** Fix wrong default for `jsBundleAssetPath` on `DefaultReactHost` ([2246e2b82c](https://github.com/facebook/react-native/commit/2246e2b82cf0c433f9a9b385ea98e532c6f322c6) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- **Build:** Fixed using USE_FRAMEWORKS (static/dynamic) with precompiled binaries ([e723ca4d6b](https://github.com/facebook/react-native/commit/e723ca4d6b86d5a98449498395c700513ceba555) by [@chrfalch](https://github.com/chrfalch))
- **Build:** Non-UTF8 crashes Info.plist local frameworks ([91e69b5d4c](https://github.com/facebook/react-native/commit/91e69b5d4c768278680a8d9ae979bc267624ce98) by [@philipheinser](https://github.com/philipheinser))
- **Build:** Fixed variable naming error in `set_fast_float_config` method in `react_native_pods.rb` ([327057fad5](https://github.com/facebook/react-native/commit/327057fad5c78a95e6c039bfe380d78672e83a43) by [@eliotfallon213](https://github.com/eliotfallon213))
- **Build:** Fix pure cocoapods dynamic framework build ([aa4555eaf1](https://github.com/facebook/react-native/commit/aa4555eaf1b6aab83660c600e867fa6c2da4128e) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
- **Native Modules:** Fix concurrent calls into resolve/reject inside native modules ([dc879950d1](https://github.com/facebook/react-native/commit/dc879950d196dfd429229f1c4c8e743ef1799d11) by [@RSNara](https://github.com/RSNara))
- **New Architecture:** Fix overriding (xc)framework Info.plist files with RCTNewArchEnabled field ([f84514a88b](https://github.com/facebook/react-native/commit/f84514a88be00f8dcae7972f84aa89d829392a58) by [@msynowski](https://github.com/msynowski))
- **Prebuild:** Fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces ([9731e8ebc5](https://github.com/facebook/react-native/commit/9731e8ebc5ea87526a91b9903172639e062cd920) by [@kitten](https://github.com/kitten))
- **Prebuild:** Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source ([f170db412b](https://github.com/facebook/react-native/commit/f170db412b3ab46fd0894d5d66431d9c230cd3a8) by [@kitten](https://github.com/kitten))
- **RCTAlertController:** Simplify RCTAlertController, don't create additional UIWindow ([05c4321b19](https://github.com/facebook/react-native/commit/05c4321b194c3d0e146b6085bcaccc75acd3fd67) by [@okwasniewski](https://github.com/okwasniewski))
- **RCTPullToRefreshViewComponentView:** Properly initialize the `RCTPullToRefreshViewComponentView` ([27217e8bd6](https://github.com/facebook/react-native/commit/27217e8bd601757b5db6efc022db428b552a2aa4) by [@cipolleschi](https://github.com/cipolleschi))
- **RCTReactNativeFactory:** Ask the delegate for `getModuleForClass` and `getModuleInstanceFromClass` ([85b47afb48](https://github.com/facebook/react-native/commit/85b47afb48e50b036d2c2c79a008f571d3bfcb43) by [@cipolleschi](https://github.com/cipolleschi))
- **ScrollView:** Correctly propagate `ScrollView` props to `RefreshControl` ([09daad27ea](https://github.com/facebook/react-native/commit/09daad27ea22b83fab65176ea3c7f5f1488ba408) by [@cipolleschi](https://github.com/cipolleschi))
- **ScrollView:** Make sure that `ScrollView` recycled refresh control have the right props setup. ([21b93d8d7d](https://github.com/facebook/react-native/commit/21b93d8d7d46a26f728df19764f85a8aebf318bb) by [@cipolleschi](https://github.com/cipolleschi))
- **Switch:** Fixed a crash when rendering the `Switch` component ([28275a0f7b](https://github.com/facebook/react-native/commit/28275a0f7b182a215010d47fb841d9c2c36bb24c) by [@cipolleschi](https://github.com/cipolleschi))
- **Switch:** Fix Switch layout to work with iOS26 ([91d427fe52](https://github.com/facebook/react-native/commit/91d427fe52a307f9aa8579912ef956d61808dad2) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Fix selectable prop not working correctly ([f004cd39bc](https://github.com/facebook/react-native/commit/f004cd39bc4b632006085cbcf61df52bc5d25242) by [@iamAbhi-916](https://github.com/iamAbhi-916))
- **TextInput:** Update TextInput recycling logic to clean up the `inputAccessoryView` dependency. ([eb08f54594](https://github.com/facebook/react-native/commit/eb08f545948de9e2eca91ab3cb7569670c553b15) by [@ArturKalach](https://github.com/ArturKalach))
- **TextInput:** Fixed TextInput behavior when `maxLength={null}` is passed ([56ad53cb14](https://github.com/facebook/react-native/commit/56ad53cb14b5c842714fcf976b6ba81f68c140f2) by [@cipolleschi](https://github.com/cipolleschi))
- **View:** Inline `View` alignment with `lineHeight` in Text ([6da351a5ed](https://github.com/facebook/react-native/commit/6da351a5ed80a10138a5558afcb380410c8a93c9) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
### Security
- **Network:** Fixed vulnerability on undici and on-headers ([dd00c9055a](https://github.com/facebook/react-native/commit/dd00c9055a8f0c9ceac1716385a8a9874f7a4c2e) by [@cipolleschi](https://github.com/cipolleschi))
## v0.81.4
### Fixed
#### iOS specific
- Fix regression that skips artifacts code generation ([f6f5ea0b2e](https://github.com/facebook/react-native/commit/f6f5ea0b2eed894725d8f6e8bd045c99c3182026) by [@kitten](https://github.com/kitten))
- Reapplied "Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source" ([bb73315a3f](https://github.com/facebook/react-native/commit/bb73315a3fd8cd203c4ddb3ffa10bfec307c7e92) by [@kitten](https://github.com/kitten))
## v0.81.3
### Fixed
#### iOS specific
- Reverted "Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source" ([537e3ad930](https://github.com/facebook/react-native/commit/537e3ad93041c0cef959f0d20586fe97818900a6) by [@gabrieldonadel](https://github.com/gabrieldonadel))
## v0.81.2
### Added
#### Android specific
- Create a debugOptimized buildType for Android ([5e3edafec6](https://github.com/facebook/react-native/commit/5e3edafec6c69558521061dced7a6bcd046576b0) by [@cortinico](https://github.com/cortinico))
- Add `useNativeEqualsInNativeReadableArrayAndroid` and `useNativeTransformHelperAndroid` feature flag to the experimental channel. This should alleviate some of the perf issue users are seeing on Android + Reanimated + NewArch on 0.81([a346096da8](https://github.com/facebook/react-native/commit/a346096da81fccf5fbc82d83bfc128695e6ec3a5) by [@cortinico](https://github.com/cortinico))
### Fixed
#### iOS specific
- Fix Node scripts related to prebuilt tarball extraction for paths containing whitespaces ([366f2ad505](https://github.com/facebook/react-native/commit/366f2ad5057ffecc1f5b211f6aae29567ae6b7e5) by [@kitten](https://github.com/kitten))
- Use autolinking-generated react-native-config output in second step of cocoapods linking that generates artifacts and generated source ([a2eb29e5e7](https://github.com/facebook/react-native/commit/a2eb29e5e7aef8bbdf4c647c8467b5292b013b20) by [@kitten](https://github.com/kitten))
## v0.81.1
### Added
## v0.81.0-rc.0
#### iOS specific
- **Prebuild:** Added setting SWIFT_ENABLE_EXPLICIT_MODULES=NO when using precompiled to support Xcode 26 ([939a75b5ce](https://github.com/facebook/react-native/commit/939a75b5ce2a580ece4a62689582ea81480c3e97) by [@chrfalch](https://github.com/chrfalch))
### Fixed
- **Infra:** Add missing Babel dependencies ([bf2c3af93b](https://github.com/facebook/react-native/commit/bf2c3af93b146943cb35866fa9badcd188e63f5b) by [@tido64](https://github.com/tido64))
- **Accessibility:** fix `aria-label` on `TextInput` ([6965d57e75](https://github.com/facebook/react-native/commit/6965d57e75ed0cf9f265c6020d478ddb9af4bf10) by [@mdjastrzebski](https://github.com/mdjastrzebski))
#### iOS specific
- **TextInput:** Setting maxLength to 0 in TextInput now correctly blocks typing ([c5956da8c0](https://github.com/facebook/react-native/commit/c5956da8c0b735d47761af51019ed25b49001c00) by [@riteshshukla04](https://github.com/riteshshukla04))
- **Switch:** Fix Switch layout to work with iOS 26 ([ba51aeaa90](https://github.com/facebook/react-native/commit/ba51aeaa9040014e1d77c93158c96e9bf09940cf) by [@cipolleschi](https://github.com/cipolleschi))
- **C++:** Fix import RuntimeExecutor.h with USE_FRAMEWORKS ([dacd8f26fd](https://github.com/facebook/react-native/commit/dacd8f26fda61b16b52a4953267f2108181c3282) by [@sharifhh](https://github.com/sharifhh))
- **Infra:** Fix scripts for paths containing whitespaces ([94623ca8ec](https://github.com/facebook/react-native/commit/94623ca8ec969f09d8ec430e7633c3bf49a3d71e) by [@kitten](https://github.com/kitten))
- **Prebuild:** Fixed how we copy and build the Symbols folder when precompiling ReactNativeDependencies ([a843119ff1](https://github.com/facebook/react-native/commit/a843119ff1f0e2dfb1d3884ccf255784e3cea1a7) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fixed wrong jsi symbols in use when using React.xcframework ([8a2e7efe01](https://github.com/facebook/react-native/commit/8a2e7efe010c49a293c146654094b1cb5d6e6acd) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fixed copying bundles correctly to xcframeworks when precompiling ReactNativeDependencies.xcframework ([e3adf47214](https://github.com/facebook/react-native/commit/e3adf4721467557f19e6cd7a65c4e2314796bc17) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Aligned Symbols folder in React.xcframework symbols with ReactNativeDependencies.xcframework symbols. ([8c444f773a](https://github.com/facebook/react-native/commit/8c444f773a44e8554745c9cfc1451083c12b00e3) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fix "file exists" error in `ReactNativeDependencies.podspec` ([4c570b5d31](https://github.com/facebook/react-native/commit/4c570b5d31ef46e04e5fa26fa92d7f7090bf15e2) by [@vonovak](https://github.com/vonovak))
- **Prebuild:** added explicit handling of ReactCodegen ([6526a98d68](https://github.com/facebook/react-native/commit/6526a98d68dbc8578ea15cbf117c0a216c6e9af0) by [@cipolleschi](https://github.com/cipolleschi))
## v0.81.0
### Breaking
@@ -126,6 +331,7 @@
#### iOS specific
- **borderWidth:** Add support for different `borderWidth`s ([70962ef3ed](https://github.com/facebook/react-native/commit/70962ef3ed06a76a96cb2e72c374dc028628c829) by [@a-klotz-p8](https://github.com/a-klotz-p8))
- **CocoaPods:** Add the `ENTERPRISE_REPOSITORY` env variable to cocoapods infra ([23f3bf9239](https://github.com/facebook/react-native/commit/23f3bf9239a849590f1c72b25732d0090780128c) by [@cipolleschi](https://github.com/cipolleschi))
- **Modal:** Allow to interactively swipe down `Modal`s. ([28986a7599](https://github.com/facebook/react-native/commit/28986a7599952a77b8b8e433f72ca837afde310e) by [@okwasniewski](https://github.com/okwasniewski))
- **Package.swift:** Added missing search path to `Package.swift` ([592b09781b](https://github.com/facebook/react-native/commit/592b09781bb94fe6dc00ba49c7a86649980fed5d) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Add more logging around `computeNightlyTarballURL` in ios pre-build ([1a6887bd70](https://github.com/facebook/react-native/commit/1a6887bd70cdefb8fbc421467de841ece74d5c6b) by [@cortinico](https://github.com/cortinico))
@@ -136,13 +342,17 @@
- **Prebuild:** Added building `XCFframework` from the prebuild script ([55534f518a](https://github.com/facebook/react-native/commit/55534f518aab53bcdc3fe12d987ab7ef6e620c77) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Added building swift package from the prebuild script ([3c01b1b6f0](https://github.com/facebook/react-native/commit/3c01b1b6f04d285c97bb182131135903b0c1cdd5) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Added downloading of hermes artifacts when pre-building for iOS. ([41d2b5de0a](https://github.com/facebook/react-native/commit/41d2b5de0af21c72227ef030dcddf208e2eb221a) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Add release/debug switch script for React-Core-prebuilt ([42d1a7934c](https://github.com/facebook/react-native/commit/42d1a7934cad4b2c92653e3fa7781c2af8f44df4) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Added support for using USE_FRAMEWORKS with prebuilt React Native Core ([40e45f5366](https://github.com/facebook/react-native/commit/40e45f53661ce80c3a6fbbf07f52dc900afcad52) by [@chrfalch](https://github.com/chrfalch))
- **runtime:** Added `HERMES_ENABLE_DEBUGGER` to debug configuration for the `reactRuntime` target. ([560ac23001](https://github.com/facebook/react-native/commit/560ac23001b02f19d4c6ca4ea493c17060cfaf5f) by [@chrfalch](https://github.com/chrfalch))
### Changed
- **API:** `NewAppScreen` no longer internally handles device safe area, use optional `safeAreaInsets` prop (aligned in 0.81 template) ([732bd12dc2](https://github.com/facebook/react-native/commit/732bd12dc21460641ef01b23f2eb722f26b060d5) by [@huntie](https://github.com/huntie))
- **Animated:** Animated now always flattens `props.style`, which fixes an error that results from `props.style` objects in which `AnimatedNode` instances are shadowed (i.e. flattened to not exist in the resulting `props.style` object). ([da520848c9](https://github.com/facebook/react-native/commit/da520848c931f356d013623c412af11dce7ff114) by [@yungsters](https://github.com/yungsters))
- **Animated:** Creates a feature flag that changes `Animated` to no longer produce invalid `props.style` if every `AnimatedNode` instance is shadowed via style flattening. ([5c8c5388fc](https://github.com/facebook/react-native/commit/5c8c5388fc53ef2430b0bb6bbbc628479819e23d) by [@yungsters](https://github.com/yungsters))
- **Animated:** Enabled a feature flag that optimizes `Animated` to reduce memory usage. ([2a13d20085](https://github.com/facebook/react-native/commit/2a13d200850e4f161a29b252a0ccedc158e53937) by [@yungsters](https://github.com/yungsters))
- **Babel:** Added support to `react-native/babel-preset` for a `hermesParserOptions` option, that expects an object that enables overriding `hermes-parser` options. ([0508eddfe6](https://github.com/facebook/react-native/commit/0508eddfe60df60cb3bfa4074ae199bd0e492d5f) by [@yungsters](https://github.com/yungsters))
- **Error handling:** Errors will no longer have the "js engine" suffix. ([a293925280](https://github.com/facebook/react-native/commit/a2939252803d5cd4b68340da08820174c30a53e6) by [@yungsters](https://github.com/yungsters))
- **Fibers:** Reduces memory usage, by improving memory management of parent alternate fibers. (Previously, a parent fiber might retain memory associated with shadow nodes from a previous commit.) ([0411c43b3a](https://github.com/facebook/react-native/commit/0411c43b3a239384c778baad22c7b4c501008449) by [@yungsters](https://github.com/yungsters))
- **infoLog:** Removed `infoLog` from `react-native` package ([8a0cfec815](https://github.com/facebook/react-native/commit/8a0cfec81584e966c9e6ea0f5e438022e0129bcd) by [@coado](https://github.com/coado))
@@ -150,24 +360,26 @@
- **Jest:** Improved default mocking for Jest unit tests. ([1fd9508ecc](https://github.com/facebook/react-native/commit/1fd9508ecc499df89b086e0c46035f43f6f78ad9) by [@yungsters](https://github.com/yungsters))
- **LegacyArchitecture:** Raise loglevel for assertion of `LegacyArchitecture` classes ([38a4b62211](https://github.com/facebook/react-native/commit/38a4b6221164d36eb4ac95c9f3bc7f7e7235e383) by [@mdvacca](https://github.com/mdvacca))
- **LegacyArchitecture:** Raise logLevel of `LegacyArchitecture` classes when minimizing of legacy architecture is enabled ([0d1cde7f36](https://github.com/facebook/react-native/commit/0d1cde7f36e9de72c997fc812bba023694c2a369) by [@mdvacca](https://github.com/mdvacca))
- **Metro:** Bump Metro to `^0.82.5` ([083644647e](https://github.com/facebook/react-native/commit/083644647eff502f484b3ba24f9d361d5df56546) by [@robhogan](https://github.com/robhogan))
- **Metro:** Metro to ^0.83.1 ([e247be793c](https://github.com/facebook/react-native/commit/e247be793c70a374955d798d8cbbc6eba58080ec) by [@motiz88](https://github.com/motiz88))
- **React DevTools:** Bumped React DevTools to `6.1.5` ([c302902b1d](https://github.com/facebook/react-native/commit/c302902b1db7e8f8ac5b61472c095dc0755d6d1c) by [@hoxyq](https://github.com/hoxyq))
- **RuntimeExecutor:** `RuntimeExecutor`: Remove noexcept from sync ui thread utils ([7ef278af50](https://github.com/facebook/react-native/commit/7ef278af505deba6b8a47876c6824f9a7fefa427) by [@RSNara](https://github.com/RSNara))
- **Typescript:** Bump `types/react` to `19.1` ([3ae9328571](https://github.com/facebook/react-native/commit/3ae932857174e9c39cd5d9c53922f849aa1401b1) by [@gabrieldonadel](https://github.com/gabrieldonadel))
#### Android specific
- **Android SDK:** Updated targetSdk to 36 in Android. ([477d8df312](https://github.com/facebook/react-native/commit/477d8df3126b325b8cc9b410f1eaeb56b727d4d9) by [@kikoso](https://github.com/kikoso))
- **APIs:** Deprecate `DefaultNewArchitectureEntryPoint.load(Boolean, Boolean, Boolean)` ([efdf73983c](https://github.com/facebook/react-native/commit/efdf73983cef1f371511b6e1efa5e01835ebcabb) by [@cortinico](https://github.com/cortinico))
- **APIs:** Make `com.facebook.react.views.common.ContextUtils` internal ([d1ef8f1fa3](https://github.com/facebook/react-native/commit/d1ef8f1fa36cbfc34d05c409abf693e4e1cac3de) by [@cortinico](https://github.com/cortinico))
- **deps:** Bump `AGP` to `8.11.0` ([04858ecbab](https://github.com/facebook/react-native/commit/04858ecbab808ddca80e20e76f1359619bb5e865) by [@cortinico](https://github.com/cortinico))
- **deps:** Bump `Gradle` to `8.14.2` ([e20bb56f3b](https://github.com/facebook/react-native/commit/e20bb56f3b4db0d3e69154b95b952b1fe8e29959) by [@cortinico](https://github.com/cortinico))
- **deps:** Bump `Gradle` to 8.14.3 ([6892dde363](https://github.com/facebook/react-native/commit/6892dde36373bbef2d0afe535ae818b1a7164f08) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Expose `react_renderer_bridging` headers via prefab ([d1730ff960](https://github.com/facebook/react-native/commit/d1730ff960fcb9a01ee94b9e46e5a9fbb7d73f4a) by [@tomekzaw](https://github.com/tomekzaw))
- **JS FPS:** Hide JS FPS on performance overlay as not accurate ([feec8d0148](https://github.com/facebook/react-native/commit/feec8d014877b2177f1c7dded7eb9664f53ee471) by [@cortinico](https://github.com/cortinico))
- Updated targetSdk to 36 in Android. ([477d8df312](https://github.com/facebook/react-native/commit/477d8df3126b325b8cc9b410f1eaeb56b727d4d9) by [@kikoso](https://github.com/kikoso))
- **Kotlin:** Convert `UIManagerModuleConstantsHelper` to Kotlin ([45fd7feb9f](https://github.com/facebook/react-native/commit/45fd7feb9f083e5c8afc916732aed9795d344e09) by [@cortinico](https://github.com/cortinico))
- **Kotlin:** Migrate `ThemedReactContext` to Kotlin ([78c9671c24](https://github.com/facebook/react-native/commit/78c9671c241a86bedb17862e549842b7e36d77ea) by [@cortinico](https://github.com/cortinico))
- **Kotlin:** Convert `ReactViewGroup` to Kotlin ([48395d346b](https://github.com/facebook/react-native/commit/48395d346bc89f63d38889e58508304df0088e4f) by [@cortinico](https://github.com/cortinico))
- **Kotlin:** Migrate `com.facebook.react.LazyReactPackage` to Kotlin. ([b4ae5c1de1](https://github.com/facebook/react-native/commit/b4ae5c1de1003c343d43c3be1b59ee2b800b9258) by [@Xintre](https://github.com/Xintre))
- **Kotlin:** Apply Collections Kotlin DSL helpers in `ReactAndroid` package ([b2ffd34a39](https://github.com/facebook/react-native/commit/b2ffd34a392de2bddba5ee13248796ccc2db6039) by [@l2hyunwoo](https://github.com/l2hyunwoo))
- **Legacy Arch:** Introduce more deprecation warnings for Legacy Arch classes ([625f69f284](https://github.com/facebook/react-native/commit/625f69f284ddfd9c6beecaa4052a871d092053ef) by [@cortinico](https://github.com/cortinico))
#### iOS specific
@@ -223,19 +435,21 @@
- **Typescript:** Add `ImageSource` type to TypeScript ([42ca46b95c](https://github.com/facebook/react-native/commit/42ca46b95cf9938de00b76dc61948a4ae7116e2b) by [@okwasniewski](https://github.com/okwasniewski))
- **Typescript:** Devtools TS Types ([8f189fce03](https://github.com/facebook/react-native/commit/8f189fce03db367abdceca6ad57ae28b613fdd7d) by [@krystofwoldrich](https://github.com/krystofwoldrich))
- **Yoga:** Fix possible invalid measurements with width or height is zero pixels ([5cc4d0a086](https://github.com/facebook/react-native/commit/5cc4d0a086d450e0f9d8ab6194013348f9de1f58) by [@NickGerleman](https://github.com/NickGerleman))
- **Yoga:** Fixed nodes with `display: contents` set being cloned with the wrong owner ([d4b36b0300](https://github.com/facebook/react-native/commit/d4b36b03003eb2de9eaf5b57bb639bae8cc12f20) by [@j-piasecki](https://github.com/j-piasecki))
#### Android specific
- **API:** Make accessors inside HeadlessJsTaskService open again ([7ef57163cb](https://github.com/facebook/react-native/commit/7ef57163cb016317e43e563da7ea181989f6abca) by [@cortinico](https://github.com/cortinico))
- **BaseViewManager:** Remove focus change listener when dropping/recycling view instances ([94cbf206d6](https://github.com/facebook/react-native/commit/94cbf206d607477257c65039d97565a79e94c7dd) by [@Abbondanzo](https://github.com/Abbondanzo))
- **BoringLayout:** Include fallback line spacing in `BoringLayout` ([2fe6c1a947](https://github.com/facebook/react-native/commit/2fe6c1a94758223a5342fdfa90163971eb588e6a) by [@NickGerleman](https://github.com/NickGerleman))
- **Bridgeless:** Adding `shouldForwardToReactInstance` check in `ReactDelegate` for Bridgeless ([0f7bf66bba](https://github.com/facebook/react-native/commit/0f7bf66bba8498c89384e96ad9219cdad0107b0c) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Codegen:** Fix combining schema in Codegen process to exclude platforms correctly ([6104ccdc6e](https://github.com/facebook/react-native/commit/6104ccdc6ef89c2d4da25e60dcc55d73038e023f) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Edge To Edge:** Fix `Dimensions` `window` values on Android < 15 when edge-to-edge is enabled ([85d10ed904](https://github.com/facebook/react-native/commit/85d10ed90401a13de1f74aeddd773736195da285) by [@zoontek](https://github.com/zoontek))
- **FBReactNativeSpec:** Extract out `FBReactNativeSpec`'s core components including Unimplemented from auto-generated registry ([b417b0c2d5](https://github.com/facebook/react-native/commit/b417b0c2d56dc37f824c0e77e98d1014d21cd8f8) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Gradle:** Fix Gradle v8.0 builds by using .set() for Property ([777397667c](https://github.com/facebook/react-native/commit/777397667c2625aab3fc907b9ef4bd564963d8bb) by [@meghancampbel9](https://github.com/meghancampbel9))
- **ImageFetcher:** Change `free` to `delete` to call destructor of `ImageFetcher` and release `contextContainer`. ([90da666691](https://github.com/facebook/react-native/commit/90da666691745ab9bf3930dc3347d8e51683099f) by [@WoLewicki](https://github.com/WoLewicki))
- **Modal:** Fix `Modal` first frame being rendered on top-left corner ([b950fa2afb](https://github.com/facebook/react-native/commit/b950fa2afb20e2213ff6c733cb1c2465b90406ef) by [@cortinico](https://github.com/cortinico))
- **onTextLayout:** Fix `onTextLayout` metrics not incorporating `ReactTextViewManagerCallback` ([a6a2884d63](https://github.com/facebook/react-native/commit/a6a2884d63717a42ac2bafd2054991ce8b32a2e9) by [@NickGerleman](https://github.com/NickGerleman))
- **RNGP:** Fix a race condition with codegen libraries missing sources ([9013a9e666](https://github.com/facebook/react-native/commit/9013a9e66629677c47e1b69703f9fc8f4cbc1c2c) by [@cortinico](https://github.com/cortinico))
- **Runtime:** Fixed `ReactHostImpl.nativeModules` always returning an empty list ([2f46a49](https://github.com/facebook/react-native/commit/2f46a49b8d8a11d5cf4342eee83c469b545c6779) by [@lukmccall](https://github.com/lukmccall))
- **Text:** Fix more text rounding bugs ([1fe3ff86c3](https://github.com/facebook/react-native/commit/1fe3ff86c364fad023ad1e426f26608699314339) by [@NickGerleman](https://github.com/NickGerleman))
- **Text:** Fix `TextLayoutManager` `MeasureMode` Regression ([99119a2104](https://github.com/facebook/react-native/commit/99119a210487af18983145fd374ff7ebc88931f3) by [@NickGerleman](https://github.com/NickGerleman))
- **TextInput:** Fix bug where focus would jump to top text input upon clearing a separate text input. ([79c47987b7](https://github.com/facebook/react-native/commit/79c47987b74ab044574fc542fd4b13a9f11aa491) by [@joevilches](https://github.com/joevilches))
@@ -243,10 +457,13 @@
#### iOS specific
- **Gradient**: Gradient interpolation for transparent colors ([097d482446](https://github.com/facebook/react-native/commit/097d482446b7a03ca0f8c7e0254f4d770e05c79c) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Prebuild:** Fixed wrong path in prebuild hermes check ([be11f2ee77](https://github.com/facebook/react-native/commit/be11f2ee77fd793efe0a1aa225897a1924163925) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fixed resolving build type when downloading hermes artifacts ([9371e20192](https://github.com/facebook/react-native/commit/9371e201927fd105e797bf06e43943dd21e04381) by [@chrfalch](https://github.com/chrfalch))
- **Package.swift:** Add missing `React-RCTSettings` to `Package.swift` ([e40c1d265a](https://github.com/facebook/react-native/commit/e40c1d265a2045730dcf751eed4ebf32e099f0c7) by [@chrfalch](https://github.com/chrfalch))
- **Package.swift:** Fixed defines in `Package.swift` ([e2f6ce4ddf](https://github.com/facebook/react-native/commit/e2f6ce4ddfbea5814fc5d8632df14daeae3636d1) by [@chrfalch](https://github.com/chrfalch))
- **Podspec:** Fixed premature return in header file generation from podspec globs ([f2b064c2d4](https://github.com/facebook/react-native/commit/f2b064c2d40c39017ac2a31bf3caf8acef23038c) by [@chrfalch](https://github.com/chrfalch))
- **Podspec:** Fixed issue with RNDeps release/debug switch failing ([4ee2b60a1e](https://github.com/facebook/react-native/commit/4ee2b60a1eacca744d58a7ad336ca9d3714289f6) by [@chrfalch](https://github.com/chrfalch))
- **Podspec:** Fixed missing script for resolving prebuilt xcframework when switching between release/debug ([2e55241a90](https://github.com/facebook/react-native/commit/2e55241a901b4cd95917de68ce9078928820a208) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fixed wrong path in prebuild hermes check ([be11f2ee77](https://github.com/facebook/react-native/commit/be11f2ee77fd793efe0a1aa225897a1924163925) by [@chrfalch](https://github.com/chrfalch))
- **Prebuild:** Fixed resolving build type when downloading hermes artifacts ([9371e20192](https://github.com/facebook/react-native/commit/9371e201927fd105e797bf06e43943dd21e04381) by [@chrfalch](https://github.com/chrfalch))
- **RCTImage:** Allow for consuming `RCTImage` in Swift codebase by enabling "Defines Module" option ([1d80586730](https://github.com/facebook/react-native/commit/1d8058673085580f402ec3a320fce810db7ad2ef) by [@kkafar](https://github.com/kkafar))
- **RCTImageComponentView:** Fix `RCTImageComponentView` image loading after source props change with no layout invalidation ([cd5d74518b](https://github.com/facebook/react-native/commit/cd5d74518becb3355519373211d2f54ff7dbd208) by Nick Lefever)
- **RCTScreenSize:** Make `RCTScreenSize` take horizontal orientation into account ([50ce8c77a7](https://github.com/facebook/react-native/commit/50ce8c77a74f2f2574030db04dc88c6092e68ba8) by [@okwasniewski](https://github.com/okwasniewski))
@@ -607,6 +824,14 @@
- **Text:** Selection range not respected when changing text or selection when selection is forced ([d32ea66e6a](https://github.com/facebook/react-native/commit/d32ea66e6a945dd84092532401b265b12d482668) by Olivier Bouillet)
- **TextInput:** Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture ([5fd5188172](https://github.com/facebook/react-native/commit/5fd51881727b2d86f87abf04db032940ac0ec8c4) by [@j-piasecki](https://github.com/j-piasecki))
## v0.79.7
See [CHANGELOG-0.7x](./CHANGELOG-0.7x.md#v0797)
## v0.79.6
See [CHANGELOG-0.7x](./CHANGELOG-0.7x.md#v0796)
## v0.79.5
See [CHANGELOG-0.7x](./CHANGELOG-0.7x.md#v0795)
+5 -2
View File
@@ -17,10 +17,13 @@
<img src="https://img.shields.io/npm/v/react-native?color=brightgreen&label=npm%20package" alt="Current npm package version." />
</a>
<a href="https://reactnative.dev/docs/contributing">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs are welcome!" />
</a>
<a href="https://twitter.com/intent/follow?screen_name=reactnative">
<img src="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative" alt="Follow @reactnative" />
<img src="https://img.shields.io/twitter/follow/reactnative.svg?label=Follow%20@reactnative" alt="Follow @reactnative on X" />
</a>
<a href="https://bsky.app/profile/reactnative.dev">
<img src="https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff" alt="Follow @reactnative.dev on Bluesky" />
</a>
</p>
+28 -16
View File
@@ -26,10 +26,12 @@ fun getListReactAndroidProperty(name: String) = reactAndroidProperties.getProper
apiValidation {
ignoredPackages.addAll(
getListReactAndroidProperty("binaryCompatibilityValidator.ignoredPackages"))
getListReactAndroidProperty("binaryCompatibilityValidator.ignoredPackages")
)
ignoredClasses.addAll(getListReactAndroidProperty("binaryCompatibilityValidator.ignoredClasses"))
nonPublicMarkers.addAll(
getListReactAndroidProperty("binaryCompatibilityValidator.nonPublicMarkers"))
getListReactAndroidProperty("binaryCompatibilityValidator.nonPublicMarkers")
)
validationDisabled =
reactAndroidProperties
.getProperty("binaryCompatibilityValidator.validationDisabled")
@@ -37,8 +39,9 @@ apiValidation {
}
version =
if (project.hasProperty("isSnapshot") &&
(project.property("isSnapshot") as? String).toBoolean()) {
if (
project.hasProperty("isSnapshot") && (project.property("isSnapshot") as? String).toBoolean()
) {
"${reactAndroidProperties.getProperty("VERSION_NAME")}-SNAPSHOT"
} else {
reactAndroidProperties.getProperty("VERSION_NAME")
@@ -66,8 +69,10 @@ tasks.register("clean", Delete::class.java) {
description = "Remove all the build files and intermediate build outputs"
dependsOn(gradle.includedBuild("gradle-plugin").task(":clean"))
subprojects.forEach {
if (it.project.plugins.hasPlugin("com.android.library") ||
it.project.plugins.hasPlugin("com.android.application")) {
if (
it.project.plugins.hasPlugin("com.android.library") ||
it.project.plugins.hasPlugin("com.android.application")
) {
dependsOn(it.tasks.named("clean"))
}
}
@@ -77,10 +82,13 @@ tasks.register("clean", Delete::class.java) {
delete(rootProject.file("./packages/react-native/sdks/download/"))
delete(rootProject.file("./packages/react-native/sdks/hermes/"))
delete(
rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/arm64-v8a/"))
rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/arm64-v8a/")
)
delete(
rootProject.file(
"./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/"))
"./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/armeabi-v7a/"
)
)
delete(rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/x86/"))
delete(rootProject.file("./packages/react-native/ReactAndroid/src/main/jni/prebuilt/lib/x86_64/"))
delete(rootProject.file("./packages/react-native-codegen/lib"))
@@ -96,9 +104,6 @@ tasks.register("build") {
tasks.register("publishAllToMavenTempLocal") {
description = "Publish all the artifacts to be available inside a Maven Local repository on /tmp."
dependsOn(":packages:react-native:ReactAndroid:publishAllPublicationsToMavenTempLocalRepository")
// We don't publish the external-artifacts to Maven Local as ci is using it via workspace.
dependsOn(
":packages:react-native:ReactAndroid:hermes-engine:publishAllPublicationsToMavenTempLocalRepository")
}
tasks.register("publishAndroidToSonatype") {
@@ -119,13 +124,14 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
That's fine for local development, but you should not commit this change.
********************************************************************************
"""
.trimIndent())
"""
.trimIndent()
)
allprojects {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(project(":packages:react-native:ReactAndroid:hermes-engine"))
.using(module("com.facebook.react:hermes-android:0.+"))
.using(module("com.facebook.hermes:hermes-android:0.+"))
.because("Users opted to use hermes from nightly")
}
}
@@ -152,10 +158,12 @@ allprojects {
"**/build/**",
"**/hermes-engine/**",
"**/internal/featureflags/**",
"**/systeminfo/ReactNativeVersion.kt")
"**/systeminfo/ReactNativeVersion.kt",
)
listOf(
com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask::class,
com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask::class)
com.ncorti.ktfmt.gradle.tasks.KtfmtFormatTask::class,
)
.forEach { tasks.withType(it) { exclude(excludePatterns) } }
// Disable the problematic ktfmt script tasks due to symbolic link issues in subprojects
@@ -165,3 +173,7 @@ allprojects {
}
}
}
// We intentionally disable the `ktfmtCheck` tasks as the formatting is primarly handled inside
// fbsource
allprojects { tasks.withType<com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask>() { enabled = false } }
+19 -16
View File
@@ -3057,30 +3057,30 @@ type util$InspectOptions = {
};
declare type util$ParseArgsOption =
| {|
| $ReadOnly<{|
type: 'boolean',
multiple?: false,
short?: string,
default?: boolean,
|}
| {|
|}>
| $ReadOnly<{|
type: 'boolean',
multiple: true,
short?: string,
default?: Array<boolean>,
|}
| {|
|}>
| $ReadOnly<{|
type: 'string',
multiple?: false,
short?: string,
default?: string,
|}
| {|
|}>
| $ReadOnly<{|
type: 'string',
multiple: true,
short?: string,
default?: Array<string>,
|};
|}>;
type util$ParseArgsOptionToValue<TOption> = TOption['type'] extends 'boolean'
? TOption['multiple'] extends true
@@ -3137,7 +3137,7 @@ declare module 'util' {
declare function stripVTControlCharacters(str: string): string;
declare function parseArgs<
TOptions: {[string]: util$ParseArgsOption} = {||},
TOptions: {+[string]: util$ParseArgsOption} = {||},
>(config: {|
args?: Array<string>,
options?: TOptions,
@@ -3995,13 +3995,16 @@ declare class Process extends events$EventEmitter {
initgroups?: (user: number | string, extra_group: number | string) => void;
kill(pid: number, signal?: string | number): void;
mainModule: Object;
memoryUsage(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
memoryUsage: {
(): {
arrayBuffers: number,
rss: number,
heapTotal: number,
heapUsed: number,
external: number,
...
},
rss: () => number,
};
nextTick: <T>(cb: (...T) => mixed, ...T) => void;
pid: number;
+46
View File
@@ -0,0 +1,46 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
declare module '@expo/spawn-async' {
type SpawnOptions = {
cwd?: string,
env?: Object,
argv0?: string,
stdio?: string | Array<any>,
detached?: boolean,
uid?: number,
gid?: number,
shell?: boolean | string,
windowsVerbatimArguments?: boolean,
windowsHide?: boolean,
encoding?: string,
ignoreStdio?: boolean,
};
declare class SpawnPromise<T> extends Promise<T> {
child: child_process$ChildProcess;
}
type SpawnResult = {
pid?: number,
output: string[],
stdout: string,
stderr: string,
status: number | null,
signal: string | null,
};
declare function spawnAsync(
command: string,
args?: $ReadOnlyArray<string>,
options?: SpawnOptions,
): SpawnPromise<SpawnResult>;
declare module.exports: typeof spawnAsync;
}
+61
View File
@@ -0,0 +1,61 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
// Partial types for Octokit based on the usage in react-native-github
declare module '@octokit/rest' {
declare class Octokit {
constructor(options?: {auth?: string, ...}): this;
repos: $ReadOnly<{
listReleaseAssets: (
params: $ReadOnly<{
owner: string,
repo: string,
release_id: string,
}>,
) => Promise<{
data: Array<{
id: string,
name: string,
...
}>,
...
}>,
uploadReleaseAsset: (
params: $ReadOnly<{
owner: string,
repo: string,
release_id: string,
name: string,
data: Buffer,
headers: $ReadOnly<{
'content-type': string,
...
}>,
...
}>,
) => Promise<{
data: {
browser_download_url: string,
...
},
...
}>,
deleteReleaseAsset: (params: {
owner: string,
repo: string,
asset_id: string,
...
}) => Promise<mixed>,
}>;
}
declare export {Octokit};
}
+13
View File
@@ -0,0 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
declare module 'fb-dotslash' {
declare module.exports: string;
}
+421
View File
@@ -0,0 +1,421 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
declare module 'jsonc-parser' {
/**
* Creates a JSON scanner on the given text.
* If ignoreTrivia is set, whitespaces or comments are ignored.
*/
declare export const createScanner: (
text: string,
ignoreTrivia?: boolean,
) => JSONScanner;
export type ScanError = number;
export type SyntaxKind = number;
/**
* The scanner object, representing a JSON scanner at a position in the input string.
*/
export type JSONScanner = $ReadOnly<{
/**
* Sets the scan position to a new offset. A call to 'scan' is needed to get the first token.
*/
setPosition(pos: number): void,
/**
* Read the next token. Returns the token code.
*/
scan(): SyntaxKind,
/**
* Returns the zero-based current scan position, which is after the last read token.
*/
getPosition(): number,
/**
* Returns the last read token.
*/
getToken(): SyntaxKind,
/**
* Returns the last read token value. The value for strings is the decoded string content. For numbers it's of type number, for boolean it's true or false.
*/
getTokenValue(): string,
/**
* The zero-based start offset of the last read token.
*/
getTokenOffset(): number,
/**
* The length of the last read token.
*/
getTokenLength(): number,
/**
* The zero-based start line number of the last read token.
*/
getTokenStartLine(): number,
/**
* The zero-based start character (column) of the last read token.
*/
getTokenStartCharacter(): number,
/**
* An error code of the last scan.
*/
getTokenError(): ScanError,
}>;
/**
* For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.
*/
declare export const getLocation: (
text: string,
position: number,
) => Location;
/**
* Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
* Therefore, always check the errors list to find out if the input was valid.
*/
declare export const parse: (
text: string,
errors?: ParseError[],
options?: ParseOptions,
) => any;
/**
* Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
*/
declare export const parseTree: (
text: string,
errors?: ParseError[],
options?: ParseOptions,
) => Node | void;
/**
* Finds the node at the given path in a JSON DOM.
*/
declare export const findNodeAtLocation: (
root: Node,
path: JSONPath,
) => Node | void;
/**
* Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.
*/
declare export const findNodeAtOffset: (
root: Node,
offset: number,
includeRightBound?: boolean,
) => Node | void;
/**
* Gets the JSON path of the given JSON DOM node
*/
declare export const getNodePath: (node: Node) => JSONPath;
/**
* Evaluates the JavaScript object of the given JSON DOM node
*/
declare export const getNodeValue: (node: Node) => any;
/**
* Parses the given text and invokes the visitor functions for each object, array and literal reached.
*/
declare export const visit: (
text: string,
visitor: JSONVisitor,
options?: ParseOptions,
) => any;
/**
* Takes JSON with JavaScript-style comments and remove
* them. Optionally replaces every none-newline character
* of comments with a replaceCharacter
*/
declare export const stripComments: (
text: string,
replaceCh?: string,
) => string;
export type ParseError = {
error: ParseErrorCode,
offset: number,
length: number,
};
export type ParseErrorCode = number;
declare export function printParseErrorCode(
code: ParseErrorCode,
):
| 'InvalidSymbol'
| 'InvalidNumberFormat'
| 'PropertyNameExpected'
| 'ValueExpected'
| 'ColonExpected'
| 'CommaExpected'
| 'CloseBraceExpected'
| 'CloseBracketExpected'
| 'EndOfFileExpected'
| 'InvalidCommentToken'
| 'UnexpectedEndOfComment'
| 'UnexpectedEndOfString'
| 'UnexpectedEndOfNumber'
| 'InvalidUnicode'
| 'InvalidEscapeCharacter'
| 'InvalidCharacter'
| '<unknown ParseErrorCode>';
export type NodeType =
| 'object'
| 'array'
| 'property'
| 'string'
| 'number'
| 'boolean'
| 'null';
export type Node = {
type: NodeType,
value?: any,
offset: number,
length: number,
colonOffset?: number,
parent?: Node,
children?: Node[],
};
/**
* A {@linkcode JSONPath} segment. Either a string representing an object property name
* or a number (starting at 0) for array indices.
*/
export type Segment = string | number;
export type JSONPath = Segment[];
export type Location = {
/**
* The previous property key or literal value (string, number, boolean or null) or undefined.
*/
previousNode?: Node,
/**
* The path describing the location in the JSON document. The path consists of a sequence of strings
* representing an object property or numbers for array indices.
*/
path: JSONPath,
/**
* Matches the locations path against a pattern consisting of strings (for properties) and numbers (for array indices).
* '*' will match a single segment of any property name or index.
* '**' will match a sequence of segments of any property name or index, or no segment.
*/
matches: (patterns: JSONPath) => boolean,
/**
* If set, the location's offset is at a property key.
*/
isAtPropertyKey: boolean,
};
export type ParseOptions = {
disallowComments?: boolean,
allowTrailingComma?: boolean,
allowEmptyContent?: boolean,
};
/**
* Visitor called by {@linkcode visit} when parsing JSON.
*
* The visitor functions have the following common parameters:
* - `offset`: Global offset within the JSON document, starting at 0
* - `startLine`: Line number, starting at 0
* - `startCharacter`: Start character (column) within the current line, starting at 0
*
* Additionally some functions have a `pathSupplier` parameter which can be used to obtain the
* current `JSONPath` within the document.
*/
export type JSONVisitor = {
/**
* Invoked when an open brace is encountered and an object is started. The offset and length represent the location of the open brace.
*/
onObjectBegin?: (
offset: number,
length: number,
startLine: number,
startCharacter: number,
pathSupplier: () => JSONPath,
) => void,
/**
* Invoked when a property is encountered. The offset and length represent the location of the property name.
* The `JSONPath` created by the `pathSupplier` refers to the enclosing JSON object, it does not include the
* property name yet.
*/
onObjectProperty?: (
property: string,
offset: number,
length: number,
startLine: number,
startCharacter: number,
pathSupplier: () => JSONPath,
) => void,
/**
* Invoked when a closing brace is encountered and an object is completed. The offset and length represent the location of the closing brace.
*/
onObjectEnd?: (
offset: number,
length: number,
startLine: number,
startCharacter: number,
) => void,
/**
* Invoked when an open bracket is encountered. The offset and length represent the location of the open bracket.
*/
onArrayBegin?: (
offset: number,
length: number,
startLine: number,
startCharacter: number,
pathSupplier: () => JSONPath,
) => void,
/**
* Invoked when a closing bracket is encountered. The offset and length represent the location of the closing bracket.
*/
onArrayEnd?: (
offset: number,
length: number,
startLine: number,
startCharacter: number,
) => void,
/**
* Invoked when a literal value is encountered. The offset and length represent the location of the literal value.
*/
onLiteralValue?: (
value: any,
offset: number,
length: number,
startLine: number,
startCharacter: number,
pathSupplier: () => JSONPath,
) => void,
/**
* Invoked when a comma or colon separator is encountered. The offset and length represent the location of the separator.
*/
onSeparator?: (
character: string,
offset: number,
length: number,
startLine: number,
startCharacter: number,
) => void,
/**
* When comments are allowed, invoked when a line or block comment is encountered. The offset and length represent the location of the comment.
*/
onComment?: (
offset: number,
length: number,
startLine: number,
startCharacter: number,
) => void,
/**
* Invoked on an error.
*/
onError?: (
error: ParseErrorCode,
offset: number,
length: number,
startLine: number,
startCharacter: number,
) => void,
};
/**
* An edit result describes a textual edit operation. It is the result of a {@linkcode format} and {@linkcode modify} operation.
* It consist of one or more edits describing insertions, replacements or removals of text segments.
* * The offsets of the edits refer to the original state of the document.
* * No two edits change or remove the same range of text in the original document.
* * Multiple edits can have the same offset if they are multiple inserts, or an insert followed by a remove or replace.
* * The order in the array defines which edit is applied first.
* To apply an edit result use {@linkcode applyEdits}.
* In general multiple EditResults must not be concatenated because they might impact each other, producing incorrect or malformed JSON data.
*/
export type EditResult = Edit[];
/**
* Represents a text modification
*/
export type Edit = {
/**
* The start offset of the modification.
*/
offset: number,
/**
* The length of the modification. Must not be negative. Empty length represents an *insert*.
*/
length: number,
/**
* The new content. Empty content represents a *remove*.
*/
content: string,
};
/**
* A text range in the document
*/
export type Range = {
/**
* The start offset of the range.
*/
offset: number,
/**
* The length of the range. Must not be negative.
*/
length: number,
};
/**
* Options used by {@linkcode format} when computing the formatting edit operations
*/
export type FormattingOptions = $ReadOnly<{
/**
* If indentation is based on spaces (`insertSpaces` = true), the number of spaces that make an indent.
*/
tabSize?: number,
/**
* Is indentation based on spaces?
*/
insertSpaces?: boolean,
/**
* The default 'end of line' character. If not set, '\n' is used as default.
*/
eol?: string,
}>;
/**
* Computes the edit operations needed to format a JSON document.
*
* @param documentText The input text
* @param range The range to format or `undefined` to format the full content
* @param options The formatting options
* @returns The edit operations describing the formatting changes to the original document following the format described in {@linkcode EditResult}.
* To apply the edit operations to the input, use {@linkcode applyEdits}.
*/
declare export function format(
documentText: string,
range: Range | void,
options: FormattingOptions,
): EditResult;
/**
* Options used by {@linkcode modify} when computing the modification edit operations
*/
export type ModificationOptions = {
/**
* Formatting options.
*/
formattingOptions: FormattingOptions,
/**
* Optional function to define the insertion index given an existing list of properties.
*/
getInsertionIndex?: (properties: string[]) => number,
};
/**
* Computes the edit operations needed to modify a value in the JSON document.
*
* @param documentText The input text
* @param path The path of the value to change. The path represents either to the document root, a property or an array item.
* If the path points to an non-existing property or item, it will be created.
* @param value The new value for the specified property or item. If the value is undefined,
* the property or item will be removed.
* @param options Options
* @returns The edit operations describing the changes to the original document, following the format described in {@linkcode EditResult}.
* To apply the edit operations to the input, use {@linkcode applyEdits}.
*/
declare export function modify(
text: string,
path: JSONPath,
value: any,
options: ModificationOptions,
): EditResult;
/**
* Applies edits to an input string.
* @param text The input text
* @param edits Edit operations following the format described in {@linkcode EditResult}.
* @returns The text with the applied edits.
* @throws An error if the edit operations are not well-formed as described in {@linkcode EditResult}.
*/
declare export function applyEdits(text: string, edits: EditResult): string;
}
@@ -91,7 +91,19 @@ declare module 'tinybench' {
beforeEach?: (this: Task) => void | Promise<void>,
};
export type Fn = () => Promise<mixed> | mixed;
// This is defined as an interface in tinybench but we define it as an object
// to catch problems like `overriddenDuration` being misspelled.
export type FnReturnedObject = {
overriddenDuration?: number,
};
// This type is defined as returning `unknown` instead of `void` in tinybench,
// but we type it this way to avoid mistakes (we can make breaking changes
// in our definition that they can't).
export type Fn = () =>
| Promise<void | FnReturnedObject>
| void
| FnReturnedObject;
declare export class Bench extends EventTarget {
concurrency: null | 'task' | 'bench';
+2 -2
View File
@@ -21,7 +21,7 @@ declare type ws$PerMessageDeflateOptions = {
maxPayload?: number,
};
/* $FlowFixMe[incompatible-extend] - Found with Flow v0.143.1 upgrade
/* $FlowFixMe[incompatible-type] - Found with Flow v0.143.1 upgrade
* "on" definition failing with string is incompatible with string literal */
declare class ws$WebSocketServer extends events$EventEmitter {
/**
@@ -141,7 +141,7 @@ declare type ws$UnexpectedResponseListener = (
) => mixed;
declare type ws$UpgradeListener = (response: http$IncomingMessage<>) => mixed;
/* $FlowFixMe[incompatible-extend] - Found with Flow v0.143.1 upgrade
/* $FlowFixMe[incompatible-type] - Found with Flow v0.143.1 upgrade
* "on" definition failing with string is incompatible with string literal */
declare class ws$WebSocket extends events$EventEmitter {
static Server: typeof ws$WebSocketServer;
+10
View File
@@ -4,6 +4,13 @@ org.gradle.caching=true
android.useAndroidX=true
# Those 2 properties are needed to make our project compatible with
# AGP 9.0.0 for the time being. Ideally we should not opt-out of
# builtInKotlin and newDsl once AGP 9.0.0 hits stable.
# More on this: https://developer.android.com/build/releases/agp-preview#android-gradle-plugin-built-in-kotlin
android.builtInKotlin=false
android.newDsl=false
# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
@@ -12,3 +19,6 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
# Controls whether to use Hermes from nightly builds. This will speed up builds
# but should NOT be turned on for CI or release builds.
react.internal.useHermesNightly=false
# Controls whether to use Hermes 1.0. Clean and rebuild when changing.
hermesV1Enabled=false
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -1
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
+2 -2
View File
@@ -86,7 +86,7 @@ module.exports = {
globalPrefix: '',
hermesParser: true,
hot: false,
// $FlowFixMe[incompatible-call] TODO: Remove when `inlineRequires` has been removed from metro-babel-transformer in OSS
// $FlowFixMe[incompatible-type] TODO: Remove when `inlineRequires` has been removed from metro-babel-transformer in OSS
inlineRequires: true,
minify: false,
platform: '',
@@ -111,7 +111,7 @@ module.exports = {
return generate(
ast,
// $FlowFixMe[prop-missing] Error found when improving flow typing for libs
// $FlowFixMe[incompatible-type] Error found when improving flow typing for libs
{
code: true,
comments: false,
+24 -20
View File
@@ -54,16 +54,19 @@
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@electron/packager": "^18.3.6",
"@expo/spawn-async": "^1.7.2",
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
"@react-native/metro-babel-transformer": "0.82.0-main",
"@react-native/metro-config": "0.82.0-main",
"@octokit/rest": "^22.0.0",
"@react-native/metro-babel-transformer": "0.83.0-main",
"@react-native/metro-config": "0.83.0-main",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.0",
"@typescript-eslint/parser": "^8.36.0",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.30.0",
"babel-plugin-syntax-hermes-parser": "0.32.0",
"babel-plugin-transform-define": "^2.1.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"clang-format": "^1.8.0",
@@ -75,48 +78,49 @@
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-api-translator": "0.30.0",
"flow-bin": "^0.278.0",
"fb-dotslash": "0.5.8",
"flow-api-translator": "0.32.0",
"flow-bin": "^0.289.0",
"glob": "^7.1.1",
"hermes-eslint": "0.30.0",
"hermes-transform": "0.30.0",
"hermes-eslint": "0.32.0",
"hermes-transform": "0.32.0",
"ini": "^5.0.0",
"inquirer": "^7.1.0",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
"jest-diff": "^29.7.0",
"jest-junit": "^10.0.0",
"jest-junit": "^16.0.0",
"jest-snapshot": "^29.7.0",
"jsonc-parser": "2.2.1",
"markdownlint-cli2": "^0.17.2",
"markdownlint-rule-relative-links": "^3.0.0",
"memfs": "^4.7.7",
"metro-babel-register": "^0.83.1",
"metro-transform-plugins": "^0.83.1",
"memfs": "^4.38.2",
"metro-babel-register": "^0.83.3",
"metro-transform-plugins": "^0.83.3",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
"prettier": "3.6.2",
"prettier-plugin-hermes-parser": "0.31.1",
"react": "19.1.1",
"react-test-renderer": "19.1.1",
"prettier-plugin-hermes-parser": "0.32.0",
"react": "19.2.0",
"react-test-renderer": "19.2.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"signedsource": "^2.0.0",
"supports-color": "^7.1.0",
"temp-dir": "^2.0.0",
"tinybench": "^3.1.0",
"tinybench": "^4.1.0",
"typescript": "5.8.3",
"ws": "^6.2.3"
"ws": "^7.5.10"
},
"resolutions": {
"eslint-plugin-react-hooks": "6.1.0-canary-12bc60f5-20250613",
"react-is": "19.1.1",
"react-is": "19.2.0",
"on-headers": "1.1.0",
"compression": "1.8.1"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
@@ -81,10 +81,147 @@ export {Commands};
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
const COMMANDS_WITH_COVERAGE_INVALID = `
// @flow
const codegenNativeComponent = require('codegenNativeComponent');
import type {NativeComponentType} from 'codegenNativeComponent';
import type {ViewProps} from 'ViewPropTypes';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
// Coverage instrumentation of invalid Commands export - should still fail
export const Commands = (cov_1234567890().s[0]++, {
hotspotUpdate: () => {},
scrollTo: () => {},
});
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
const COMMANDS_WITH_COVERAGE_WRONG_FUNCTION = `
// @flow
const codegenNativeComponent = require('codegenNativeComponent');
import type {NativeComponentType} from 'codegenNativeComponent';
import type {ViewProps} from 'ViewPropTypes';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
// Coverage instrumentation of wrong function call - should fail
export const Commands = (cov_abcdef123().s[0]++, someOtherFunction({
supportedCommands: ['pause', 'play'],
}));
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
const COMMANDS_WITH_COMPLEX_COVERAGE_INVALID = `
// @flow
const codegenNativeComponent = require('codegenNativeComponent');
import type {NativeComponentType} from 'codegenNativeComponent';
import type {ViewProps} from 'ViewPropTypes';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
// Complex coverage instrumentation with invalid nested structure - should fail
export const Commands = (
cov_xyz789().f[1]++,
cov_xyz789().s[2]++,
{
pause: (ref) => {},
play: (ref) => {},
}
);
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
const COMMANDS_WITH_COVERAGE_WRONG_NAME = `
// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type {NativeComponentType} from 'codegenNativeComponent';
import type {ViewProps} from 'ViewPropTypes';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+pause: (viewRef: React.ElementRef<NativeType>) => void;
+play: (viewRef: React.ElementRef<NativeType>) => void;
}
// Coverage instrumentation with correct function but wrong export name - should fail
export const WrongName = (cov_wrong123().s[0]++, codegenNativeCommands<NativeCommands>({
supportedCommands: ['pause', 'play'],
}));
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
const COMMANDS_WITH_COVERAGE_TYPE_CAST_INVALID = `
// @flow
const codegenNativeComponent = require('codegenNativeComponent');
import type {NativeComponentType} from 'codegenNativeComponent';
import type {ViewProps} from 'ViewPropTypes';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+pause: (viewRef: React.ElementRef<NativeType>) => void;
+play: (viewRef: React.ElementRef<NativeType>) => void;
}
// Coverage instrumentation with type cast but wrong function - should fail
export const Commands: NativeCommands = (cov_cast123().s[0]++, invalidFunction({
supportedCommands: ['pause', 'play'],
}));
export default (codegenNativeComponent<ModuleProps>('Module'): NativeType);
`;
module.exports = {
'CommandsExportedWithDifferentNameNativeComponent.js':
COMMANDS_EXPORTED_WITH_DIFFERENT_NAME,
'CommandsExportedWithShorthandNativeComponent.js':
COMMANDS_EXPORTED_WITH_SHORTHAND,
'OtherCommandsExportNativeComponent.js': OTHER_COMMANDS_EXPORT,
'CommandsWithCoverageInvalidNativeComponent.js':
COMMANDS_WITH_COVERAGE_INVALID,
'CommandsWithCoverageWrongFunctionNativeComponent.js':
COMMANDS_WITH_COVERAGE_WRONG_FUNCTION,
'CommandsWithComplexCoverageInvalidNativeComponent.js':
COMMANDS_WITH_COMPLEX_COVERAGE_INVALID,
'CommandsWithCoverageWrongNameNativeComponent.js':
COMMANDS_WITH_COVERAGE_WRONG_NAME,
'CommandsWithCoverageTypeCastInvalidNativeComponent.js':
COMMANDS_WITH_COVERAGE_TYPE_CAST_INVALID,
};
@@ -59,6 +59,92 @@ export default codegenNativeComponent<ModuleProps>('Module', {
});
`;
// Coverage instrumentation test cases - should be recognized as valid
const COMMANDS_WITH_SIMPLE_COVERAGE = `
// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponentType} from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+pause: (viewRef: React.ElementRef<NativeType>) => void;
+play: (viewRef: React.ElementRef<NativeType>) => void;
}
export const Commands = (cov_1234567890.s[0]++, codegenNativeCommands<NativeCommands>({
supportedCommands: ['pause', 'play'],
}));
export default codegenNativeComponent<ModuleProps>('Module');
`;
const COMMANDS_WITH_COMPLEX_COVERAGE = `
// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponentType} from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+seek: (viewRef: React.ElementRef<NativeType>, position: number) => void;
+stop: (viewRef: React.ElementRef<NativeType>) => void;
}
export const Commands = (
cov_abcdef123().f[2]++,
cov_abcdef123().s[5]++,
codegenNativeCommands<NativeCommands>({
supportedCommands: ['seek', 'stop'],
})
);
export default codegenNativeComponent<ModuleProps>('Module');
`;
const COMMANDS_WITH_TYPE_CAST_COVERAGE = `
// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponentType} from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps,
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+mute: (viewRef: React.ElementRef<NativeType>) => void;
+unmute: (viewRef: React.ElementRef<NativeType>) => void;
}
export const Commands: NativeCommands = (cov_xyz789().s[1]++, codegenNativeCommands<NativeCommands>({
supportedCommands: ['mute', 'unmute'],
}));
export default codegenNativeComponent<ModuleProps>('Module');
`;
const FULL_NATIVE_COMPONENT_WITH_TYPE_EXPORT = `
// @flow
@@ -107,4 +193,9 @@ module.exports = {
'NotANativeComponent.js': NOT_A_NATIVE_COMPONENT,
'FullNativeComponent.js': FULL_NATIVE_COMPONENT,
'FullTypedNativeComponent.js': FULL_NATIVE_COMPONENT_WITH_TYPE_EXPORT,
'CommandsWithSimpleCoverageNativeComponent.js': COMMANDS_WITH_SIMPLE_COVERAGE,
'CommandsWithComplexCoverageNativeComponent.js':
COMMANDS_WITH_COMPLEX_COVERAGE,
'CommandsWithTypeCastCoverageNativeComponent.js':
COMMANDS_WITH_TYPE_CAST_COVERAGE,
};
@@ -1,5 +1,77 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Babel plugin inline view configs can inline config for CommandsWithComplexCoverageNativeComponent.js 1`] = `
"// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type { ViewProps } from 'ViewPropTypes';
import type { NativeComponentType } from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+seek: (viewRef: React.ElementRef<NativeType>, position: number) => void,
+stop: (viewRef: React.ElementRef<NativeType>) => void,
}
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'Module';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: \\"Module\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);"
`;
exports[`Babel plugin inline view configs can inline config for CommandsWithSimpleCoverageNativeComponent.js 1`] = `
"// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type { ViewProps } from 'ViewPropTypes';
import type { NativeComponentType } from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+pause: (viewRef: React.ElementRef<NativeType>) => void,
+play: (viewRef: React.ElementRef<NativeType>) => void,
}
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'Module';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: \\"Module\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);"
`;
exports[`Babel plugin inline view configs can inline config for CommandsWithTypeCastCoverageNativeComponent.js 1`] = `
"// @flow
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');
import type { ViewProps } from 'ViewPropTypes';
import type { NativeComponentType } from 'codegenNativeComponent';
type ModuleProps = $ReadOnly<{|
...ViewProps
|}>;
type NativeType = NativeComponentType<ModuleProps>;
interface NativeCommands {
+mute: (viewRef: React.ElementRef<NativeType>) => void,
+unmute: (viewRef: React.ElementRef<NativeType>) => void,
}
const NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');
let nativeComponentName = 'Module';
export const __INTERNAL_VIEW_CONFIG = {
uiViewClassName: \\"Module\\",
validAttributes: {}
};
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);"
`;
exports[`Babel plugin inline view configs can inline config for FullNativeComponent.js 1`] = `
"// @flow
@@ -153,6 +225,61 @@ exports[`Babel plugin inline view configs fails on inline config for CommandsExp
24 |"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsWithComplexCoverageInvalidNativeComponent.js 1`] = `
"/CommandsWithComplexCoverageInvalidNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
14 |
15 | // Complex coverage instrumentation with invalid nested structure - should fail
> 16 | export const Commands = (
| ^
17 | cov_xyz789().f[1]++,
18 | cov_xyz789().s[2]++,
19 | {"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsWithCoverageInvalidNativeComponent.js 1`] = `
"/CommandsWithCoverageInvalidNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
14 |
15 | // Coverage instrumentation of invalid Commands export - should still fail
> 16 | export const Commands = (cov_1234567890().s[0]++, {
| ^
17 | hotspotUpdate: () => {},
18 | scrollTo: () => {},
19 | });"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsWithCoverageTypeCastInvalidNativeComponent.js 1`] = `
"/CommandsWithCoverageTypeCastInvalidNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
19 |
20 | // Coverage instrumentation with type cast but wrong function - should fail
> 21 | export const Commands: NativeCommands = (cov_cast123().s[0]++, invalidFunction({
| ^
22 | supportedCommands: ['pause', 'play'],
23 | }));
24 |"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsWithCoverageWrongFunctionNativeComponent.js 1`] = `
"/CommandsWithCoverageWrongFunctionNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
14 |
15 | // Coverage instrumentation of wrong function call - should fail
> 16 | export const Commands = (cov_abcdef123().s[0]++, someOtherFunction({
| ^
17 | supportedCommands: ['pause', 'play'],
18 | }));
19 |"
`;
exports[`Babel plugin inline view configs fails on inline config for CommandsWithCoverageWrongNameNativeComponent.js 1`] = `
"/CommandsWithCoverageWrongNameNativeComponent.js: Native commands must be exported with the name 'Commands'
20 |
21 | // Coverage instrumentation with correct function but wrong export name - should fail
> 22 | export const WrongName = (cov_wrong123().s[0]++, codegenNativeCommands<NativeCommands>({
| ^
23 | supportedCommands: ['pause', 'play'],
24 | }));
25 |"
`;
exports[`Babel plugin inline view configs fails on inline config for OtherCommandsExportNativeComponent.js 1`] = `
"/OtherCommandsExportNativeComponent.js: 'Commands' is a reserved export and may only be used to export the result of codegenNativeCommands.
17 | }
+58 -6
View File
@@ -102,6 +102,58 @@ function isCodegenDeclaration(declaration) {
return false;
}
function isCodegenNativeCommandsDeclaration(declaration) {
if (!declaration) {
return false;
}
// Handle direct calls: codegenNativeCommands()
if (
declaration.type === 'CallExpression' &&
declaration.callee &&
declaration.callee.type === 'Identifier' &&
declaration.callee.name === 'codegenNativeCommands'
) {
return true;
}
// Handle coverage instrumentation: (cov_xxx().s[0]++, codegenNativeCommands())
if (declaration.type === 'SequenceExpression' && declaration.expressions) {
// Get the last expression in the sequence (the actual function call)
const lastExpression =
declaration.expressions[declaration.expressions.length - 1];
// Recursively check if the last expression is a valid codegenNativeCommands call
return isCodegenNativeCommandsDeclaration(lastExpression);
}
// Handle Flow type casts: (codegenNativeCommands(): NativeCommands)
if (
(declaration.type === 'TypeCastExpression' ||
declaration.type === 'AsExpression') &&
declaration.expression &&
declaration.expression.type === 'CallExpression' &&
declaration.expression.callee &&
declaration.expression.callee.type === 'Identifier' &&
declaration.expression.callee.name === 'codegenNativeCommands'
) {
return true;
}
// Handle TypeScript assertions: codegenNativeCommands() as NativeCommands
if (
declaration.type === 'TSAsExpression' &&
declaration.expression &&
declaration.expression.type === 'CallExpression' &&
declaration.expression.callee &&
declaration.expression.callee.type === 'Identifier' &&
declaration.expression.callee.name === 'codegenNativeCommands'
) {
return true;
}
return false;
}
module.exports = function ({parse, types: t}) {
return {
pre(state) {
@@ -125,12 +177,12 @@ module.exports = function ({parse, types: t}) {
const firstDeclaration = path.node.declaration.declarations[0];
if (firstDeclaration.type === 'VariableDeclarator') {
if (
firstDeclaration.init &&
firstDeclaration.init.type === 'CallExpression' &&
firstDeclaration.init.callee.type === 'Identifier' &&
firstDeclaration.init.callee.name === 'codegenNativeCommands'
) {
// Check if this is a valid codegenNativeCommands call, handling type annotations
const isValidCommandsExport = isCodegenNativeCommandsDeclaration(
firstDeclaration.init,
);
if (isValidCommandsExport) {
if (
firstDeclaration.id.type === 'Identifier' &&
firstDeclaration.id.name !== 'Commands'
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.82.0-main"
"@react-native/codegen": "0.83.0-main"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+9 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,16 +22,16 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.82.0-main",
"@react-native/dev-middleware": "0.83.0-main",
"debug": "^4.4.0",
"invariant": "^2.2.4",
"metro": "^0.83.1",
"metro-config": "^0.83.1",
"metro-core": "^0.83.1",
"metro": "^0.83.3",
"metro-config": "^0.83.3",
"metro-core": "^0.83.3",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.83.1"
"metro-resolver": "^0.83.3"
},
"peerDependencies": {
"@react-native-community/cli": "*",
@@ -40,6 +40,9 @@
"peerDependenciesMeta": {
"@react-native-community/cli": {
"optional": true
},
"@react-native/metro-config": {
"optional": true
}
},
"engines": {
@@ -116,7 +116,7 @@ function copyAll(filesToCopy: CopiedFiles) {
const src = queue.shift();
// $FlowFixMe[incompatible-type]
const dest = filesToCopy[src];
// $FlowFixMe[incompatible-call]
// $FlowFixMe[incompatible-type]
copy(src, dest, copyNext);
}
};
@@ -31,9 +31,9 @@ type MiddlewareReturn = {
...
};
// $FlowFixMe
// $FlowFixMe[incompatible-type]
const unusedStubWSServer: ws$WebSocketServer = {};
// $FlowFixMe
// $FlowFixMe[incompatible-type]
const unusedMiddlewareStub: Server = {};
const communityMiddlewareFallback = {
@@ -119,7 +119,6 @@ async function runServer(
watchFolders,
});
const {middleware, websocketEndpoints} = createDevMiddleware({
projectRoot,
serverBaseUrl: devServerUrl,
logger: createDevMiddlewareLogger(terminalReporter),
});
@@ -88,7 +88,6 @@ Diff: ${styleText(['dim', 'underline'], newVersion?.diffUrl ?? 'none')}
}
}
// $FlowFixMe
function isDiffPurgeEntry(data: Partial<DiffPurge>): data is DiffPurge {
return (
// $FlowFixMe[incompatible-type-guard]
@@ -153,7 +152,7 @@ function buildDiffUrl(oldVersion: string, newVersion: string) {
* Returns the most recent React Native version available to upgrade to.
*/
async function getLatestRnDiffPurgeVersion(): Promise<LatestVersions | void> {
const options = {
const options: RequestOptions = {
// https://developer.github.com/v3/#user-agent-required
headers: {'User-Agent': '@react-native/community-cli-plugin'} as Headers,
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<9252db36d4b1db907a38c08935ceeb38>>
Git revision: 921566790e9e16d0ecace6e49b3cfaace205958c
@generated SignedSource<<4bb67766e15e25a481c4c38873260a7a>>
Git revision: 7aa57d13e50ce9d74a91c9315c9b0ded00fbc19f
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import*as e from"../root/root.js";const t=e.Runtime.RNExperimentName,n={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};class i{name;title;unstable;docLink;feedbackLink;enabledByDefault;constructor(e){this.name=e.name,this.title=e.title,this.unstable=e.unstable,this.docLink=e.docLink,this.feedbackLink=e.feedbackLink,this.enabledByDefault=function(e,t){if(null==e)return()=>t;if("boolean"==typeof e)return()=>e;return e}(e.enabledByDefault,!1)}}const r=new class{#e=new Map;#t=new Set;register(e){if(n.didInitializeExperiments)throw new Error("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))throw new Error(`React Native Experiment ${t} is already registered`);this.#e.set(t,new i(e))}enableExperimentsByDefault(e){if(n.didInitializeExperiments)throw new Error("Experiments must be configured before constructing MainImpl");for(const n of e)if(Object.prototype.hasOwnProperty.call(t,n)){const e=this.#e.get(n);if(!e)throw new Error(`React Native Experiment ${n} is not registered`);e.enabledByDefault=()=>!0}else this.#t.add(n)}copyInto(e,t=""){for(const[i,r]of this.#e)e.register(i,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:n.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([i]);for(const t of this.#t)e.enableExperimentsByDefault([t]);n.didInitializeExperiments=!0}};r.register({name:t.JS_HEAP_PROFILER_ENABLE,title:"Enable Heap Profiler (Memory Panel)",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.REACT_NATIVE_SPECIFIC_UI,title:"Show React Native-specific UI",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>e}),r.register({name:t.ENABLE_PERFORMANCE_PANEL,title:"Enable Performance panel",unstable:!0,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.ENABLE_NETWORK_PANEL,title:"Enable Network panel",unstable:!0,enabledByDefault:()=>!1});var a=Object.freeze({__proto__:null,Instance:r,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(n.didInitializeExperiments)throw new Error("setIsReactNativeEntryPoint must be called before constructing MainImpl");n.isReactNativeEntryPoint=e}});export{a as RNExperimentsImpl};
import*as e from"../root/root.js";const t=e.Runtime.RNExperimentName,i={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};class n{name;title;unstable;docLink;feedbackLink;enabledByDefault;constructor(e){this.name=e.name,this.title=e.title,this.unstable=e.unstable,this.docLink=e.docLink,this.feedbackLink=e.feedbackLink,this.enabledByDefault=function(e,t){if(null==e)return()=>t;if("boolean"==typeof e)return()=>e;return e}(e.enabledByDefault,!1)}}const r=new class{#e=new Map;#t=new Set;register(e){if(i.didInitializeExperiments)throw new Error("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))throw new Error(`React Native Experiment ${t} is already registered`);this.#e.set(t,new n(e))}enableExperimentsByDefault(e){if(i.didInitializeExperiments)throw new Error("Experiments must be configured before constructing MainImpl");for(const i of e)if(Object.prototype.hasOwnProperty.call(t,i)){const e=this.#e.get(i);if(!e)throw new Error(`React Native Experiment ${i} is not registered`);e.enabledByDefault=()=>!0}else this.#t.add(i)}copyInto(e,t=""){for(const[n,r]of this.#e)e.register(n,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:i.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([n]);for(const t of this.#t)e.enableExperimentsByDefault([t]);i.didInitializeExperiments=!0}};r.register({name:t.JS_HEAP_PROFILER_ENABLE,title:"Enable Heap Profiler (Memory Panel)",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>!e}),r.register({name:t.REACT_NATIVE_SPECIFIC_UI,title:"Show React Native-specific UI",unstable:!1,enabledByDefault:({isReactNativeEntryPoint:e})=>e}),r.register({name:t.ENABLE_NETWORK_PANEL,title:"Enable Network panel",unstable:!0,enabledByDefault:()=>!1});var a=Object.freeze({__proto__:null,Instance:r,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(i.didInitializeExperiments)throw new Error("setIsReactNativeEntryPoint must be called before constructing MainImpl");i.isReactNativeEntryPoint=e}});export{a as RNExperimentsImpl};
@@ -1 +1 @@
import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,r,s="";function a(){return window.location.pathname}function i(e){return["node_app","js_app"].some((t=>e.includes(t)))}class o{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new o),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static isNode(){return void 0===r&&(r=i(a())),r}static setPlatform(e){s=e}static platform(){return s}static isDescriptorEnabled(e){const{experiment:t}=e;if("*"===t)return!0;if(t&&t.startsWith("!")&&h.isEnabled(t.substring(1)))return!1;if(t&&!t.startsWith("!")&&!h.isEnabled(t))return!1;const{condition:n}=e;return!n||n(_)}loadLegacyModule(e){console.log("Loading legacy module: "+e);return import(`../../${e}`).then((t=>(console.log("Loaded legacy module: "+e),t)))}}class l{#e=[];#t=new Set;#n=new Set;#r=new Set;#s=new Set;#a=new c;allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||e.push(t);return e}register(t,n,r,s,a){if(this.#t.has(t))throw new Error(`Duplicate registration of experiment '${t}'`);this.#t.add(t),this.#e.push(new m(this,t,n,Boolean(r),s??e.DevToolsPath.EmptyUrlString,a??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==this.#a.get(e)&&(!(!this.#n.has(e)&&!this.#r.has(e))||(!!this.#s.has(e)||Boolean(this.#a.get(e))))}setEnabled(e,t){this.checkExperiment(e),this.#a.set(e,t)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#r.clear(),this.#s.clear()}cleanUpStaleExperiments(){this.#a.cleanUpStaleExperiments(this.#t)}checkExperiment(e){if(!this.#t.has(e))throw new Error(`Unknown experiment '${e}'`)}}class c{#e={};constructor(){try{const e=self.localStorage?.getItem("experiments");e&&(this.#e=JSON.parse(e))}catch{console.error("Failed to parse localStorage['experiments']")}}get(e){return this.#e[e]}set(e,t){this.#e[e]=t,this.#i()}cleanUpStaleExperiments(e){for(const[t]of Object.entries(this.#e))e.has(t)||delete this.#e[t];this.#i()}#i(){self.localStorage?.setItem("experiments",JSON.stringify(this.#e))}}class m{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,r,s,a){this.name=t,this.title=n,this.unstable=r,this.docLink=s,this.feedbackLink=a,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const h=new l;var E,p,d,u;!function(e){e.REACT_NATIVE_SPECIFIC_UI="react-native-specific-ui",e.JS_HEAP_PROFILER_ENABLE="js-heap-profiler-enable",e.ENABLE_PERFORMANCE_PANEL="enable-performance-panel",e.ENABLE_NETWORK_PANEL="enable-network-panel"}(E||(E={})),function(e){e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(p||(p={})),function(e){e[e.ALLOW=0]="ALLOW",e[e.ALLOW_WITHOUT_LOGGING=1]="ALLOW_WITHOUT_LOGGING",e[e.DISABLE=2]="DISABLE"}(d||(d={})),function(e){e.ALL_SCRIPTS="ALL_SCRIPTS",e.SIDE_EFFECT_FREE_SCRIPTS_ONLY="SIDE_EFFECT_FREE_SCRIPTS_ONLY",e.NO_SCRIPTS="NO_SCRIPTS"}(u||(u={}));const _=Object.create(null),f={canDock:()=>Boolean(o.queryParam("can_dock")),notSourcesHideAddFolder:()=>Boolean(o.queryParam(p.NOT_SOURCES_HIDE_ADD_FOLDER)),reactNativeUnstableNetworkPanel:()=>Boolean(o.queryParam(p.REACT_NATIVE_UNSTABLE_NETWORK_PANEL))||h.isEnabled("enable-network-panel")};var x=Object.freeze({__proto__:null,get ConditionName(){return p},Experiment:m,ExperimentsSupport:l,get GenAiEnterprisePolicyValue(){return d},get HostConfigFreestylerExecutionMode(){return u},get RNExperimentName(){return E},Runtime:o,conditions:f,experiments:h,getChromeVersion:()=>{const e=navigator.userAgent.match(/(?:^|\W)(?:Chrome|HeadlessChrome)\/(\S+)/);return e&&e.length>1?e[1]:""},getPathName:a,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},hostConfig:_,isNodeEntry:i});export{x as Runtime};
import*as e from"../platform/platform.js";const t=new URLSearchParams(location.search);let n,r,s="";function a(){return window.location.pathname}function i(e){return["node_app","js_app"].some((t=>e.includes(t)))}class o{constructor(){}static instance(e={forceNew:null}){const{forceNew:t}=e;return n&&!t||(n=new o),n}static removeInstance(){n=void 0}static queryParam(e){return t.get(e)}static setQueryParamForTesting(e,n){t.set(e,n)}static isNode(){return void 0===r&&(r=i(a())),r}static setPlatform(e){s=e}static platform(){return s}static isDescriptorEnabled(e){const{experiment:t}=e;if("*"===t)return!0;if(t&&t.startsWith("!")&&h.isEnabled(t.substring(1)))return!1;if(t&&!t.startsWith("!")&&!h.isEnabled(t))return!1;const{condition:n}=e;return!n||n(_)}loadLegacyModule(e){console.log("Loading legacy module: "+e);return import(`../../${e}`).then((t=>(console.log("Loaded legacy module: "+e),t)))}}class l{#e=[];#t=new Set;#n=new Set;#r=new Set;#s=new Set;#a=new c;allConfigurableExperiments(){const e=[];for(const t of this.#e)this.#n.has(t.name)||e.push(t);return e}register(t,n,r,s,a){if(this.#t.has(t))throw new Error(`Duplicate registration of experiment '${t}'`);this.#t.add(t),this.#e.push(new m(this,t,n,Boolean(r),s??e.DevToolsPath.EmptyUrlString,a??e.DevToolsPath.EmptyUrlString))}isEnabled(e){return this.checkExperiment(e),!1!==this.#a.get(e)&&(!(!this.#n.has(e)&&!this.#r.has(e))||(!!this.#s.has(e)||Boolean(this.#a.get(e))))}setEnabled(e,t){this.checkExperiment(e),this.#a.set(e,t)}enableExperimentsTransiently(e){for(const t of e)this.checkExperiment(t),this.#n.add(t)}enableExperimentsByDefault(e){for(const t of e)this.checkExperiment(t),this.#r.add(t)}setServerEnabledExperiments(e){for(const t of e)this.checkExperiment(t),this.#s.add(t)}enableForTest(e){this.checkExperiment(e),this.#n.add(e)}disableForTest(e){this.checkExperiment(e),this.#n.delete(e)}clearForTest(){this.#e=[],this.#t.clear(),this.#n.clear(),this.#r.clear(),this.#s.clear()}cleanUpStaleExperiments(){this.#a.cleanUpStaleExperiments(this.#t)}checkExperiment(e){if(!this.#t.has(e))throw new Error(`Unknown experiment '${e}'`)}}class c{#e={};constructor(){try{const e=self.localStorage?.getItem("experiments");e&&(this.#e=JSON.parse(e))}catch{console.error("Failed to parse localStorage['experiments']")}}get(e){return this.#e[e]}set(e,t){this.#e[e]=t,this.#i()}cleanUpStaleExperiments(e){for(const[t]of Object.entries(this.#e))e.has(t)||delete this.#e[t];this.#i()}#i(){self.localStorage?.setItem("experiments",JSON.stringify(this.#e))}}class m{name;title;unstable;docLink;feedbackLink;#e;constructor(e,t,n,r,s,a){this.name=t,this.title=n,this.unstable=r,this.docLink=s,this.feedbackLink=a,this.#e=e}isEnabled(){return this.#e.isEnabled(this.name)}setEnabled(e){this.#e.setEnabled(this.name,e)}}const h=new l;var E,p,d,u;!function(e){e.REACT_NATIVE_SPECIFIC_UI="react-native-specific-ui",e.JS_HEAP_PROFILER_ENABLE="js-heap-profiler-enable",e.ENABLE_NETWORK_PANEL="enable-network-panel"}(E||(E={})),function(e){e.NOT_SOURCES_HIDE_ADD_FOLDER="!sources.hide_add_folder",e.REACT_NATIVE_UNSTABLE_NETWORK_PANEL="unstable_enableNetworkPanel"}(p||(p={})),function(e){e[e.ALLOW=0]="ALLOW",e[e.ALLOW_WITHOUT_LOGGING=1]="ALLOW_WITHOUT_LOGGING",e[e.DISABLE=2]="DISABLE"}(d||(d={})),function(e){e.ALL_SCRIPTS="ALL_SCRIPTS",e.SIDE_EFFECT_FREE_SCRIPTS_ONLY="SIDE_EFFECT_FREE_SCRIPTS_ONLY",e.NO_SCRIPTS="NO_SCRIPTS"}(u||(u={}));const _=Object.create(null),f={canDock:()=>Boolean(o.queryParam("can_dock")),notSourcesHideAddFolder:()=>Boolean(o.queryParam(p.NOT_SOURCES_HIDE_ADD_FOLDER)),reactNativeUnstableNetworkPanel:()=>Boolean(o.queryParam(p.REACT_NATIVE_UNSTABLE_NETWORK_PANEL))||h.isEnabled("enable-network-panel")};var x=Object.freeze({__proto__:null,get ConditionName(){return p},Experiment:m,ExperimentsSupport:l,get GenAiEnterprisePolicyValue(){return d},get HostConfigFreestylerExecutionMode(){return u},get RNExperimentName(){return E},Runtime:o,conditions:f,experiments:h,getChromeVersion:()=>{const e=navigator.userAgent.match(/(?:^|\W)(?:Chrome|HeadlessChrome)\/(\S+)/);return e&&e.length>1?e[1]:""},getPathName:a,getRemoteBase:function(e=self.location.toString()){const t=new URL(e).searchParams.get("remoteBase");if(!t)return null;const n=/\/serve_file\/(@[0-9a-zA-Z]+)\/?$/.exec(t);return n?{base:`devtools://devtools/remote/serve_file/${n[1]}/`,version:n[1]}:null},hostConfig:_,isNodeEntry:i});export{x as Runtime};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -238,7 +238,7 @@ import"../../ui/components/icon_button/icon_button.js";import"../../ui/component
<td>${e.method}</td>
<td>${e.params?d`<code>${JSON.stringify(e.params)}</code>`:""}</td>
<td>
${e.result?d`<code>${JSON.stringify(e.result)}</code>`:e.error?d`<code>${JSON.stringify(e.error)}</code>`:"(pending)"}
${e.result?d`<code>${JSON.stringify(e.result)}</code>`:e.error?d`<code>${JSON.stringify(e.error)}</code>`:"id"in e?"(pending)":""}
</td>
<td data-value=${e.elapsedTime||0}>
${"id"in e?e.elapsedTime?U(A.sMs,{PH1:String(e.elapsedTime)}):"(pending)":""}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -983,7 +983,7 @@ import*as e from"../../../services/trace_bounds/trace_bounds.js";import*as t fro
<p class="tooltip">${Ai(Oi.feedbackTooltip)}</p>
</div>
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0),this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab("insights")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
`,n=s.Directives.repeat([i],(()=>this.#ve),(e=>e));s.render(n,this.#e,{host:this})}}customElements.define("devtools-performance-sidebar-insights",Ui);var Bi=Object.freeze({__proto__:null,SidebarInsightsTab:Ui});class qi extends Event{removedAnnotation;static eventName="removeannotation";constructor(e){super(qi.eventName,{bubbles:!0,composed:!0}),this.removedAnnotation=e}}class Vi extends Event{annotation;static eventName="revealannotation";constructor(e){super(Vi.eventName,{bubbles:!0,composed:!0}),this.annotation=e}}class ji extends r.Widget.VBox{#ri=new r.TabbedPane.TabbedPane;#tn=new Wi;#in=new Ki;#nn=a.Settings.Settings.instance().createSetting("timeline-user-has-opened-sidebar-once",!1);userHasOpenedSidebarOnce(){return this.#nn.get()}constructor(){super(),this.setMinimumSize(170,0);const e=!S.Runtime.experiments.isEnabled("react-native-specific-ui");e&&this.#ri.appendTab("insights","Insights",this.#tn,void 0,void 0,!1,!1,0,"timeline.insights-tab"),this.#ri.appendTab("annotations","Annotations",this.#in,void 0,void 0,!1,!1,1,"timeline.annotations-tab"),this.#ri.selectTab(e?"insights":"annotations")}wasShown(){this.#nn.set(!0),this.#ri.show(this.element),this.#rn(),"insights"===this.#ri.selectedTabId&&this.#ri.tabIsDisabled("insights")&&this.#ri.selectTab("annotations")}setAnnotations(e,t){this.#in.setAnnotations(e,t),this.#rn()}#rn(){const e=this.#in.deduplicatedAnnotations();this.#ri.setBadge("annotations",e.length>0?e.length.toString():null)}setParsedTrace(e,t){this.#tn.setParsedTrace(e,t)}setInsights(e){this.#tn.setInsights(e),this.#ri.setTabEnabled("insights",null!==e)}setActiveInsight(e){this.#tn.setActiveInsight(e),e&&this.#ri.selectTab("insights")}}class Wi extends r.Widget.VBox{#sn=new Ui;constructor(){super(),this.element.classList.add("sidebar-insights"),this.element.appendChild(this.#sn)}setParsedTrace(e,t){this.#sn.parsedTrace=e,this.#sn.traceMetadata=t}setInsights(e){this.#sn.insights=e}setActiveInsight(e){this.#sn.activeInsight=e}}class Ki extends r.Widget.VBox{#sn=new xi;constructor(){super(),this.element.classList.add("sidebar-annotations"),this.element.appendChild(this.#sn)}setAnnotations(e,t){this.#sn.annotationEntryToColorMap=t,this.#sn.annotations=e}deduplicatedAnnotations(){return this.#sn.deduplicatedAnnotations()}}var Gi=Object.freeze({__proto__:null,DEFAULT_SIDEBAR_TAB:"insights",DEFAULT_SIDEBAR_WIDTH_PX:240,RemoveAnnotation:qi,RevealAnnotation:Vi,SidebarWidget:ji}),Yi={cssText:`:host{max-height:100%;overflow:hidden auto;scrollbar-width:thin}.timeline-summary{font-size:var(--sys-typescale-body4-size);flex-direction:column;padding:0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8)}.summary-range{font-weight:var(--ref-typeface-weight-medium);height:24.5px;line-height:22px}.category-summary{gap:var(--sys-size-4);display:flex;flex-direction:column}.category-row{min-height:16px;line-height:16px}.category-swatch{display:inline-block;width:var(--sys-size-6);height:var(--sys-size-6);margin-right:var(--sys-size-4);top:var(--sys-size-1);position:relative;border:var(--sys-size-1) solid var(--sys-color-neutral-outline)}.category-name{display:inline;word-break:break-all}.category-value{text-align:right;position:relative;float:right;z-index:0;width:var(--sys-size-19)}.background-bar-container{position:absolute;inset:0 0 0 var(--sys-size-3);z-index:-1}.background-bar{width:100%;float:right;height:var(--sys-size-8);background-color:var(--sys-color-surface-yellow);border-bottom:var(--sys-size-1) solid var(--sys-color-yellow-outline)}\n/*# sourceURL=${import.meta.resolve("./timelineSummary.css")} */\n`};const{render:Xi,html:Ji}=s,Zi={total:"Total",rangeSS:"Range: {PH1} {PH2}"},Qi=t.i18n.registerUIStrings("panels/timeline/components/TimelineSummary.ts",Zi),en=t.i18n.getLocalizedString.bind(void 0,Qi);class tn extends HTMLElement{#e=r.UIUtils.createShadowRootWithCoreStyles(this,{cssFile:Yi,delegatesFocus:void 0});#on=0;#an=0;#ln=0;#dn=[];set data(e){this.#ln=e.total,this.#dn=e.categories,this.#on=e.rangeStart,this.#an=e.rangeEnd,this.#i()}#i(){const e=Ji`
<div class="timeline-summary">
<div class="summary-range">${en(Zi.rangeSS,{PH1:t.TimeUtilities.millisToString(this.#on),PH2:t.TimeUtilities.millisToString(this.#an)})}</div>
<div class="category-summary">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.82.0-main",
"version": "0.83.0-main",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
@@ -0,0 +1,33 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`prepareDebuggerShellFromDotSlashFile fails with the expected error message for a missing dotslash file 1`] = `
Object {
"code": "unexpected_error",
"humanReadableMessage": "An unexpected error occured while installing the latest version of React Native DevTools. Using a fallback version instead.",
"verboseInfo": Any<String>,
}
`;
exports[`prepareDebuggerShellFromDotSlashFile fails with the expected error message for missing platforms 1`] = `
Object {
"code": "platform_not_supported",
"humanReadableMessage": "The latest version of React Native DevTools is not supported on this platform. Using a fallback version instead.",
"verboseInfo": Any<String>,
}
`;
exports[`prepareDebuggerShellFromDotSlashFile scenarios requiring a local HTTP server fails with the expected error message for a corrupted tarball 1`] = `
Object {
"code": "possible_corruption",
"humanReadableMessage": "Failed to verify the latest version of React Native DevTools. Using a fallback version instead. ",
"verboseInfo": Any<String>,
}
`;
exports[`prepareDebuggerShellFromDotSlashFile scenarios requiring a local HTTP server fails with the expected error message for a network error 1`] = `
Object {
"code": "likely_offline",
"humanReadableMessage": "Failed to download the latest version of React Native DevTools. Using a fallback version instead. Connect to the internet or check your network settings.",
"verboseInfo": Any<String>,
}
`;
@@ -0,0 +1,59 @@
#!/usr/bin/env dotslash
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 113510892,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "http://$HOST:$PORT/corrupted.tar.gz"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 113243910,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "http://$HOST:$PORT/corrupted.tar.gz"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 108810433,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "http://$HOST:$PORT/corrupted.tar.gz"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 113769989,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "http://$HOST:$PORT/corrupted.tar.gz"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
}
}
}
@@ -0,0 +1,59 @@
#!/usr/bin/env dotslash
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 113510892,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "https://$HOST:$PORT/does-not-exist"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 113243910,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "https://$HOST:$PORT/does-not-exist"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 108810433,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "https://$HOST:$PORT/does-not-exist"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 113769989,
"hash": "sha256",
"digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"providers": [
{
"type": "http",
"url": "https://$HOST:$PORT/does-not-exist"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
}
}
}
@@ -0,0 +1,6 @@
#!/usr/bin/env dotslash
{
"name": "React Native DevTools",
"platforms": {}
}
@@ -0,0 +1,139 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
const {
prepareDebuggerShellFromDotSlashFile,
} = require('../src/node/private/LaunchUtils');
const fs = require('fs').promises;
const http = require('http');
const os = require('os');
const path = require('path');
// The implementation of prepareDebuggerShellFromDotSlashFile relies on
// details of DotSlash that are not guaranteed to be stable (support for
// `dotslash -- fetch <file>`, certain strings being printed to stderr).
// This (admittedly elaborate) test suite ensures we'll fail loudly if we
// try to upgrade DotSlash to a version that breaks our assumptions.
describe('prepareDebuggerShellFromDotSlashFile', () => {
test('fails with the expected error message for missing platforms', async () => {
const result = await prepareDebuggerShellFromDotSlashFile(
path.join(__dirname, 'dotslash-file-with-missing-platforms.jsonc'),
);
expect(result).toMatchSnapshot({
verboseInfo: expect.any(String),
});
});
test('fails with the expected error message for a missing dotslash file', async () => {
const result = await prepareDebuggerShellFromDotSlashFile(
path.join(__dirname, 'dotslash-file-that-does-not-exist.jsonc'),
);
expect(result).toMatchSnapshot({
verboseInfo: expect.any(String),
});
});
describe('scenarios requiring a local HTTP server', () => {
let server, scratchDir;
beforeEach(async () => {
scratchDir = await fs.mkdtemp(path.join(os.tmpdir(), 'dotslash-test-'));
server = http.createServer((request, response) => {
if (request.url === '/corrupted.tar.gz') {
response.writeHead(200, {'Content-Type': 'application/gzip'});
response.end(
'Hello, world!\n' + 'This simulated a corrupted tarball.',
);
} else {
response.writeHead(404);
response.end();
}
});
await new Promise((resolve, reject) => {
server.on('error', reject);
server.listen(0, 'localhost', () => {
server.removeListener('error', reject);
resolve();
});
});
});
afterEach(async () => {
await fs.rm(scratchDir, {recursive: true, force: true});
if (server.listening) {
await new Promise((resolve, reject) => {
server.close(error => {
if (error) {
reject(error);
} else {
resolve();
}
});
});
}
});
test('fails with the expected error message for a corrupted tarball', async () => {
const dotslashFileContents = injectHostPort(
await fs.readFile(
path.join(
__dirname,
'dotslash-file-simulating-data-corruption.jsonc',
),
'utf8',
),
server.address(),
);
await fs.writeFile(
path.join(scratchDir, 'dotslash-file.jsonc'),
dotslashFileContents,
);
const result = await prepareDebuggerShellFromDotSlashFile(
path.join(scratchDir, 'dotslash-file.jsonc'),
);
expect(result).toMatchSnapshot({
verboseInfo: expect.any(String),
});
});
test('fails with the expected error message for a network error', async () => {
const dotslashFileContents = injectHostPort(
await fs.readFile(
path.join(__dirname, 'dotslash-file-simulating-network-error.jsonc'),
'utf8',
),
server.address(),
);
await fs.writeFile(
path.join(scratchDir, 'dotslash-file.jsonc'),
dotslashFileContents,
);
const result = await prepareDebuggerShellFromDotSlashFile(
path.join(scratchDir, 'dotslash-file.jsonc'),
);
expect(result).toMatchSnapshot({
verboseInfo: expect.any(String),
});
});
});
});
function injectHostPort(
dotslashFileContents: string,
address: net$Socket$address,
) {
const host =
address.family === 'IPv6' ? `[${address.address}]` : address.address;
return dotslashFileContents
.replaceAll('$HOST', host)
.replaceAll('$PORT', address.port.toString());
}
@@ -22,7 +22,7 @@ describe('Electron dependency', () => {
// $FlowFixMe[untyped-import] - package.json is not typed
const ourPackageJson = require('../package.json');
const declaredElectronVersion = ourPackageJson.dependencies.electron;
const declaredElectronVersion = ourPackageJson.devDependencies.electron;
expect(declaredElectronVersion).toBeTruthy();
// $FlowFixMe[untyped-import] - package.json is not typed
@@ -1,62 +1,75 @@
#!/usr/bin/env dotslash
// @generated SignedSource<<686df5695b32a90cd465412d979a1a3f>>
// @generated SignedSource<<8b06371489dc8b79c23cbf095568c91a>>
{
"name": "React Native DevTools",
"platforms": {
"linux-aarch64": {
"size": 113511487,
"size": 116051181,
"hash": "sha256",
"digest": "c22f7d5e029357f05055ce7c56cc284a0d441d558e103a7b7ebae118c67d0b95",
"digest": "a6060e1291f9ee7e9feecd511012c041ed2a65c6df6f8ab5aca4d96adbbc9921",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPRilWDJV8xyKEv9lqYn7Hf2kyZg6nqW8KctGZCXsU95lS_MTFyAmEULrB3J6hGCjqBY2Zl-uq_FjERAIgzbZFWX2eceacTbutBSOKEj6QTZzkVN_L1zPh2lGh24x29MHpkwUzw4E-kAXV43f-11QxqD7orI1QicyOnsmUqeRNKE_QjM9rNRsw6iE8"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOD3-UmqD25MctpnB7Ogj0A8nHDs-SgFnMNFfStIxOajFAFSN93zuoWsLD3ylc3wVuX6-L-ndcMftTd7tlR1ZZWYy4a7g78w4N1UTzIT_z9vdOXpYGe7fZrHXiBHJu0QexD0b54OcdDSEFhh0-7puUTGPnIg3pHhThiU6bf_5AqvGIEYA5FGjih3zY"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-arm64/React Native DevTools"
},
"linux-x86_64": {
"size": 113244728,
"size": 115927343,
"hash": "sha256",
"digest": "d749aee18d6c969f033511ed631b439c578068cc20786974bc0ee707c6c2f177",
"digest": "354f6550617d0c6b4bb4478ad085d4efe3671ba9a1b78d90d9bfc003a523cb6d",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQP8NAAXjHJ-9NJThip1nnmVim4yiS1tdYAXmWl2Remiluq5f13nXA8YEadsmGRLWxXz2WJouHXSK47ea4a30fxewyKeTt0niFn3T-lr_91m3Ve5ZS-FOZ_9CRVCkv5zC-Z1FlXJGOnphfWetIU10Pw9tho3IzjdSNlXle0XTrkJ2AyKSl4cKPaX"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQMVMfCfSykWSI8mB5koUEUtx819xGQGW3Tm1DBpEmjWA_g8C4PoPPDCIPpgJmB5nUKrv081_dtayoArCncyFJVs0ofbxGn0EkaEW2vW3OJ2J0XMH58v5cTLED3dT8TmWwAg6aYUTr0ch8DfVXRxsibYUIWaxJUwOJ-urR-iQm7YPQUboLElaJbM"
}
],
"format": "tar.gz",
"path": "React Native DevTools-linux-x64/React Native DevTools"
},
"macos-aarch64": {
"size": 108805847,
"size": 110891048,
"hash": "sha256",
"digest": "dc4a6cfa3d2d8646db8793ef497e43ad72be54bb14ed96345d059880ff72ce1e",
"digest": "df41cfce9bc977ef4fdc66c3c892c0eedee5b07aa618550308157c51b8e75561",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPuZx9G4h30mUDM0hZ8y74LbzAi7-S6jnOqq8uyfDdIptLwIgpb8CKB8F2tduvaBFMGd7obwXd2NVy01r6XKVdgAK5-QTp8PYUPUE7VSCi6QAqobXcQ2uq_lY-jgyj8XkV4Ua4gA6KR609Bmh-beSTOrSqMymqVodaGqoGjB_9jVwfD99_PfFlex-Ta"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQOGfzOOV_mwg63orI4Hv0VQKQtE5Vk60eSl55gZDd0djjU-lmqddRZm_LxsWsek4xM7qIxqCbw6wGx7zqnrlmQGyfD98n0TBFh3uhVeYP_j3r2UkKci6tqjEqcLTHjFj3agjI6jDEe3fDpZtwKY4UMhXdVP4o1goYq13rG-IQAqIsAm04MnPFOYyp5X"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"macos-x86_64": {
"size": 113766610,
"size": 117777930,
"hash": "sha256",
"digest": "74178859ce6a1c26c32055e192b1b123822c76c827ea86a6dfdb5463b89b1ace",
"digest": "96805c51623a163b1d94b501e2e091f403b4c3575063bd7363f8e1550cda8dc5",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQN6DjGhr8_L7N_cwrh8pi3cfNcbn9dot_QQpgwe3Vv-780FDgi6JUeMvbo_wbFoT2rogxfHZ0-NbXbKdWYwhGUoGeQuikT57QnVMOYuPUTjlQUgYy0Ng9XPhq3iSEYwlMV1XsUJuPFRUg-hIHcgaaA55JoTLXZ1fLYydhHnmgRxGHc4pxaHvSpTtQ"
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQNbF-vba13QuctGdSckSWSApEqUne0w8vGceEm5u9VNYqHzwaZu6_T0n12Ml7aHuNgAgU0OOxJKUjcr2DVsNEsjcCYwMqCjZys8yF8NfM39OH1YePjHZCw5jinydbhGxhF1zbJ_zKmuOx1FhJtzCD3CUbLSea7fuhPh6ytLUIu3Ctx4aFQLFtbJZQ"
}
],
"format": "tar.gz",
"path": "React Native DevTools.app/Contents/MacOS/React Native DevTools"
},
"windows-x86_64": {
"size": 125533589,
"hash": "sha256",
"digest": "7f560e6d68b4b917c53ba0518a778a20e267cce55474ad972d345b2738746a52",
"providers": [
{
"type": "http",
"url": "https://scontent.xx.fbcdn.net/mci_ab/uap/?ab_b=m&ab_page=react_native_devtools_binaries&ab_entry=AQPZzccNNBkp1OKt_SPZ-iDoK5LDWyvZhFMgz4oTf9Ja9PlKU7i_5ydAVd714waJteCM1cdAidPN6PumBRs1uK12E9moytEskWXlMPbQObFpaTnkxLn6xp3N5EAKbAXvPfecX41Tz_7HRqh19_hW3XpwXF-VNsAdtn59ApMtX1fpN0peB1l4o57P"
}
],
"format": "tar.gz",
"path": "React Native DevTools-win32-x64/React Native DevTools.exe"
}
}
}

Some files were not shown because too many files have changed in this diff Show More