Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50339
Explicitly sets the default `reactRuntimeTarget` when invoking `require('hermes-parser').parse` so that it'll be easier to find these configurations when upgrading to `'19'`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D72006705
fbshipit-source-id: 4994917152a2a4a767b871d4a36092c0c5391324
Summary:
This workflow bumps the Podfile.lock automatically when a new release happens.
I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads.
## Changelog:
[Internal] - Bumps podfile.lock automatically
Pull Request resolved: https://github.com/facebook/react-native/pull/50345
Test Plan:
GHA - tested as a separate workflow first, hardcoding the latest RC
https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345
The flow correctly fails as the Podfile.lock has already been bumped in the release branch.
Reviewed By: fabriziocucci
Differential Revision: D72050261
Pulled By: cipolleschi
fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50337
# Changelog: [Internal]
This should not have any functional changes, it only prevents the WebSocket from being killed on Android, when we are sending Profile-related Trace Events.
For large traces, a single message could be more than 16MB, because we send a unique string url for every call frame.
Reviewed By: huntie
Differential Revision: D71993748
fbshipit-source-id: f0bfddfb0bb87631e72b573142abdf0d7d87ba48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50335
Changelog: [internal]
This defines the internal technical documentation for the MutationObserver API, as an example of how to define docs using the new strategy and structure.
Reviewed By: javache
Differential Revision: D71890748
fbshipit-source-id: 3ef19c784dff7aea7a2e2d08302640d5eefacc30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50334
Changelog: [internal]
This updates the documentation for the feature flag system to adhere to the new documentation strategy and structure.
Reviewed By: javache, rshest
Differential Revision: D71889753
fbshipit-source-id: 7ff47cf613ac01012e7329485d2b97e997a97c07
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50333
Changelog: [internal]
This defines a placeholder for the main entrypoint for the React Native internal technical documentation.
Reviewed By: javache, mdvacca, rshest
Differential Revision: D71889755
fbshipit-source-id: 453518a0b7ec2cf433884a87446a7a622418d0b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50332
Changelog: [internal]
This defines a detailed strategy on how to approach internal technical documentation in React Native, including defining a template for subsystem documentation.
Reviewed By: javache, rshest
Differential Revision: D71889754
fbshipit-source-id: 5ce630b2e71f8c7b6aaf027a5833bcbdf0dfa5de
Summary:
Regression introduced in D71735505 where I tried to ensure fabricEventEmitter was always non-null. Instead log a soft error when this happens, so we don't drop the event silently.
Changelog: [Android][Fixed] Fixed crash when event is emitted after instance is shutdown
Reviewed By: mdvacca
Differential Revision: D71967092
fbshipit-source-id: 990b6414b41a2709d70a6deae38f5aa043203a20
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50325
axOrderViews is an optimization I came up with so that we could find and queue all the views on a single tree traversal. It initializes the array with the size of the accessibilityOrder array and places each view where its nativeID is. If there is no view corresponding to the nativeID then that axOrderViews element will be null. So to fully ignore nativeIDs that don't correspond to any View we can just filter the nulls
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71977739
fbshipit-source-id: a3f2138eebe06808ce413355df5d9beb2f4ff388
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50230
Currently, `AnimatedProps` invokes `findNodeHandle` to both connect and disconnect the native `AnimatedNode` instances to corresponding `viewTag`s.
Not only is this slow and wasteful (because `findNodeHandle` requires traversing the fiber tree), but it prevents deferring disconnection to after the fiber tree has been unmounted.
Disconnecting after unmount is necessary when the `scheduleAnimatedCleanupInMicrotask` feature flag is enabled, which is necessary to avoid invoking animation completion callbacks in the commit phase that unmounts animated views.
I have verified that `disconnectAnimatedNodeFromView` is needed and handles being called after fibers are unmounted.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71745805
fbshipit-source-id: ce8c2c95d38c4d5adbb79bac3c07b0872211cf51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50311
We are going to initially expose this with the `experimental_` prefix to indicate that it has not been battle tested yet.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71939365
fbshipit-source-id: e9481b6bd4f253fb97c11fc9d7bf3708ffe79635
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50316
This should only be used internally
Changelog: [Android][Removed] Remove FabricSoLoader from public API
Reviewed By: Abbondanzo
Differential Revision: D71965740
fbshipit-source-id: 41c2377a9efcaa21378b2ac49af0c1a544589371
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50315
Make it clearer that the only purpose of this class is to manage the soloading of the core bridge so file.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D71965759
fbshipit-source-id: d333f3e768a2359b082d4df279548cbd4b58ec76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50319
Originally removed in 0.71, leaving a README file as an FYI, which is now removed.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71968498
fbshipit-source-id: 81d380570df346f709a35727090c8e3b8b043183
Summary:
to resolve use_frameworks build error. this is an edge case happening only when there's objective-c files import to `React_RCTAppDelegate`. Xcode will have `include of non-modular header inside framework module` error originally. this is the generated umbrella header for jsitooling is incorrect. even the header path are correct, they are not modular headers.
~this pr adds a workaround to import header from outside the module.~ updates: this pr uses a forward declaration to prevent exposing the dependency in umbrella header.
## Changelog:
[IOS] [FIXED] - `JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build
Pull Request resolved: https://github.com/facebook/react-native/pull/50252
Test Plan:
to reproduce the build error, we can build `USE_FRAMEWORKS=static bundle exec pod install` from rn-tester. we also need to import `React_RCTAppDelegate` from objective-c files. in this case, we can add `import React_RCTAppDelegate;` in rn-tester's main.m
```diff
--- a/packages/rn-tester/RNTester/main.m
+++ b/packages/rn-tester/RNTester/main.m
@@ -8,6 +8,9 @@
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
+@import React_RCTAppDelegate;
+// This also triggers the error
+//#import <React_RCTAppDelegate/React-RCTAppDelegate-umbrella.h>
int main(int argc, char *argv[])
{
```
Reviewed By: fabriziocucci
Differential Revision: D71963188
Pulled By: cipolleschi
fbshipit-source-id: 5d566ae5aadb9efc032aacfe32862ea289134f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50288
Add hints about why devices running in the background might not report debuggable pages:
- Taking them from background might be enough
- Force killing them to restart them properly might be needed on Android.
Changelog:
[General][Internal]
Reviewed By: huntie
Differential Revision: D71888615
fbshipit-source-id: dda54b15daa7eebd1bc28a4d327a9b3d006397a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50287
Using keys intersection to iterate over Props and PassThroughProps is not legal in TS. The issue can be mitigated by using intersection of AnimatedProps and PassThroughProps.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D71898246
fbshipit-source-id: 8505989f60622654034e5a775b884945dd9388ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50295
Enabling `useFabricInterop` by default for internal apps since before D71582553 iOS wasn't using useFabricInterop in it's codebase and old architecture with Interop enabled is harmless.
This is to keep the current behaviour consistent.
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D71908601
fbshipit-source-id: 825338db486d8f64c44c2d4c28394d8b789c4195
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50299
## Changelog
[General] [Fixed] – Add explicit `folly/dynamic.h` include where it is actually used
## Internal
This symbol is used in the file, so ensure we actually declare it. That way we do not need to depend on some other header to provide the symbol
Reviewed By: NickGerleman
Differential Revision: D71910330
fbshipit-source-id: 4fbb584cafc688bd58f6863370efc1ede3a4c5f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50225
Updates `index.js.flow` to export (what should be) all public types for `react-native`, closely matching the resolved exported types of `types/index.d.ts` (current manual TS defs).
- Note that this first pass doesn't have to be exhaustive (not yet load bearing) — however, I've done a best-effort scan, which passes our current `__typetests__` fixtures.
**Approach: Explicit type imports in `index.js.flow`**
We have a number of options for how we organise and re-export values and types from the new index file — for now, we're opting for explicitly exporting each symbol here.
- While this clutters the index file somewhat, it also provides a single scannable source of truth — without introducing / altering each contributing module's type exports (we might want to do this eventually, but we're far from having strong organisation denoting the public API boundary). It's self-documenting that the index file contains all root exports by name.
- At the same time, we currently have some exceptions that use `export [type] *` to line up with TypeScript `namespace`s. We aim to review and update these within this release cycle, to enforce the above system.
Changelog: [Internal] - The `react-native` package now exports all public types in Flow (fbsource)
Reviewed By: rubennorte
Differential Revision: D71741575
fbshipit-source-id: 770e2b490e494ee195f4240358fec39f69145a94
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50298
Given EventDispatcher already synchronously calls EventListener, this convenience method for listening to events directly from EventEmitter was short-sighted. We will revisit how to handle JS vs. UI dispatched events for NativeAnimated purposes in future diffs. For now, this reverts https://github.com/facebook/react-native/pull/49998
This change is not being marked as breaking since the change that added this API has not yet been shipped to stable.
## Changelog
[General][Removed] - EventEmitter addListener and removeListener APIs
Reviewed By: zeyap
Differential Revision: D71909828
fbshipit-source-id: 9246de5c7a33368d182369a2d6eb57aa960b415b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50229
Makes a few internal improvements to `AnimatedProps`:
- Change `__connectAnimatedView` and `__disconnectAnimatedView` to be private methods, so that we can confidently change their type signatures.
- Pass `#targetInstance` into those methods, so that the responsibility of verifying `#targetInstance`'s non-nullability is hoisted to the call sites.
There should be no observable runtime behavior change.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71740601
fbshipit-source-id: 6abc6faf63f3c3274fd2d92baf0958d2471d4a63
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50228
Properly annotate the type of `#animatedView` in `AnimatedProps` and rename it to `#targetInstance`.
Otherwise, no runtime behavior change.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71739606
fbshipit-source-id: c97e4bd323ad9b1c08fd4976f13b6b20e8fe4793
Summary:
JsErrorHandler throwing again masks what the real problem is.
Changelog: [Internal]
Reviewed By: tmikov
Differential Revision: D71920942
fbshipit-source-id: 1697f6f4c779d5c896df1be8e696a185f1c2c828
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50306
`LengthPercentage` is a class representing a length, or a percentage of a reference length.
Having a function on it, specific to resolving asymetrical corner radius is the wrong organization. Let's move it to where it belongs.
Very technically breaking, but I would be shocked if anyone is using this API.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71922893
fbshipit-source-id: 4660c861e21c1dffae15d3f463c135a494124e2a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50233
Ships the `disableInteractionManager` feature flag, which disables `InteractionManager` and replaces its scheduler with `setImmediate`.
Changelog:
[General][Changed] - InteractionManager is deprecated and will be removed in a future release. Its behavior has been changed to be the same as `setImmediate`, and callers should migrate away from it.
Reviewed By: javache
Differential Revision: D71766877
fbshipit-source-id: 36710fdf17c92f8cdee141e43a3c4d0bd9ef0e81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50174
Add `httpReasonPhrase` util and use to populate CDP `Response.statusText` value.
AFAIK, neither platform, and none of our dependencies, reliably provide this mapping — so this is implemented directly.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D71470037
fbshipit-source-id: f3f6437d0fb3227858b5910a71170e3a634aa962
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50286
Configures a thinner version of `NetworkReporter.cpp` (the entry point to `jsinspector_network`) in production builds (i.e. dev or profiling build, as gated by `REACT_NATIVE_DEBUGGER_ENABLED`).
Even though enabling the CDP Network domain isn't reachable in prod, this will reduce the compiled code footprint of `jsinspector_network`.
We also don't need `glog` here any more — remove dep.
**Implementation notes**
The reason to gate the logic within each method, with inline `#ifdefs`, rather than swapping between complete implementation files, is because each `report*` function will also have load-bearing logic (for the Performance API) in all prod builds. Therefore, this will reduce duplication (and file switching) down the line — and can be understood at a glance with this pattern.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71636694
fbshipit-source-id: 50e7c008bb6fd128fe1248d767832b36ccb0219b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50173
Refactors the internals of `NetworkReporter` (and the `jsinspector_network` library) to better organise concepts before we scale to more Network CDP events.
- Introduces `cdp::network` structs modelling CDP `Network` domain events and data types.
- Moves implementation details in converting input data objects to CDP types into `CdpNetwork.cpp` and `HttpUtils.cpp`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71470039
fbshipit-source-id: 0c04ffb40efbbb6d6d9782959f5adb33c9097ccb
Summary:
These modules don't actually use ui things in their setup. So, they don't need to be set up on the main queue.
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D71849447
fbshipit-source-id: d9d6ee043cac112731c27ff920e857fccdd54bc0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50110
## Rationale
Rendering can now include main -> js sync calls.
If we allow js -> main sync calls during rendering, react native can deadlock.
So, this diff moves the js -> main sync calls to "main queue module setup", which occurs before rendering.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D71347452
fbshipit-source-id: 894f21c703981c633fc0966e1edd647251d0fe2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50302
Changes `eslint-config-react-native` to stop overriding rules that are disabled by `eslint-config-prettier`, which disables rules that conflict with Prettier formatting.
This also adds a Jest unit test to enforce that this invariant even as the configs change.
Changelog:
[General][Changed] - `eslint-config-react-native` now respects rules disabled by `eslint-config-prettier`.
Reviewed By: kassens
Differential Revision: D71922014
fbshipit-source-id: 55ba46e880d6129a417e864ab2fbb5704c57997b
Summary:
I made a mistake before, it seems we should use std::size_t to prevent bits truncation.
## Changelog:
[IOS] [FIXED] - Fabric: Fixes color hash type to prevent bits truncation
Pull Request resolved: https://github.com/facebook/react-native/pull/50285
Test Plan: N/A
Reviewed By: javache
Differential Revision: D71895413
Pulled By: cipolleschi
fbshipit-source-id: 26cc036bee851902e11abfa8ed5c5c8222421b09
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50242
Similar to D71636694, adds conditional compile to `RCTInspectorNetworkReporter.mm` to minimize code size and operations performed in production builds.
Specifically:
- Expensive copy of `httpBody` is eliminated.
- Other optional fields that are only mapped when CDP support is enabled are also omitted.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71637716
fbshipit-source-id: 6c7688b1ac82d2b1047b42a812834a7dfb37cd0f