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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54226https://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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
- **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))
- 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
- 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.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
- **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
- **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
- **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))
- **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 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))
- **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
#### 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
@@ -554,6 +824,10 @@
- **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))
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
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
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
import*asefrom"../root/root.js";constt=e.Runtime.RNExperimentName,n={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};classi{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"==typeofe)return()=>e;returne}(e.enabledByDefault,!1)}}constr=newclass{#e=newMap;#t=newSet;register(e){if(n.didInitializeExperiments)thrownewError("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))thrownewError(`React Native Experiment ${t} is already registered`);this.#e.set(t,newi(e))}enableExperimentsByDefault(e){if(n.didInitializeExperiments)thrownewError("Experiments must be configured before constructing MainImpl");for(constnofe)if(Object.prototype.hasOwnProperty.call(t,n)){conste=this.#e.get(n);if(!e)thrownewError(`React Native Experiment ${n} is not registered`);e.enabledByDefault=()=>!0}elsethis.#t.add(n)}copyInto(e,t=""){for(const[i,r]ofthis.#e)e.register(i,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:n.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([i]);for(consttofthis.#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});vara=Object.freeze({__proto__:null,Instance:r,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(n.didInitializeExperiments)thrownewError("setIsReactNativeEntryPoint must be called before constructing MainImpl");n.isReactNativeEntryPoint=e}});export{aasRNExperimentsImpl};
import*asefrom"../root/root.js";constt=e.Runtime.RNExperimentName,i={didInitializeExperiments:!1,isReactNativeEntryPoint:!1};classn{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"==typeofe)return()=>e;returne}(e.enabledByDefault,!1)}}constr=newclass{#e=newMap;#t=newSet;register(e){if(i.didInitializeExperiments)thrownewError("Experiments must be registered before constructing MainImpl");const{name:t}=e;if(this.#e.has(t))thrownewError(`React Native Experiment ${t} is already registered`);this.#e.set(t,newn(e))}enableExperimentsByDefault(e){if(i.didInitializeExperiments)thrownewError("Experiments must be configured before constructing MainImpl");for(constiofe)if(Object.prototype.hasOwnProperty.call(t,i)){conste=this.#e.get(i);if(!e)thrownewError(`React Native Experiment ${i} is not registered`);e.enabledByDefault=()=>!0}elsethis.#t.add(i)}copyInto(e,t=""){for(const[n,r]ofthis.#e)e.register(n,t+r.title,r.unstable,r.docLink,r.feedbackLink),r.enabledByDefault({isReactNativeEntryPoint:i.isReactNativeEntryPoint})&&e.enableExperimentsByDefault([n]);for(consttofthis.#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});vara=Object.freeze({__proto__:null,Instance:r,RNExperimentName:t,setIsReactNativeEntryPoint:function(e){if(i.didInitializeExperiments)thrownewError("setIsReactNativeEntryPoint must be called before constructing MainImpl");i.isReactNativeEntryPoint=e}});export{aasRNExperimentsImpl};
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.",
@@ -88,6 +88,16 @@ WebSocket handler for registering device connections.
WebSocket handler that proxies CDP messages to/from the corresponding device.
## Experimental features
React Native frameworks may pass an `unstable_experiments` option to `createDevMiddleware` to configure experimental features. Note that these features might not work correctly, and they may change or be removed in the future without notice. Some of the experiment flags available are documented below.
When `true`, the debugger frontend will launch in a standalone app shell (provided by the `@react-native/debugger-shell` package) rather than in a browser window. The standalone shell provides an improved experience and will become the default in a future version of React Native.
The shell is powered by a separate binary that is downloaded and cached in the background (immediately after the call to `createDevMiddleware`). If there is a problem downloading or invoking this binary for the first time, the debugger frontend will revert to launching in a browser window until the next time `createDevMiddleware` is called (typically, on the next dev server start).
## Contributing
Changes to this package can be made locally and tested against the `rn-tester` app, per the [Contributing guide](https://reactnative.dev/contributing/overview#contributing-code). During development, this package is automatically run from source with no build step.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.