Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52574
Changelog: [Internal]
The main change here is to catch *all* exceptions in:
- loadScriptFromDevServer
- loadScriptFromBundlePath
so that we can make the `loadScript(...` method `noexcept`
Other methods which only call into `noexcept` methods have been marked with `noexcept` as well
Reviewed By: lenaic
Differential Revision: D78222989
fbshipit-source-id: 174ac2420e88c913662f857c875fef996959c564
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52582
Continues integration of `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.
NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.
**This diff**
Updates the Android inputs to `NetworkReporter` to support incremental string data HTTP responses (`Transfer-Encoding: chunked`).
Implemented:
- Incremental response case for `Network.getResponseBody` (fetch response previews).
- `Network.dataReceived` (incremental response update event).
This means that incremental responses, such as Metro bundle requests, can be displayed as previews in React Native DevTools.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D77927896
fbshipit-source-id: 6eff2e7b94d3f784bbc33b1fecdc20242f98b39f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52487
Continues integration of `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.
NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.
**This diff**
Integrates `Network.storeRequestBody` on Android (CDP: [`Network.getResponseBody`](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody) CDP event) to populate the "Preview" and "Response" tabs in the React Native DevTools Network panel.
This is integrated with `NetworkingModule.kt` to support synchronously received `text` or `blob` data types, with incremental response support added next in D77927896.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D77799617
fbshipit-source-id: 495baebbb3b447d1ea86705c1680578eed796d78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52566
This bumps the plugin we use to publish to Maven Central from 1.3.0 to 2.0.0
as it has better support for the latest Gradle feature.
We're not affected by the breaking changes so we should be good to go (nightlies will tell).
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D78161579
fbshipit-source-id: de5178b2cc17885636f17eabdb0eea4e5b1515dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51493
Changelog: [IOS][FIXED] Don't retain cached images in state after `RCTImageComponentView` gets recycled
Fixes https://github.com/facebook/react-native/issues/51198
Crosspost from the task comment:
From what I've been able to figure out, it seems like the image shadow nodes (keeping the loaded image in state) are being kept in memory by shadow node reference wrappers. It doesn't seem strictly like a memory leak - manually triggering garbage collection causes those nodes to be deallocated, but since Hermes isn't aware of the memory they are retaining, I think, it doesn't trigger it automatically.
This diff releases the image data when the observers are notified and adds a new (`Consumed`) status to signify that.
Reviewed By: sammy-SC
Differential Revision: D75137263
fbshipit-source-id: 97eda7e6d1ef5cd633c4a5a4c37babc5e08968fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52545
Pull Request resolved: https://github.com/facebook/react-native/pull/51735
This diff refactors the ViewManagerInterfaces codegen to generate kotlin classes,
As a consequence of this change, there are some ViewManagerInterfaces that have changed their APIs
## Changelog: [Android][Breaking] - 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)
Reviewed By: cortinico
Differential Revision: D78118738
fbshipit-source-id: cdd9e660e55397bd0936efce1c5aaf90c2946b7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52571
This diff fixes the following warning:
```
The corresponding parameter in the supertype 'XYZViewManager' is named 'value'. This may cause problems when calling this function with named arguments.
```
changelog: [Android][Changed] Changed method arguments names for Core ViewManagers to match the names of ViewManagerInterfaces
Reviewed By: cortinico
Differential Revision: D78170316
fbshipit-source-id: 29a2611eabb4e260bd6126aeca95516912ea4b4d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52485
Begins integrating `NetworkReporter` (jsinspector-modern) on Android, to enable the Network panel in React Native DevTools.
Since the larger lift of initial setup and the C++ subsystem has been done for iOS, this will be a lighter stack of changes solely setting up necessary integration points in the Android Networking stack.
NOTE: As with iOS, all changes are gated behind the `enableNetworkEventReporting` and `fuseboxNetworkInspectionEnabled` feature flags.
**This diff**
Initially integrates the `NetworkReporter` methods corresponding to the `Network.requestWillBeSent`, `Network.requestWillBeSentExtraInfo`, `Network.responseReceived`, `Network.loadingFinished` CDP events, which are sufficient for populating a minimally rendered Network request list.
- Create JNI `InspectorNetworkReporter` helper class (may also become the later public API for 3P reporting into the `Network` domain).
- Renames `ResponseUtil.kt` as `NetworkEventUtil.kt`.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71897099
fbshipit-source-id: 90972a5bfa34a095252b7e745e5f4afeb53b0ebe
Summary:
Bump Metro to 0.83.0.
This release contains some breaking changes for integrators, and a minimum Node.js version of 22.14.
Full release notes: https://github.com/facebook/metro/releases/tag/v0.83.0
Changelog: [General][Changed] Bump Metro to ^0.83.0
Test Plan:
Imported from GitHub, without a `Test Plan:` line.
Rollback Plan:
Differential Revision: D78171925
Pulled By: robhogan
fbshipit-source-id: 7ea5e04d285632a14dd71ba00da872d60f283840
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52572
We'd like to stop supporting `metro-memory-fs` - there are better alternatives out there.
This replaces the one usage of `metro-memory-fs` in `react-native` with `memfs`, and swaps the dependency.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D78161921
fbshipit-source-id: 139233adac413a4f47a0d56d9e08ec841abaf47c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52543
Prefixing "eager" to the name makes it less confusing. React native already has main queue modules: they're just lazy.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D78109287
fbshipit-source-id: 5fa6095d2dd8fcf74fdda64e05483eb487bc8f56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52544
Let's remove these runtime errors for now. We can re-introduce this later, if needed.
Main queue coordinator will make "unsafe execute on main queue sync" not deadlock.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D78109286
fbshipit-source-id: 7c3acc2e560e341889d8ede4665bc70fefc2f058
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52570
JSONArguments is a set of utility methods that are not part of the legacy architecture, removing the annotation.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D78168536
fbshipit-source-id: 25fcc41441df6c71f9a96ec0ba82c42e8f6af80c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52561
The removed code comment is pretty clear that this workaround is in place for a specific bug, which was closed in a Node.js 8.x minor: https://github.com/nodejs/node/issues/13391
A related issue descibed a problem that still existed in Node 10:
https://github.com/nodejs/node/issues/27363
Subsequent comments reporting problems with newer Node.js versions all seem to relate to mismatched configuration with load balancers, not directly relevant to Metro.
Reproducers for the original bugs no longer repro on new Node.js (tested with 22.14), so I think it's safe to conclude this is fixed.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D78158427
fbshipit-source-id: 0be5dbc4334ac7b0bbccde44a840caac43deb4df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52548
Changelog: [Internal]
While this does not cause real crashes as the code is already gated via
```
bool haveRHS = j < rhs.operations.size();
```
it still represents a bug in the logic
Reviewed By: rshest
Differential Revision: D78133364
fbshipit-source-id: 80efc97b5174e3d0d7efe33604255a96bc856e87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52560
Changelog: [internal]
This migrates the profiling logic for `XMLHttpRequest` from `performance.measure` to `console.timeStamp` with built-in support for tracks.
Reviewed By: hoxyq
Differential Revision: D78157407
fbshipit-source-id: 0ef060557a00e7973ef7f0478b26b81471d38226
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52542
Changelog: [internal]
This adds support to propagate performance entries logged to `console.timeStamp` to Perfetto, if enabled. It also modifies the Perfetto integration to support track groups, in addition to track names.
Reviewed By: hoxyq
Differential Revision: D78092596
fbshipit-source-id: 76b0fe2738d856fd75ee941de223d6a6a73d8e1c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52535
Those constructors are no longer necessary. They're deprecated + the class is internal so they're not breaking changes.
I'm just cleaning them up as they're not needed anymore.
Changelog:
[Internal] [Changed] - Remove deprecated constructors for TextInput *Event classes
Reviewed By: javache
Differential Revision: D78095748
fbshipit-source-id: 2dc6c750f8470a88918d8a69b68364f38251d79e
Summary:
This change tries to use the prebuilds we build in CI i other iOS jobs to speed-up the iOS CI
bypass-github-export-checks
## Changelog:
[Internal] -
Pull Request resolved: https://github.com/facebook/react-native/pull/52531
Test Plan:
Build rntester using prebuilds:
```
# after downloading the prebuilds from CI and unzipping them
export HERMES_ENGINE_TARBALL_PATH=~/Downloads/hermes-ios-Debug.tar.gz
export RCT_USE_LOCAL_RN_DEP=~/Downloads/reactnative-dependencies-debug.tar.gz
export RCT_TESTONLY_RNCORE_TARBALL_PATH=~/Downloads/React.xcframework.tar.gz
USE_FRAMEWORKS=dynamic bundle exec pod install
open RNTesterPods.xcworkspace
```
And then build from Xcode.
Reviewed By: rshest
Differential Revision: D78158734
Pulled By: cipolleschi
fbshipit-source-id: 43cbb66bd44fa621292b69de0dadde5ed20c4574
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52549
Changelog: [Internal]
- The #includes are not used
- `enum class` is C++, (enum is C)
Reviewed By: rshest
Differential Revision: D78135339
fbshipit-source-id: 1a35301ea063ce17c195be7dc373132d342f111a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52556
Changelog: [internal]
This adds a new benchmark for `performance.measure` to measure the performance of calling it without arguments.
Reviewed By: hoxyq
Differential Revision: D78013563
fbshipit-source-id: 84e2151d9d91cfc2e85d310f42010483e7304648
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52557
Changelog: [internal]
`PerformanceEntry.detail` should be `null` if not defined, not undefined as it is currently. This fixes that.
Reviewed By: hoxyq
Differential Revision: D78013568
fbshipit-source-id: b22dfdd8d582594fc1e5199264e8af92c26bb0ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52558
Changelog: [internal]
Small refactors for `$ReadOnly`, move `getCurrentTimeStamp` to utils so it can be reused, etc.
Reviewed By: hoxyq
Differential Revision: D78013570
fbshipit-source-id: f73d119f22dd4dc9aaa5efef76a1156821ecd8de
Summary:
Resolves https://github.com/microsoft/react-native-windows/issues/14797
We were facing a type conversion error in the DynamicEventPayload::extractValue() method. The function signature declares a return type of std::optional<double>, but when handling INT64 values, but when handling `INT64` values, the code was directly returning `dynamic.asInt()` without proper type conversion
We faced the issue while integrating https://github.com/microsoft/react-native-windows/pull/14791
## Changelog:
[General][Fixed]
Pull Request resolved: https://github.com/facebook/react-native/pull/52525
Test Plan:
The fix involved wrapping the dynamic.asInt() call with static_cast<double>(), creating the corrected line: return static_cast<double>(dynamic.asInt())
Tested E2E in RNW
Reviewed By: andrewdacenko
Differential Revision: D78083842
Pulled By: rshest
fbshipit-source-id: 8dbedd67fa7c21e89b863d8b1bc7b9e0d7978b9f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52530
This PR fixes two issues with `display: contents` implementation:
1. When a node with `display: contents` set is a leaf, it won't be cloned after the initial tree is built. The added test case covers this scenario.
2. It was possible for the subtree of `display: contents` nodes not to be cloned during layout. I don't have a minimal reproduction for this one, unfortunately. It was discovered in the Expensify app: https://github.com/Expensify/App/issues/65268, along with a consistent reproduction. In that specific case, it seems to be heavily tied to `react-native-onyx`, which is a state management library.
Changelog: [GENERAL][FIXED] - Fixed nodes with `display: contents` set being cloned with the wrong owner
X-link: https://github.com/facebook/yoga/pull/1826
Reviewed By: adityasharat, NickGerleman
Differential Revision: D78084270
Pulled By: j-piasecki
fbshipit-source-id: eb81f6d7dcd1665974d07261ba693e2abea239bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52532
Since we updated TypeScript in https://github.com/facebook/react-native/pull/51831, ESLint has printed a warning that `typescript/eslint` doesn't support our TS version.
This updates it to fix the warning.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D77833826
fbshipit-source-id: 29a5179c4f223a8cc0ab2c8071f0a5efa09e5edc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52533
This method is deprecated in the JavaDoc but not correctly annotated as Deprecated, let's fix it.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D78092468
fbshipit-source-id: 31e4cb958a51b20f5105a4bec3366d67402e5419
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52528
This was a breaking change that is currently breaking `react-native-safe-area-context` so we can't ship it as it is, especially because all the apps in OSS will be affected by this.
Changelog:
[General] [Changed] - Revert breaking change due to the removal of `ShadowNodeTraits::Trait::DirtyYogaNode`
Original commit changeset: 869e81f0ae00
Original Phabricator Diff: D75324251
Reviewed By: huntie
Differential Revision: D78085848
fbshipit-source-id: f7fcc5e33d59cc966a4ee88dfdbedca4f4c580e0
Summary:
This PR fixes the following build error while trying to build `react-native@0.81.0-rc.0` app with `react-native-screens@4.10.0` installed using react-native prebuilds (AAR) due to a missing `react/renderer/bridging/bridging.h` file in `prefab/modules/` inside `react-android-0.81.0-rc.0-debug.aar`.
```
In file included from /Users/tomekzaw/RNOS/react-native-reanimated/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:2:
In file included from /Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/fabric/Binding.h:12:
In file included from /Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/fabric/FabricUIManagerBinding.h:22:
/Users/tomekzaw/.gradle/caches/8.14.1/transforms/75e7f8f7b5ef763e687a16737daf01b6/transformed/react-android-0.81.0-rc.0-debug/prefab/modules/reactnative/include/react/renderer/uimanager/primitives.h:14:10: fatal error: 'react/renderer/bridging/bridging.h' file not found
14 | #include <react/renderer/bridging/bridging.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
ninja: build stopped: subcommand failed.
```
## Changelog:
[ANDROID] [CHANGED] - Expose `react_renderer_bridging` headers via prefab
Pull Request resolved: https://github.com/facebook/react-native/pull/52529
Reviewed By: cipolleschi
Differential Revision: D78092428
Pulled By: cortinico
fbshipit-source-id: de8208ae7545201f600c277a0c8907575c310c58
Summary:
Fixes #T228219721
This commit adds the debug/release switch script like we have for rn deps and hermes for react-core prebuilt:
- Added script: replace-rncore-version-js
- Inserted script into React-Core-prebuilt podspec
- Updated rncore.rb with correct filenames
bypass-github-export-checks
## Changelog:
[IOS] [ADDED] - add release/debug switch script for React-Core-prebuilt
Pull Request resolved: https://github.com/facebook/react-native/pull/52498
Test Plan: Run in RNTester and switch between release/debug
Reviewed By: rshest
Differential Revision: D78012917
Pulled By: cipolleschi
fbshipit-source-id: 71cad23cd41484a8253fc89d5dce8653649657a0
Summary:
Instead of returning when creating the list of header files from our podspecs, we now call `continue`. This is a bug that causes all subsequent globs in the header file list to be omitted after the first omitted glob.
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - Fixed premature return in header file generation from podspec globs
Pull Request resolved: https://github.com/facebook/react-native/pull/52490
Test Plan: Run prebuild scripts and verify that React-Fabric podspec headers are included in the resulting xcframework.
Reviewed By: mdvacca
Differential Revision: D78012399
Pulled By: cipolleschi
fbshipit-source-id: 2d334f4f7ff966ea4c778786a7056e13a255a708
Summary:
When using prebuilts the USE_FRAMEWORKS setting is not really relevant for the React Native code, since there will not be any source code to build frameworks for - and because we already have a framework for the code in React.XCFramework.
This commit adds a new command to the React Native podspecs like we did with the ReactNativeDependencies framework. The method is called `add_rncore_dependency` and it does nothing when building from source - but when linking with the React.XCFramework it explicitly adds linking with the framework.
In addition there are a few places in the ruby code where we check for the USE_FRAMEWORK value and changes some settings - where needed this commit will add a separate check to ensure we're building from source when making these changes.
bypass-github-export-checks
## Changelog:
[IOS] [ADDED] - Added support for using USE_FRAMEWORKS with prebuilt React Native Core
Pull Request resolved: https://github.com/facebook/react-native/pull/52489
Test Plan:
RNTester:
- Builds without USE_FRAMEWORKS as before with/without prebuilt
- Builds with USE_FRAMEWORKS=dynamic as before with source - and now also with prebuilt code.
- Same goes for the static variant.
Reviewed By: mdvacca
Differential Revision: D78012332
Pulled By: cipolleschi
fbshipit-source-id: ea942738ae52b9dceae48fb78a5026f04b7545b8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52519
Changelog: [Internal] - Experiment with intersection logic for VirtualViews in scrollView. Currently only on Android
### Changes in detail
`VirtualViewContainer` is held by the ScrollView and is lazily instantiated once a VirtualView tries to access.
Upon initial layout, a VirtualView will add itself to the container and report its updated `rect`. `VirtualViewContainer` holds a sorted list of VirtualViews and iterates through them to update mode
Reviewed By: yungsters
Differential Revision: D77313890
fbshipit-source-id: 30843143bf1828dcac9091479964e83934bf330c