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