Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52378
This adds a Gradle property called `exclusiveEnterpriseRepository`
that users can set in their `android/gradle.properties` as such:
```diff
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
```
This will remove all the existing Maven repositories and only use the internal mirror they have.
Changelog:
[Android] [Added] - RNGP - Add support for `exclusiveEnterpriseRepository` to specify an internal Maven mirror.
Reviewed By: mdvacca
Differential Revision: D77667573
fbshipit-source-id: 835004d2ae7aa4e250b6f7a88a41918b573f5bd5
Summary:
This React Native Android fix hardens the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`. By iterating over a shallow copy of the UI‐block lists and catching any mid‐iteration mutations, we ensure the listener never throws during a UI frame and always clears its pending blocks.
The issue was first reported in [React Native Issue https://github.com/facebook/react-native/issues/49783](https://github.com/facebook/react-native/issues/49783), and although [React Native PR#50091](https://github.com/facebook/react-native/pull/50091) was closed and not merged, the work in that PR did make it to React Native in [commit 17da3cb](https://github.com/facebook/react-native/commit/17da3cbbf4687f86226c4a80297c4d8abfc9c4f5). However, the fix didn't go far enough. We saw intermittent examples of this exception being thrown when swiping through a carousel from `react-native-reanimated-carousel`. This fix goes right to the exception site itself.
## Changelog:
[ANDROID] [FIXED] - Hardened the Fabric `InteropUiBlockListener` against `ConcurrentModificationException` crashes in `willMountItems` and `didMountItems`
Pull Request resolved: https://github.com/facebook/react-native/pull/51631
Test Plan:
The only way to test this is to develop a standalone app that emulates what we've been seeing in our commercially available RN app. We have done extensive testing of before (intermittent crashes) and after the fix (no crashes) and things have been standing up very well for us.
Here is a the Red Box we see right at the time of the crash, before this fix:
<img width="414" alt="image" src="https://github.com/user-attachments/assets/8d1b6c6d-42f7-48a0-9574-2f05436547d4" />
And here is the beginning of the logcat crash log:
```
2025-05-07 16:01:49.212 unknown:BridgelessReact com.aura.suite W ReactHost{0}.handleHostException(message = "null")
2025-05-07 16:01:49.212 unknown:ReactNative com.aura.suite E Exception in native call
java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1111)
at java.util.ArrayList$Itr.next(ArrayList.java:1064)
at com.facebook.react.fabric.internal.interop.InteropUIBlockListener.willMountItems(InteropUiBlockListener.kt:72)
at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener.willMountItems(FabricUIManager.java:1235)
at com.facebook.react.fabric.mounting.MountItemDispatcher.dispatchMountItems(MountItemDispatcher.java:184)
at com.facebook.react.fabric.mounting.MountItemDispatcher.tryDispatchMountItems(MountItemDispatcher.java:122)
at com.facebook.react.fabric.FabricUIManager$3.runGuarded(FabricUIManager.java:820)
at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:29)
at com.facebook.react.fabric.FabricUIManager.scheduleMountItem(FabricUIManager.java:824)
at com.facebook.react.fabric.FabricUIManagerBinding.reportMount(Native Method)
at com.facebook.react.fabric.FabricUIManager$MountItemDispatchListener$1.run(FabricUIManager.java:1282)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
```
All of this goes away with this fix. We're using React Native 0.79.2 and this is the first time we've open a PR for react-native. I hope this is enough info as far as testing goes.
Can we see a 0.79.x release with this fix, please?
Reviewed By: Abbondanzo, cortinico
Differential Revision: D75594791
Pulled By: javache
fbshipit-source-id: 982ae27e89756fdb290a24b0bdfa67c2e47c04e3
Summary:
FIXED Add index.js.flow to npm package files for Flow support
Currently, the distributed npm package for react-native does not include the index.js.flow file, which causes all exports to be typed as any when using Flow. This commit adds index.js.flow to the "files" array in package.json, ensuring Flow users receive proper type definitions out of the box. This addresses issues where type checking with Flow fails in React Native projects.
## Changelog:
[General][Added] Publish top-level Flow types for `react-native`
Pull Request resolved: https://github.com/facebook/react-native/pull/51908
Reviewed By: huntie, necolas
Differential Revision: D76292301
Pulled By: robhogan
fbshipit-source-id: e56360d3f35af30ef160470181349aac1812e7c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52035
Fixes https://github.com/facebook/react-native/issues/52014
Some OSS library is still returning null for `getViewManagerNames` especially if they're
implementing the `ViewManagerOnDemandReactPackage` in Java.
I'm adding a try-catch here so that we prevent the NPE for those scenarios.
Changelog:
[Android] [Fixed] - Fix crash on ReactInstance due to null returned for getViewManagerNames
Reviewed By: javache
Differential Revision: D76723826
fbshipit-source-id: cc159dee389257c6877b03a67840a45ee5bec165
Summary:
After testing the latest RC and nighly builds, crash appeared when emitting events from turbo modules on 32bit Android devices. The crash is always reproducible only on 32bit devices on signed production builds. Fore more details and the crash log, check the [related issue](https://github.com/facebook/react-native/issues/51628#issue-3094045077).
From what I found, the variadic functions like CallVoidMethod are unsafe on 32bit due to not type checking the passed arguments at compile time. As far as I understand the 64bit cpus and ABIs are more forgiving with alignment and calling conventions. On 32bit the ABIs are strict as arguments are passed on the stack and if there is type/size/alignment issue it reads the wrong memory, which causes the SIGEGV crashes.
## Changelog:
[ANDROID] [FIXED] - emitting event from turbo module crashes on 32bit android
Pull Request resolved: https://github.com/facebook/react-native/pull/51695
Test Plan:
1. Pull the [reproduction demo](https://github.com/vladimirivanoviliev/rn079eventcrash), install the dependencies (v `0.80` is on PR)
2. Run codegen on android
3. Build signed apk. To create it you will need to create new demo key-store.
4. To install the build apk in 32bit mode you can use `adb -s YOURDEVICE install --abi armeabi-v7a android/app/release/app-release.apk`
5. Run the app, create key, save it. Than update the key and save it again. The app crashes when try to emit event from the turbo module.
6. Patch the related `JavaTurboModule.cpp` file with the changes from this PR and enable build from source.
7. Rebuild and reinstall the apk and test again - the issue is now fixed
## Additional notes:
I have tested the app on android using the `rn-tester` demo app, everything works as expected. I also patched our production app and tested more complex scenarios and they works as expected. I have run the tests and linter and they passed.
One thing that I didn't able to setup and run is the iOS `rn-tester` app, due to Hermes engine error `Command PhaseScriptExecution failed with a nonzero exit code`. I haven't found any information how to fix it. I have followed [this guide](https://github.com/facebook/react-native/blob/main/packages/rn-tester/README.md) and installed node modules using yarn and started the `yarn prepare-ios`. I also haven't found any information with what node version and ruby version the react native package is build on CI so I use the same versions locally. If you provide me with updated instructions for those I can contribute by updating the related guides and including `.npmrc`, `.ruby-version` files.
Reviewed By: cortinico
Differential Revision: D75782377
Pulled By: javache
fbshipit-source-id: b94998be6dd51e90ad4137b1d2e38a6850bc3cb2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51530
Alternative to https://github.com/facebook/react-native/pull/50784.
`__mocks__` (and other underscored dirs) are correctly excluded from our npm package via `package.json#files`. But in this instance, this is a source file for the `jest/` directory (Jest preset within `react-native`), and should be included — fix by relocating.
Changelog:
[General][Fixed] - Fix missing RefreshControlMock source in Jest preset
Reviewed By: rshest
Differential Revision: D75215731
fbshipit-source-id: 1240344c4236288f31b16513f4df16766ad1e571
Summary:
Due to us moving to central.sonatype.com for publishing, we cannot publish and release the Maven repository in 2 distinct invocations.
This consolidates all the publishing job to happen during build_npm_package
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D76888543
fbshipit-source-id: 3cb0db6176ed2221a12b4f3f1f575232aa006a6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52004
This is necessary because the snapshots are now going to be published on a different repository:
central.sonatype.com.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D76596802
fbshipit-source-id: 424fb1134e41502d53b76209fba325c895c79ba8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51693
This moves React Native to use the Central Portal URLs rather than the legacy OSSRH ones.
See https://github.com/gradle-nexus/publish-plugin for more context.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D75673984
fbshipit-source-id: 1de6746809eed72f232eac0c3fb4d809c2046620
Summary:
PR https://github.com/facebook/react-native/issues/51078 Implemented finding disabled libraries but the code (below) didn't actually filter any libraries out because destructured name is `undefined`. This pr adds the name to codegenEnabledLibraries so filtering would work.
```js
const libraries = codegenEnabledLibraries.filter(
({name}) => !disabledLibraries.includes(name),
);
```
## Changelog:
[IOS] [FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js
Pull Request resolved: https://github.com/facebook/react-native/pull/51838
Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (for example: react-native-safe-area-context and react-native-screens or see [reproducer](https://github.com/aattola/rn-codegen-exclude))
2. Exclude library with react-native.config.js
3. install pods / run codegen
4. Check that codegen actually excluded the specified dependencies from: `ios/build/generated/ios/RCTThirdPartyComponentsProvider.mm`
Rollback Plan:
Reviewed By: cortinico
Differential Revision: D76044622
Pulled By: cipolleschi
fbshipit-source-id: 9e70c2a263c750edb1ea95305c9e5e178e2ce8d8
Summary:
There is an edge case in the codegen `findRCTComponentViewProtocolClass` function where the parsing of the Component Class will fail if there is another `.class` call in the same file after the `Class<RCTComponentViewProtocol>` function. This ends up resulting in a `RCTThirdPartyComponentsProvider.mm` file that looks like the image bellow
<img width="1052" alt="image" src="https://github.com/user-attachments/assets/26ce93be-0370-4852-a949-9da21762ff7f" />
You can reproduce this with the following
```
Class<RCTComponentViewProtocol> XYZCls(void)
{
return XYZ.class;
}
// this comment breaks codegen .class
```
## Changelog:
[IOS] [FIXED] - Fix codegen extracting `.class` from complex component classes
Pull Request resolved: https://github.com/facebook/react-native/pull/51813
Test Plan: Run codegen locally, use this patch in the expo/expo repo and CI should be green
Reviewed By: cipolleschi
Differential Revision: D75964424
Pulled By: cortinico
fbshipit-source-id: 50e45aa2ac6e43c75ee6fdd76791c591d81d4df7
Summary:
https://github.com/facebook/react-native/pull/49927 introduced a regression where a Ruby script would read compilation artifacts and fail, when the user has relative build directories set in XCode.
After successful compilation `build/` dir and `DerivedData/` dir have `.plist` files that aren't in UTF-8 encoding and shouldn't be read by the script. If the user tries to reinstall pods at this point, he gets the following error:

This is how you enable relative build directories in XCode.

## Changelog:
[IOS] [FIXED] - Ignore `build/` and `DerivedData/` directories when reading `.plist` files.
Pull Request resolved: https://github.com/facebook/react-native/pull/51833
Test Plan: After applying this patch the problem doesn't occur anymore on my machine.
Reviewed By: cortinico
Differential Revision: D76030133
Pulled By: cipolleschi
fbshipit-source-id: 7ae8c2d0ce28b6925245a9172154e3dcafee126f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51602
Changelog: [GENERAL][FIXED] - Fixed the generated type definitions for `Animated.FlatList` and `Animated.SectionList` to correctly infer item types.
Current definitions for animated list components cast away their generic definitions, preventing the types to be inferred from usage. This diff addresses that.
Reviewed By: huntie
Differential Revision: D75407762
fbshipit-source-id: c86f20298ded707971c05a78d025a63e82fe2a64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51699
Re-expose **all `"./src/*"` paths via `package.json#exports`.
Follows D72228547 — as we'd attempted to be proactive with hiding `src/`, but are now reverting — essentially reducing this change as much as possible (read: most defensive/safer effect on OSS).
**Motivation**
Mitigates a warning emitted by Metro that may surface in new bare React Native template projects.
{F1978757796}
This is due to a 1P reference to `'react-native/src/private/featureflags/ReactNativeFeatureFlags` in `react-native/virtualized-lists`.
This is enough motivation to undo part of our change with introducing `"exports"` on `react-native` in 0.80.
**Especially**, to avoid confusion with other warnings we've intentionally introduced in 0.80 around subpath imports.
- The key difference is the above screenshot is from Metro and covers **any** import from any `node_modules` file — as opposed to just the immediate project.
Changelog:
[General][Changed] - Re-expose `src/*` subpaths when not using the Strict TypeScript API
The net breaking change for 0.80, once picked, is simply the presence of `"exports"` (only very edge case effects on expanding per-platform extensions, which we've mitigated). **All exported paths equivalent**.
Reviewed By: robhogan
Differential Revision: D75682566
fbshipit-source-id: f90c7298279c6be3a4eab70f2dfdc618ffcf1124
Summary:
In https://github.com/facebook/react-native/pull/50734, `LayoutAnimationController` was migrated to Kotlin and all of its methods are now marked as final.
However, this class is used and extended by `react-native-reanimated` in order to provide Layout Animations for Android on the Old Architecture. With all its methods being marked as final, the builds are failing.
This PR restores the possibility to extend `LayoutAnimationController`.
## Changelog:
[ANDROID] [FIXED] - Restored the possibility to extend `LayoutAnimationController`
Pull Request resolved: https://github.com/facebook/react-native/pull/51479
Test Plan: I've checked that this PR fixes build errors caused by `LayoutAnimationController` in react-native-reanimated.
Reviewed By: cipolleschi, mdvacca
Differential Revision: D75079557
Pulled By: cortinico
fbshipit-source-id: beeb700cbad87362dda4b60941124562c4753815
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51496
Fixes problem with generics passed to `VirtualizedSectionList` in generated types. The `flow-api-translator` creates a re-declaration for `export default` variables which shadows generics.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D75141051
fbshipit-source-id: 260ef066038320eee3ffa93692f77f1eff5c9205
Summary:
Calls to create timers should return sequential ids (integers greater than zero in the spec's words). This regressed in the `TimerManager` implementation, which instead starts at zero inclusively.
This has two side-effects for code assuming a spec-compliant implementation of `setTimeout` and `setInterval`:
- Calls to `clearTimeout(0)` or `clearInterval(0)` will potentially cancel scheduled timers, although it's supposed to be a noop
- Predicates like `if (timeoutId)` will fail since they assume non-negative ids
The change in this PR is to align with WHATWG HTML 8.6.2 (Timers): https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers
> otherwise, let id be an [implementation-defined](https://infra.spec.whatwg.org/#implementation-defined) integer that is **greater than zero** and does not already [exist](https://infra.spec.whatwg.org/#map-exists) in global's [map of setTimeout and setInterval IDs](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#map-of-settimeout-and-setinterval-ids).
Specifically,
- we should return `0` to indicate that no timer was scheduled
- we should start generating timer IDs at `1` instead of `0`
This was previously raised in review comments here: https://github.com/facebook/react-native/pull/45092/files#r1650790008
The spec-incompliant behaviour was raised in an issue here: https://github.com/apollographql/apollo-client/issues/12632#issue-3075269978
This PR does not,
- add bounds checking on `timerIndex_` and add a search of an available id that isn't in the unordered map
- exclude `0` from being an accepted `TimerHandle` in `TimerManager::createTimer` or `TimerManager::deleteTimer` since the above bounds checking hasn't been added either
## Changelog:
[GENERAL] [FIXED] - Align timer IDs and timer function argument error handling with web standards.
Pull Request resolved: https://github.com/facebook/react-native/pull/51500
Test Plan:
- Run `setTimeout` / `setInterval`; before applied changes the timeout for the first timer will be `0`
- Run `setTimeout(null)`; before applied changes the timer ID will be non-zero
- Run `setInterval(null)`; before applied changes an error will be thrown rather than `0` being returned
Reviewed By: cipolleschi
Differential Revision: D75145909
Pulled By: rshest
fbshipit-source-id: 6646439abd29cf3cfa9e5cf0a57448e3b7cd1b48
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51338
There was some problems removing this feature flag earlier in that, on older android versions, we would try to focus the top most text input whenever any other text input would try to blur. This was ultimately and issue with how Android implements `clearFocus`. To fix this, lets block the focusability of all views while we clear the focus, then re-enable.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D74760594
fbshipit-source-id: 2811c08ad6ed0855da0a4d7fca89fb08f84905c2
Summary:
I noticed the link to networking in new app screen is wrong. So correcting it here
## Changelog:
[GENERAL][FIXED] - Fix Networking URL in New app screen
Pull Request resolved: https://github.com/facebook/react-native/pull/51396
Test Plan: Click on the link to open
Reviewed By: arushikesarwani94
Differential Revision: D74886240
Pulled By: cortinico
fbshipit-source-id: 19ccf63e64f0e40df4a0ab4082299c654926e35d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51382
This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests.
It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74804967
fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51383
This diff is a set of alignments/improvements in generated TS types. It includes:
- extending `AppStateStatus` with `extension` and `unknown`,
- exporting `AnimatedProps` under `Animated` namespace,
- resolving issue with discriminated unions in `ProgressBarAndroidTypes`,
- fixing `StyleSheet.create` type to accept only specified style properties,
- extending `TextProps` with `AccessibilityProps`,
extending Fn Args generic with `$ReadOnlyArray` in `ErrorUtils`,
- small `__typetests__` adjustments,
- removing type test `styleDimensionValueValidAnimated` as `DimensionValue` no longer accepts `AnimatedNode`,
- removing `styleDimensionValueInvalid` as `DimensionValue` accepts any string now - template literal types in Flow are not supported,
- changing `overlayColor` type to `ColorValue` to align with manual types,
- fixing `AnimatedPropsAllowList` type which wasn't correct in TS because index signature type was different from style type,
- using `DeviceEventEmitter` instead of `DeviceEventEmitterStatic` in type tests which is equivalent in both new and old types - `DeviceEventEmitterStatic` was only a type of `DeviceEventEmitter`,
- removing type test for checking forwarded key type - doesn't work with new types and that shouldn't be supported,
- removing `Animated.legacyRef` type test - not included in new types,
- adding `DOMRect` from "dom" lib to `globals.d.ts` to not include "dom" lib in the tsconfig - tries to compare globals with `lib.dom.d.ts` and produces many errors,
- exporting `SectionListData`,
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74807552
fbshipit-source-id: c5254ea0f701f3602b9d716faeb50ca1ab21b013
Summary:
Expo is using the backingmap to be able to update properties in a fast and performant way in two overridden view manager subclasses (ViewGroupManager subclass is one of them).
This diff exposes the backing field via JvmName using the `internal_` prefix.
So Expo can keep on accessing the field as they were doing before. In the long run we should prevent them from accessing this property altogether but this would require a different API.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/51386
Test Plan: Build with Expo modules
Reviewed By: cipolleschi
Differential Revision: D74884533
Pulled By: cortinico
fbshipit-source-id: e76673c794a6a125059633d29445d991d867b770
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51285
The `composeStyles` function should correctly determine the type of the input styles (`ViewStyle`, `ImageStyle`, `TextStyle`) base on the output type:
```ts
const combinedStyle8: StyleProp<ImageStyle> = StyleSheet.compose(
// ts-expect-error
composeTextStyle,
composeTextStyle,
);
```
This diff adds generic type checking for `compose` function and fixes `ImageStyle` overflow prop type which accepted `scroll` property (which wasn't previously accepted in manual types) and which enables type system to distinguish `ImageStyle` from `ViewStyle` and `TextStyle`:
previous:
```ts
overflow?: 'visible' | 'hidden' | 'scroll'
```
current:
```t
overflow?: 'visible' | 'hidden'
```
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74574293
fbshipit-source-id: 751a44f2d3cd43055d93031343995f16ef87b185
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51307
D72228547 added the `exports` field to the main `react-native` package, in which all imports from `./src/*` are explicitly disallowed. This was expected to be a breaking change and to limit the surface area of it, this diff will allow using all imports in jest tests.
Changelog: [General][Added] Added a custom Jest resolver to opt out from handling "exports" in tests
Reviewed By: huntie
Differential Revision: D74708701
fbshipit-source-id: 9a2714f4e6f78ffbad9e56b5bb92657c9ea908ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51121
Previously could match via the `"./*"` subpath when `"react-native-strict-api"` is not set. Only the entry point `./types_generated/index.d.ts` should be exposed.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D74242716
fbshipit-source-id: 232c90f34fafe8fdf1a5a7ef1fec4acc191525b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51096
**Problem:** `Activity.onBackPressed()` has been deprecated and with targetSdk 36, predictive back will be enforced and the API no longer called. We need to migrate to backward compatible AndroidX `OnBackPressedCallback`.
- https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back.
**Solution:**
`OnBackPressedCallback` is registered conditionally only if it is `targetSdk` 36 or greater.
If the callback in enabled, `onBackPressed()` is not called and callback is used regardless of `android:enableOnBackInvokedCallback` property in <application> or <activity> set in AndroidManifest.xml.
As a workaround callback is manually calling existing `onBackPressed()`.
This is done rather than removing onBackPressed() completely and using only `OnBackPressedCallback` as we are not sure of the impact of removing the implementation entirely. Once we determine it is safe to do so then, we should remove the workaround and fully transition to `OnBackPressedCallback`
* I also surveyed child classes extending ReactActivity for overridden `onPressedBack()` usage and found only one usage which will be handled later.
NOTE: `ReactDelegate.onHostResume()` sets up the `DefaultHardwareBackBtnHandler` using `ReactActivity` (https://fburl.com/ul47tbeo) and will be called from JS `BackHanderl.exitApp` (https://fburl.com/code/a4l2pjsw). Calling `BackHanderl.exitApp` enables predictive back to work.
Changelog:
[Internal]
Reviewed By: mdvacca
Differential Revision: D74161428
fbshipit-source-id: 2e081ba6922b315e9d1746e83a41bab5277fa62e
Summary:
Expo inherits from the DevServerHelper class, and needs it to be declared as open, the same goes for its public interface.
Expo is using this in `DevLauncherDevServerHelper` and overrides the methods:
- getDevServerBundleURL
- getDevServerSplitBundleURL
- getSourceUrl
- getSourceMapUrl
- isPackagerRunning
This PR fixes this by adding the open to the class and to the methods that should be open
## Changelog:
[ANDROID] [FIXED] - Made DevServerHelper and its method open so that they can be overridden.
Pull Request resolved: https://github.com/facebook/react-native/pull/51323
Test Plan: Verify that we can build against Expo.
Reviewed By: cipolleschi
Differential Revision: D74876479
Pulled By: cortinico
fbshipit-source-id: 0037d6f7cee190a690ec3ec59896df04f46797b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51381
Changelog: [General][Fixed] Fixed codegen breaking when a subset of `modulesConformingToProtocol` fields was specified or when the value was string
D70822061 introduced a new way of defininf modules and components in codegen, but accidentally introduced two breaking changes to the legacy syntax:
- before that diff, in case of 1:1 mapping, the value of the fileds could be a string, while after, it required it to be an array
- before that diff, not all of the fields on `modulesConformingToProtocol` had to be defined in `package.json`, while after, it required all fields to be defined even if unused
Reviewed By: cipolleschi
Differential Revision: D74875251
fbshipit-source-id: 610103b508f1462b4de01725f9b0a87341571197
Summary:
See https://github.com/facebook/react-native/issues/51212 - children aren't updated correctly in an old arch native view using the interop layer under Fabric.
This is caused by the mountChildComponentView method not updating the view, only adding the new view to a list that will be used on the next update to mount the child.
This commit fixes this by adding the same pattern as in unmountChildComponentView where children are inserted directly if the underlying paperview is available in the adapter - otherwise it uses the mounting list as before.
#Closes 51212
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - fixed adding child views to a native view using the interop layer
Pull Request resolved: https://github.com/facebook/react-native/pull/51213
Test Plan:
**Previous output**:
<image src="https://github.com/user-attachments/assets/472b95e7-0921-46c9-be6a-f31759c0cd26" width="200px" />
**After fix**:
<image src="https://github.com/user-attachments/assets/554387cd-c264-483e-9c52-d9cd40b42601" width="200px" />
Reviewed By: sammy-SC
Differential Revision: D74471278
Pulled By: cipolleschi
fbshipit-source-id: 798f9e7be389359bd6e3aa1b6a6e9fb799fcb369
Summary:
After conversion to Kotlin we could no longer override the removeView function since it is no longer open. The rest of this class can be overridden as before, but since functions are final by default this doesn't work for the new `removeView` function.
Expo is overriding the `removeView` functions in `GroupViewManagerWrapper.kt` (a lot of other ViewManager methods are also overridden here, but the `removeView` is introduced in `ViewGroupManager` and needs to be open as well. `GroupViewManagerWrapper.kt` is a replacement view manager that adds support for a delegate that will receive callbacks whenever one of the methods in the view manager are called.
This commit fixes this by making the removeView function explicitly open.
## Changelog:
[ANDROID] [FIXED] - Made function `removeView` open in Kotlin class
Pull Request resolved: https://github.com/facebook/react-native/pull/51322
Test Plan: Verify that Expo can build against this class.
Reviewed By: javache
Differential Revision: D74807744
Pulled By: cortinico
fbshipit-source-id: 55f4b9deccb7d82ceb78be1d56c2b99a6f7e3ce9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51135
In generated types default exported variables are re-declared which shadows attached tags and doc blocks. This transform moves necessary comments on top of re-declarations to keep them accessible.
Example output for SafeAreaView:
```ts
import type { ViewProps } from "../View/ViewPropTypes";
import View from "../View/View";
import * as React from "react";
declare const exported: (props: Omit<ViewProps, keyof {
ref?: React.Ref<React.ComponentRef<typeof View>>;
}> & {
ref?: React.Ref<React.ComponentRef<typeof View>>;
}) => React.ReactNode;
/**
* Renders nested content and automatically applies paddings reflect the portion
* of the view that is not covered by navigation bars, tab bars, toolbars, and
* other ancestor views.
*
* Moreover, and most importantly, Safe Area's paddings reflect physical
* limitation of the screen, such as rounded corners or camera notches (aka
* sensor housing area on iPhone X).
*/
declare const SafeAreaView_DEFAULT: typeof exported;
declare type SafeAreaView_DEFAULT = typeof SafeAreaView_DEFAULT;
export default SafeAreaView_DEFAULT;
```
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74249424
fbshipit-source-id: 5cdd1c746e7fed99e3d3427d6ebf4c0e7ba3f3fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51136
This diff attaches doc block to ProgressBarAndroid copied from the manual TS types.
Generated types result:
```ts
import * as React from "react";
import type $$IMPORT_TYPEOF_1$$ from "./ProgressBarAndroidNativeComponent";
type ProgressBarAndroidNativeComponentType = typeof $$IMPORT_TYPEOF_1$$;
import type { ProgressBarAndroidProps } from "./ProgressBarAndroidTypes";
export type { ProgressBarAndroidProps };
declare let ProgressBarAndroid: (props: Omit<ProgressBarAndroidProps, keyof {
ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}> & {
ref?: React.Ref<React.ComponentRef<ProgressBarAndroidNativeComponentType>>;
}) => React.ReactNode;
/**
* ProgressBarAndroid has been extracted from react-native core and will be removed in a future release.
* It can now be installed and imported from `react-native-community/progress-bar-android` instead of 'react-native'.
* see https://github.com/react-native-community/progress-bar-android
* deprecated
*/
declare const $$ProgressBarAndroid: typeof ProgressBarAndroid;
declare type $$ProgressBarAndroid = typeof $$ProgressBarAndroid;
export default $$ProgressBarAndroid;
```
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D73855212
fbshipit-source-id: c6c09ea68c9f61f305f96c0954370bb938fc59d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51192
The `build-types` script cannot currently resolve `react-native/assets-registry` and `react-native/js-polyfills`. This diff moves imported types from these packages to `react-native` to include them in generated types.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74392568
fbshipit-source-id: cbce977b710f54dc53ce1b0fc080704b420490d4
Summary:
Enables `DEFINES_MODULE` in `React-jsc.podspec`
After upgrading app to RN `0.79`, when installing pods with JSC enabled there is an error being thrown that
`The following Swift pods cannot yet be integrated as static libraries`
`The Swift pod 'RNFlashList' depends upon 'React-jsc', which does not define modules. ...`
when installing packages that use Swift
## Changelog:
[IOS] [CHANGED] - enable `DEFINES_MODULE` in `React-jsc.podspec`
Pull Request resolved: https://github.com/facebook/react-native/pull/51160
Test Plan: RNTester runs and builds correctly
Reviewed By: huntie
Differential Revision: D74325357
Pulled By: cipolleschi
fbshipit-source-id: b994b7e678633440d5e362ae6965b2d5188d34f1
Summary:
Selectively disabling autolinking of a native dependency with components registered in the codegen configuration in react-native.config.js causes builds to crash upon launch on iOS. This is because the generated `RCTThirdPartyComponentsProvider.mm` file contains references to the excluded library using `NSClassFromString` causing the returned NSDictionary from `+[RCTThirdPartyComponentsProvider thirdPartyFabricComponents]` to be populated with nil values and therefore crashing the app. This has been confirmed in 0.78.2 and 0.79.2 but probably exists in 0.77.x as well.
The issue has been further described in https://github.com/facebook/react-native/issues/51077.
## Changelog:
[IOS][FIXED] - Skip codegen for selectively disabled libraries in react-native.config.js
Pull Request resolved: https://github.com/facebook/react-native/pull/51078
Test Plan:
1. Install a library that has the componentProvider field set in the codegen config (see reproducer) and install the iOS pods.
2. Build the app.
3. App should run successfully without any crashes.
Reviewed By: cortinico
Differential Revision: D74248371
Pulled By: cipolleschi
fbshipit-source-id: 1ff7b477ed3d94ca45616ae243d3d2d30bd897db
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51246
Changelog: [General][Fixed] Fix generated types in react-native/virtualized-lists being used without opt-in
D71969602 introduces `exports` field to `package.json` files in `react-native` and `virtualized-lists`. In that diff, the `types` in `virtualized-lists` by default pointed to the new generated types without requiring the opt-in.
This fixes that by requiring the opt-in before using the generated types.
Reviewed By: huntie
Differential Revision: D74573321
fbshipit-source-id: fe05b0204a7200c1c91aac2614aa786bbbced2a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51101
TS LSP suggests importing/using components from `types_generated` directory which are exported under slightly different name than root exports. Prefixing default exports with `$$` fixes the issue.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D74177107
fbshipit-source-id: 86a6869c2aa7a113915184e4857a7882710b1db4
Summary:
When building the RNDependencies XCFrameworks we saw some errors in the CI servers about rsync failing:
`rsync(3031): error: poll: hangup on nonblocking write`
We decided to fix this by changing from using rsync to cp.
This commit fixes this by replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.
## Changelog:
[INTERNAL] [FIXED] - Replacing rsync with cp, and adding a cleanup step after copying the XCFramework files.
Pull Request resolved: https://github.com/facebook/react-native/pull/51095
Test Plan: Run RNDependencies scripts on CI and verify that they're working as expected.
Reviewed By: fabriziocucci
Differential Revision: D74236114
Pulled By: cipolleschi
fbshipit-source-id: accd84abf7601919cfdbc1b6a8681a61d4293ca5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51112
Throw if getCatalystInstance() is executed when running on bridgless mode + legacy arch minification
This should be safe given that all the methods of BridgelessCatalystInstance throw exceptions
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D74200099
fbshipit-source-id: a888061250f19348a22895c3684aa2333280c916
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51111
BridgelessCatalystInstance is unused in bridgeless, any usage will lead to an exception / crash.
This diffs marks BridgelessCatalystInstance as LegacyArchitecture and removes DoNotStrip annotation to enable further optimizations
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D74200097
fbshipit-source-id: f99b6fa74c30bdf0e1cd6758e223601b3ce5826c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51088
Creates `ShadowNodeReferenceCounter`, a module with utilities for writing Fantom tests that make assertions about the reference count for a `ShadowNode` object.
Changelog:
[Internal]
Reviewed By: lunaleaps
Differential Revision: D74131710
fbshipit-source-id: a949a402ee52f40445ce99c712540e80c8a05065
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51065
This adds infrastructure to let us start storing cached Android text layouts as part of a `ParagraphShadowNode`. After this, we will clear them out, and propagate them to state. Right now, the flag doesn't do much, apart from extra work.
This is done by adding `TextLayoutManagerExtended::supportsPreparedLayout()`, and `TextLayoutManager::PreparedLayout` types, to shim between platforms, then on Android, we add a `PreparedLayout`, which is for now just an Android layout, with extra field (`maxNumberOfLines`, for some reason not exposed on recent versions).
Android `TextLayoutManager` java side is split a little bit, so that we reuse all the existing logic for prepared layouts. I tried to set up the boundary, so that we don't reserialize a MapBuffer after preparation, and for simplicity, this means source of truth for attachment count, and attachment sizes, now lives on the layout. This means we need to change boundary a bit, where we are no longer able to pass in a buffer to fill from C++ side of attachment positions.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D73970149
fbshipit-source-id: ff71c227e062c16fe52a4eb3ba2acbebf3d96e56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51107
Changelog: [iOS][Deprecated] Deprecate loadImageForURL in favor of new signature which uses completionHandlerWithMetadata
Updating the signature of completionHandlerWithMetadata to allow passing metadata through the completionHandlerWithMetadata in order to enable better instrumentation of image loading.
Reviewed By: philIip
Differential Revision: D73162738
fbshipit-source-id: 8e7e4ac35c9685a362a2efe08ebebbf0dd249ff9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51108
We calculate the width of text to be the full width of the container, if the text overflows the bounds of the container, instead of the wrapped width, to match the behavior on web.
Incorporating line count into layout defeats this logic, since the final layout never overflows. We need to also check to see if we are ellipsized (had overflow) instead.
Changelog:
[Android][Fixed] - Assume full container width when ellipsizing line
Reviewed By: joevilches
Differential Revision: D74204041
fbshipit-source-id: 1c2a7fc50f101bd4c9ed2f979534731992b5310b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51106
There was a strange bug reported to us with `accessibilityOrder` where an OCR model would announce text on the screen sometimes. This would happen if a focused `View` without a label would wrap `Text` that was was not included in the `accessibilityOrder` array. What happens under the hood is we have a focused `View` trying to coopt a label. It finds no accessibility nodes under it (because the `Text` has `importantForAccessibility` set to `NO`) so it falls back to this weird TalkBack behavior. It both reads the text from the TextView and announces an OCR announcement - leading to repeating the text.
To fix this we just check if we are going to coopt text and if we do then we do not set `importantForAccessibility`. Behavior here changes a bit. Links are not accessible without having to reference the Text, setting `accessible={true}` on non-referenced `Text` will lead to be focusable.
These are both less bad than what we had before though, so I think this tradeoff is fine.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D74101530
fbshipit-source-id: 0678915efdc46a6273f79927b87f22bc9017814a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50997
In some apps, we spend a non-trivial amount of time calling ShadowNode destructors on the UI thread.
A simple way to avoid stalling the UI thread is to move the `baseRevision_` instance to a data structure that is cleared on a background thread, so it's tree of ShadowNode shared_ptrs are released (and in most cases destroyed) on the background thread.
Rather than using std::thread, this change introduces the LowPriorityExecutor abstraction that should be supplied by host platforms. The implementation of this LowPriorityExecutor for each platform is as follows:
- iOS: uses dispatch_async to a low priority dispatch queue
- Android: uses a pthread with SCHED_OTHER and priority = 19
Moving the ShadowTreeRevision into a lambda capture and punting the lambda to the LowPriorityExecutor moves the destructor calls of the ShadowNodes to the host platform implementation of the LowPriorityExecutor.
This change is also guarded by a feature flag so we can keep an eye out for potential memory leaks.
## Changelog
[Internal]
Reviewed By: NickGerleman
Differential Revision: D73688009
fbshipit-source-id: 6a66da248e6fe5c38375bf026499346e8381e75a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51018
`ReactNativeTypes` deep imports `MeasureOnSuccessCallback`, `PublicInstance`, `PublicRootInstance` and `PublicTextInstance`. The `MeasureOnSuccessCallback` type is already root exported, `PublicInstance` is exported as `HostInstance` and there are two types left to export to root import all of them from react-native. This is needed for `simpleResolve` to properly resolve and build types located in `ReactNativePrivateInterface`.
This cannot be fixed on the resolver level because that would also involve change in the `exports` field in `package.json` to enable types resolution for deep paths which should be strict by design.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73926160
fbshipit-source-id: 3a711a0f002ea42d9ad538c07ec00f22cc4afb6b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51091
Fix for top padding with Android edge-to-edge (default for current version of the RN template). We add a `statusBarHeightOffset` explicitly, since this is not covered by the builtin `SafeAreaView`.
{F1977676990}
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D74142357
fbshipit-source-id: 6d70db43d8b80b7e3d2d4b598e29560efa046b5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51066
Splits up some of the `measureText` code in Android TextLayoutManager, ahead of D73970149, which adds `measurePreparedLayout` to reuse most of this logic. Most significant change, is we pull out logic to iterate and retrieve metrics for attachments, since `measurePreparedLayout`, needs to also return dimensions, and fill into ArrayList, instead of received buffer.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D74035246
fbshipit-source-id: 2a0f5b171c4343e26ffa5b2538a0018939b06773
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51055
When clipping to the padding box without a background or border set, we should default to clipping to the drawing rectangle.
This ensures accurate clipping behavior when there is no background or border set. This is because it seems bounds accommodates the contents of the drawables but when no content is present (either a background or a border) the bounds are 0. In which case we want to rely on the drawing rect instead of the bounds for this edge case.
Changelog: [Android][Fixed] - Fix incorrect clip to padding box on new Background and Border drawables
Reviewed By: NickGerleman
Differential Revision: D74014372
fbshipit-source-id: bd5a496db6de44c4185760ed72b3013d9f2faa00
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51039
We added a feature flag in case this broke things. Its been about 4 months now with now issues, I think we can clean this up.
Changelog: [Android][Fixed] - Can now focus TextInput with keyboard
Reviewed By: NickGerleman
Differential Revision: D73954790
fbshipit-source-id: 4682cf709aa2f34ba69e76a35d07a908edb28f23
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51053
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.
## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.
The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.
## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.
Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.
Reviewed By: yungsters, cipolleschi
Differential Revision: D73949864
fbshipit-source-id: ac5b6fc373cb1b2436045ae1f78391f0712bca17
Summary:
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please 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!
Changelog: [Internal]
<< DO NOT EDIT BELOW THIS LINE >>
diff-train-skip-merge
Generated by: https://www.internalfb.com/intern/sandcastle/job/22517999956752681/
GitHub Repo: facebook/react
Reviewed By: kassens
Differential Revision: D73844457
fbshipit-source-id: 840a8448839992538427cd52501cdfaf0a2e82da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51062
Document logic implemented in ComponentDescriptorRegistry when a component is not found
changelog: [internal] internal
Reviewed By: arushikesarwani94, cortinico
Differential Revision: D74036572
fbshipit-source-id: 20a5d182e0308538cdfa3f5e97957d488f010f0d
Summary:
This PR introduces a concise Kotlin DSL for constructing `ReadableMap` and `ReadableArray` in Android native modules:
- Adds `buildReadableMap { … }` and `buildReadableArray { … }` functions, modeled after Kotlin’s `buildMap`/`buildList` APIs.
- Wraps `Arguments.createMap()` / `Arguments.createArray()` in a type-safe, nested DSL to reduce boilerplate and prevent errors.
- Improves readability and maintainability when assembling nested map/array structures for React Native bridges.
Current code like:
```kotlin
val map = Arguments.createMap().apply {
putString("name", user.name)
putInt("age", user.age)
// …
}
```
can now be written as:
```kotlin
val userMap = buildReadableMap {
put("name", user.name)
put("age", user.age)
put("scores") {
user.scores.forEach { add(it) }
}
}
```
This feature proposal also written in [[Android] Support Collection DSL](https://github.com/react-native-community/discussions-and-proposals/issues/899)
## Changelog:
[Android] [Added] - Collections DSL functions for Kotlin(`buildReadableMap`, `buildReadableArray`)
Pull Request resolved: https://github.com/facebook/react-native/pull/51042
Test Plan:
### Run Unit Test
```shell
cd packages/react-native/ReactAndroid
./gradlew :ReactAndroid:unitTest
```
Ensure all tests in `src/test/java/.../ReadableMapBuilderTest.kt` and `ReadableArrayBuilderTest.kt` pass.
Reviewed By: javache
Differential Revision: D73986390
Pulled By: cortinico
fbshipit-source-id: b9f94327646bcb6e0190cdd06dfb9bb5eaa6375c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51079
This test was not using AssertJ. I've updated it then.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D74065455
fbshipit-source-id: 2393340fd75aaf9599ba789237c29bb91e0192ae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51025
(Sparsely) wires up reporting of Network events to the Web Performance subsystem.
Our plan is to report to the Web Performance APIs (lightweight timing metadata, here) for all build flavours, and report to CDP (more costly full metadata/previews) in dev/profiling builds.
**Notes**
- Introduces `PerformanceEntryReporter::unstable_reportResourceTiming` — this will become "stable" when further network events/fields are fully hydrated on Android and iOS.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73922341
fbshipit-source-id: bcfc03c3d8a9a286ae72ba00a3313602fb2adea8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51046
This small change improves the cleanup script for ios, which is now not deleting the workspace and that it might be keeping an outdated version of the codegen for OSS.
## Changelog:
[Internal] - Improve yarn clean-ios script
Reviewed By: cortinico
Differential Revision: D73988442
fbshipit-source-id: 6de5d6ab08812ba7fdb19b0cc955a38840d82f89
Summary:
Static code analysis detected several redundant constructs across the codebase. Most of the ones fixed here are marked as warnings/weak warnings, likely code smells post-migration from Java.
Doing a small round to clean up some of them.
## Changelog:
[INTERNAL] - Kotlin: Clean up redundant constructs
Pull Request resolved: https://github.com/facebook/react-native/pull/51061
Test Plan:
```sh
yarn android
yarn test-android
```
Reviewed By: rshest
Differential Revision: D74056259
Pulled By: javache
fbshipit-source-id: 04f7ce7ce7b4f6063c8e1712840a44fd91d3b9e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51073
Currently the SampleLegacyModule screen is not loading in OldArch for RNTester.
That's because we gate adding a `SampleLegacyModule` to the BaseReactPackage
only if NewArch is enabled.
This shouldn't be the case as we can still build RNTester in oldarch and we
should be able to visualize the SampleLegacyModule example.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D74009245
fbshipit-source-id: 55eae3dc6063343f57261af2742e643a8e5c2b50
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51050
Gate network event reporting on iOS (inputting into the network reporting subsystem), now that this is load-bearing with the Performance API.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D73995864
fbshipit-source-id: 65a15485cdae445eadff6c57148f3682af6de215
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50995
Refactors our previous single-struct representation for `PerformanceEntry` ([see MDN](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry)) as a `std::variant`.
This maps closely to the `PerformanceEntry` type inheritance in the web spec, and makes this type substantially cleaner to extend and work with in D73861431.
Changelog: [Internal]
Reviewed By: rubennorte, rshest
Differential Revision: D73860532
fbshipit-source-id: f3b7a7444d2456370620c1a1ba9a43f118cb9730
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51044
This change prevents RN from accessing the MainBundle every time a NativeModule is registered by caching the `legacyLogEnabled` property in a static variable.
## Changelog:
[Internal] - Prevent multiple access to mainBundle
Reviewed By: javache
Differential Revision: D73992070
fbshipit-source-id: a14aada43f367314b7f868a0b5e30b9f92d0971a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51064
This is pretty much just checked in printf debugging. Let's clean it up, before we duplicate some code which has the logs.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73975310
fbshipit-source-id: d2b936ad62a17aef20903fd2ca0defc23c647aa0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51040
## Resubmit
We were previously only checking for `maxNumberOfLines` of `ReactConstants.UNSET` (-1), but it may also be `0` to signify unset from other checks (wut), and different versions of Android would handle this case of `maxLines={0}` differently.
The resubmission adds an explicit check for zero here as well.
```
if (ReactNativeFeatureFlags.incorporateMaxLinesDuringAndroidLayout()) {
if (maxNumberOfLines != ReactConstants.UNSET && maxNumberOfLines != 0) {
builder.setEllipsize(ellipsizeMode).setMaxLines(maxNumberOfLines);
}
}
```
## Previous
Right now, we fully layout text, then use max lines to determine a metric to use when calculating size.
Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.
Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.
I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.
Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout
Reviewed By: lenaic, joevilches
Differential Revision: D73953691
fbshipit-source-id: 2e08faab5bb9eda90a126545571bb441ea1ece39
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51037
## Changelog:
[Android] [Changed] - Make mHybridData in CxxReactPackage protected
In some cases subclass needs to override it in constructor
Reviewed By: javache
Differential Revision: D73894471
fbshipit-source-id: 7958f9b88841a0201d39e49fba09af76927e5737
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51019
Follows D72228547 and D73770609.
This diff internalises (moves files from fbsource+GitHub to fbsource only) a number of RNTester examples which referenced `'react-native/src/private/'` subpaths.
In future, new components/APIs should be exported from index as `unstable_`, or added to `RNTesterListFbInternal` if they are exported from `src/fb_internal/`.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73777092
fbshipit-source-id: d9fb0833c56f2ae580b6db62ddbbbeae774a0004
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51043
The call to the mainBundle to read the `RCTLegacyWarningsEnabled` key can sometime deadlock in prod.
However, these are development logs that we don't want to run in Prod.
This change should disable the logs in prod, skipping the access to the `mainBundle`, and avoid the deadlock completely.
## Changelog:
[Internal] - Fix deadlock at startup to read `RCTLegacyWarningsEnabled`
Reviewed By: philIip, javache
Differential Revision: D73987454
fbshipit-source-id: 014410266733fdfa1e7b29d41fab5f7112b1ddb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50914
The URL spans generated by Linkify are not actually accessible because we do not update the delegate's virtual views.
I also had to change how AccessibilityLinks get generated, since it does not work well if it includes spans that are not `ReactClickableSpans`
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73612119
fbshipit-source-id: 0c6028a7473e0484216300863f2d7a043fb2ea85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50887
There is currently a bug with the recent changes to keyboard accessibility with Text and nested links. If something with nested links has a `dataDetectorType` prop then we have 2 different selections when we navigate with arrow keys since the drawing behind the 2 are separate.
Removing LinkMovementMethod is not possible since it allows for clicking the links it detects
As a result, lets just allow it to take precedence over the delegate when handling link navigation in the cases its present.
Changelog: [Android][Fixed] - Double selection with dataDetectorType and links
Reviewed By: NickGerleman
Differential Revision: D73549839
fbshipit-source-id: bbe37470e78841bb119fa68e197b327023031c7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51029
# Changelog: [Internal]
Instead of exposing vector of samples / call frames directly, we will share pair of iterators that would allow iterating over them in a specified order.
Reviewed By: dannysu
Differential Revision: D73448002
fbshipit-source-id: 16c476453e943a71403b375b168b30da7d261cfa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51028
# Changelog: [Internal]
There is a way to implement the trie without allocating `ProfileTreeNode` on the heap. The serialization logic (`RuntimeSamplingProfilerTraceEventSerializer.cpp`) remained mostly the same, the only new limitation is that we can only use pointer to `ProfileTreeNode` until the next push into a `children` container, when all pointers are invalidated. Not sure if we can avoid this invalidation, since we don't know the potential size of `children` vector, it has to be dynamically allocated.
Main changes are in `ProfileTreeNode`:
- Instead of receving already created instane that will be check if it should be added as a child, it will expose predicate to check if such node already exists - `getIfAlreadyExists`. If not, then caller can use `addChild` to register it and receive a pointer.
Reviewed By: huntie
Differential Revision: D73213284
fbshipit-source-id: 385be884bcc5feb61b3a8cbd0ff36402e3b20c6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50847
# Changelog: [Internal]
We have different types of call frames, right now we defined 4 of them. Previously, they would descend from `ProfileSampleCallStackFrame`, which has `kind_` field that can be used for determining the type of the call frame.
We were using polymorphism later on React Native side to cast from base type to derived.
Instead of this, and instead of doing heap allocations for potentially tens of thousands of objects, we will use std::variant for storing frames in a single container and them distinguishing them.
This fixes memory leaks caused by new-ing objects and not clearing out when Profile is destroyed.
Reviewed By: dannysu
Differential Revision: D72803934
fbshipit-source-id: a279c6d68c7c2628f0eab585f33137222ad9e3f1
Summary:
The `Object.assign` support is [inherently unsound](https://github.com/facebook/flow/issues/3392), carries a lot of tech debt, and we want to error on them.
This diff pre-suppresses errors that will be added in the next version of Flow, to make the next release easier.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D73963639
fbshipit-source-id: ebefc82c123588eb0b72ab48a24e45c42be33267
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51035
This is causing some problems with older versions of Android. Let's back out for now.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73950625
fbshipit-source-id: 424dfc1216ae811e1e287774c6ac5d0c9ba5aa17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51004
It would be very convenient if `accessibilityOrder` could reference itself. Meaning the View with the `accessibilityOrder` prop can include its own `nativeID` in the array. This makes sense API wise - we allow for referencing parents and their descendants, so long as they are treated as an element and not a container. This is pretty nice since you no longer have to wrap everything in a View who's sole purpose is `accessibilityOrder`.
Under the hood things get a bit garbled, however, since iOS only lets you have UIViews that are either accessibility elements or accessibility containers - and we need to support both at the same time for this to work. To do this, we make use of the `UIAccessibilityElement` class and just forward all of the logic to the View with the `accessibilityOrder` prop. This View will also not be an accessibility element from the point of view of iOS.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D73792934
fbshipit-source-id: b0810277c8e410319639b863b59e4e60782bffca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50925
This crashes without this change, now it does not!
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73626930
fbshipit-source-id: 37fd99372d1781a9e895e854e8b2f75c568ef9c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51027
Simple change to make the host of `experimental_accessibilityOrder` include the view that hosts the property in its order.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73808337
fbshipit-source-id: 441329a6ca0cd4b0aba08bddb15143215d337e01
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51014
Starting from the [24th of April](https://developer.apple.com/news/upcoming-requirements/?id=02212025a), Apple only accepts app built with Xcode 16.0 or greater
This change bumps our CI to ensure that everything works with Xcode 16.
## Changelog:
[Internal] - Bump CI to Xcode 16.2
Reviewed By: javache
Differential Revision: D73924819
fbshipit-source-id: 82cdca5e12cee505de6e97513c07678776642d88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51022
As per title, it bumps maestro to 1.40 in CI
## Changelog:
[Internal] - Bump Maestro to 1.40
Reviewed By: cortinico
Differential Revision: D73929936
fbshipit-source-id: 7dfd974a0d1227520c5a6892ff4f157633fdbd54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51013
There's no need to use a singleton pattern here, we can just use a Kotlin object.
Changelog: [Android][Removed] Deprecated `ResourceDrawableIdHelper.instance`
Reviewed By: Abbondanzo
Differential Revision: D73923281
fbshipit-source-id: f46e125ce595fe4506b9fb5aa471109f5ba150f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50998
I'm reverting this as this change is too disruptive for the OSS ecosystem.
It will break ALL the apps written in Kotlin and it's coming too close to the branch cut which is in less than one week.
We need to re-do this migration in a non breaking manner after the branch cut as this is highly disruptive for little benefit at this point
Changelog
[Android][Changed] - Back out "[RN][Kotlin] Migrate ReactActivity"
Original commit changeset: 936263100ca9
Original Phabricator Diff: D73507044
Reviewed By: mdvacca
Differential Revision: D73864144
fbshipit-source-id: 264921b1f1cd38301e66364de4b619807272bd27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51006
Moves a bit of code, reading spans that we may not control, to query for `Spanned`, instead of `Spannable`, since some code (see last diff around ellipsization) may wrap intermediate Spannables.
Changelog: [internal]
Reviewed By: joevilches
Differential Revision: D73820368
fbshipit-source-id: e107bcf1f2f7d5555fca68fb2209c12c3f99c099
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51007
Right now, we fully layout text, then use max lines to determine a metric to use when calculating size.
Android API 23+ which we fully target allows incorporating ellipsization and maxlines directly into the layout. This will let us directly draw the layout when using maxLines later. This may also let Android optimize line-breaking a bit, when we hit truncation.
Special care is taken not to set this when we are in `adjustsFontSizeToFit` path, so that line count will flow over, signifing overflow.
I think the main user-facing change is that `onTextLayout` events will have measures post-ellipsization.
Changelog:
[Android][Changed] - Incorporate maxLines and ellipsization into text layout
Reviewed By: joevilches
Differential Revision: D73811573
fbshipit-source-id: df83295d0902ae8b043ce57b06cbb9c8f0c194fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51005
We need to get a context corresponding to the root being passed, to be able to resolve things like theme to use. RIght now that's a TODO, that's been around since new arch. Let's pass the real data along.
Changelog:
[Android][Fixed] - Correctly Pass SurfaceID to TextLayoutManager
Reviewed By: javache
Differential Revision: D73819640
fbshipit-source-id: 1ae2505b59b8577d35a4dc5bb2a524663f3bd47f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50889
This effectively reverts D67064488
We are trying to smash together functions, variables, virtual or non-virtual, all required by different platforms, into a single header, often using #ifdefs that are not what we want (apart from a bad editor experience, `#ifdef ANDROID` may or may not be compiled into the react-native-cxx platform, and we cannot use it for the Android platform reliably).
For Facsimile, we are going to be introducing more potential divergence, with the idea of `PreparedText`, where we can generate intermediate products as part of the layout process to be reused later. I'm planning to design that in a way which can be eventually reused across platforms, but not everywhere.
I think the best path for this is going to be to allow each platform to have their own headers, instead of the current messiness, then allow shared code (e.g. in `ParagraphShadowNode`) to pick how to interact at compile time. I added an example of this as part of `TextLayoutManagerExtended`, to customize how we act if a `TextLayoutManager` chooses not to implement `measureLines`.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73557126
fbshipit-source-id: 9851ebba691b0d123f6a355126f2d5b003aceba0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50970
__onAnimatedValueUpdateReceived is called from 2 places.
It is called from the onAnimatedValueUpdate subscription where the source of the values comes from here: https://fburl.com/8v2cwd2x with getValue() returning the offset + value components combined.
It's also called from in the animation end callback here: https://fburl.com/h36xy2nw where the source of this value comes from https://fburl.com/sud7m7st. In this case it's accessing `nodeValue` directly rather than calling getValue() and so it only includes the value component.
In this diff we pass both the value and offset in both onAnimatedValueUpdate callbacks as well as endCallback.
This allows us to separate the value from the offset on the JS side and ensures we have the latest offset value from native
Changelog: [Android][Fixed] - Sync offset and value from native -> js in separate fields
Reviewed By: zeyap
Differential Revision: D73795619
fbshipit-source-id: e8ed234497e3fcaf9d2a137aa1e17ca8d0f76d97
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51000
changelog: [internal]
# Why so many tests?
Differentiator has two modes: regular and reparenting. The reparenting one is almost a completely separate Differentiator, effectively doubling the complexity. It handles quite a few different special cases and is not covered by any reasonable tests, so here I am adding the tests to make sure every branch of the reparenting Differentiator is traversed.
Reviewed By: lenaic
Differential Revision: D73845746
fbshipit-source-id: 27a9fd72a5f8111b84e231cf8f495e278037a323
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50971
This feature flag enables a fix of double measurement on a subset of android components
changelog: [internal] internal
Reviewed By: yungsters
Differential Revision: D73804996
fbshipit-source-id: 3271deb8a8bf4c132cbfb6819f72cab556c6253c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50985
# Changelog: [Internal]
There may be tens of thousands of samples stored, so we should avoid copying it. I don't think we should restrict it from being copied, though, but we don't need it to copy in this case.
Reviewed By: huntie, dannysu
Differential Revision: D73106950
fbshipit-source-id: 45c027ea8bfc3424fe3428f5578d5bed3d1cdda9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50984
# Changelog: [Internal]
We are only using these struct to define how they will be serialize before sending over CDP, no need for custom constructors.
Also updated the naming of the serialization method to align with other parts of the project: `asDynamic()` -> `toDynamic()`.
Reviewed By: huntie
Differential Revision: D73774114
fbshipit-source-id: d0371cf3dee7584daa77054f73aced440550e674
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50988
Changelog: [internal]
This fixes a potential bug where we coalesce unique events with non-unique ones of the same type and target.
Not marked as a bug fix in the changelog because this wouldn't happen in practice, as we always dispatch events of a given type the same way (all unique or all non-unique).
Reviewed By: sammy-SC, javache
Differential Revision: D73849222
fbshipit-source-id: 6f387d63b3a68dccc81c110287d42e15e31c181e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50987
Changelog: [internal]
This adds a new `isUnique` option in `RawEvent` to determine if it's unique (whether it should be coalesced with other unique events of the same type and target).
This effectively makes `dispatchUniqueEvent` redundant, as we can use `dispatchEvent` with a `RawEvent` marked as unique.
This will allow us to fix the bug we found in the new tests for event dispatching, where non-unique events of a given type where being coalesced with non-unique events of the same type.
Reviewed By: javache
Differential Revision: D73849220
fbshipit-source-id: ce89623aee509071ab6a86654ee25d9614863a8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50989
Changelog: [internal]
Just adding a test suite to verify the behavior of event dispatching in Fabric (especially around event priorities, automatic determination based on ContinuousStart/ContinuousEnd and unique events).
This also surfaced a bug where we incorrectly batch unique and non-unique events together (see the disabled test).
Reviewed By: javache
Differential Revision: D73849218
fbshipit-source-id: 404172822d6985283a161c8a56575e0b5658a5cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50986
Changelog: [internal]
This just exposes some enum values and methods that we forgot to expose in a few interfaces.
Reviewed By: javache
Differential Revision: D73849221
fbshipit-source-id: 19014d53216e67c77b0c31e5ade8f86de071b001
Summary:
This PR aims to migrate ViewGroupManager to kotlin as part of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID][CHANGED]Migrate ViewGroupManager to kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50895
Test Plan: Tested with RN tester with old and new arch
Reviewed By: javache
Differential Revision: D73770843
Pulled By: cortinico
fbshipit-source-id: 45959a8bf512b3590ca8bc64dac281e13fa41ca3
Summary:
With the redesign of the new app screen, the E2E tests against the template started failing because we don't have a `Step One` string anymore.
This change should fix them.
## Changelog:
[Internal] - Fix Template E2E tests
Pull Request resolved: https://github.com/facebook/react-native/pull/50990
Test Plan: tested by running the E2E tests on this PR
Reviewed By: huntie
Differential Revision: D73855988
Pulled By: cipolleschi
fbshipit-source-id: d0d72e5a07cd88923e310767eae27f5df376d637
Summary:
As part of the work to integrate libraries with our nightlies, we want to receive a message when the libraries are failing to build on discord. This will help us catch breaking changes early on and onboarding library maintainer as soon as possible.
## Changelog:
[Internal] - Integrate with Discord when nightly fails
Pull Request resolved: https://github.com/facebook/react-native/pull/50979
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D73845810
Pulled By: cipolleschi
fbshipit-source-id: c6cfdf16b29642b1c3ad3872096c0e815fa88a0a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50992
shouldnt happen but when it does it shouldnt crash some more
fix for P1798860939
Changelog: [Internal] - fix crash when onHostPause is called and mCurrentActivity is null
Reviewed By: cortinico
Differential Revision: D73852655
fbshipit-source-id: 19ee4ada1c71a34a6115882e9a558b4ea9f9d8c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50965
While D72228547 has recently disallowed all `./src/*` subpath imports from React Native (functionally, `./src/private/*`), we have a number of APIs that are imported from Meta product code legitimately — e.g. as part of validating under-development React Native features internally in real Meta apps.
This diff defines a new, exported `./src/fb_internal/*` subpath via `package.json#exports`, which will allow us to expose select entry points for this purpose.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73770609
fbshipit-source-id: 397019669e565b95a86302ef30f80b65a17dcc0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50976
This is the second part of the migration of `rn-tester` package to use root imports. In this diff the `CodegenTypes` namespace is used to define Codegen primitives.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73780584
fbshipit-source-id: c13c2dfcfa4d023978a9463af1d2a3bf7b72476c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50975
Re-defining types in `AnimatedExports.js.flow` shadows their documentation located in `AnimatedImplementation`. Moving them to the `AnimatedExports` fixes the issue for generated TS types.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73840908
fbshipit-source-id: 2648498a53660b483c70be647716accc11e96d82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50967
In some cases we may want to check this only if the prop exists
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73793783
fbshipit-source-id: b498f82414edf63d8644b90bb3932298eb37b43c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50941
Without doing this, using Animated.event to update a value with an offset causes the value to revert to not having an offset because the native side doesn't even know about the offset if it hasn't been synced.
Don't think there's a better place to sync this for the cases where an animation is kicked off entirely from the native side
Changelog: [Android][Fixed] - Ensure latest offset value is synced to native
Reviewed By: javache
Differential Revision: D73622302
fbshipit-source-id: 7e67a7f41d900cc225af410af94ccdfd33c170c8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50850
This prop will be used to enable screen reader focusability without allowing keyboard focus. Mostly a quality of life prop for product engineers and maps 1:1 to Android
Changelog: [Android][Added] - Expose Android's screenReaderFocusable prop
Reviewed By: javache
Differential Revision: D73382051
fbshipit-source-id: 8171b9d24a735dd42d54abe4537fb487bdd011b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50962
OSS is affected by https://github.com/facebook/react-native/issues/49694 and it is endangering the migration of multiple apps to the New Architecture.
We fixed the issue but it is hidden behind feature flag while we are experimenting with it internally, to make sure it does not causes regressions.
However, the fix has been verified for the reproducer code and the OSS will be beneficial for the community.
We are overriding the featureFlag, enabling it for OSS.
## Changelog:
[Internal] - Enable `updateRuntimeShadowNodeReferencesOnCommit` for OSS
Reviewed By: lenaic, cortinico
Differential Revision: D73771648
fbshipit-source-id: 4394a2370d9edd9699c8e03293868defd465853c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50909
Enables and maps the `types_generated/` directory for `react-native` and `react-native/virtualized-lists` — exposing the new Strict TypeScript API entry points to React Native.
**New `"exports"` conditions**
- `"react-native-strict-api"` — The Strict TypeScript API opt in, exposing the `index.d.ts` entry point only.
- `"react-native-strict-api-UNSAFE-ALLOW-SUBPATHS"` — Opts into the new from-source generated types, but allows accessing subpaths (unsafe).
- We intend for this unsafe condition to be an escape hatch for Frameworks only (i.e. Expo).
Note: In the case of `virtualized-lists`, we simply use the `"types"` condition — since this package did not expose any TypeScript API previously.
NOTE: Should we need to roll back JS Stable API phase 1, **this is the single diff to revert**.
Changelog:
[General][Added] - Configure the "react-native-strict-api" opt in for our next-gen TypeScript API
Reviewed By: cipolleschi
Differential Revision: D71969602
fbshipit-source-id: 291182cc826db8b33f21fc79698e6096876d17ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50964
Address/supress ESLint warnings across the codebase, currently flagged on every PR via GitHub's "Unchanged files with check annotations" check.
{F1977480883}
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73778510
fbshipit-source-id: 91bed86877eae74fa3b9ebea71e26cdcaeee1761
Summary:
Rewrite of the Inspector class from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID] [CHANGED] - Migrated Inspector to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50947
Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages
Reviewed By: cortinico
Differential Revision: D73767386
Pulled By: javache
fbshipit-source-id: e0098568aa0ed9863503e206a88d3b171c8f9966
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50958
In rn-tester package there are many react-native deep imports which will be deprecated in the future. It is a starter for migrating rn-tester to using root imports instead. Only deep imports that are already root exported are changed. This diff avoids using `CodegenTypes` as it causes build errors and will be resolved in next stages.
Besides import changes, `PointerEvent` type is now also exported from the root.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73656526
fbshipit-source-id: 5814a3d9c6a04b1236581dbbe291cd109e2c71c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50957
Changelog: [internal]
Now we can use the higher level API for event dispatching in this test.
Reviewed By: javache
Differential Revision: D73663626
fbshipit-source-id: 961af26f62128f093c71ad14f457ac8544348415
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50903
For now we do not change the way this module is exported to prevent breaking changes (due to high usage in external packages). It is a tentative mitigation - this case requires more discussion and what could be sufficient. The `no-deep-imports` rule and plugin shouldn't emit a warning when encountered.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D73590627
fbshipit-source-id: 6f85c52373ee6c7c538c632b55cd9e0b9357f2a3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50932
Add a warning for LegacyArch users that are providing a ViewManager with a corresponding shadow node that implements the `YogaMeasureFunction`.
For those users, we know that the ViewManager is most likely not working on the NewArch (unless they have a backward compat ViewManager with a C++ shadow node implementation).
Changelog:
[Android] [Added] - Warn Legacy Arch users if they use a Component with a ShadowNode with `YogaMeasureFunction.measure()` function. That Component will stop working on NewArch.
Reviewed By: javache
Differential Revision: D73654273
fbshipit-source-id: 70d232434f94bc2a6970379d566b276f73850fce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50939
Redesigns React Native's `NewAppScreen` component, and moves it into a new `react-native/new-app-screen` package with a single component export. Deletes the old New App Screen under `'react-native/Libraries/NewAppScreen/'`.
{F1977434404}
**Motivation**
- **Reduces our public API** (see https://github.com/react-native-community/discussions-and-proposals/pull/894)
- Separates this screen from the main `react-native` package, where it was a number of subpath exports.
- Reduces the size of the main `react-native` package, including image assets — which are redundant for consumers like Expo.
- **Updated visual treatment**
- Replace outdated logo, update to a responsive tablet/windowed layout.
- Removes outdated guidance (e.g. "use cmd+R to reload"), and generally simplifies the layout (with the aim of reducing future maintenance).
- **Simplifies template boilerplate**
- `NewAppScreen` is now a fully encapsulated screen layout, avoiding the cruft of the previous modular design.
**Integration plan**
When we cut the `0.80-stable` branch, we'll update [the template](https://github.com/react-native-community/template/blob/main/template/App.tsx) to import and use `<NewAppScreen />`.
- This will cause an extra runtime dependency in the template `package.json`, which will require user cleanup. We are happy with this tradeoff, given the self-evident package name, reduction of template boilerplate, and size reduction on the main `react-native` package.
Changelog:
[General][Breaking] - The `NewAppScreen` component is redesigned and moved to the `react-native/new-app-screen` package
Reviewed By: cipolleschi
Differential Revision: D73657878
fbshipit-source-id: 9ca07afa9fbdd6f32015eafa2f27d52ed182918e
Summary:
This PR makes sure that monitor-new-issues runs only in the main repo. It was failing on my fork and spamming notifications.
## Changelog:
[INTERNAL] [FIXED] - run monitor-new-issues only in the main repo
Pull Request resolved: https://github.com/facebook/react-native/pull/50951
Test Plan: CI Green
Reviewed By: cipolleschi
Differential Revision: D73763006
Pulled By: cortinico
fbshipit-source-id: cbb22f8804448b41de970d3d11930110b353994f
Summary:
For real this time, the change was lost due to some merge conflict
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73726167
fbshipit-source-id: 1e0cef75f59a166d795922266365b2b7b060472e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50872
NOTE: Resubmission of D71968187.
Define `"exports"` field on the main `react-native` package.
**Notes**
Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).
- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅)
- These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
- Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅)
- Exports `./package.json` (unchanged ✅)
- TypeScript should:
- fall back to the `"types"` field (unchanged ✅)
- OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅)
Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Jest mocks to a `react-native` subpath will need to be updated to match the import path used in your code.
- Imports from `src/` and `src/private/` directories are disallowed.
Reviewed By: robhogan
Differential Revision: D72228547
fbshipit-source-id: d50d6e556d32a9cf2f90855a562e61549853acb9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50855
This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.
This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.
The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo.
Reviewed By: joevilches
Differential Revision: D73471780
fbshipit-source-id: efbb968600f21b24ab1fa32222d555f346fb336e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50936
D63141469 introduced an option to use HSR Core's trace macros for profiling react. I believe this was to enable Tracy support. However, the consequence of this is that hsr core is statically linked twice into Worlds, once in libclient_server_android.so and once into libxplat_js_react-native-github_packages_react-native_ReactCxxPlatform_react_profiling_profiling.so.
It isn't obvious that this causes any problems, but it does result in some weirdness with regard to symbol interposition between the two shared libraries. Some tracing categories are registered twice in hz_tracing, for example.
Since the HSR Core macros call directly through to hz_tracing, this change simply replaces the HSR Core dependency with an equivalent hz_tracing dependency.
Reviewed By: javache
Differential Revision: D73532803
fbshipit-source-id: 56d4b62873aabcbf0a92cebd7a0f720fed616158
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50908
This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D73519567
fbshipit-source-id: e222e3b4fab371c8bc5480950da005d2a12a8619
Summary:
We landed a PR that was importing a file available only in the New Architecture also when the app was running in the old architecture.
This was creating a corrupted bundle for rntester.
This PR fixes the issue
bypass-github-export-checks
## Changelog:
[Internal] - Fix RNTester on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/50940
Test Plan: Tested locally by setting `newArchEnabled` to false in the gradle.properties file
Reviewed By: javache, cortinico
Differential Revision: D73663049
Pulled By: cipolleschi
fbshipit-source-id: c8d6e4190adee7388e51901360a811b0007ee3a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50938
Changelog: [internal]
No more `maybeNode`s. Using ref objects makes the tests cleaner and the JSX easier to read than injecting lambdas.
This speaks for itself:
* 617 lines added
* 1393 lines removed
{F1977434870}
Reviewed By: lenaic
Differential Revision: D73659018
fbshipit-source-id: d1c23e6457bb1d351ce02b9f6fa8778b06ee0e55
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50935
Those classes are internal and deprecated since a while.
It should now be safe to fully remove them.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73655877
fbshipit-source-id: cdca8f032fe865f9a08c40e4a0145945c7e25a85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50931
This removes all the `OSS_LEGACY_WARNINGS_ENABLED` infrastructure from LegacyArchitectureLogger. We'll instead pivot to use ad-hoc functions for scenarios that don't work in LegacyArch + Interop Layers (see D73654273).
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73654272
fbshipit-source-id: d10eac2ded92f2c0191503e64f0c1d9db688d6e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50930
Due to D73591315, we don't need to specify the `legacyWarningsEnabled` for RNTester anymore as it's effectively ignored.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest, cipolleschi
Differential Revision: D73654270
fbshipit-source-id: 9428634fb8374024940e4041de60d679b6f352a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50929
We decided to change the warning model for LegacyArch/NewArch.
I'm currently removing the infra to read the `legacyWarningsEnabled` Gradle property if provided.
Warnings will be enabled by default for all Legacy Arch users in the new model.
This change was never shipped in a numbered version, so that's not breaking.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D73591315
fbshipit-source-id: a46fade91b46fcc9b81984577161c046dc0939b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50928
This broke in D72979663, since we relied on the object identify of `native` changing to correctly reset the native state back to the controlled JS state.
Changelog: [General][Fixed] Fixed switches correctly reverting to controlled state
Reviewed By: vzaidman
Differential Revision: D73653323
fbshipit-source-id: d6ca8a31d9f08a339c7acf6bba264137690dd794
Summary:
Rewrite of JSBundleLoader from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
[ANDROID] [CHANGED] - Migrated JSBundleLoader to Kotlin
<!-- 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/50911
Test Plan: Tested using RNTester app, on both old and new arch, and tested by navigating to multiple pages
Reviewed By: cortinico
Differential Revision: D73649145
Pulled By: javache
fbshipit-source-id: 7ef1fc1ea1c53a8b914ae1aada1966e64b4c3d80
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50899
changelog: [internal]
making things clearer in the docs for Fantom.
Reviewed By: rubennorte
Differential Revision: D73580305
fbshipit-source-id: 0e5edaa3baf57fc54f7a0c454fe4d2fa81627f66
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50906
Annotation to mark classes or functions that are part of the interop APIs that provide support for legacy architecture APIs in the new architecture of React Native .
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D73407613
fbshipit-source-id: 887a14ca4dea891b50e7df01e0ffff5064cd43ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50888
This is shared between platforms using a very strange pattern. Let's just extract this into its own function. Not considering breaking, since TextLayoutManager is internal interface.
Changelog: [internal]
Reviewed By: rshest
Differential Revision: D73555465
fbshipit-source-id: ea99fbebd9db44efd1dc56c2cad68b5b56e77ad1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50890
With Facsimile, we are introducing some new concept of `PreparedText`, where platform TextLayoutManager which implement, can lead to additional optimizations.
`#ifdef ANDROID` is not a workable pattern for this. Apart from react-native-cxx getting hooked into it, and all of the existing bugs there, it is bad for editor environment, and hard to reason about.
This splits up `ParagraphState`, so that we can control platform specific bits more easily. We do not split `ParagraphShadowNode`, which will use concepts (e.g. `TextLayoutManagerWithPreparedText`) to control which paths it takes, based on platform capaibilities.
Changelog: [internal]
Reviewed By: rshest
Differential Revision: D73555441
fbshipit-source-id: fd585eb99d26b0b6966efb1867d03fbd5cc7e7e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50923
This implements the view manager for `PreparedLayoutTextView`, originating by taking the view managers composing `ReactTextView`, converting to Kotlin, and removing everything no longer needed.
In Facsimile, anything influencing text appearance is applied earlier, when creating the Fabric layout, so there are many less setters here. Most visual attributes are instead present in the state we are presenting.
We have tasks for some of these, that need to be reimplemented, as they do not currently influence the Spannable being measured. That includes e.g. `ReactTextViewManagerCallback`, used for injection, and `dataDetectorType` for linkifying Spannable.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73287706
fbshipit-source-id: 938b57d4e443f6b8bb127e17b47cc371f31a416d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50922
This forms the basis for a replacement of `TextView`.
This started off with Litho's [`RCTextView`](https://github.com/facebook/litho/blob/master/litho-rendercore-text/src/main/java/com/facebook/rendercore/text/RCTextView.java), which is a simple view, for rendering a text layout, and providing some built-in keyboard navigation and a11y support. Many changes were made to it, including:
1. Removing many parts not relevant to RN, or which will be replaced by other RN infra. E.g. we will reuse existing a11y delegates, have existing ways of creating Spannables and text layouts, inline views, etc
2. Converting to Kotlin
3. Adding back in some changes required for RN's drawing, and expected view manager APIs (e.g. overflow/clipping customization)
4. Making it target a ViewGroup instead of a View, for correct inline view support down the line
Because we rely on drawing text layout, with the same Spannable as before, most things "just work", because they are part of the layout we are drawing, generated by TextLayoutManager on the Fabric side. We don't offer much customization to what can be drawn, forcing it to have happened in the layout we are showing already.
There are quite a few bits not implemented yet. Some of these are cases, like `textAlignVertical`, were previously incorrectly implemented just at the ReactTextView layer, so Fabric layout was unaware of them. Another similar class to this is any non-default fonts which we must load. `adjustsFontSizeToFit` (stubbed out in later diff) will also need some tweaking with the new assumption we don’t want to mutate Spans/layouts set in State.
Fine grained selection support is the largest tbd.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73282649
fbshipit-source-id: abe3a30461095d2d0ddbc6c939704f3982f44771
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50921
This adds the ability to represent Fabric State sent to Java View managers as a raw JNI reference. This is used by Facsimile to tell a component to mount a layout, previously generated during measurement.
This API is consciously well hidden (in comparison to MapBuffer which is fairly public). To use it:
1. The concrete state data representation must implement a method named `getJNIReference()` that returns an fbjni ref
2. The Java view manager must cast the `StateWrapper` to an internal `ReferenceStateWrapper` type, not exposed outside of React Native internals
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73159146
fbshipit-source-id: b7602bf7717bff28d2f3b259073bc47606fd76e4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50920
We construct this from JNI, which doesn't care about visibility, and then only want to expose `StateWrapper` as the public interface.
Changelog:
[Android][Removed] - Make StateWrapperImpl Internal
Reviewed By: Abbondanzo
Differential Revision: D73161592
fbshipit-source-id: b787e31e190dc52a02d73cadfa77b1c1defb9703
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50912
Changelog: [Internal] - Update IntersectionObserver Fantom tests to use the new `scrollTo` api which didn't exist when I first wrote these tests. As well, do clean up between tests
Reviewed By: rubennorte
Differential Revision: D73551695
fbshipit-source-id: 9625328879230d178f23a089436f2a3c7b8323bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50905
Subtle compiler differences cause this to fail, but we can just `Class<*>` here instead.
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D73593304
fbshipit-source-id: ea3996fc0641ae5d12a6923bd78645e21232afe7
Summary:
Resolves https://github.com/facebook/react-native/issues/50778
### Problem Description
Implement the crossOrigin property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.
For reference, check the public API documentation: https://reactnative.dev/docs/image#crossorigin
Implement the referrerPolicy property for Image in RNW Fabric when only source.uri is passed and not src/ srcSet.
For reference, check the public API documentation: https://reactnative.dev/docs/image#referrerpolicy
Also refer docs for source, src, srcSet
https://reactnative.dev/docs/image#sourcehttps://reactnative.dev/docs/image#srchttps://reactnative.dev/docs/image#srcset
It's not mentioned in the doc that when src / srcSet is missing then crossOrigin / referralPolicy would be ignored when source uri is a remote URL that is passed.
Currently these were ignored if src / srcSet was not passed and not added to sources headers.
This change adds headers support even without passing src / srcSet and only sources uri that consists of remote URL.
crossOrigin and referrerPolicy are passed as source.headers here:

### Steps to reproduce
```
<Image
defaultSource={{uri: this.state.defaultImageUri}}
source={{uri: this.state.imageUri}}
crossOrigin="use-credentials"
referrerPolicy="no-referrer"
/>
```
Pass this in React Native and check source headers
## Changelog:
[GENERAL] [ADDED] - Support headers [crossOrigin and referralPolicy] in Image without src and srcSet and only remote source.uri
Pull Request resolved: https://github.com/facebook/react-native/pull/50799
Test Plan:
Refer this PR for testing; https://github.com/microsoft/react-native-windows/pull/14521
## Screenshots
_Add any relevant screen captures here from before or after your changes._
Before

After
<img width="790" alt="image" src="https://github.com/user-attachments/assets/8e0a2522-7009-430d-b848-da80896670f4" />
## Testing
_If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios._
Tested in playground and RNW Tester and Visual Studio Debugger
_Optional_: Describe the tests that you ran locally to verify your changes.
1. Tested with only source remote uri passed
2. Tested with both source, src
3. Tested with source, src, srcSet
Reviewed By: javache
Differential Revision: D73427747
Pulled By: cipolleschi
fbshipit-source-id: f09174d1e4eaa2173b27970a6079eeb8ba6f3069
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50900
This bumps the minor of Android Gradle Plugin ahead of the branch cut for 0.80
Changelog:
[Android] [Changed] - AGP to 8.9.2
Reviewed By: rshest
Differential Revision: D73579447
fbshipit-source-id: f0d40ba3d160e332ee9ab2853a949ed6ec51a3fc
Summary:
Right now having a javascript error like an invalid import statement during first bundle load results in a disappearing redbox screen.
https://github.com/user-attachments/assets/ab9c64f5-6e32-481c-a58f-6d37bb920acb
The `invalidate` call removed in this PR cleans up all turbomodules, including the RedBox module, which in turns calls `dismiss` in `RCTRedBox`.
After removing this line the result is as following:
https://github.com/user-attachments/assets/6eeb4d43-f883-440f-ade3-5628f85f833a
I made sure that the `invalidate` function is still called when executing only two possible ways to reload the bundle:
- the Reload button
- Cmd+R
The HMR/hot reload is not connected if the bundle has an error on initial load, so we don't need to worry about it.
Longer term, it would be better to establish HMR and use a different redbox in this case:

Doing this requires larger changes to the bundle loading flow – happy to to try and land that change if there's any guidance you could give.
## 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 disappearing redbox on initial load of an invalid bundle.
Pull Request resolved: https://github.com/facebook/react-native/pull/50867
Test Plan: I have tested this change using RN from main and RNTester app (see videos).
Reviewed By: cortinico
Differential Revision: D73511154
Pulled By: cipolleschi
fbshipit-source-id: dfe149ebc15d845f07fd3926db2e063b468870af
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50802
The plugin analyses the source of all `import`, `require`, and `export` statements and injects the `console.warn` statement for each path targeting deep react-native source code. It runs only on a dev mode so there is no need to keep that in the `if (__DEV__) ` block. It is possible to disable this plugin by setting `disableDeepImportWarnings: true` and **resetting** the Metro cache:
```js
module.exports = {
presets: [['module:react-native/babel-preset', {
"disableDeepImportWarnings": true
}]],
};
```
Changelog:
[General][Internal] - Added plugin to react-native/babel-preset injecting `console.warn` for each react native deep import in dev mode.
For a given code:
```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
```
The transformed output should look like:
```js
import { Image } from 'react-native';
import View from 'react-native/Libraries/Components/View/View';
const Text = require('react-native/Libraries/Text/Text');
export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Components/View/View').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Text/Text').");
console.warn("Deep imports from the 'react-native' package are deprecated ('react-native/Libraries/Pressability/PressabilityDebug').");
```
For more information about why this plugin was needed, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).
Reviewed By: huntie
Differential Revision: D70783145
fbshipit-source-id: ae145db6471d861099566a8faf2fbd93bd136450
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50894
changelog: [internal]
adding more tests to cover all branches of `calculateShadowViewMutationsFlattener`.
calculateShadowViewMutationsFlattener is over 400 lines of code and covers quite a few edge cases. I plan to cover every branch with a test to make it easier to refactor Differentiator in the future.
Reviewed By: rubennorte
Differential Revision: D73543444
fbshipit-source-id: b0b22aba4b9cc4718edd2a6c4535993be437ed9f
Summary:
As the repository is moving towards Kotlin and the tests have also been moving towards mockito-kotlin, I'm doing another round here.
## Changelog:
[INTERNAL] - Flip mockito usages to mockito-kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50878
Test Plan:
```sh
yarn test-android
```
Reviewed By: javache
Differential Revision: D73569293
Pulled By: rshest
fbshipit-source-id: 9bfe7d3f69480367384eafdde429db15eb81d11c
Summary:
Rewrite of JavaModuleWrapper from Java to Kotlin in scope of https://github.com/facebook/react-native/issues/50513
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[ANDROID] [CHANGED] - Migrated JavaModuleWrapper to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50882
Test Plan:
Test RNTester using old arch. SampleLegacyModule is the one I've used, it needs to be enabled for old arch though (RNTesterApplication.kt -> getPackages & getReactModuleInfoProvider).
I may enable SampleLegacyModule for old arch to make testing easier. mateoguzmana
It breaks on `getDynamic` on old arch, but I could filter these from examples or add some fallback in SampleLegacyModule.kt for old arch.
Reviewed By: cortinico
Differential Revision: D73576099
Pulled By: javache
fbshipit-source-id: c940be27133258fa589571a600435fa478e6b51e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50863
No need for `shouldReturnInteropModule` if we can just use the nullability of what's returned by `getInteropModule` instead.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73501845
fbshipit-source-id: 9b7628707edc3eb288733baffaca59a9d3c40b40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50870
As explained in the doc block, now that ReactInstance is in Kotlin we can move this logic to StackTraceHelper and migrate it to Kotlin
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73503879
fbshipit-source-id: 38a9ff346e00d68bbc3c383834e2a1763dbba9b8
Summary:
While upgrading a project to React 19, I noticed React.ElementRef is deprecated (see [types/react/index.d.ts#L199](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts#L199)). I think we can replace it for the RN types as well.
Not sure if this is considered as a breaking change.
## Changelog:
[GENERAL] [CHANGED] - TypeScript: Replace deprecated React.ElementRef usages to React.ComponentRef
Pull Request resolved: https://github.com/facebook/react-native/pull/50883
Test Plan:
Create a RNTesterPlayground.tsx next to the normal .js just to validate the type checking is not throwing an unexpected error.
<details>
<summary>Code snippet:</summary>
```tsx
import React, { useRef, useEffect } from 'react';
import { FlatList, Text, View } from 'react-native';
type Item = { id: string; title: string };
const data: Item[] = Array.from({ length: 10 }, (_, i) => ({
id: i.toString(),
title: `Item ${i + 1}`,
}));
const FlatListScrollRefExample: React.FC = () => {
const flatListRef = useRef<FlatList<Item>>(null);
useEffect(() => {
if (flatListRef.current) {
const nativeRef = flatListRef.current.getNativeScrollRef();
console.log('nativeRef', nativeRef?.componentWillUnmount);
}
}, []);
return (
<FlatList
ref={flatListRef}
data={data}
keyExtractor={(item) => item.id}
renderItem={({ item }) => (
<View style={{ padding: 16 }}>
<Text>{item.title}</Text>
</View>
)}
/>
);
};
export default FlatListScrollRefExample;
```
</details>
Reviewed By: cipolleschi
Differential Revision: D73569274
Pulled By: rshest
fbshipit-source-id: f72477b9b3c0eda1007187c7dac3da0433410e86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50886
changelog: [internal]
Group tests related to reparenting in "describe" block. Differentiator is two algorithms hidden behind a single interface: regular and reparenting. The tests are structured this way as well where regular tests focus on common scenarios and reparenting section focuses on reparenting and special cases around that. The reparenting implementation is considerably more complex as it handles edge cases that don't happen often.
Reviewed By: mdvacca
Differential Revision: D73541053
fbshipit-source-id: c3905a0f0117cb1aa6c468e24e6bb982de48545d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50885
changelog: [internal]
a special case inside of Differentiator handling parent-child switching from unflattened-flattened to flattened-unflattened. If a child has view that is culled, this needs to be handled.
This diff also simplifies the implementation inside of calculateShadowViewMutationsFlattener by passing only one cullingContext.
Reviewed By: mdvacca
Differential Revision: D73523523
fbshipit-source-id: d6f314da6b9ff40bcf3362243b03de1b39e7aabb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50881
Rename Codegen Component Descriptors Entrypoint for FAC and hook it up in DefaultComponentsRegistry
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D73535745
fbshipit-source-id: dad68e7e6c8d7ba2ed86bbd1c06131101e00689e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50851
## Changelog:
[General] [Added] - Add pan gesture animation example to rntester
Including examples of
* using native driven Animated.event + touch event (which will not be interrupted by busy js thread, and is potentially a boost to performance) - the code requires some hacks but it's doable
* using js PanResponder to drive pan gesture animation
Reviewed By: sammy-SC
Differential Revision: D68909931
fbshipit-source-id: 484ecb0646fb249b31362013725219a1c1ec6181
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50879
The view for a view manager should not be nullable. Let's fix that.
These are also all bound specifically to `ReactTextView` instead of the generic constraint, so I just changed the constraint. Really this should just be totally merged with `ReactTextViewManager`.
Changelog: [Internal]
Reviewed By: cortinico, rshest
Differential Revision: D73453631
fbshipit-source-id: 74bcadeef0e83a719dfe2b989784501575b58168
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50753
Runtime Shadow Node Reference Updates (RSNRU) is currently implemented through the clone method which on each internal clone updates the runtime reference to point to the new clone. This guarantees that the runtime reference always points at the latest revision of the shadow node.
This came with the constraint that RSNRU could only run from one thread at all times, otherwise the React renderer state (current fiber tree) would end up being corrupted by receiving reference updates from multiple threads cloning shadow nodes.
This change moves the reference update step to the locked scope of the commit phase. Since the runtime is blocking on the commit and the scope is locked, it is safe and correct to update the runtime references with the latest revision of the shadow node after running state progression and layout.
By moving the reference update to the commit, we can support shadow node syncing from any thread since the actual runtime references are now executing at a safe time and the renderer state will stay valid at all times.
This change is gated behind the `updateRuntimeShadowNodeReferencesOnCommit` feature flag, which enabled shadow node syncing from any thread and reference updates only during the commit.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73038439
fbshipit-source-id: d90308498f3c0625dc87158f15311d1088aad8b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50752
Storing the runtime reference for a shadow node and updating the runtime reference to point at a specific shadow node should be separated so that these actions can be done at different moments in time.
We want to keep a reference to the runtime reference of a shadow node for all revisions cloned internally (not triggered by the React renderer, e.g. on layout or shadow node state updates).
We also want to support updating that runtime reference to point at a specific shadow node revision, ideally the one that will end up being used to mount the host component.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D73038438
fbshipit-source-id: 68c3912cbb077d790dd8d2abe8291548b12c8231
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50877
At some point I made some changes to how alpha works on BackgroundDrawable. This inadvertently broke BackgroundImage because we need a non transparent color to apply shaders.
Setting the alpha to 255 temporarily when drawing background-image layers fixes it
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73520952
fbshipit-source-id: b8017bb06adc0d3d328d9831fbc4c74f2ec0b783
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50876
This diff is temporarily reverting the code shipped in D72671083 to wait for more data before fully release this change
changelog: [internal] internal
Reviewed By: rshest, arushikesarwani94
Differential Revision: D73515903
fbshipit-source-id: 6566e9533ebffc93348e24eb6c0512020b220eae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50533
Builds upon https://github.com/facebook/react-native/pull/49446
On iOS, by default, every EditText accepts DragEvent and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.
This change adds a new prop `acceptDragAndDropTypes` to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.
The prop accepts a list of [Uniform Type Identifiers](https://developer.apple.com/documentation/uniformtypeidentifiers) that iOS supports. It's important to note that these are *not* MIME types. A MIME type would be something like `text/plain` but the equivalent for iOS is `public.plain-text`.
It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk
Changelog: [iOS][Added] - Add new prop for filtering drag and drop targeting to text inputs
Reviewed By: javache
Differential Revision: D70992749
fbshipit-source-id: 22b5aa1b4ced14147bf16a844361acf6f99c5a40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49446
On Android, by default, every EditText accepts `DragEvent` and will automatically focus themselves to accept these data. In some rare cases, it might not be desirable to allow data from arbitrary drag and drop events to be pasted into a text input.
This change adds a new prop `acceptDragAndDropTypes` to do exactly that: reject drag and drop events by telling the system to ignore certain types of drag data and, by proxy, disabling behavior that automatically focuses the text input.
The prop accepts a subset of MIME types supported by Android as documented [here](https://developer.android.com/reference/android/content/ClipDescription#MIMETYPE_TEXT_HTML).
It's important to note that this is an experimental prop, as is evident by the `experimental_` prefix on the JS side. Its signature could change before the prop has fully matured, use at your own risk
Changelog: [Android][Added] - Add new prop for filtering drag and drop targeting to text inputs
Reviewed By: javache
Differential Revision: D69674225
fbshipit-source-id: 4dbbdd81bb0f394b6206da5a377c75ea71671626
Summary:
Some libraries still use the `folly_flags` method provided by our infra. When updating how folly should be installed in an app, we removed that function.
We are putting it back as deprecated, to avoid unnecessary breaking changes in libraries
## Changelog:
[iOS][Fixed] - Put back the `folly_compiler_flag` function to make libraries install pods
Pull Request resolved: https://github.com/facebook/react-native/pull/50875
Test Plan: Tested locally in a nightly app, using the react-native-exit-app library which still uses these flags
Reviewed By: cortinico
Differential Revision: D73512830
Pulled By: cipolleschi
fbshipit-source-id: 28f099064e93ecd5a5a6a7b82e3f7e9db4d35cb9
Summary:
`SocketRocket` and `fmt` are part of React Native dependencies.
If a library is written in swift and depends on them, it will fail to install the pods because these pods are not compatible with Swift.
This change makes sure that the pods are installed in a way that is swift compatible.
## Changelog:
[iOS][Fixed] - Make fmt and SocketRocket Swift friendly
Pull Request resolved: https://github.com/facebook/react-native/pull/50874
Test Plan:
Tested locally in a nightly app.
### Before the change:
```
yarn add react-native-video
cd ios
bundle exec pod install
```
This script resulted in this error:
```
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `react-native-video` depends upon `fmt` and `SocketRocket`, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
```
### After the change
```
yarn add react-native-video
cd ios
bundle exec pod install
```
This script installed pods successfully.
Reviewed By: cortinico
Differential Revision: D73512109
Pulled By: cipolleschi
fbshipit-source-id: 222d85dba1cbdf4044e3c8459008a4083a720016
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50846
## Motivation
After a more rigorous search through GitHub uses of the restricted APIs, and consultation with framework authors, it became apparent that this restriction should be lifted.
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D73267844
fbshipit-source-id: e6c0c146690c07debf74c51f82171a9239be5c15
Summary:
the `react-native-maps` library has a complex setup for iOS. It doesn't work with autolinking, therefore we need to disable the test with the nightlies
## Changelog:
[Internal] - Disable nitghtly test for react-native-maps
Pull Request resolved: https://github.com/facebook/react-native/pull/50873
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D73510995
Pulled By: cipolleschi
fbshipit-source-id: a8abadfc8f0656de1288aa28e65abeab07bb9074
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50852
changelog: [internal]
Adding a test to verify view culling in scenario where a subtree is revealed and part of it is culled.
Reviewed By: lenaic
Differential Revision: D73454202
fbshipit-source-id: 6c4fb2ec4757b9ed1460bec8d3f02a661470266f
Summary:
Fixes https://github.com/facebook/react-native/issues/50010
On the initial render of a Text with the `selectable` prop set as `true`, the Text view is not making itself selectable. I debugged this quite a lot, and by changing the state from false to true using `setState` on the JS side, I made it work.
It turns out that we are setting this property in `onAttachedToWindow`, but somehow if `super.setTextIsSelectable` was already set as `true`, it won't re-apply it and we have to reset it to false before setting it again to true. This PR adds this reset.
I couldn't understand yet why this is not breaking in Fabric.
## Changelog:
[ANDROID] [FIXED] - Fix `selectable` prop not working correctly on initial render (old-arch)
Pull Request resolved: https://github.com/facebook/react-native/pull/50822
Test Plan:
- Test in both Fabric and Paper architectures to ensure there won't be a regression with this change in Fabric, as the issue occurs only in Paper.
- To test this, I created a small example in the RN-Tester playground to toggle the selectable property on/off. Notice in the first video that initially the prop is set as true, but it won't allow selecting. If you toggle to false and then back to true again, it works. With the provider fix it should also allow selecting the text on initial render.
Use this code snippet:
```tsx
function Playground() {
const [selectable, setSelectable] = React.useState(true);
return (
<View style={styles.container}>
<Text selectable={selectable} selectionColor="blue">
TESTING: is selectable? {selectable ? 'true' : 'false'}
</Text>
<Button title="Press me" onPress={() => setSelectable(!selectable)} />
</View>
);
}
```
Videos:
<details>
<summary>Before</summary>
https://github.com/user-attachments/assets/6a24dd0d-7f45-4a38-b18d-5142801ea1c3
</details>
<details>
<summary>After</summary>
https://github.com/user-attachments/assets/ce5f9e6e-9a4c-44d7-9d97-f607f2fdc1b4
</details>
Reviewed By: cortinico
Differential Revision: D73421487
Pulled By: rshest
fbshipit-source-id: c0b9d76076ef2e05930996953015fb58ad2a3d5f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50858
changelog: [internal]
This test verifies that React commits can override values previously set by `setNativeProps`. The test demonstrates the proper reconciliation behaviour between imperative updates via `setNativeProps` and declarative updates via React renders.
Reviewed By: lenaic
Differential Revision: D73463364
fbshipit-source-id: 3504d9a23bfc36a46fdfc4e9bf585f64088ab518
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50849
changelog: [internal]
Previously we didn't have a way to properly test bug reported in https://github.com/facebook/react-native/issues/47476. But with Fantom we do! Let's write a test for it to make sure this is not broken in the future.
Reviewed By: rubennorte
Differential Revision: D73432279
fbshipit-source-id: dbc1ce9d7b34bbe4275f6b8b1ce3a1c48bca3504
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50854
changelog: [internal]
In D73437449 I accidentally introduced a deadlock for single threaded testing environments. Here, I resolve the flakiness and the deadlock.
Reviewed By: mdvacca
Differential Revision: D73457182
fbshipit-source-id: 242edd4443b354cda4b082c2d45d8df04033cfd0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50827
This diff addresses a crash caused by view duplication in React Native Android. The issue occurred when a view was not already clipped and was laid out again, resulting in duplicated views.
This problem was particularly noticeable when using nested FlatLists, which triggered a custom focus search with an incomplete and buggy duplicated FlatList container view.
The fix involves preventing the duplication of views by checking if a view is clipped already before laying it out again. Additionally, this diff includes two other improvements:
- Preventing clipping issues: When a view is nested within a non-ReactClippingViewGroup ancestor, focus searching would fail due to the needUpdateClippingRecursive logic only running on instances of ReactClippingViewGroup. By excluding these ancestors, we ensure that the next focusable view can be properly excluded from being clipped.
- Minor fix: A minor fix was made to prevent potential issues in deeply nested cases.
- Add a Kill switch with a feature flag and mobile config combo. For Facebook we can kill through MC and for all other apps we can kill with the feature flag default value
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D73213775
fbshipit-source-id: 51a667a0c22eb35f0ec46ac4cbe430e2e62b407b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50826
Pull Request resolved: https://github.com/facebook/react-native/pull/50105
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: NickGerleman
Differential Revision: D73114782
fbshipit-source-id: 081a2216037e033a4638151e5226f430ac093ea5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50825
Pull Request resolved: https://github.com/facebook/react-native/pull/50404
Add another function to fabric to get the topmost stacking context parent given a root and a child.
This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.
If we don't lay out the parent as well as the next focusable view:
- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73114933
fbshipit-source-id: 081720199943eff78966982a5fd1c921d4e105fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50824
Pull Request resolved: https://github.com/facebook/react-native/pull/50196
Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.
This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219
Fabric algorithm to find the next focusable view given:
`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving
EDIT AFTER AMA SEV 3 S510469:
This whole algorithm was based on the idea of fixing focusing within a ScrollView. What we didn't consider is that focus search could be triggered when focusing a pop-up view. This includes transfering focus to an element on a new page or a modal which means that in some cases the parent view could be removed from the hierarchy.
Just add null checks to the parent node and the currently focused node to prevent unexpected crashes.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73115104
fbshipit-source-id: b9c9314fbd4b97da23c0b941d34f4dc2a1a3b883
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50823
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73114986
fbshipit-source-id: eed8642db0c65b6f54808d681640bb605cb6e0aa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50845
changelog: [internal]
`signalTaskToSync` should be released after `executeNowOnTheSameThread` is called to prevent race condition between `executeNowOnTheSameThread` and reading stubQueue's size on line 723.
Reviewed By: rubennorte, rshest
Differential Revision: D73437449
fbshipit-source-id: 3b2af3ddee5a422f7f846cc34ebbb7695463c267
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50840
Cleanup of index.js API removal warnings. This should motivate more urgency on the remaining members.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D73429537
fbshipit-source-id: 03faabdf30c2836dd5c61b4a2ce8d2355ad8e1e9
Summary:
Fixes https://github.com/facebook/react-native/issues/50817
Using a fragment is very common when rendering elements. We are cloning and adding `onLayout` always to the ListEmptyComponent element, but this would seem to work only when `View` is used for this as a wrapper in this prop. To prevent this unnecessary warning, I think we can easily check whether it is a fragment or not before cloning and adding the extra props – this adds backwards compatibility for those that don't need to use `onLayout`.
## Changelog:
[GENERAL] [FIXED] - Skip cloning Fragments in ListEmptyComponent to avoid onLayout warning
Pull Request resolved: https://github.com/facebook/react-native/pull/50833
Test Plan: Use the code snippet from the linked issue to verify that the warning is not thrown anymore when using a Fragment.
Reviewed By: javache
Differential Revision: D73421503
Pulled By: rshest
fbshipit-source-id: 0da4a38130601943e4704589ac275eba39767191
Summary:
This PR aims to migrate BlobProvider from Java to kotlin as part of [50513](https://github.com/facebook/react-native/issues/50513)
## Changelog:
[ANDROID][CHANGED] – Migrate BlobProvider to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50756
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: rshest
Differential Revision: D73420896
Pulled By: cortinico
fbshipit-source-id: 4c9a26452a7e45a78c9698f699822b4ac855628c
Summary:
instead of explictly specifying fully qualified Java boxed types, use proper Kotlin syntax to refer to it.
---
👉 Notes on Java <> Kotlin type mapping !!!
See: Kotlin's Mapped Types; https://kotlinlang.org/docs/java-interop.html#mapped-types
- kotlin `Boolean` maps to Java's primitive type `boolean` and not boxed Type `Boolean`
- Java boxed type `Boolean` maps to `Boolean?` in Kotlin
So in Kotlin,
- `Boolean::class.java` refers to Java primitive type `Class<boolean>` which is equivalent to `Boolean::class.javaPrimitiveType`
- For boxed type use `Boolean::class.javaObjectType` == `Class<Boolean>`
**TIP:** When dealing with Java primitive types using reflection, use `::class.javaPrimtiveType` or `::class.javaObjectType` to avoid the confusion with using plain `::class.java`.
Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D73224138
fbshipit-source-id: 858093a22b38bfdad40b170d0cf80a440e503829
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50812
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73283176
fbshipit-source-id: 5bb451c1e79cd8bc92f333ef2fce82669ad0e971
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50811
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73281713
fbshipit-source-id: 42db49feba5c232e699afe01916425ddf11f4aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50810
tsia, adding some accessibility examples that we have refined so far this half.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73280582
fbshipit-source-id: a1cc572522729d06b9a0227f0e5731e698f86cc3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50838
This diff removes the usages of ShadowNodes in the new architecture by fully releasing disableShadowNodeOnNewArchitectureAndroid() feature flag.
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72671083
fbshipit-source-id: a1505d02fd6bf7e87c7234581a26ef13768796a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50829
It is not appropriate to go through the fast path for border drawing when we have translucent border colors since it will cause overlapping borders to look weird.
Adding an if statement to prevent fastpath when the alpha value of any border is less than 255 (opaque)
Changelog: [Android][Fixed] - Fix translucent borders on Android overlapping bug
Reviewed By: NickGerleman
Differential Revision: D73145119
fbshipit-source-id: f22d0d55adca571d6b75725f6bc4753f98698763
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50828
The new Background and Border drawables come with some correctness improvements and potential small perf gains on edge cases. We are now switching to using them by default.
Changelog: [Android][Changed] - Change to use new Background and new Border drawables by default
Reviewed By: NickGerleman
Differential Revision: D72082947
fbshipit-source-id: 7caeb279110b520bea760a4621184dc0de05cf78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50807
This structure is unsafe:
```
// In each native module:
+load
dispatch_once
NSBundle mainBundle
```
NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.
## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.
Created from CodeHub with https://fburl.com/edit-in-codehub
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D73265906
fbshipit-source-id: f718e5bba7e95517613204b1f95e1b637e6c2366
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50832
Changelog: [iOS][Breaking]
these experiences did not end up shipping, so cleaning them up.
Reviewed By: fkgozali
Differential Revision: D73343958
fbshipit-source-id: ff0dc1394748c897aed9c66513b250dfc2192e0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50818
Logging LegacyArchitectureLogger asserts only in Debug mode as that will give us enough information about wrong usages of Legacy Architecture at this point
changelog: [internal] internal
Reviewed By: fkgozali
Differential Revision: D73322301
fbshipit-source-id: 981a26b1bd7c89080f35ef0ab27677b0a38f2665
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50813
This is already in the same package, which makes Gradle build unhappy. Then, this wasn't invoked at all by a Buck build, because we have target per folder. Let's fix those.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D73286269
fbshipit-source-id: 6100c83e6607705160e4602e8637e3b1ebe8f28b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50809
Configures `react-native/metro-babel-transformer` (used by `react-native/babel-preset`) to parse source using `hermes-parser` to target React 19. This changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).
Most of this was already accomplished in https://github.com/facebook/react-native/pull/50377 ({D72070021}), but this call site was missed.
Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.
Reviewed By: elicwhite
Differential Revision: D73279825
fbshipit-source-id: c0d64cb8c0adb22b78c5fbed1b2c386c8b3f3ede
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50796
When we render a `Switch` today we are never actually focusing on the native `UISwitch` that gets rendered. We instead focus on the parent `RCTViewComponentView` which houses the `UISwitch` as a `contentView`. That is because of [this logic](https://www.internalfb.com/code/fbsource/[b7e1547dab5a]/xplat/js/react-native-github/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm?lines=1211-1213). This blocks the accessibility of any descendants, including the `contentView`.
What we lose here is the announcement of "on" and "off" based on the toggle state that comes built into `UISwitch`. To do this today you need to add `accessibilityState={{checked: ...}}` which is very unintuitive. Android DOES announce "on" and "off".
We can fix this with an override on the switch class.
Changelog: [iOS][Fixed] - Fix "on" and "off" announcements on `Switch`
Reviewed By: realsoelynn
Differential Revision: D73226500
fbshipit-source-id: ff4eed0b0b4b978e4b59c5e4b37d880373f6506c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50806
1. `useWindowDimensions` is already returning in DIPs, my math was just wrong before
2. Playground is marking itself as a deeplink when it shouldn't be
Changelog: [internal]
Reviewed By: cortinico, joevilches
Differential Revision: D73221335
fbshipit-source-id: 32dfa9d60609faccef8e264aa46d64b79250b64d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50782
Changelog: [IOS][FIXED] Fix TextInput `onContentSizeChange` event being dispatched only once on iOS on the new architecture
Currently, the comparison to decide whether to send event happens between the content size before and after layout metrics update. Those values turn out to be the same in all but the first call.
This updates the logic to use the previously send values in the comparison.
Reviewed By: huntie
Differential Revision: D73182563
fbshipit-source-id: 3b764a89c1844e203001d75022a3295a3fd747f2
Summary:
PR migrates DynamicFromObject class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.
## Changelog:
[ANDROID] [CHANGED] - Migrated DynamicFromObject to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50754
Test Plan: Run RN-Tester application and played around with it a bit.
Reviewed By: mlord93
Differential Revision: D73118014
Pulled By: alanleedev
fbshipit-source-id: 84958ff07ccafea9ec3dbdf06467c638eb92d49d
Summary:
unstable_hasComponent(component) first registers the component with react native, if possible. Then, it returns you whether registration succeeded.
## Problem
For unregistered components, the initial call returns false. But, all subsequent calls return true.
The reason why: After the initial call fails, react native registers unimplemented view under that component name. So, all subsequent calls return true.
## Solution
Just record the initial loopup result. And always return that initial lookup result from this method.
Changelog: [iOS][Fixed] Fix bug: unstable_hasComponent(*) = true for unregistered components for n > 1th call.
Reviewed By: yungsters
Differential Revision: D73127468
fbshipit-source-id: ee30bde486a6bb970f40f654c65a8946452f49b3
Summary:
These internals have leaked pretty far. As we are adding support for JNI reference state wrappers, lets hide this, and make functions for getting MapBuffer work automatically if state data exposes the requisite functions, instead of external users needing to worry about multiple possible `ConcreteState` types for a given state data type.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73158627
fbshipit-source-id: e3ac2a045368d46fab72e2017fc28d680db6a7c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50784
Migrates us from several `.npmignore` files to `package.json#files`, for the main `react-native` package.
This reduces the size of our npm package by 38 files — in particular, catching previously missed `__tests__` and `__docs__` directories.
```diff
- npm notice package size: 4.4 MB
- npm notice unpacked size: 23.7 MB
- npm notice total files: 4533
+ npm notice package size: 4.4 MB
+ npm notice unpacked size: 23.7 MB
+ npm notice total files: 4533
```
NOTE: `"files"` or `.npmignore` — one or the other!
- Having `.npmignore` at the package root does not behave(!). Having `"files"` as one source of truth is better and safer. See https://github.com/npm/cli/issues/6221.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D73185321
fbshipit-source-id: 429c9fec4f447d63440a38bb8e3f3ce3bd155414
Summary:
parse-git-config is a transitive dep for Danger that hasn't been updated in years and has an unresolved CVE (CVE-2025-25975)
Danger has moved away from this dependency yesterday and cut a new version, so we can update to resolve
Changelog: [General][Fixed] Update Danger to 13.0.4
Reviewed By: cortinico
Differential Revision: D73181590
fbshipit-source-id: e5c512e6f381725eea71d64555018327144e23be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50730
This is a consolidation of our "dev support" features in the `src/private/` dir.
New grouping:
- `src/private/devsupport/`
- `devmenu/` — The Dev Menu and in-app inspection features (in-app UI)
- `elementinspector/` — The Element Inspector overlay (panel with sub-features), accessed from Dev Menu → Toggle Element Inspector
- `perfmonitor/` — The Perf Monitor overlay, accessed from Dev Menu → Show Perf Monitor
- `rndevtools/` — Modules supporting React Native DevTools (external UI)
`NativeReactDevToolsRuntimeSettingsModule.js` and `NativeReactDevToolsSettingsManager.js` are also moved out of `specs_DEPRECATED/`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D73031559
fbshipit-source-id: 952a469f31f4cd05aeed27dc7023552e723ca078
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50780
This bumps Kotlin to the latest stable: 2.1.20.
I've also fixed several warnings emitted by the new compiler.
Changelog:
[Android] [Changed] - Kotlin to 2.1.20
Reviewed By: rshest
Differential Revision: D73122000
fbshipit-source-id: 019a01d085b2c115a3efcf567056e9990a1ff0ce
Summary:
PR migrates DynamicFromArray class to Kotlin as part of https://github.com/facebook/react-native/issues/50513 work.
## Changelog:
[ANDROID] [CHANGED] - Migrated DynamicFromArray to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50602
Test Plan: Run RN-Tester application and played around with it a bit.
Reviewed By: rshest
Differential Revision: D73179609
Pulled By: cortinico
fbshipit-source-id: e304884fea9f57e152bca4926677d7338dc2403a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50774
Adding a Fantom test for the `useShadowNodeStateOnClone` feature flag, showing that the shadow node state is maintained after commit hook processing only when the feature flag is enabled.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D73121159
fbshipit-source-id: bbd7f46fbf49394ca5015e825a59d2fb1b519ee5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50776
Changelog: [Internal]
Adds a lint rule that prevents the use of named imports when importing types from React. `flow-api-translator` relies on the `React` namespace being used when generating TypeScript definitions based on Flow.
Reviewed By: huntie
Differential Revision: D73170799
fbshipit-source-id: 96d014b016c7cec8d3b266447dc7a185d2b1da26
Summary:
I've migrated `FrescoBasedTextInlineImageSpan.java` to kotlin. Reference https://github.com/facebook/react-native/issues/50513.
## Changelog:
[ANDROID] [CHANGED] - Refactor class `FrescoBasedTextInlineImageSpan` from Java to Kotlin.
<!-- 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/50532
Test Plan: Tested the RN tester app with `yarn android` on both new and old architecture.
Reviewed By: rshest
Differential Revision: D73031024
Pulled By: cortinico
fbshipit-source-id: e7208bf1103849f38c3dc26d73b31315b2326275
Summary:
I forgot to add toString and protocol in test cases last time when we merged this https://github.com/facebook/react-native/pull/50043
## 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][ADDED] More Test cases
Pull Request resolved: https://github.com/facebook/react-native/pull/50768
Test Plan: Tested with yarn jest
Reviewed By: rshest, cipolleschi
Differential Revision: D73169665
Pulled By: cortinico
fbshipit-source-id: 1115c0ccce52a67663fcd60ef376ce7bde502d1f
Summary:
This unblocks the `binary-compatibility-validator` for Kotlin 2.1.0
I've bump the tool to the latest version + re-aligned all the dependencies to the one used by the tool as well
(diff utils, asm, kotlinx-metadata-jvm).
Reviewed By: mdvacca
Differential Revision: D73057557
fbshipit-source-id: 020babea3a4032a8f9919ce7f456c3d4fb9a8e0c
Summary:
Nothing big, fixed typos in CHANGELOG
## Changelog:
[INTERNAL] - Fix Changelog message
<!-- 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/50772
Reviewed By: cortinico
Differential Revision: D73155730
Pulled By: arushikesarwani94
fbshipit-source-id: 0f169b455af5d657f3fa09a99562eb376c955389
Summary:
Since I enabled INTERPROCEDURAL_OPTIMIZATION last week, we're having a warning for gtest that
they're not setting this CMake policy: CMP0069
https://cmake.org/cmake/help/latest/policy/CMP0069.html
As Gtest is not a production dependency, we can safely ignore this warning. So I'm enabling the policy for all the targets.
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D73122573
fbshipit-source-id: 319a889024f080752f0c9287d011209459dcb013
Summary:
Afacit from searching both fbsource and GitHub, this should be totally dead.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D73154613
fbshipit-source-id: 1ed993ae53e7bc97232a8200b5fb4e01f0db7bb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50773
With shadow node syncing enabled by default, whenever a shadow node has to be cloned, we can be guaranteed that the state on the shadow node will be the most recent state in most cases.
This change fixes state updates being ignored when cloning YogaLayoutableShadowNodes from a commit hook. Since the most recent state gets updated post commit, any clone reading the most recent state might miss state changes done within the commit.
Changelog: [Internal]
Reviewed By: rshest, cipolleschi
Differential Revision: D72315898
fbshipit-source-id: 5e14d03681dd1cc5686a649caa2e8c3685042cfa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50770
OSS CI is failing because the we forgot a deprecation message in ReactScrollViewManager.
## Changelog:
[Internal] - Add deprecation annotation to fix ci build
Reviewed By: sbuggay
Differential Revision: D73136939
fbshipit-source-id: 4f39d7c7ae60aaca1011b70135d9535b16ed58e0
Summary:
This structure is unsafe:
```
// In each native module:
+load
dispatch_once
NSBundle mainBundle
```
NSBundle mainBundle itself uses dispatch_once during initialization. If that initialization triggers a native module class load, we could end up with a circular dependency chain. This could deadlock the application.
## Changes
Just remove the dispatch_once. Getting the NSBundle mainBundle is very efficient after the first access. And NSBundle objectForInfoDictionaryKey is also very efficient.
Created from CodeHub with https://fburl.com/edit-in-codehub
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D73058551
fbshipit-source-id: 9d14b5556748288227cfb93940f79d44997d7b47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50735
This change adds a warning in JS that is printed when the app is running using the old architecture.
The assumption is that, if it is running with Fabric, it is running with the new architecture. So running without Fabric implies old architecture.
## Changelog:
[General][Added] - Add warning when the app runs with the legacy architecture
Reviewed By: cortinico, rubennorte
Differential Revision: D73041156
fbshipit-source-id: 89a14f6370ae54b9d115e0ef672f29084d009a8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50757
We received [this issue](https://github.com/facebook/react-native/issues/50747) in OSS where the URL parsing logic does not respect node/chromium specs.
This can cause issue in usercode. This change fixes it
## Changelog:
[General][Fixed] - make sure that URLs are parsed following the node specs
Reviewed By: huntie
Differential Revision: D73101813
fbshipit-source-id: 36f1d23b3ad7882c16524843621d9ebbcc09b95d
Summary:
This diff converts the last java file inside `com.facebook.react.views.textinput` to Kotlin.
As `ReactEditText` is quite involved, reviewing this one is going to be quite critical.
I'm marking this as breaking as a number of nullability types has changed for OSS users.
Changelog:
[Android] [Breaking] - com.facebook.react.views.textinput.ReactEditText is now in Kotlin. If you're subclassing this type you'll need to adjust your signatures.
Reviewed By: rshest
Differential Revision: D72972921
fbshipit-source-id: 92ed112444cbc20daed5466ad20f651479bfac6f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50738
The implementation of this in Hermes depends on a deprecated CMake
feature. Since it just needs to run a command to generate the dSYM, it
seems simpler to eliminate the flag and move the work into the RN build
script.
## Changelog:
[Internal] - move dsym generation logic from Hermes to RN
Reviewed By: cortinico, cipolleschi
Differential Revision: D73054511
fbshipit-source-id: 4b8f9d97ef3386154bfe4030e0061f9c0791d7ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50760
Changelog: [internal]
This updates all Excalidraw SVG diagrams in the repository to use the latest format exported by Excalidraw after the fix in https://github.com/excalidraw/excalidraw/pull/9386.
I basically opened every image in Excalidraw and re-exported it.
Reviewed By: lenaic
Differential Revision: D73107703
fbshipit-source-id: 4432e952f9e6ee29f59ef8a9ff05479552744a31
Summary:
## Changelog:
[Android] [Internal] - As in the title
Reviewed By: cortinico
Differential Revision: D72971263
fbshipit-source-id: 8bd0c4e29e48f7e3d47a97f1a4e988e7b0282646
Summary:
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Only Error was supressed in previous diff, also suppress warning.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D73085528
fbshipit-source-id: a38a6e15e8ca33d4e93678c54d337ad9e86c2bbe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50748
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D73079163
fbshipit-source-id: 1928b00acbba5bc6577a248bc46a091d5b970f10
Summary:
const val NAME had quotes around it breaking native module loading from CoreReactPackage
This error was uncaught in previous diff.
Changelog:
[Internal]
Reviewed By: makovkastar
Differential Revision: D73070533
fbshipit-source-id: a7f14f4b4bd25003529c625d9182554dd2c2ee3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50744
Crash was discovered after converting source code from Java to Kotlin.
This was due to type checking against Kotlin types instead of Java types.
Also added minor refactoring of code
Changelog:
[Internal]
Reviewed By: Abbondanzo
Differential Revision: D73064216
fbshipit-source-id: 3429f0627740438be3bbc345c9e7b2c4a535da7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50586
# Changelog: [Internal]
We are going to record microtasks phase of the Event Loop.
RAII reporter that was added in D69399955 will be updated to support phase as a parameter.
There is one downside of the current implementation. Every Event Loop task will have a corresponding "Run Microtasks" block displayed, even if the microtasks queue was empty. There is no API in `jsi` that would allow us to get the size of the queue. If we had that, we could emit this event only when there is something in a microtasks queue.
The good this is that these frames usually have duration of 1-2 microseconds, so they are not visible, until user fully zooms in.
Reviewed By: rubennorte
Differential Revision: D72649816
fbshipit-source-id: d597f5b75aaf0975b14f61d2aa28b9c8bc34f4d5
Summary:
The check nightlies job is failing on some libraries because the library key contains `/` and ` ` characters that fails to be used properly when they are part of a path.
With this change, we are replacing those characters with `_` so this is a valid path were CI can save the outcome that needs to be collected later.
## Changelog:
[Internal] - Fix folder path
Pull Request resolved: https://github.com/facebook/react-native/pull/50726
Test Plan: Running in GHA
Reviewed By: cortinico
Differential Revision: D73036049
Pulled By: cipolleschi
fbshipit-source-id: 147b9fa15b4dfa08e94f01715e5a175479230d80
Summary:
*Hi,*
I made a small update to the dependency array in `useLayoutEffect`, changing it from `[native]` to `[native.value]` for better precision. Since JavaScript compares objects by reference, this change can lead to a minor performance improvement. Additionally, as `useLayoutEffect` is render-blocking, I wanted to ensure we optimize its usage as much as possible.
As a micro-optimization and in line with good coding practices, I also changed a `let + if` variable to `const`. While the performance gain is minimal, it contributes to cleaner and more consistent code.
Please feel free to review, and I sincerely apologize if I made any mistakes in the process.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
*[General] [Changed]* – Refined `useLayoutEffect` dependency array from `[native]` to `[native.value]` for improved precision and efficiency in re-renders.
*[General] [Changed]* – Replaced `let` with `const` where applicable for better code standards and micro-optimization.
Pull Request resolved: https://github.com/facebook/react-native/pull/50682
Reviewed By: huntie
Differential Revision: D72979663
Pulled By: yungsters
fbshipit-source-id: 64ac09811b78ca67be903d8cd91da8cd6f0a45fa
Summary:
Implemented ReactLifecycleStateManager.java in Kotlin as part of Kotlin-ifying RN Round 3
## Changelog:
[ANDROID] [CHANGED] - Migrate ReactLifecycleStateManager to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50685
Test Plan: Run RN-Tester and interacted with Mulitple components(Image, Flatlist, Input ) with both new architecture enabled and disabled
Reviewed By: rshest
Differential Revision: D73003097
Pulled By: cortinico
fbshipit-source-id: 27b90a0b94c17aa42cbb1665ca6fcf06db7cbf96
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50396
Integrates the `yarn build-types` script into our CI workflows.
**Notes**
- Will validate type generation in future PRs as part of the `test-all` workflow (this has been stable (i.e. successfully runs for our codebase) for the last 3 weeks).
- This is not load bearing in production code until D71969602.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71975705
fbshipit-source-id: a234a05008b5e75976bbd5258948c37fcc1eeb76
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50718
On Windows `path.join` returns path with separators unsupported by resolution mechanism. This change enforces the use of `/` separators in `no-deep-imports` rule tests.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D73021185
fbshipit-source-id: d4799c01a5aef5b27fad961d774b58627115d213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50714
This diff changes the category used by LegacyArchitectureLogger soft errors to be SOFT_ASSERTIONS
changelog: [internal] internal
Reviewed By: makovkastar
Differential Revision: D72999455
fbshipit-source-id: b5378fb92b22a3d06dda550192c7eba0db97ddcb
Summary:
Migrated ReactClippingViewGroupHelper.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.
## Changelog:
[ANDROID] [CHANGED] - Migrated ReactClippingViewGroupHelper.java to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50679
Test Plan:
✅ Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
✅ Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
✅ Specifically tested views with removeClippedSubviews enabled to confirm runtime behavior remains unchanged.
✅ Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.
Reviewed By: arushikesarwani94
Differential Revision: D72973621
Pulled By: cortinico
fbshipit-source-id: e6f426a0cb7eb583935a560660900b29786df4c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50105
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
We then prevent the clipping of the topmost parent of the next focusable view to lay out the entire containing element in case we have some necessary context in the parent
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: joevilches
Differential Revision: D71324219
fbshipit-source-id: b55b7735a30714b2a5e1c9e0ed4ae84ab43f6694
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50404
Add another function to fabric to get the topmost stacking context parent given a root and a child.
This is to be used on focus searching algorithm in the case where the next focusable child is deeper in the hierarchy meaning we need to find the top most parent in the Android hierarchy and lay that out as well before transferring focus.
If we don't lay out the parent as well as the next focusable view:
- The next focusable view might lack context given by the parent
- If the parent is a scrollview and has removeClippedSubviews enabled then laying out the next focusable view will not work
- If the view is deeper in the android hierarchy in some cases it won't be layed out unless the parent is
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72178408
fbshipit-source-id: 7b91ea695e236f3a92f9703bcc9ca943bf0dec24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50196
Currently when `removeClippedSubviews` is enabled on Android keyboard navigation breaks and we can never focus the elements that are clipped. iOS has a similar issue but not as drastic, it only happens when elements on the FlatList have a lot of margin between them.
This algorithm aims to find the next focusable view and return it to native so that we can prevent the clipping of the view on the view clipping algorithm and hence fix keyboard navigation. For more information see D71324219
Fabric algorithm to find the next focusable view given:
`parentTag`: Top most relevant parent of the focused view
`focusedTag`: Tag of the currently focused view
`direction`: Direction in which focus is moving
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71558965
fbshipit-source-id: 1a13c82d067834337e7f7936860780f467c9a15d
Summary:
Introduce a trait to be able to tell if a ShadowNode is focusable by keyboard. This will be used for focus ordering that delegates the work to the shadow tree when Native platforms don't have enough information to define the next focusable node
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72258544
fbshipit-source-id: dcc2410b408eab5dbefc4512e0680cbe7f18c811
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50638
There were two issues with inset shadows here that I fixed
* If spread was big enough it would "invert" the clear region. [RectF's inset](https://developer.android.com/reference/android/graphics/RectF#inset(float,%20float)) method does not bound to a 0x0 rect, it will instead start making the rect bigger if the inset value is large enough.
* If the clear region was outside the rect the shadow disappeared. This is because [Canvas's drawDoubleRoundRect](https://developer.android.com/reference/android/graphics/Canvas#drawDoubleRoundRect(android.graphics.RectF,%20float[],%20android.graphics.RectF,%20float[],%20android.graphics.Paint)) will fail to draw if the inner rect is not completely inside of the outer.
Changelog: [Android][Fixed] - Fix inset shadow edge cases
Reviewed By: GijsWeterings
Differential Revision: D72833275
fbshipit-source-id: 3f42fb767630319c51a380f8ea28d682df9771a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50666
This diff updates the assert message in ReactNativeNewArchitectureFeatureFlags to reflect the behavior required by the assert
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D72868428
fbshipit-source-id: 7a43aa9d3b3a2ee60e88cf77d117d97edc955af3
Summary:
Fixes https://github.com/facebook/react-native/issues/45857
The general idea behind this PR is the same for both platforms: dirty all nodes with `MeasurableYogaNode` trait when the layout is constrained with a new `fontSizeMultiplier`. There were a few caveats:
- `ParagraphShadowNode` marks its layout as clean in the constructor in most cases. To prevent that from using a stale measurement I'm using the font scale multiplier stored in `content_` property of the node. That value is then compared with the scale used to create the attributed string kept in the node's state. If those differ, the layout is not cleared.
- On Android, font scale wasn't passed down to the `SurfaceHandler`
- On Android, text measurement relies on cached `DisplayMetrics` which were not updated when the system font scale changed.
- `AndroidTextInputShadowNode` wasn't using `fontSizeMultiplier` at all. I needed to add it in all places where an `AttributedString` is constructed.
## Changelog:
[GENERAL] [FIXED] - Fixed text not updating correctly after changing font scale in settings
Pull Request resolved: https://github.com/facebook/react-native/pull/45978
Test Plan:
So far tested on the following code:
```jsx
function App() {
const [counter,setCounter] = useState(0);
const [text,setText] = useState('TextInput');
const [flag,setFlag] = useState(true);
return (
<SafeAreaView
style={{
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Text style={{fontSize: 24}}>RN 24 Label Testing {flag ? 'A' : 'B'}</Text>
<TextInput value={text} onChangeText={setText} style={{fontSize: 24, borderWidth: 1}} placeholder="Placeholder" />
<Pressable onPress={() => setCounter(prevState => prevState + 1)} style={{backgroundColor: counter % 2 === 0 ? 'red' : 'blue', width: 200, height: 50}} />
<Pressable onPress={() => setFlag(!flag)} style={{backgroundColor: 'green', width: 200, height: 50}} />
</SafeAreaView>
);
}
```
Reviewed By: NickGerleman
Differential Revision: D71727907
Pulled By: j-piasecki
fbshipit-source-id: 240fb5fa4967a9182bce7e885798b233d1e25aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50377
Configures the Hermes Parser to target React 19, which changes components written with Component Syntax to stop generating `forwardRef` calls (because `ref` is now a prop).
Changelog:
[General][Changed] - Configured Hermes Parser to target React 19, resulting in Component Syntax no longer producing `forwardRef` calls.
Reviewed By: javache, SamChou19815
Differential Revision: D72070021
fbshipit-source-id: b891789d4ff1cbcb8eebea3525361ab14e628b51
Summary:
Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin as part of the React Native Kotlin migration initiative.
This change helps modernize the React Native Android codebase and improve maintainability.
No functional changes were introduced—only a language conversion while preserving the original logic and behavior.
## Changelog:
[ANDROID] [CHANGED] - Migrated FrescoBasedReactTextInlineImageShadowNode.java to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50693
Test Plan:
✅ Ran yarn && yarn android in the root directory and verified RNTester builds successfully.
✅ Opened RNTester on an Android emulator/device and navigated through various screens to ensure the app works as expected.
✅ Specifically tested views with FrescoBasedReactTextInlineImageShadowNode enabled to confirm runtime behavior remains unchanged.
✅ Used [KtFmt](https://github.com/facebook/ktfmt) to format the Kotlin file properly.
Reviewed By: cortinico
Differential Revision: D72948067
Pulled By: rshest
fbshipit-source-id: ed56e6b328804d7b70271b669d101f70d6190d7f
Summary:
On Android, when resource shrinking is enabled, all resources added by Metro may be removed as react-native is accessing resources based on strings rather than references, so AGP can't see its usage.
Example output of `android/app/build/outputs/mapping/release/resources.txt `when `shrinkResources` is enabled.
```
raw/__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons : reachable=false
drawable/__common_assets_haptics_icon : reachable=false
```
It’s a coincidence that most of the resources are currently working, as many file names begin with strings that already exist in the String Pool. For example, `node_modules...` is flagged as used because 'node' is present in the String Pool, causing it to be whitelisted. However, this does not guarantee that the same will apply to all files - especially in a monorepo setup, where paths are significantly different. For example
* `__node_modules_expo_vectoricons_build_vendor_reactnativevectoricons_fonts_materialcommunityicons`
* `__common_assets_haptics_icon`
To prevent that behavior, metro during assets export should create `keep.xml` listing all resources generated by metro.
https://developer.android.com/build/shrink-code#keep-resources
We have already made a similar change in expo cli: https://github.com/expo/expo/pull/35465
## Changelog:
[ANDROID][ADDED] - Generate keep.xml to prevent resource shrinking
Pull Request resolved: https://github.com/facebook/react-native/pull/50620
Test Plan:
1. Enable resource shrinking in RNTester by adding this to `android.buildTypes.release` to `packages/rn-tester/android/app/build.gradle.kts`
```gradle
isMinifyEnabled = true
isShrinkResources = true
```
2. Use some resources in playground, for example:
```diff
diff --git a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
index 9dbacb99701..9ac9c231f3f 100644
--- a/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
+++ b/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
@@ -11,16 +11,14 @@
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
-import RNTesterText from '../../components/RNTesterText';
import * as React from 'react';
import {StyleSheet, View} from 'react-native';
+import {Header} from "react-native/Libraries/NewAppScreen";
function Playground() {
return (
<View style={styles.container}>
- <RNTesterText>
- Edit "RNTesterPlayground.js" to change this file
- </RNTesterText>
+ <Header />
</View>
);
}
```
3. Build app using `hermesRelease` variant
4. See Playground screen
| Before | After |
|---|---|
| <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 17 53" src="https://github.com/user-attachments/assets/24fcaa7b-6ddb-4ba6-9fe5-65c27bcbc931" /> | <img width="488" alt="Zrzut ekranu 2025-04-10 o 12 15 58" src="https://github.com/user-attachments/assets/09a1ce77-be26-4571-a4b8-c466bf19e026" /> |
5. Inspect `packages/rn-tester/android/app/build/outputs/mapping/hermesRelease/resources.txt`
| Before | After |
|---|---|
| `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=false` | `drawable/_reactnative_libraries_newappscreen_components_logo : reachable=true` |
Reviewed By: cortinico
Differential Revision: D72960028
Pulled By: huntie
fbshipit-source-id: df725fa2ea50150cd67687a97986976ffbbb5b40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50698
Changelog: [internal]
This cleans up the flag to enable paint time reporting for Event Timing API entries, as this reporting fixes a bug and we've verified is stable/performant enough.
Reviewed By: rshest
Differential Revision: D72960337
fbshipit-source-id: 976810382208b9403c01c80324b540570bbc0e42
Summary:
Avoid incorrectly updating caret position
Pull Request resolved: https://github.com/facebook/react-native/issues/50641
The caret position is updated incorrectly when a user is first typing if an zero-length selection is set.
## Changelog:
[IOS] [CHANGED] - Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set.
Pull Request resolved: https://github.com/facebook/react-native/pull/50680
Test Plan:
Tested with the following code(a simplified version from the code in https://github.com/facebook/react-native/issues/50641)
```js
const [selection, setSelection] = useState({start: -1, end: -1});
const onSelectionChange = (
evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>,
) => {
const {selection} = evt.nativeEvent;
const {start, end} = selection;
console.log('selection change: ', start, end);
setSelection(selection);
};
return (
<View style={{ position: 'absolute', top: 50, left: 30 }}>
<TextInput
placeholder="test"
selection={selection}
onSelectionChange={onSelectionChange}
/>
</View>
);
```
When using the main branch, the caret position will jump back to the beginning after the first typing.
It works fine after applying this commit.
Reviewed By: fabriziocucci
Differential Revision: D72957245
Pulled By: cipolleschi
fbshipit-source-id: 3586797332b35e86b17f386a35e7d192ff758f7e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50699
Changelog: [internal]
Just changing the template to include emojis in the top level titles to make it easier to scan the doc
Reviewed By: lenaic
Differential Revision: D72961870
fbshipit-source-id: 64c45e7ac769c38af06ea318cdb581a04e230f90
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50656
This is going to convert to Kotlin one of the biggest class we have: ReactTextInputManager
As this class is quite big, I suspect there will be breakages.
https://github.com/search?type=code&q=%22%3A+ReactTextInputManager%22
I will investigate further and adjust the class as necessary.
Changelog:
[Android] [Breaking] - ReactTextInputManager is now in Kotlin
Reviewed By: rshest
Differential Revision: D72859925
fbshipit-source-id: 140d1a48ef891f1e6a401e3be59a11d3f9e24078
Summary:
Static code analysis detected obsolete SDK version checks.
Since [the minimum supported SDK version is API 24](https://github.com/react-native-community/discussions-and-proposals/discussions/802), these checks for API 21 are no longer necessary and can be safely removed.
## Changelog:
[INTERNAL] - Remove obsolete TargetApi annotations for LOLLIPOP (API 21)
Pull Request resolved: https://github.com/facebook/react-native/pull/50686
Test Plan:
```sh
yarn test-android
yarn android
```
CI should be green.
Reviewed By: cortinico
Differential Revision: D72948073
Pulled By: rshest
fbshipit-source-id: 1dd1415364d19f115771de3643cdc023a247d851
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50645
While we were refactoring the generation of the podspec, we made a mistake and we started generating the ReactCodegen.podspec for both libraries and apps.
This must be generated only for apps.
## Changelog:
[iOS][Fixed] - Generate `ReactCodegen.podspec` only for apps.
Reviewed By: fabriziocucci
Differential Revision: D72854074
fbshipit-source-id: 5a1d1120e576d4fe4cf8f733793f5a2619278c2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50542
After TS types generation is completed, react native deep imports will be deprecated. This rule produces warnings to let users know to use root imports instead. For more information about why this rule was added, please check [RFC](https://github.com/react-native-community/discussions-and-proposals/pull/894).
Changelog:
[General][Added] - Added no-deep-imports rule to eslint-plugin-react-native.
Reviewed By: robhogan
Differential Revision: D71398004
fbshipit-source-id: 69104f69b1b1c59b5b0f115dcdd708a46d8d614d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50657
The ReactTextInputManager file is huge and really hard to migrate to Kotlin.
Here I'm extracting 4 private inner classes to separate files and converting them to Kotlin.
This will make reviewing the Kotlin migration of ReactTextInputManager a bit easier.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D72858396
fbshipit-source-id: 1fcca1b8421c810aa4bf9fdca7656f4e805565d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50647
This diff makes the following file internal - ReactTextInputShadowNode
as part of our ongoing effort of reducing the API surface.
There is only one usage in OSS: `react-native-aztec`. The library is abandoned
with little weekly download so we should be good marking this as internal.
Changelog:
[Internal] [Changed] - ReactTextInputShadowNode is now internal.
Reviewed By: javache
Differential Revision: D72854896
fbshipit-source-id: 27512704ed84e893ae72d26469527276133a6295
Summary:
We fixed the previous layout issue when it wasn't in a ScrollView (I think text caching problem?) Let's enable for more than just Catalyst, and re-enable this test for iOS!
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D72683455
fbshipit-source-id: 538f8e23226c07510d382e45eb29f1710822849e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50673
Because, this is less a pain then trying to shrink every example to fit in to the tiny window given to us by Jest E2E.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D72683487
fbshipit-source-id: 5c08bd04445fc573086bc780194c893d0cb6ea19
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50672
We have precious little screen real estate, esp in E2E tests where we get 320x192 dips. Let's clean this up.
Changelog: [Internal]
Reviewed By: cortinico, GijsWeterings
Differential Revision: D72683491
fbshipit-source-id: 222a77f937dfb9dcceb627d8f084c58df7c07b56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50669
Fixes a bug that was introduced while migrating from Java to Kotlin.
Changelog:
[Android][Changed] - Fixed a bug with synchronously fetching resources from Metro.
Reviewed By: cortinico, mdvacca
Differential Revision: D72878362
fbshipit-source-id: feb881fa51f6eaa2cb5c7ba87ac93b7fdc29dc2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50636
A while ago someone on GitHub reported that box shadow on iOS was causing frame drops when animating a large, pretty blurry shadow: https://github.com/facebook/react-native/issues/49128. This week I finally got around to fixing this!
The slowness was happening since we were using CG to draw this shadow, which is very CPU intensive and, to my knowledge, does not take advantage of GPUs to do anything. Couple that with an animating, large, blurry shadow and we have frame issues. These shadows were taking very long to draw, to get the image of the shadow (which then needs to be copied into some texture 3 times as big, composited, put on the screen etc) took 12-14ms :o, thats very slow.
To fix this I figured out how to get CA's shadow APIs working, which take advantage of the GPU. The enable inset shadows and spread you have to get creative with a mix of `shadowPath` and `mask` with a `CAShapeLayer`, but we got it done! Things are much faster, I am not sure how to time this but using a real device shows no frame drops :D
Changelog: [iOS][Fixed] - Box shadows on iOS are faster
Reviewed By: lenaic
Differential Revision: D72823334
fbshipit-source-id: 460339c9d77e7423ce59a1a9178b6b3ad527e4b0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50665
Changelog: [internal]
Just a stylistic change of the link back to the documentation home.
It also changes the link in the template to make sure it's incorrect so people are forced to edit it when creating new docs.
Reviewed By: lenaic
Differential Revision: D72866823
fbshipit-source-id: fa7be286f996049b3f06e2defa5a8c486d63091b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50663
Changelog: [internal]
Adds additional documentation about pragmas and feature flags for Fantom.
Changes the diagram to mention that feature flags are passed to the Fantom CLI.
Reviewed By: andrewdacenko
Differential Revision: D72865960
fbshipit-source-id: abfd167279195495064f3c4dbdcaff92dd865bcf
Summary:
This PR introduces a rewrite of `DynamicFromMap.java` to Kotlin as requested in https://github.com/facebook/react-native/issues/50513.
## Changelog:
[ANDROID] [CHANGED] - Migrated `DynamicFromMap.java` to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50597
Test Plan:
1. Implement unit tests for `DynamicFromMap.kt` - `DynamicFromMapTests.kt`
2. Ensure the tests pass: `./gradlew test`
3. Run the RN tester app on new & on old architectures
Reviewed By: javache, rshest
Differential Revision: D72853616
Pulled By: cortinico
fbshipit-source-id: 855acdc7fa7810ab9f223b0be7778c028a646de5
Summary:
Backing out https://github.com/facebook/react-native/pull/50244 as it is causing unexpected issues internally.
## Changelog:
[iOS][Changed] - Revert "Add warning when a component is loaded with the interop layer"
Reviewed By: cortinico
Differential Revision: D72857290
fbshipit-source-id: cfae6ccf85a472ae03983349fc7a2620e157865d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50658
The root cause of this is D67857739, confirmed via bisect.
The ReactInstanceIntegrationTest.cpp tests caused some sort of state poisoning. Because of that all tests in the same buck module that ran after, failed. These cpp tests have a retry mechanism where failing tests are retried, and because in that situation the integration tests didn't run, they passed there.
This turned into a total of 24 tests being 50% flaky, as every first attempt failed but every second attempt (in isolation) succeeded.
I did a bit of trial and error with resetting InspectorFlags and ReactNativeFeatureFlags (the latter was already being done before D67857739), and added an extra assertion to the tests to make sure that after that, `dangerouslyDisableFuseboxForTest` still worked in the right (but only the right) contexts.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D72860850
fbshipit-source-id: 959e67ff7a43ccc3c35db108bdb1138d8c27d328
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50660
Changelog: [internal]
This is just a simpler way to test for changes in scroll position.
Reviewed By: andrewdacenko
Differential Revision: D72860138
fbshipit-source-id: a92d430399255a278f5c3c72005a5288d28310ab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50644
Changelog: [internal]
This improves the documentation for the feature flag system by extending information about 2 areas:
- Codegen
- `print` command in CLI
Reviewed By: lenaic
Differential Revision: D72852768
fbshipit-source-id: 97932ea078595ef54cd437a433072f83bbdff609
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50654
We realized that when calling
```
npx react-native-community/cli codegen --path . --platform all --outputPath /tmp/codegen
```
We were generating in the android folder some files that are Apple-specific.
With this change, we should stop generating the Apple specific files in Android.
## Changelog
[General][Fixed] - Do not generate Apple specific files for Android
Reviewed By: cortinico
Differential Revision: D72859336
fbshipit-source-id: 443c4dca032e8e68c1da9d829d361d5e0ed007a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49887
## Changelog:
[Internal] -
As in the title.
This was the last Java file in the `events-common` module, so now it can be a pure Kotlin one.
NOTE: I opted to make the base method `Event.getEventData` public (instead of previously protected), as based on the usage patterns by the users this seems to make the most sense in this context.
Reviewed By: cortinico
Differential Revision: D70777597
fbshipit-source-id: fdaa52e4400ad8e86a8711daf359eb5a10974d05
Summary:
Static code analysis shows that there are a lot of unresolved KDoc references. This is just another round addressing several of them.
## Changelog:
[INTERNAL] - Fix unresolved KDoc references
Pull Request resolved: https://github.com/facebook/react-native/pull/50640
Test Plan: Verify that the comments link the classes correctly using Android Studio
Reviewed By: cortinico
Differential Revision: D72848152
Pulled By: javache
fbshipit-source-id: e09b1ddad494885ef3090d7f0f62a782eed922c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50632
Changelog: [internal]
This cleans up the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag that is no longer necessary.
Reviewed By: javache
Differential Revision: D72561255
fbshipit-source-id: 0942122832ce40cacc273265e4c95b5fe251dbe6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50643
Changelog: [internal]
Just realized this was missing from the message.
Reviewed By: lenaic
Differential Revision: D72852138
fbshipit-source-id: 27ed4b6e6d8b370cfa34a9878ca9bb0815cb75eb
Summary:
This code is not referenced internally or externally and was part of the DevSplitBundleLoader which was removed in D43597007.
Changelog: [Android][Breaking][Removed] Removed loadSplitBundleFromServer from DevSupportManager interface
Reviewed By: cortinico
Differential Revision: D72790533
fbshipit-source-id: 9e0960af4c528d9019943c89466ab442f34619e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50545
All usages of Task.call involve a Runnable which returns another Task, which we then extract using `.continueWithTask(Task::getResult)`. Instead inline this behaviour inside `Task.call` to avoid allocation of unnecessary intermediate objects.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72600051
fbshipit-source-id: 7e7c0c8e1de24b1aeff7addab2eb10272bc73ddb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50546
We do not use this mechanism for exception handing with Tasks, so remove it.
Changelog: [Internal]
Reviewed By: cortinico, fabriziocucci
Differential Revision: D72600053
fbshipit-source-id: f9ae877b05ece66682cb6c291b05257953f5aebb
Summary:
PR is here https://github.com/facebook/react-native/pull/50581
This enables INTERPROCEDURAL_OPTIMIZATION for Hermes in OSS, similar to how we did for libreactnative.so
I also had to bump CMake to 3.30.x to unblock the build failure with `-fuse-ld=gold`
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D72696879
fbshipit-source-id: e842f6cdf41f6936ef4baeb70e4833a1a0c2d19b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50635
Ships the feature flag introduced by https://github.com/facebook/react-native/pull/50002.
Changelog:
[General][Changed] - Animated components' `ref` will now only reattach when receiving new props if the new props contain different `AnimatedValue` or `AnimatedEvent` instances. (Previously, Animated components' `ref` would always reattach when receiving new props.)
Differential Revision: D72802613
fbshipit-source-id: 4495eb778e3bb9473172c393bd984d93c4ba5f00
Summary:
Deleting ChoreographerCompat as its only method is deprecated and it's unused.
Use Choreographer.FrameCallback instead
changelog: [Android][Breaking] Deleting ChoreographerCompat, Use Choreographer.FrameCallback instead
Reviewed By: alanleedev
Differential Revision: D72817152
fbshipit-source-id: 08624dd07e916116381293cde57a0fdf5452a670
Summary:
ReactModuleWithSpec is deprecated and unused, it was replaced by TurboModule interface.
In this diff I'm removing DoNotStripAny annotation from ReactModuleWithSpec to make sure proguard doesn't retain any reference to it
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090838
fbshipit-source-id: 44aa0d6d4b2b592b5b8fea1b9e4578e2df3a9a8e
Summary:
InvalidIteratorException is not used in java, kotlin nor C++. This diff just removes this class
This is not a breaking change due to the lack of usages
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D72090837
fbshipit-source-id: 75aa4a8d2c1abbeb32bd38e5e60cbf7f04be823e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50605
In order to help Proguard to stripping-out bytecode, we need a way to statically enable all Feature Flags used by the New Architecture at build time (e.g. enableBridgelessArchitecture, useTurboModule, etc). The React Native Feature Flag system is mostly implemented in C++ and unfortunately Proguard can’t follow C++ code to understand what feature flags are enabled or disabled at build time.
After analyzing several proposals, we decided to introduce a new internal API called ReactNativeNewArchitectureFeatureFlags, this API will help us detect if an app is using the new architecture at build time.
In order to make this API to work I’ve migrated all usages of new architecture feature flags from ReactNativeFeatureFlags -> ReactNativeNewArchitectureFeatureFlags
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71988912
fbshipit-source-id: a6d58c5b1f39f85370298a347db228e933c6c743
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50604
ReactBuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE asume Fabric and TurboModule interops are disabled, in this diff I'm adding an assertion to validate this at runtime
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D71854550
fbshipit-source-id: a4b3acfe4c3227115300b100be4d6222d5eace8e
Summary:
FrameworkAPI classes are not part of the public API, this diff will remove all FrameworkAPI classes from our public API tracking
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72805466
fbshipit-source-id: b16791ab854017be681ceabd61b628d2d0ba0c5c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50627
Changelog: [internal]
This defines 2 new priorities in Fabric, matching the definitions in React:
* Continuous
* Idle
They're exposed to React via 2 new properties in `nativeFabricUIManager`: `unstable_ContinuousEventPriority` and `unstable_IdleEventPriority`.
It also adds the mapping from the raw event priorities to the Fabric event priorities.
This change doesn't have any effect at the moment. For these to come into effect, we need to:
1. Fix the mapping between Fabric priorities and React priorities in the React repository. See https://github.com/facebook/react/pull/32847
2. Enable the `fixMappingOfEventPrioritiesBetweenFabricAndReact` feature flag.
Reviewed By: javache
Differential Revision: D72791968
fbshipit-source-id: 525b6e5c99dc0ddc1e5c60fdb5b73f0555e5f0d3
Summary:
We currently have a high granularity of different React Native systrace markers. These different markers are not consistently applied and we only enable a subset of them by default in our tracing workflows. As we migrate more and more tracing to Perfetto the tags also become less relevant and will be replaced by Perfetto categories and tracks in the future.
This stack aims to simplify this setup by reducing all systrace tags to single TRACE_TAG_REACT.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72672912
fbshipit-source-id: 1b6b14fc4ef6d6830bba41d7977f277d63ff5117
Summary:
Changelog: [internal]
(This is "internal" because the `PerformanceObserver` API isn't stable yet).
This cleans up the feature flag to enable the LongTasks API to the availability of the API itself isn't gated behind this specific one.
Reviewed By: rshest
Differential Revision: D72784109
fbshipit-source-id: 8ca45d66cebbd80729829c928bebb13f4a38b7ab
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactHostImpl.java nullsafe
Reviewed By: cortinico
Differential Revision: D72384082
fbshipit-source-id: 999903b1bf98ea61d2431ace5ca6584535ca4857
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72384065
fbshipit-source-id: 0f1df2a870d1975b0c522a2e6a17e8959aab6c7c
Summary:
This diff converts to Kotlin the following file: BridgelessAtomicRef.java
as part of our ongoing effort of migrating the codebase to Kotlin.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D72777272
fbshipit-source-id: b6e10ce32b701614cb323adde7d3df2aa2a8f293
Summary:
This PR aims to migrate FileReaderModule from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513
## 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][CHANGED]Migrate FileReaderModule to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50562
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: arushikesarwani94
Differential Revision: D72726333
Pulled By: cortinico
fbshipit-source-id: 130393373a258f18f8baaa96745da8fdebd62436
Summary:
This is not mentioned on the spec https://drafts.csswg.org/css-ui/#outline-offset but web adds the outline-offset to the border-radius of the outline. With this change now we render outline in this case like web
Related issue: https://github.com/facebook/react-native/issues/50582
Changelog: [General][Fixed] - Outline now takes into account outline-offset to calculate its border-radius, same as web.
Reviewed By: joevilches
Differential Revision: D72749009
fbshipit-source-id: b3cd39e09e7856b6ccd45aab541cd51f05559832
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactApplicationContext.java as nullsafe
Reviewed By: javache
Differential Revision: D72704847
fbshipit-source-id: cd6907630839a8be2a6fb1d0a673357aef1395fc
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark Inspector.java as nullsafe
Reviewed By: javache
Differential Revision: D72704854
fbshipit-source-id: fcd15a3cc2e9ea1ed90ecca13c068188b859afac
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JavaScriptModuleRegistry.java as nullsafe
Reviewed By: javache
Differential Revision: D72704846
fbshipit-source-id: d1bca84cd2f4543e154ab8e7948821b176088d64
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JSBundleLoader.java as nullsafe
Reviewed By: javache
Differential Revision: D72704848
fbshipit-source-id: 7995bda8200fff96ff66e54eb503fee53f8a19dd
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark JSONArguments.java as nullsafe
Reviewed By: javache
Differential Revision: D72704849
fbshipit-source-id: a545bca24d4d95930f0e334c5295584e3c03c10c
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ModuleSpec.java as nullsafe
Reviewed By: javache
Differential Revision: D72704851
fbshipit-source-id: 4cccc70ac846f1aa90831557841d2e621847bfc4
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactContextBaseJavaModule.java as nullsafe
Reviewed By: javache
Differential Revision: D72704852
fbshipit-source-id: 65abc94d59aefc64ff214bd70ead16d9011dec20
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark ReactMarker.java as nullsafe
Reviewed By: javache
Differential Revision: D72704853
fbshipit-source-id: 2d022f407070ab473a43281fab6f28c53fa09f21
Summary:
This class doesn't have any FIXMEs to fix, so we can just annotate it and protect against future issues!
Changelog: [Android][Fixed] Mark NativeModule.java as nullsafe
Reviewed By: javache
Differential Revision: D72704850
fbshipit-source-id: a71f3acddb0382410739b9632fba509fffcfebfd
Summary:
This is not a TextInput and is totally unused (whoops).
Changelog: [Internal]
Reviewed By: cortinico, Abbondanzo
Differential Revision: D72683433
fbshipit-source-id: 1218701fdc473117774a9bdb6f94b6a4508599a4
Summary:
I've implemented a feature that automatically bundles the Metro Bundler's IP address into Android builds. This change aligns the Android development experience with iOS, allowing the app to maintain a connection to the Metro Bundler even when disconnected from USB.
Currently, in iOS builds, the IP address of the computer running the Metro Bundler is automatically bundled into the app, ensuring seamless connectivity even when the device is disconnected from USB. In contrast, Android developers must manually input the IP address if the USB connection is lost, which can be tedious and error-prone.
More info in discussion thread: https://github.com/react-native-community/discussions-and-proposals/issues/870
I anticipate that a change where making IP the default method of connection will result in a lot of people running into issues where they can't connect to Metro server (for example, if they're on a different network, or they disable wifi). So I also changed the default error message you get in case the app can't connect to the bundler and updated the "Change Bundle Location" dev menu.
The previous error message
```
Unable to load script. Make sure you're either
running Metro (run 'npx react-native start') or
that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.
```
was changed to:
```
Unable to load script.
Make sure you're running Metro (npx react-native start)
or that your bundle 'RNTesterApp.android.bundle' is
packaged correctly for release.
The device must be on the same WiFi as your laptop to
connect to Metro.
To use USB instead, shake the device to open the dev
menu and set the bundler location to 'localhost: 8081'
and run:
adb reverse tcp:8081 tcp:8081
```

And the new dev menu UI looks like this:

The two buttons with "10.0.2.2:8081" and "localhost:8081" are suggestions which when tapped fill the input with the text from the button. The first button suggests the IP of the development machine, and the second one is hardcoded to localhost:8081.
## Changelog:
[ANDROID] [CHANGED] - Automatically use Metro bundler IP address when installing apps on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/49166
Test Plan:
I've tested the implementation on a physical device and on emulator and it's working solid. However, I would invite further testing in order to catch possible edge cases.
I've recorded common scenarios
Scenario 1:
Device doesn't have the app installed.
We connect the device via USB, install the app and open it.
Device is on the same network as the dev machine.
Bundler location is by default set to the IP of the dev machine.
When starting app, the app is able to connect to the dev machine and download the bundle.
Scenario 2:
Device doesn't have the app installed.
Wi-Fi is turned off on the device but device is connected via USB
We install the app and open it.
Bundler location is by default set to the IP of the dev machine.
When starting app, the app is not able to connect to the dev machine and shows the error message.
After opening the dev menu we see that the IP is set to the IP of the dev machine.
We click the "localhost" option in the dev menu and click apply
After that the app is able to connect to the dev machine and download the bundle (via USB) since the traffic is forwarded using adb reverse.
Notes:
When we set an IP in the dev menu, the app will persist it.
If we connect the device via USB and reinstall the app the persisted data stays the same, so the previously set IP will be used.
However, the IP of the dev machine will be displayed as an option in the dev menu.
https://github.com/user-attachments/assets/cc2da5d4-de07-4980-a61c-68ca53db74c7https://github.com/user-attachments/assets/407b8871-8b83-4a6b-a833-f87ddc0afc82
Reviewed By: huntie
Differential Revision: D69664231
Pulled By: cortinico
fbshipit-source-id: 5a339be50a17a59202416b99e72f4397d8ff4805
Summary:
We only use fbsystrace API's directly from cxxreact and reactperferflogger targets, so export the dependency and the preprocessor flag there so we do not have to duplicate (and potentially forget to do this) from all other targets in react-native.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72704827
fbshipit-source-id: 845c174b4f9ce0a67dd80be3f6274234328bbdb9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50592
For unclear reasons this is crashing on some devices when dereferencing the module ref. Instead we can just access the existing global_ref to the module instance and avoid any deallocation timing issues.
Also added some additional safeguards and validation against incorrect JNI invocations.
Changelog: [Android][Fixed] Fix crash when TurboModule event emitters are used on arm32
Reviewed By: cortinico
Differential Revision: D72716972
fbshipit-source-id: 3803329048d8388b3d30c9cb55a857e399569eea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50594
Some tests are failing due to unsatisfied error when looking for C++ classes of feature flags, we fix this by calling ReactNativeFeatureFlagsForTests.setup()
changelog: [internal] internal
Reviewed By: yungsters, sbuggay
Differential Revision: D72721786
fbshipit-source-id: c41c05428b1f99db9b03bb67cd9ddc47ebec84b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50591
Changelog: [internal]
This implements linting for Markdown files in React Native via `markdownlint`. We already have Prettier support for Markdown, but this adds some missing functionality, especially validation of local links.
Reviewed By: cortinico
Differential Revision: D72649666
fbshipit-source-id: 5e2c369332b270850d6d04d8960e6ce717f5ba7a
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D72705994
fbshipit-source-id: 56786a5df78322e833401c94dafae4e9335feefe
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TextAttributeProps.java nullsafe
Reviewed By: rshest
Differential Revision: D72460127
fbshipit-source-id: b5b098d8763ed45579c50068033374dfc88afa86
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460132
fbshipit-source-id: 4ff177555f4d035be82ec6a134227f9ed2076fb9
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextViewManager.java nullsafe
Reviewed By: javache
Differential Revision: D72460124
fbshipit-source-id: a75705ac4ab486ccaa9162dee5bfd8cae77967c7
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: arushikesarwani94
Differential Revision: D72460133
fbshipit-source-id: 7673e962e50946b504e3bd9446b3aef962271241
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460130
fbshipit-source-id: fbc073e7b644326e85a05227c1e2e72e3dd5b870
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72460128
fbshipit-source-id: 5165055b1023a9eab86b97ef6cdfa9553c063ec0
Summary:
https://developer.android.com/reference/android/widget/TextView#setEllipsize(android.text.TextUtils.TruncateAt) explicitly allows setting setEllipsize's argument in TextView to null to turn off ellipsizing, which is what we want for `clip`
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactTextAnchorViewManager.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72460123
fbshipit-source-id: 26d91d273ead5906060772f65a32fbf4389d0db3
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72460131
fbshipit-source-id: d2b82fe1abcfd828490820f31862339bce9785b6
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReactBAseTeextShadowNode.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72460122
fbshipit-source-id: 772b19016fa1558b549d73ad2b23f891ce2f57f6
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72460134
fbshipit-source-id: b5e8864ddd7454ef23c5632dc2c8e502050dfe2b
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ViewManagerRegistry.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384049
fbshipit-source-id: dbca38ee6379e2e64b37c1d265c001585344661d
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384050
fbshipit-source-id: ac88074a45752a5512daa09fce8c385b256b3d41
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TouchTargetHelper.java nullsafe
Reviewed By: rshest
Differential Revision: D72384076
fbshipit-source-id: 344d93484cb465f4841256d302a6d9eec1467643
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D72384058
fbshipit-source-id: 543da56ed4410625f17d143b127aa5cc882e0327
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ThemedReactContext.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384053
fbshipit-source-id: 39ce998cfce1de358f13b4f068f180dfd1d88378
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384062
fbshipit-source-id: 70b7b4490e002016a83746336b9bb397e917a858
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JSPointerDispatcher.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384071
fbshipit-source-id: 474671024632f7cdce7547855d0631c6a7005e8b
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72384057
fbshipit-source-id: fd10242d14dd3e9cc2f6cd72dcac693b0f52c818
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made PromiseImpl.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384070
fbshipit-source-id: 142a0e001af42ebb8cc1c8301b3ec7f586191d92
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384080
fbshipit-source-id: f859a21826bd1dd9d6fa0da82df5a4f0e9e79264
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NativeModuleRegistry.java nullsafe
Reviewed By: javache
Differential Revision: D72384075
fbshipit-source-id: bebc637a757c9f86d6260f9076010de9d7c80d4a
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384051
fbshipit-source-id: 6cc3ab112a676fe6dfcfa1a4aa74e0dcd0e53e4a
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ModuleHolder.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384056
fbshipit-source-id: 42bfdd9b73bdb599ab67b6fe8759c80665156d22
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384081
fbshipit-source-id: a45f551089f9484d11d0701c98a06467da667b36
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JsonWriterHelper.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384060
fbshipit-source-id: ce41674cc5dbadcd70029396607ac046100e2be7
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384061
fbshipit-source-id: 7a238fae907398ad785b169db7232068eef5617b
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromObject.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384066
fbshipit-source-id: 6f187f8a87a2c5d239c671880404eb81f0e22d3e
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384067
fbshipit-source-id: b9cc92e41f29cd5af4d277ee8ec0cb3c432bdeec
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromMap.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384077
fbshipit-source-id: 70fb921fed06e9f89eb69c558692d1d7705fe2e5
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384073
fbshipit-source-id: fb9cc4d6da6ee78785e70c8b298434f61c60c1dd
Summary:
D65596278 marked the non-primitive return types from ReadableArray as optional, so we have to follow suit
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DynamicFromArray.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384069
fbshipit-source-id: c67dc5bfb540af9190f740d565e5bda63d1caaa8
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384068
fbshipit-source-id: 83f4b75b19dcccf752e53fd301ccda7b42a5c611
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BaseJavaModule.java nullsafe
Reviewed By: alanleedev
Differential Revision: D72384078
fbshipit-source-id: aba0f261f3b3e77133ff2a148bf4903c73c54691
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D72384074
fbshipit-source-id: de616024dcca4c2d14b329aa020267c8a3d0ee56
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Arguments.java nullsafe
Reviewed By: cortinico
Differential Revision: D72384054
fbshipit-source-id: 87ad373d8663d8342d2ec8b757cec2a756210f45
Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72384064
fbshipit-source-id: 12272e3b1b0a7900515071cee9d95469e4d95d6c
Summary:
Implemented ReactEditTextInputConnectionWrapper in Kotlin as part of Kotlin-ifying RN
## Changelog:
- Removed ReactEditTextInputConnectionWrapper.java
- Added ReactEditTextInputConnectionWrapper.kt
Pick one each for the category and type tags:
[ANDROID] [CHANGED] - Kotlinify ReactEditTextInputConnectionWrapper
Pull Request resolved: https://github.com/facebook/react-native/pull/50573
Test Plan: Run RN-Tester and interacted with TextInputs with both new architecture enabled and disabled
Reviewed By: rshest
Differential Revision: D72704246
Pulled By: cortinico
fbshipit-source-id: fec358d157c6ba09fecfa98bf431b18eee7824b0
Summary:
Some minor fixes in the RNTester that were bugging me a bit:
- Playground tab icon is not displaying the correct icon when the tab is active.
- The RNTTestDetails button is being displayed when there is nothing to display.
- Export the data for the Playground tab correctly to display the description.
## Changelog:
[INTERNAL] - RNTester: Fix playground icon & test details button
Pull Request resolved: https://github.com/facebook/react-native/pull/50530
Test Plan:
<details>
<summary>Screenshots</summary>
| Before | After |
|------------------------------------|------------------------------------|
|  |  |
</details>
Reviewed By: NickGerleman
Differential Revision: D72576804
Pulled By: cortinico
fbshipit-source-id: 8555677a5121fe908c18d349e80ce8097d144fe5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50588
Changelog: [internal]
This configures Prettier to format all markdown files in `__docs__`.
Reviewed By: lenaic
Differential Revision: D72706239
fbshipit-source-id: 67b4c82528c89e497c0ff1aacbc30d76f4d29a3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50587
Changelog: [internal]
This does an initial formatting of all Markdown files that are going to be formatted by prettier from now on.
Reviewed By: lenaic
Differential Revision: D72706240
fbshipit-source-id: b365a94e5d74945a121966fddcb43776ebc534e0
Summary:
* EventBeatManager's deprecated constructor is removed
* No need to keep a ref to jhybridobject_ (it's invalid to keep an alias_ref like this anyway)
* Use HybridClassBase to reduce the number of objects
Changelog: [Android][Removed] Removed deprecated EventBeatManager(ReactApplicationContext) constructor
Reviewed By: mdvacca
Differential Revision: D71984490
fbshipit-source-id: 01482ddd3128ef5f495682e75897e2a6549274a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50553
Adding nanosecond resolution for macOS to the NativeCPUTime native module. This allows for running Fantom benchmarks on macOS with high resolution CPUTime counters.
This change adds the internal `getCPUTimeConversionFactor` function which is needed to convert the output from `mach_absolute_time` to a double representing time in nanoseconds. The native module calls `getCPUTTimeConversionFactor` once in the constructor and stores the result for future calls. The conversion factor defaults to 1.0 for all other platforms.
Changelog: [internal]
Reviewed By: rubennorte
Differential Revision: D72631963
fbshipit-source-id: 33fa1bfc576e634187091bfa668106e31cc62214
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50559
This diff migrates the following file to Kotlin - DevSupportManagerBase.kt
as part of our ongoing effort of migrating the codebase to Kotlin
This file was 1000LOC+ so its migration is quite involved.
I had to look into nullability of various parameters. Most notably the `Array<StackFrame?>` -> `Array<StackFrame>`.
This also is the last file left in the devsupport package that needs to be migrated to Kotlin.
Changelog:
[Android] [Breaking] - DevSupportManagerBase is now converted to Kotlin. If you're subclassing this class, you will have to adjust some of the parameters as types have changed during the migration.
Reviewed By: javache, mdvacca
Differential Revision: D72637098
fbshipit-source-id: b87d5f17e30d69fe9c09ec9b49f96818df34ea3b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50558
This diff migrates the following file to Kotlin - DevServerHelper
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - DevServerHelper to Kotlin.
Reviewed By: javache
Differential Revision: D72632266
fbshipit-source-id: 5dab7206dcf11de042d9e274e33a38a4491f1d17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50580
This follow ups to us enabling INTERPROCEDURAL_OPTIMIZATION to libreactnative.so and enables
INTERPROCEDURAL_OPTIMIZATION for the app module as well.
Changelog:
[Android] [Changed] - Enable INTERPROCEDURAL_OPTIMIZATION for libappmodules.so in OSS
Reviewed By: rshest
Differential Revision: D72696658
fbshipit-source-id: ec07c7df9a639b5c3df8923ec384db90a78463e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50569
This diff makes all the *Systrace files internal.
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D72646992
fbshipit-source-id: d085da9cf841fc2e8a026b8d09d8a17550505c7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50563
This diff makes all the classes inside `com.facebook.react.views.text.internal.span` internal.
Those classes are already inside an `.internal` package. By making them `internal` with the Kotlin keyword
we're making harder for them to be accidentally referenced outside React Native.
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.views.text.internal.span is now internal
Reviewed By: mdvacca
Differential Revision: D72644962
fbshipit-source-id: dbb5a45e6121cb49509469d1d40c3b278cc62368
Summary:
Users should not be using `getCurrentActivity()` method on `ReactContextBaseJavaModule`.
Instead they should use `getReactApplicationContext.getCurrentActivity()`
This correctly deprecates this method for 0.80.x
Changelog:
[Android] [Deprecated] - Correctly deprecate ReactContextBaseJavaModule.getCurrentActivity() method
Reviewed By: mdvacca
Differential Revision: D72449062
fbshipit-source-id: f74bf94980447497e7e9049ede2b44c1d1f0d48b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50557
This diff migrates the following file to Kotlin - BundleDownloader
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BundleDownloader to Kotlin
Reviewed By: javache
Differential Revision: D72627995
fbshipit-source-id: 9d65473c4d4a0962f78b0f71fc24530415a0e908
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50560
This diff migrates the following file to Kotlin - StackTraceHelper
as part of our ongoing effort of migrating the codebase to Kotlin
I've moved the method `convertProcessedError` to `internal` because it was already using a parameter of type `ProcessedError` which is itself internal.
Changelog:
[Internal] [Changed] - StackTraceHelper to Kotlin
Reviewed By: rshest
Differential Revision: D72569103
fbshipit-source-id: 8c544b83deda82c7a3d1a04d8cd0c9e12c9b6d46
Summary:
This diff removes the usage of getShadowNodeClass() on apps that are purely running on the new architecture.
The implications of this change are:
- all shadow node classes will be stripped-out by proguard
- props exposed in shadow Nodes won't be included in the native view configs, this is fine becuase all core components are already using static view configs, props included in LayoutShadow node are covered by: BaseViewConfig.android.js
changelog: [internal] internal
Reviewed By: javache, cortinico, rshest
Differential Revision: D72602551
fbshipit-source-id: caada701f80253830df0085fdbbac47a2aa6d71b
Summary:
In this diff I'm introducing the ReactNativeFeatureFlags.disableShadowNodeOnNewArchitectureAndroid() feature flag, this will be used to control the usage of shadow nodes in apps that are purely running on the new architecture.
The default value for this feature flag is true because we are assuming this is the right value long term (this is just a toggle)
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D72602553
fbshipit-source-id: 3eb1a151e74c1728374a1d37b4151a0928801de5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50566
This diff makes the following file internal - package com.facebook.react.internal
as part of our ongoing effort of reducing the API surface.
Changelog:
[Internal] [Changed] - com.facebook.react.internal pakcage is now internal
Reviewed By: mdvacca
Differential Revision: D72645991
fbshipit-source-id: 406c922b06ad883e00c63116e8efccd29e088ced
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50570
This diff makes the following file internal - ReactRawTextShadowNode and ReactRawTextManager
as part of our ongoing effort of reducing the API surface.
The only meaningful user of this API is this library:
https://github.com/iyegoroff/react-native-text-gradient
Which is umaintained (last supported version is RN 0.59) so I'm not considering this breaking.
Changelog:
[Android] [Changed] - Make ReactRawTextManager internal. We verified no popular libraries are impacted by this change
Reviewed By: mdvacca
Differential Revision: D72647702
fbshipit-source-id: 59a3646fdbc8f11907b4cf5056ff88c6dcec1cf8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50365
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FabricUIManager.java nullsafe
Reviewed By: GijsWeterings
Differential Revision: D71979601
fbshipit-source-id: 599d87f0783a566c837aa70975a62f5f908a2294
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50371
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979591
fbshipit-source-id: 77369affbe4fd7411f149a4a2de869b48a1faa1a
Summary:
This PR aims to migrate UiThreadUtil from Java to kotlin as part of https://github.com/facebook/react-native/issues/50513
## 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][CHANGED]Migrate UiThreadUtil to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/50536
Test Plan: Tested on RN tester with both new and old arch
Reviewed By: cortinico
Differential Revision: D72602041
Pulled By: arushikesarwani94
fbshipit-source-id: 9f45a139805819a21039eb640a0bd1583a3acde9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50565
This annotation is unused. It was referenced in the past with Buck1 OSS but now we can safely remove it.
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D72645219
fbshipit-source-id: 0327fa562276193ad9f48dc81ea7a9fa0da19eee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50374
This diff breaks down ScrollView props into ScrollViewBaseProps to generate more readable TS types, re-exports AnimatedComponent and sets the default SectionList Item type to `any`.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D72061941
fbshipit-source-id: 439fcdb1540288d6e610cd535b1fed82243c3b7c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50531
# Changelog: [Internal]
This should not have any functional changes, mostly refactoring the previous code, splitting it into smaller methods, better documentation and added tests.
Main changes are:
1. We are going to use smart pointers for `ProfileTreeNode`
2. Split single static method into multiple smaller methods of one class, less cognitive load and smaller context window
Reviewed By: robhogan
Differential Revision: D72401690
fbshipit-source-id: a1eed5501349dcd811661d91f3bf126a0daaacf2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50538
Promises created from `Linking.sendIntent` calls never resolve, leaving them dangling. This change fixes the issue in two spots:
1. By calling promise.resolve directly after the startActivity call
1. By wrapping startActivity in a try/catch so any exceptions thrown are forwarded to the promise as a rejection
Changelog: [Android][Fixed] - Ensure Linking.sendIntent promises resolve or reject
Reviewed By: NickGerleman
Differential Revision: D72606918
fbshipit-source-id: cd437bf65bb631bc04f99b4d2e3d637f7e98b25e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50556
This class is effectively unused, I'm removing it.
It was package private also so no one in OSS could easily use it.
Changelog:
[Internal] [Changed] - Remove unused JSDebuggerWebSocketClient
Reviewed By: GijsWeterings
Differential Revision: D72567055
fbshipit-source-id: aa2fa62c05488d1560c0acfa0b21e2d934c34be2
Summary:
Looks like Jest E2E had significant issues with this test on both android and ios RNTester. I think it's because the view with the testID did not have any contents, which means the accessibility tools have trouble getting the proper context from it. By changing it to a nested view (with some padding to better inspect the borders, since that's what's important in this test) I think we have a better, more stable test case this way
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D72571911
fbshipit-source-id: a85266cf4a1696fdaedcc97ed2a7a05f086d35bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50549
As part of D72558674, I made SurfaceHandlerBinding.setProps nullable, to align with D71979601 - but I didn't realize this wasn't properly handled on the JNI side.
Changelog: [Android][FIxed] Fix crash when passing null initialProps
Reviewed By: lenaic
Differential Revision: D72632625
fbshipit-source-id: 82db1791ceb7c96248b6eea2eb1e6395edc308a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50528
Changelog: [internal]
This adds basic documentation for the IntersectionObserver Web API implementation in React Native.
Reviewed By: lenaic
Differential Revision: D72573107
fbshipit-source-id: 14ed318ae3691550bbe14a6da1184013ce0c60a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50527
Changelog: [internal]
This just defines an outline for the expected docs to be added to RN.
Reviewed By: GijsWeterings
Differential Revision: D72573497
fbshipit-source-id: a8e1c2cc0c6b966656d1089cd33b547174ace873
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50525
Changelog: [internal]
Just a rename of the file and moving relevant documentation to the README.
Reviewed By: GijsWeterings
Differential Revision: D72562795
fbshipit-source-id: d675037376a0345dd7d178cf5863f4093eb74542
Summary:
This diff migrates the following file to Kotlin - CxxInspectorPackagerConnection
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - CxxInspectorPackagerConnection to Kotlin
Reviewed By: rshest
Differential Revision: D72566596
fbshipit-source-id: 046e7549841f64d73fed56d8bc8d70f2d3ea63e8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50519
This diff migrates the following file to Kotlin - MultipartStreamReader
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - MultipartStreamReader to Kotlin
Reviewed By: rshest
Differential Revision: D72561124
fbshipit-source-id: d616bfc547ea6a773ebc1c45f97111ae7c7ec85a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50526
This change wants to automate the rotation of the issue triaging squad on Discord.
This is taking us a few minutes every week to rotate the oncall.
This change can save us some time.
The configuration file format is supposed to be like this:
```
{
"userMap": {
"discord-username1": "discord-id1",
"discord-username2": "discord-id2",
"discord-username3": "discord-id3",
"discord-username4": "discord-id4"
},
"schedule": {
"date1": ["discord-username1", "discord-username2"],
"date2": ["discord-username3", "discord-username4"],
}
}
```
## Changelog
[Internal] - Automate the issue triage oncall rotation
Reviewed By: cortinico
Differential Revision: D72569435
fbshipit-source-id: 435c13350cf503e99302775674e78a20e328e68d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50518
This diff migrates the following file to Kotlin - BridgeDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BridgeDevSupportManager to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72558373
fbshipit-source-id: 07a16dc479e967677b1aab8a6d4a4366994fd490
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50522
This diff migrates the following file to Kotlin - BridgelessDevSupportManager
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - BridgelessDevSupportManager to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72558016
fbshipit-source-id: 9c84f89dfca03991b1feb6f8c9ffe846350aafed
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50520
This diff migrates the following file to Kotlin - DebugOverlayController
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - DebugOverlayController.java to Kotlin
Reviewed By: arushikesarwani94
Differential Revision: D72557349
fbshipit-source-id: dd4a1c7204206189c176b36f81c6d54f5f780b10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50521
This diff migrates the following file to Kotlin - DebugCorePackage
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Internal] [Changed] - Migrate to Kotlin - DebugCorePackage
Reviewed By: javache
Differential Revision: D72556867
fbshipit-source-id: dc37538da7089f532dc3a617a8e7dbccc6e187e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50402
While investigating pointer events, I noticed that all Android views fire `onPointerLeave`/`onPointerEnter` in rapid succession on every button press. This is because Android fires `ACTION_HOVER_EXIT` on every frame before firing `ACTION_DOWN` (in the same frame). The logic in JSPointerDispatcher needed to be updated to account for this.
Unfortunately, `ACTION_HOVER_EXIT` events have no means of distinguishing between whether they were driven by the mouse actually leaving the view's bounds or by a button press. Some OS implementations fire this event on the frame just before leaving the view's boundaries while others fire after, so pure X/Y position isn't helpful enough. The button state property on `ACTION_HOVER_EXIT` also never gets set in some OS.
To work around this issue, this change posts a callback to the very next frame after receiving `ACTION_HOVER_EXIT`. If no `ACTION_DOWN` event was received in the same frame, it calls all the way through the existing logic. But, if an `ACTION_DOWN` event *is* received, we compare the event timestamps and if they match we don't post `onPointerLeave`.
Changelog: [Android][Fixed] - Prevent onPointerLeave from dispatching during button presses
Reviewed By: vincentriemer
Differential Revision: D72078450
fbshipit-source-id: dcc7cfa4086963ed8599147d60d8406c54cd5d69
Summary:
Since we've made SurfaceHandler internal, there's no need to maintain a separate interface between it and the actual Binding implementation class.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D72558674
fbshipit-source-id: d7ac15b0e608c3aa7d05e46f1078cef1e154f846
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50481
It's here! kinda...this only works internally right now, so no OSS usage which is explicitly gated to be off. We can't really avoid exposing the types so here we are.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D72428425
fbshipit-source-id: 9642e5db46f9bd34ff505b0e37987da52857b6e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50303
This feature is being tested internally right now. We cannot really avoid exposing the type but we are going to make this no-op for now in OSS until we are confident we can roll it out fully
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D71919847
fbshipit-source-id: b1730b8af5180c4513ce1f0d58b3a6526fffed84
Summary:
I was helping a team with some keyboard link accessibility and they had this strange bug where a link was not keyboard accessible despite having `accessible={true}`. Something that fixed it for them was adding an `accessibilityLabel`, which makes no sense.
Turns out there is a bug when the link encompasses the entirety of the `Text` component. We have a special case for handling links of this manner, and right now we are not setting the `frame` property which is responsible for outlining the element when it takes focus.
This property is not one defined by UIKit, rather it is defined in RCTAccessibilityElement. We use it to derive the accessibilityFrame which has to be in screen coordinates. If you do not set the frame property then it is supposed to use the bounds of the container. This does not work properly, seemingly bc the name "frame" gets mangled internally in UIKit leading to UB. I changed the name the "something" and it works.
To remedy this lets just change the name
Changelog: [iOS] [Fixed]
Reviewed By: javache
Differential Revision: D72338838
fbshipit-source-id: da91d0c28baeb6765d4d604f3e47c91952167f9d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50516
This diff migrates the following file to Kotlin - DevSupportManagerFactory
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Android] [Changed] - Migrate to Kotlin - DevSupportManagerFactory - We couldn't find any implementation of this class in OSS. Some Kotlin implementers might have to change the method signatures. However this interface is not supposed to be extended in OSS.
Reviewed By: javache
Differential Revision: D72556310
fbshipit-source-id: 35d1ed3c332296d3be5244fdab92a890d7ea3c40
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50517
This diff migrates the following file to Kotlin - ReactInstanceDevHelper
as part of our ongoing effort of migrating the codebase to Kotlin
Changelog:
[Android] [Changed] - Migrate to Kotlin - ReactInstanceDevHelper. Some users implementing this class in Kotlin could have breakages. As this is a devtools/frameworks API we're not marking this as breaking.
Reviewed By: javache
Differential Revision: D72555226
fbshipit-source-id: e7e5523c56de8697def0a509c03e9fe89c6d5839
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50514
When building React Native for mac catalyst on intel architecture, we are observing a build failure in RCTInstance.
See issue: https://github.com/facebook/react-native/issues/50388
Apparently, the compiler don't understand that `errorData[@"isFatal"]` is a BOOL, so we are helping it by extracting the `boolValue`.
## Changelog:
[iOS][Fixed] - Avoid build failure on Catalyst (x86_64)
Reviewed By: cortinico
Differential Revision: D72558024
fbshipit-source-id: 152d89b02ae250a8ae54fe2df658c018d5f63f45
Summary:
Changelog: [internal]
This is stable after the last couple of fixes, so we can enable it by default. Enabling this just improves the accuracy of `IntersectionObserver` and the Event Timing API, and we still haven't shipped those to stable.
Reviewed By: GijsWeterings
Differential Revision: D72561256
fbshipit-source-id: 4b505f1df9c7c495d316e6fbf1498af94aaca959
Summary:
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made NetworkingModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979590
fbshipit-source-id: 0ddf764f4707d2ee76ab99bc1a09a4e2a7e6b794
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50347
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979581
fbshipit-source-id: 4ed264ff43794b6aafc2a0ee419a660a6b5b0440
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50366
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979598
fbshipit-source-id: bbef5548d05e0b77ea03cf72f41a384fe7294d59
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50364
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979588
fbshipit-source-id: f5ec8bced87ea0c6c1c193be51ebc78396388d0e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50370
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979605
fbshipit-source-id: b8da8f1ad12f5f6d63e7bd876d7c4912d69a4c4d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50358
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979595
fbshipit-source-id: 19bfcea537b7b62536eafa8e1d0b3f8b50666e22
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50357
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made TurboModuleInteropUtils.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979599
fbshipit-source-id: ffd7006f28db4daf8cd47ce1cd8ff6e3192c0ad1
Summary:
Per discussion in D71979599
Changelog: [General][Fixed] Throw ParsingException when ReactModule doesn't conform to TurboModule invariants
Reviewed By: cortinico
Differential Revision: D72383857
fbshipit-source-id: 2d0282b136312d414234246584d2ae60858955b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50367
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979600
fbshipit-source-id: be36f4c409a0423b3d3ccdf2c28d96c7a3f50201
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50512
Reland of D72389708
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D72552028
fbshipit-source-id: 2594df9ef8056f9931960117770c4b7cddd4e922
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50511
Reland of D72384347
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72552075
fbshipit-source-id: bbc75aada1564f6f54ea70a8dd4f5145d4a3ffaa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50495
Changelog: [internal]
This migrates the last remaining usages of these polyfills to the built-in classes.
Reviewed By: yungsters
Differential Revision: D67828652
fbshipit-source-id: 5ff039d7413aed49d882ff03e722531cdd195488
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50494
Changelog: [internal]
Removes the dependency on the `event-target-shim` npm package now that we're using a custom implementation within `react-native`.
Reviewed By: yungsters
Differential Revision: D67828636
fbshipit-source-id: 8727f8caa2bd4badd7162eb7b993dcc768e74b85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50485
Changelog: [internal]
This cleans up the experiment to test the new implementations of `XMLHttpRequest`, `FileReader` and `WebSocket` using the built-in `EventTarget` definition.
This effectively replaces the legacy implementations with the ones using the built-in `EventTarget` class in stable.
Reviewed By: yungsters
Differential Revision: D68625225
fbshipit-source-id: 7ccefe5d8612baca283146cdbca7f7f1d51b4ffa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50499
We enocuntered an issue internally where the `RCTInstance` was ready before the modules were done registering statically.
When this happens, it can occur that we iterate over an array that is going to be modified.
With this change, we are introducing several changes:
- By default the logs are not outputted, so the array is not going to be populated
- we are making a copy of the array before we start iterating, so even if the original reference is updated, the iteration is safe
- we are not emitting logs if in release mode. This will protect production from this issue. Also, these warns are not going to be useful in production anyway.
## Changelog:
[Internal] - fix crash when RCTInstance is ready while modules are initialized
## Facebook:
This fixes T220205371
Reviewed By: Abbondanzo
Differential Revision: D72512518
fbshipit-source-id: 32e561111d034455a6a778d05af4a96602b74bfb
Summary:
ReactMethod will remain to be supported in the New Architecture, we are unmarking it
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D72491698
fbshipit-source-id: 656b36711dcdfc0a776ac05b1f7f431d6416f9dd
Summary:
Changing these object arguments to `$ReadOnly` permits passing in values that are `$ReadOnly` (e.g. `payload` argument to `enqueueNativeEvent`).
Changelog:
[Internal]
Reviewed By: lyahdav
Differential Revision: D72474879
fbshipit-source-id: 27341131724f4f572b78563975774a5b20dee8f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50489
ParagraphState is shared between ParagraphTextView and ParagraphComponentView, but we only need one copy. We were forgetting to clear this on ParagraphTextView when recyling.
Changelog: [iOS][Fixed] ParagraphState is correctly deallocated when recycling Text
Reviewed By: cipolleschi
Differential Revision: D72454038
fbshipit-source-id: 43afa4eaea183cc66b64d16870c1403debff985a
Summary:
# Changelog: [Internal]
We should avoid allocating multiple of these, since they can get really big.
`RuntimeSamplingProfile` may contain up to 10k of `Sample` for every second of sampling. Every `Sample` may contain up to 500 of call frames, each of which may have a copy of strings like `functionName` and `url`.
> NOTE: The actual logic for deduplicating strings and not allocating too many of them is not part of this diff and will be published separately. Even with deduplication, there is a reason to avoid copying the profile.
Reviewed By: javache
Differential Revision: D72254364
fbshipit-source-id: fa7907fb5cabbd2ac99d3e4e05a93bcb07f7f7c7
Summary:
# Changelog: [Internal]
This was changed in D70402439.
Since these hexadecimal numbers are serialized as strings, we don't need to includes empty bits, this could save us few kilobytes of the trace in json format.
Also, this is the default for Chromium, so we shouldn't probably diverge.
`0x00000001` -> `0x1`
Reviewed By: robhogan
Differential Revision: D72459307
fbshipit-source-id: 5cc4ccbe25cdc16946e745184ad17dfcd51c6449
Summary:
# Changelog: [Internal]
`"ProfileChunk"` trace events can actually be big, depending on the number of the unique nodes reported in a single chunk.
We should avoid copying it for memory and performance reasons.
Reviewed By: robhogan
Differential Revision: D72459306
fbshipit-source-id: db3583c6c6397bb6ee8a0eb33a06a48bc10e82b8
Summary:
This renames the method to be more aligned to the fact that we're using this entrypoint both for internal
and for OSS users.
I've also added a `assertLegacyArchitectureOnlyWhenMinifyEnabled` that will run only for internal builds.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D72389708
fbshipit-source-id: 23830df2f71cc816c7ca178b735a930e794efe47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50471
ReactMarker is currently loading the whole `reactnativejni` which we should not be loading in NewArch.
This is resulting in a warning fired for all the NewArch users with `legacyWarningsEnabled`.
I'm cleaning this up by moving it inside `reactnativejni_common`.
Changelog:
[Internal] [Changed] - Move ReactMarker to `reactnativejni_common` as it's used in NewArch also
Reviewed By: javache
Differential Revision: D72384347
fbshipit-source-id: 83965c3e4eb7847184856485d1cc1c478b2888d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50479
In D72273163 the only reference to RN feature flag `throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS` was removed, so this diff removes the feature flag. Also it removes remnants of D69922771 which are no longer needed.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427164
fbshipit-source-id: 398583ac14910a396839140c06011efa084fe04d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50470
This diff introduces a new property called `legacyWarningsEnabled` for `gradle.properties` that
toggles the Legacy Arch warnings for users.
I've also introduced a new `ReactNativeApplicationEntryPoint` that is generated by RNGP. This class
effectively wrap `DefaultNewArchitectureEntryPoint` by setting warnings and also invoking SoLoader.
It will reduce the errors in the user space.
As of now warnigns appear in Logcat, but I'm looking into adding some UI in a subsequent diff.
Changelog:
[Android] [Added] - Add a `legacyWarningsEnabled` property to enable Legacy Warnings on NewArch
Reviewed By: mdvacca
Differential Revision: D72383907
fbshipit-source-id: bcd659a23ec5b468958124f0f6650ff72d01ce81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50490
Changelog: [internal]
This follows the good practice in Fantom tests.
Reviewed By: javache
Differential Revision: D72454795
fbshipit-source-id: 412ee53f61073c63295a23fd7decd6f19a72bf99
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50484
Changelog: [internal]
This cleans up the `enableUIConsistency` feature flag (shipping the feature) after we verified it was stable and performance in production.
Reviewed By: yungsters
Differential Revision: D72387602
fbshipit-source-id: 11d225d962f7e3a47e858d039b7fd5c70a6cadfd
Summary:
Found this unused class with static code analysis. It is internal and has no OSS usages, so it seems like it can be safely deleted.
## Changelog:
[INTERNAL] - Remove unused com.facebook.react.fabric.mounting.mountitems.SendAccessibilityEvent class
Pull Request resolved: https://github.com/facebook/react-native/pull/50478
Test Plan:
```sh
yarn test-android
yarn android
```
Reviewed By: fabriziocucci
Differential Revision: D72445544
Pulled By: javache
fbshipit-source-id: ebbb035da22111e41b04131596d3ec61d4e1423c
Summary:
This PR adds a bunch of OSS libraries to the testing matrix.
We use these OSS libraries internally in our Meta application, so we want to make sure that our changes don't break them.
## Changelog:
[Internal] - Add OSS libraries used internally to the testing matrix
Pull Request resolved: https://github.com/facebook/react-native/pull/50477
Test Plan: GHA - Tested in a sample job firts:
Reviewed By: cortinico
Differential Revision: D72401647
Pulled By: cipolleschi
fbshipit-source-id: c0c2f4b2525b58822c2cc6225fe64210a9513275
Summary:
Use nightlies to test reanimated with RN nightlies
## Changelog:
[Internal] - use reanimated nightlies together with react native nightlies to spot breaking changes
Pull Request resolved: https://github.com/facebook/react-native/pull/50428
Test Plan: GHA - Tested triggering it from a PR in this job: https://github.com/facebook/react-native/actions/runs/14197051228?pr=50428
Reviewed By: cortinico
Differential Revision: D72243345
Pulled By: cipolleschi
fbshipit-source-id: 297ec0073dfc32ec5a5e90630b93867fac0b564f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50480
The map in the script has an if in it checking for proper release channel. For feature flags that do not pass this if, they do not have an alternative return, so `map` just maps this to `undefined`. That means there is still an element in this array which gets joined by 2 new lines. As a result every new feature flag will add 2 new lines of white space making these files look rather silly.
Fix is to filter undefined out.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D72427349
fbshipit-source-id: 87e1d63c8854652296ce9160ab7171a948983d54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50467
Changelog: [Internal]
Adds a transform that is able to divide properies of interaces, types and classes into sections:
- properties
- properties typed as functions
- methods
ands sorts them alphabetically within the groups.
Reviewed By: huntie
Differential Revision: D72381050
fbshipit-source-id: 20781dc44e19e63cbb5706a02e513fc0e9bb2412
Summary:
The original diff caused some breakages.
Changelog: Backout [Android][Fixed] Made Task.java nullsafe
Differential Revision: D72433889
fbshipit-source-id: 53f7e730455ccaadde197a0f400fc6e834c1ffdd
Summary:
Image component was missing an override which enables setting accessibility values and properties.
The main issue is the lack of this prevented Image component from being accessed by VoiceOver.
Changelog: [iOS][Fixed] - Fixed accessible prop no-opts on Image components
Reviewed By: joevilches
Differential Revision: D72410952
fbshipit-source-id: 5612205aca1710fe4bfed6132efeb59065ebf0b3
Summary:
Mark concrete classes of shadow node as LegacyArchitecture
These classes won't be included in legacy architecture apks
changelog: [internal] internal
Reviewed By: joevilches, mlord93, Abbondanzo
Differential Revision: D72351188
fbshipit-source-id: 4727cdd1486b2fafb87fe3b512440af3264ad189
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50249
This change introduces a flag to turn off the legacy architecture warning if they become too annoying.
The flag can be set in the Info.plist of the React Native architecture and it is controlled by the key: `RCTLegacyWarningsEnabled`.
* If the key is missing or with a value of `YES`, logs are enabled
* If the key has a value of `NO`, react native will not output any log.
We decided to use the Info.plist file to configure the logs because in that way it will work also with React Native prebuilds.
## Changelog:
[iOS][Added] - Add flag to enable or disable legacy warning.
Reviewed By: cortinico
Differential Revision: D71814001
fbshipit-source-id: b6ae6b032ff7add6bae3d73dba490adeaceffa1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50244
This change adds warning to React Native whenever a component is loaded using the interop layer.
The warning is emitted only once per component.
## Changelog:
[iOS][Added] - Add warnings when components are loaded using the interop layer.
Reviewed By: cortinico
Differential Revision: D71808323
fbshipit-source-id: ce864f73c7789512d4e5e67368b5aa67f94e0570
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50441
When useFabricInterop is disabled, deleting component descriptors in Component Registry is failing since https://github.com/facebook/react-native/pull/47321 removed the Fabric Interop check from the ComponentDescriptorRegistry.cpp which was added earlier in https://github.com/facebook/react-native/pull/42294
Adding back the logic of Fallback component descriptor and error for the same.
Changelog:
[General][Fixed] Fixing Fabric Interop layer bug defaulting to UnstableLegacyViewManagerAutomaticComponentDescriptor irrespective of feature flags.
Reviewed By: javache
Differential Revision: D72266017
fbshipit-source-id: 1f3093d37dbe2b96ca26aa80c0a59d5c3026e9cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50440
Making the following changes to definition of `useFabricInterop` feature flag:
1. Changing default value to True for both internal and OSS.
2. Changing expected Release Value to false since aiming at disabling interop finally with new architecture strict mode.
3. Hence changed the `ossReleaseStage` from `canary` to `none`
4. Removing all existing over-rides of `useFabricInterop` to True now that the default is True itself.
5. Adding the over-ride to false for Facebook since that doesn't need the interop as is already in new architecture without interop mode.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D72266336
fbshipit-source-id: ff16c5b9d0f39837706a86bd0d178a66a8f2e920
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50448
In preparation for API snapshot generation and README documentation, move into dedicated dir.
Changelog: [Internal]
Reviewed By: iwoplaza
Differential Revision: D72306094
fbshipit-source-id: 3663f9ba9987a59918bae54cfc5a27555b90a9f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50355
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made Task.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979582
fbshipit-source-id: f4104e5deb1d0538fe8b4968dc1411036a3e9634
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50361
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979592
fbshipit-source-id: 07f3b74362b85803eec90c0c974a88d061d8e816
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50354
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made ReconnectingWebSocket.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979606
fbshipit-source-id: d71e26fe37bdf5abbe7b933d0fee25e05d0da87d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50368
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979580
fbshipit-source-id: 0eaeaf327421db47a8499a9b6154fa6d5ab8a4fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50353
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DialogModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979604
fbshipit-source-id: 556b2b10ef0879bf7cd4eac6eaf3c9c3cc1c5413
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50351
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979584
fbshipit-source-id: 52e29ac578edcbcd9bd14de4d327564d54f421cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50352
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made FileReaderModule.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979585
fbshipit-source-id: 3bef5ff48d1d27838d2668367785a85b2b863f05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50360
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979587
fbshipit-source-id: 50c248def66360f2a063d9eb213cfae5d6787943
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50363
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BlobProvider.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979597
fbshipit-source-id: a6fba0d83f3558b3bed21de484b59ee6b17bb643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50350
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979586
fbshipit-source-id: 155fc505d131acc1fa3444692928448b8567cbd5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50362
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountingManager.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979607
fbshipit-source-id: 0a41e3a6405500c29ec4710ea3ed57e6705f1b4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50356
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979593
fbshipit-source-id: 4dbe6ae7f44694b77ebf64170cb71393b532b981
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50348
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MountItemDispatcher.java nullsafe
Reviewed By: cortinico
Differential Revision: D71979589
fbshipit-source-id: 0133fa6bd56d5595e8397029517b43d0a95b260b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50349
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D71979596
fbshipit-source-id: a463b916328d4aecb6b8d91c37be170a8f6fb355
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50437
Currently we do have `NativeArray`, `NativeMap` being tightly coupled with the old arch (i.e. everything inside `libreactnativejni.so`).
Those classes however are primitives used also by the New Arch and they should be accessible even without the bridge infra.
I've noticed this dependency while working on the Legacy Arch warnings.
Here I'm refactoring those primitives to live in a separate `libreactnativejni_common` module that can be loaded indipendently.
Changelog:
[Internal] [Changed] - Decouple NativeMap and NativeArray from `reactnativejni`
Reviewed By: javache, mdvacca
Differential Revision: D71635967
fbshipit-source-id: 64b0fc26491977a0e6c5be4688ff91969c81d680
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50436
Changelog: [Internal]
`is_idle` was a confusing concept that I didn't find useful when researching why disconnections happen. Instead, I'd like to know when the last communication with inspector proxy took place.
Reviewed By: hoxyq
Differential Revision: D72251072
fbshipit-source-id: 10f83bde6c8f3ed4b661bcfbef57f86f34039e5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50435
Changelog: [Internal] when reporting how many cdp messages passed inspector proxy, also report their total size
Reviewed By: hoxyq
Differential Revision: D72245498
fbshipit-source-id: 777274527b7e180c984b11414bec54d0e6f9d27b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50464
Runners in GHA has been updated by github and they now ship with CMake 4.0. (actions/runner-images#11926)
This version is not compatible with React Native, so we are pinning cmake to 3.36.1
## Changelog:
[Internal] - Pin cmake to 3.36.1
Reviewed By: cortinico
Differential Revision: D72379834
fbshipit-source-id: ab09009102118e6590f02cf57fa6f9149482f62b
Summary:
We should not be adding files inside Jest's __mocks__ folder inside the generated podspec.
This takes care of it.
Context: https://github.com/reactwg/react-native-new-architecture/discussions/282
Changelog:
[Internal] [Changed] - Exclude __mocks__ folder from codegen podspec generation
Reviewed By: fabriziocucci
Differential Revision: D72318736
fbshipit-source-id: 73a8c3f3cd84794ead9e7ce622f7ac4299d943f1
Summary:
Currently markers are ignored in RN apps. Utilizing newly added instant track event type for sytrace so the markers are displayed nicely on the timeline. The time delta decoding will be addressed separately for proper timestamp assignment during backend processing.
## Changelog:
[Internal] [Added] - Support for logging mark events with fbsystrace
Reviewed By: javache
Differential Revision: D72094455
fbshipit-source-id: 4cd8f53ddd0b40dfded8d6d8df367698515588c7
Summary:
Make RCTScreenSize and RCTScreenScale initialize during React Native init.
After this diff, there shouldn't be any sync dispatches to the main queue. So, we can just introduce an error into RCTUnsafeExecuteOnMainQueueSync.
## Note
If people manually dispatch to the main queue like so, react native can still deadlock:
```
dispatch_sync(dispatch_get_main_queue(), ^{});
```
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72273163
fbshipit-source-id: 6211851b380b4f5cd556f48f4d717a6f53d65d32
Summary:
I'll need to use feature flags in this file. And those are only accessible from c++.
Changelog: [Internal]
Reviewed By: lyahdav
Differential Revision: D72326982
fbshipit-source-id: 4c9dfd0e5baa69d979b12914f289d58be6e123a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50432
This diff adds lint rule to keep React imports consistent across the react native repo. There is a fix suggestion in case if only React is imported.
Changelog:
[internal]
Reviewed By: NickGerleman
Differential Revision: D72244838
fbshipit-source-id: b783d6320520d76c2e5d5ce5c5b7c2a4548d50fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50433
Make React imports consistent across react-native source code to also align with Flow tooling.
flow-api-translator adds `import * as React from 'react';` if there is no React import and React namespace has to be used after translation.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D72238732
fbshipit-source-id: 5f8cfeab26f397684b1d802731729be7071b5da7
Summary:
This method is redundant. You could just call RCTScreenScale()
Changelog: [iOS][Removed] Delete RCTComputeScreenScale
Reviewed By: philIip
Differential Revision: D72258778
fbshipit-source-id: 0b469169efc4f2def85b2e6b736f3c4570e6b428
Summary:
This is dead code. Let's remove this for now.
This api is unsafe: if it's called from a non-ui thread, it may dispatch to the ui thread synchronously.
Changelog: [iOS][Removed] - Remove RCTFloorPixelValue
Reviewed By: NickGerleman
Differential Revision: D72260694
fbshipit-source-id: d032917643c957a395ee380ef925a047abd5dace
Summary:
## Problem
If RCTScreenScale() is called from a non-ui thread, it will synchronously dispatch to the ui thread.
If the calling thread is the javascript thread, this could deadlock React Native.
## Changes
Move the method calls to the ui thread.
In the future, once all call-sites are migrated to the ui thread, we will just make these methods assert that they're being called from the ui thread.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D72177192
fbshipit-source-id: daadf713f059d33e8fff4559b4184f9d4b6b420d
Summary:
In expo-updates, we would like to handle exceptions on app launch. We used to do this by reassigning our own `DefaultJSExceptionHandler` to the property on the `ReleaseDevSupportManager `. This class has been migrated to kotlin and is now final so we can no longer do this. Instead of having the `defaultJSExceptionHandler` typed as `DefaultJSExceptionHandler` we'd like to change it to the interface, `JSExceptionHandler` so we can do this https://github.com/expo/expo/blob/93b7e9b1724a7be11b9d79c0313a2e5a2fd5e5bf/packages/expo-updates/android/src/main/java/expo/modules/updates/errorrecovery/ErrorRecovery.kt#L118C82-L118C97
## Changelog:
[ANDROID] [CHANGED] Change `defaultJSExceptionHandler`'s type to `JSExceptionHandler` on the `ReleaseDevSupportManager`
Pull Request resolved: https://github.com/facebook/react-native/pull/50400
Test Plan: RNTester runs without issue in a release build.
Reviewed By: huntie
Differential Revision: D72173667
Pulled By: cortinico
fbshipit-source-id: 978fd696322432e638a90014ff3c8c2b09fae761
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50392
## This diff
Defines an exports field for the "react-native/virtualized-lists" package. Limits internal use of subpath
imports to virtualized-lists package, and exports all currently used APIs one the root level.
Changelog:
[General][Breaking] - Subpath imports to the internal react-native/virtualized-lists package are not allowed.
Reviewed By: huntie
Differential Revision: D72162344
fbshipit-source-id: 828dab8e569f019fc48084af475e152b898f5bb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50391
No need for the indirection here of a heap allocated pointer.
Since we have the RootComponentDescriptor we generally don't need it in any other component registry.
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D72058916
fbshipit-source-id: 0c29f26f4c56c4353eda251fe06a475e3b6085da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50379
## Changelog:
[Android] [Added] - Allow invoking `synchronouslyUpdateViewOnUIThread` from c++ via `UIManager`
implementation is provided by SchedulerDelegate on the platform
Reviewed By: javache
Differential Revision: D71648772
fbshipit-source-id: bba0f7e9e2deafd074d28ff5cece6b7738c4d123
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50320
Define `"exports"` field on the main `react-native` package.
**Notes**
Module resolution should be equivalent to the previous implicit `"main"` field (backwards compatible).
- Exports all module subpaths to JavaScript (Flow) source files, with and without `.js` suffix (unchanged ✅)
- These are restricted to the `flow/` and `Libraries/` subdirectories (ℹ️ this should be unchanged, matching any JS imports apps may have today)
- Still includes 3P integration scripts such as `./jest-preset.js` and `./rn-get-polyfills.js` (unchanged ✅)
- Exports `./package.json` (unchanged ✅)
- TypeScript should:
- fall back to the `"types"` field (unchanged ✅)
- OR to `"."`,`"./*"` when Package Exports support is enabled via `compilerOptions`, and use the *adjacent `.d.ts` file* (unchanged ✅)
Changelog:
[General][Breaking] - The `react-native` package now defines package.json `"exports"`.
- While these expose existing JavaScript and TypeScript modules, this change may affect deep imports of non-JS files via Node in third party tools.
- Imports from `src/` and `src/private/` directories are disallowed.
Reviewed By: robhogan
Differential Revision: D71968187
fbshipit-source-id: 28ff941692d1822a916457c4fb891e200e3bca61
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50308
CxxCallbackImpl is used in new architecture, in this diff i'm removing LegacyArchitecture annotation from CxxCallbackImpl class
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D71820292
fbshipit-source-id: 54748cc23aa7091841a025e41ad43dcaa60923cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50376
This makes a couple of tweaks to `SafeReleaseJniRef` to let it be used in more places:
1. Add a default ctor for null state
2. Bridge `get()` to return raw JNI ref, for use when calling Java functions directly (compared to current use case of hybrid objects)
3. Keep JNI environment attached to thread longer term, instead of repeated attach/detach, to allow use for higher frequency objects.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71933838
fbshipit-source-id: 622cc70d2d7483475406314abcbcf92d3d2ff227
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50330
Changelog: [Internal]
Make the error reported when a debugger is created for a device that does not exist generic, and not including any specific details to make them easier to aggregate
Reviewed By: hoxyq
Differential Revision: D71979796
fbshipit-source-id: 88badc51043e35ff91d7db81c5966ed5ffce9109
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50341
Ships tge `scheduleAnimatedCleanupInMicrotask` feature flag, which changes the cleanup of `AnimatedProps` to occur in a microtask instead of synchronously during effect cleanup (for unmount) or subsequent mounts (for updates).
Changelog:
[General][Changed] - When an `Animated` component is unmounted, any completion callbacks will now be called in a microtask instead of during the commit phase.
Reviewed By: javache
Differential Revision: D71942778
fbshipit-source-id: cbe636d5cff84dfeca2f21ead374609c536e91ad
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
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50142
This is a first pass at integrating `NetworkReporter` in our networking stack on iOS (`RCTNetworking.mm`).
**Implemented events**
Wires up minimal events sufficient to populate the Chrome DevTools Network panel:
- `Network.requestWillBeSent`
- `Network.responseReceived`
- `Network.loadingFinished`
**Other notes**
`RCTNetworking` is used (tentatively) as the integration point since it:
- Is the default implementation for the network stack on iOS.
- Should allow us to pair with originating JS call site down the line.
- Intercepts Blob requests (at least `RCTImageLoader`).
- Sits outside the user-configurable `RCTNetworkingResponseHandler` and `RCTNetworkingRequestHandler` concepts.
- Is where network events are currently sent to JavaScript (`sendEventWithName`).
NOTE: Reminder: `NetworkReporter` is currently a no-op without the `fuseboxNetworkInspectionEnabled` experiment set.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71470038
fbshipit-source-id: 069d77473c333a98f796b3dffa670a39b3016b2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50290
Changelog: [internal]
Small rename as the official name of the API is LongTasks.
Reviewed By: yungsters
Differential Revision: D71734777
fbshipit-source-id: fac085e3b0d304f7d05087143c15d32cf2b0971b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50265
This is a fun one!
"Improvements" consist of
* Performance is better now. Previously we did a tree walk for each ID in the array, now its just one :)
* Properly handles coopting (more on that below)
**Performance**
The previous implementation naively walked the tree until it found the right nativeId for each nativeId in the prop. This new algo just does a single tree walk and collects the views that have the right nativeIds as we are doing that walk.
**Coopting**
Our iOS code implements a form of accessibility coopting, where an element can "speak for" a descendant. This happens when some parent element does not have an accessibility label but a descendant does. We look at the subtree and grab every node that has a label and lift it up to the aforementioned element without a label. This enables some nice a11y features like wrapping `Text` in a `View` and letting the `View` just read all the `Text` inside (imagine a button with a label, you would only want to focus the button and just read the text instead of the text itself).
This feature is nice but it becomes buggy when we introduce `accessibilityOrder`. Previously, there was no way to access nested elements on iOS, the platform prohibits this. However, you can get around this by using `accessibilityElements`, which our `accessibilityOrder` prop maps to. So you could define the order as `['parent', 'child']` and access both elements just fine. However, if that `parent` is a `View` that coopts `Text`, we have some issues. The `View` will read the `Text` but then when the user swipes we focus the `Text` and read it again!
To get around this we check up the superview chain in RCTParagraphViewComponentView looking for Views that might coopt us and a cooresponding accessibilityElements with said candidates. If there is such a View we do not announce ourselves. Performance is iffy here, we need to iterate up to root for all text focusing, but this should be fairly fast for all intents and purposes and I have not noticed any lag when changing focus ordering.
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71562476
fbshipit-source-id: 31fd935df0764459403464bd645aae2e664c69cb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50215
Backwards compatible updates to `CoreEventTypes`, `Image`, `Switch`, `TextInput` to align types and reduce root exports.
The effects of this change can be seen in `packages/react-native/types/__typetests__/index.tsx` (smoke test file against current manual TypeScript definitions).
Under Flow, exports on each `*EventData` type are directly removed (unreferenced).
Changelog:
[General][Deprecated] - Deprecate `*EventData` types on `Image`, `Switch`, `TextInput` components. These can be substituted for `*Event`, e.g. `NativeSyntheticEvent<ImageLoadEventData>` becomes `ImageLoadEvent`.
Reviewed By: NickGerleman
Differential Revision: D71734361
fbshipit-source-id: 287c775e840319242984d248169c267abf8f032b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50275
This change adds a check to automate a step in the release process: https://github.com/reactwg/react-native-releases/blob/main/docs/guide-release-process.md#verify-assets-have-been-uploaded-to-maven
The script will poll maven for 90 minutes and return when the artifacts are available. If, after 90 minutes, artifacts are not available, it exits with code 1 that should fail the Release workflow. The Release Crew should have a look at what's happened.
## Changelog:
[Internal] - Automate the check for artifacts being on Maven
Reviewed By: fabriziocucci
Differential Revision: D71825014
fbshipit-source-id: 8879bf9c8fc4519e86b55ad8f9bd3ecf3f8ecfb7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50283
In OSS we have some libraries written in Swift, like Flashlist, that depends on these pods.
However, if a pod is not configured to define modules, those pods cannot be imported by Swift. Therefore, the libraries above will failed to be installed in a project.
This change adds the defines_modules directive to those pods and make the library work again.
This fixes https://github.com/facebook/react-native/issues/50246
## Changelog
[Internal] - Make React-hermes and React-renderercss defines modules
Reviewed By: fabriziocucci
Differential Revision: D71892679
fbshipit-source-id: b03b65986fbdbe781b616f31dfb6bceb38b8b3b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50232
While reviewing the `avoidStateUpdateInAnimatedPropsMemo` experiment, I noticed that the control and test groups were invoking `areCompositeKeysEqual` differently:
- Test group was passing in `allowlist`.
- Control group was not passing in `allowlist`.
Passing it in is technically more correct, but let's restore the control group behavior for now to isolate the tested changes.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D71746745
fbshipit-source-id: aa34db0532ef53ead08bbd632aab0994b31b9340
Summary:
The React Native monorepo depends on `jest-config` in `jest.config.js` but does not specify it as a dependency. This means we got it as a phantom / transitive dependency. In React Native macOS, I am testing using Yarn 4 with pnpm layout to protect against such dependencies (See https://github.com/microsoft/react-native-macos/pull/2366). The simplest way to fix this is to just declare it as a dependency.
## Changelog:
[INTERNAL] [FIXED] - Add jest-config as a dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/50280
Test Plan: This change should be a no-op in React Native, we already had the package in our lock.
Reviewed By: yungsters, huntie
Differential Revision: D71891841
Pulled By: robhogan
fbshipit-source-id: 5b4720e9e09e25b2f1eebb80675bfe4f3a48e2dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50261
Since now we have the optimization of only running the custom accessibility order when we define the tree as dirty we need to add a hierarchy change listener on all ViewGroups within the parent to notify accessibility services of potential changes in hierarchy and so mark the subtree as dirty.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71821636
fbshipit-source-id: 25649efa1679024a205e94c340511dc58783d575
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50240
StrictAnimatedComponentType was introduced to incrementally adopt sctricter animated types at the time. After aligning AnimatedProps it is no longer necessary and can be swapped with AnimatedProps.
Changelog:
[Internal] - Removed StrictAnimatedComponentType from createAnimatedComponent.
Reviewed By: huntie
Differential Revision: D71804845
fbshipit-source-id: e8adbfde1a48fd3f4fc94f4cc0938bd64384c418
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50038
Changelog: [Internal]
Creating a new feature flag to gate change for integrating c++ native animated
Reviewed By: rozele
Differential Revision: D71216797
fbshipit-source-id: 9669628a0789701ab6d447a8561027f3a335ef4f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50271
In the next version of Flow, support for `$PropertyType` will be removed in favor of indexed access types. The final 2 usages in react-native is in `ReactNativeTypes`, which is synced from upstream react. Sync of https://github.com/facebook/react/pull/32733 is currently blocked by test failures, so I will add the temporary shim to unblock releases.
Changelog: [Internal]
Reviewed By: panagosg7
Differential Revision: D71849353
fbshipit-source-id: d4787fe17ae52aa50d54f9fb7fb8b14c149aa1e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50260
Changelog: [internal]
Created new directory `react-native/src/private/__tests__/utilities` and moved `ensureInstance` and `isUnreachable` to it.
Reviewed By: yungsters
Differential Revision: D71826787
fbshipit-source-id: 50a50a54ab928c9060282a9f2256ad97dd856ba4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50258
Changelog: [internal]
Minor reordering of tests in `Fantom-itest`, fix of describe block for `enqueueScrollEvent` and fix incorrect usage of `enqueueScrollEvent` instead of `scrollTo` in `scrollTo` tests.
Reviewed By: yungsters
Differential Revision: D71820977
fbshipit-source-id: 07637e2d18cde96c78c83285ba28201260e42f3c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50257
Changelog: [internal]
## Context
We have some tests that make sure certain objects are deallocated/released at the right times, but those are generally hard to get right. The main reason is that WeakRefs semantics are tied to the tasks and microtasks in JS, but we handle them both inside and outside the Event Loop in Fantom tests.
This leads to some surprising behavior where things we expect to have been deallocated weren't because of some innocent looking code.
## Changes
This introduces a safety mechanism in Fantom to enforce that WeakRefs are always dereferenced inside the Event Loop, by patching the method in `WeakRef` and checking if we're in the Event Loop using Fantom APIs.
It also updates the existing test using WeakRefs to fix the new errors thrown by this patch, and to serve as a "good example" on how to use WeakRefs to do memory testing.
Reviewed By: yungsters
Differential Revision: D71815397
fbshipit-source-id: 8faab1898d9112ec365b41867179abb8b251e337
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50219
* Make FabricEventDispatcher private, we already have a public EventDispatcher interface
* Rename ReactEventEmitter to EventEmitterImpl, to make it clearer it aligned with EventDispatcherImpl
* Update docs to make it clearer what's part of the old architecture
Changelog:
[Android][Removed] Removed FabricEventDispatcher from public Android API
[Android][Removed] Removed (un)registerEventEmitter from EventDispatcher interface
Reviewed By: lenaic
Differential Revision: D71735505
fbshipit-source-id: f0b56298cc38d08101ccdcdf0bda5487204e7bdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50247
Rather than nooping the RCTSurfacePresenterObserver in RCTNativeAnimatedTurboModule, we should just not register the observer when using ReactNativeFeatureFlags::animatedShouldSignalBatch.
## Changelog
[Internal]
Reviewed By: shwanton
Differential Revision: D71735004
fbshipit-source-id: 5176497197314a9b07fc9bd77828f7a2af2650ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50236
If you do something like
```
<Text>
<Text accessibilityRole="link">
I am a link!
</Text>
</Text>
```
we do not announce "link".
We skip any sort of spans on the entire text on iOS, which I feel like is not ideal. This case would be common enough, and users may not have access to the top level text component.
Note Android correctly handles this already.
Changelog: [iOS] [Fixed] - Correctly announce "link" on nested text if its the entire text element
Reviewed By: javache
Differential Revision: D71770798
fbshipit-source-id: 4a0781a95cb27cf244d6d2b1d1df8a0451964301
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50245
Follows D69867335, but uses the system `[[UIDevice currentDevice] systemName]` API to get the case sensitive OS name (as opposed to the `RCTPlatformName` concept, which is lowercase "ios").
Ultimately, this value is displayed as a user facing label in the debugger.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71809427
fbshipit-source-id: 3f62bba94df16329c934a7671bcaa489c6797cb6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50214
This diff is a second step toward the TS AnimatedProps alignment. In this change the rest of the extended types and recursions in `WithAnimatedValue` are applied.
Changelog:
[Internal] - Aligned AnimateProps to match TS types.
Reviewed By: huntie
Differential Revision: D71623036
fbshipit-source-id: d4777e25c3bf3119608938ee4cd246cdc4c4f7ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50195
In Flow, all AnimatedProps properties are set to `any` and misaligned with Typescript definitions. This diff is a first step toward the TS AnimatedProps. The problem can be broken down into a few parts, at each point more types will be extended in WithAnimatedValue and the rest will be set to `any`. This approach enables smoother migration and validation.
Changelog:
[Internal] - Check for Builtin and Nullable types in WithAnimatedValue to align closer to TS types.
Reviewed By: huntie
Differential Revision: D71551006
fbshipit-source-id: 9316227f4ba32bdaa5be8097483a03ae19bf516f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50221
This was already rolled out by default previously, but we wanted to complete further testing internally before cleaning up the flag.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D71735311
fbshipit-source-id: b9d32787081fbe3d7fb740067d3709624028fa23
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50223
This is an implementation detail of React and better not make it leak everywhere. It's not used quite often even in react-native codebase, so it's better to just suppress the error on each call site. Currently it's typed as any, so there is not much type safety lost anyways.
Changelog: [Internal]
Reviewed By: alexmckenley
Differential Revision: D71687426
fbshipit-source-id: 7373bcd9bedcfcb95a10fa02e6a04399ccab91f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50216
Call TouchesHelper directly from TouchEvent and remove the need for `RCTModernEventEmitter.receiveTouches`. This enables `Animated.Event` to process these events too, since they are now being delivered just like any other event.
Changelog:
[Android][Fixed] Enables Animated.Event to be used with onTouchMove in the new architecture.
[Android][Removed] Removed deprecated EventDispatcher#receiveTouches
Reviewed By: Abbondanzo
Differential Revision: D71114177
fbshipit-source-id: 61ca43ef5334b5514c4980a05b61b674d9a52c5b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50231
Changelog: [Internal]
RCTDeviceInfo uses KVO to listen to frame changes in the application's keyWindow. On initialization, it reads the global keyWindow and adds itself as a listener. When RCTDeviceInfo is cleaned up, it reads the global keyWindow again, and removes itself as an observer.
However, this makes an assumption that the keyWindow is always the same. This is not always true - for example, when a UIAlert is presented, the OS creates a new temporary keyWindow to host the alert in order to make sure it is the first responder. If the cleanup is called then, the app will crash because there is no RCTDeviceInfo observing it. Another example is the LogBox, which also temporarily creates a new keyWindow.
The fix is simple, we can capture a reference to the application's keyWindow on initialization, but make sure it is weakly held as the keyWindow is usually managed by iOS. Then, when we remove the listener, it is always guaranteed it is the window that we are observing.
Reviewed By: javache, cipolleschi, realsoelynn
Differential Revision: D71667722
fbshipit-source-id: 103baf980b79b413fb29e6c3deff81dae33671c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50218
These were added in D70129295 to BaseViewManager but did not exist in the JS interface.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D71737288
fbshipit-source-id: 751d26fb9116daf45d09f3853fe37cad29a8903a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49982
In D68708899, we removed dataURI inlining of sources and source maps into `Debugger.scriptParsed` CDP notifications.
After that, all message handling for which we need to preserve order is implemented completely synchronously, so there's no need for a promise queue to preserve order.
This removes the redundant queue.
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D71036230
fbshipit-source-id: d17fb7d06a038b379fe45b4e1c742dbf8ff12f78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50036
This is my friday round of fixing some warnings in our codebase.
Those are all minor bits that should be fixed.
Changelog:
[Internal] [Changed] -
Reviewed By: huntie
Differential Revision: D71209124
fbshipit-source-id: 40aa231e049025bbff9dff8a572784bb1a9f324b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50187
D70668516 broke some SSTs, where asset that previously was black, showed up as clear.
I was assuming that was because we fixed a separate bug where assets could erroneously show as black layer, but these tests were actually just using a black asset.
Real bug here, is that the change led to only setting image when we have a displayLink, ie showing on screen, where before, we set image (implicitly at first frame) as layer content.
This change fixes that behavior, so first frame is rendered as part of off-screen view rendering, for images considered animatable.
Changelog:
[iOS][Fixed] - Fix animated images missing from offscreen render
Reviewed By: cipolleschi
Differential Revision: D71590856
fbshipit-source-id: f5da690b27f2da0f6979f25ece031ff0d418cca6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50193
This fix makes sure that we convert to JSException only NSException thrwn by sync methods.
Currently, nothing in the stack will be capable of understanding that js error if it is triggered by an exception raised by an asyc method.
See https://github.com/reactwg/react-native-new-architecture/discussions/276 for further details
We need to cherry pick this in 0.78 and 0.79
## Changelog:
[iOS][Fixed] - Make sure the TM infra does not crash on NSException when triggered by async method
Reviewed By: fabriziocucci
Differential Revision: D71619229
fbshipit-source-id: b87aef5dd2720a2641c8da0904da651866370dc6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50175
This change logs warning in the RN Dev Tools and in the Xcode console when a legacy module is used through the interop layer.
The `moduleName.methodName` warning is logged only once per usage not to flood the users with Warnings.
## Changelog:
[iOS][Added] - Add warnings when a legacy module is used in the Interop Layer.
Reviewed By: cortinico
Differential Revision: D71561348
fbshipit-source-id: f3ec830ddb07c4d0ab34534ad2baf95e75b1a3b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49897
This change introduces the first warning for the New Architecture warning.
When modules are registered through the RCT_EXPORT_MODULE (or its variants) a warning is emitted.
Note: currently it is only emitted on the Xcode console.
I'm looking into ways to emit it also in the RN DevTools console.
## Changelog:
[iOS][Added] - Show warnings in the New Architecture when modules are loaded using RCT_EXPORT_MODULE
Reviewed By: cortinico
Differential Revision: D70789672
fbshipit-source-id: 06cb6cafbe7f65142a92d2e1ab9bc4ff59d0312a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50194
Changelog: [internal]
Just a small improvement of the diagram to make it more symmetrical and expand on what parts of the system are used within the rest of the RN repo.
Reviewed By: javache
Differential Revision: D71620577
fbshipit-source-id: 6b9398f416fd529eea192e82cad844212278492c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50192
Third party libraries depend transitively agains the React-renderercss modules because it is imported by Fabric.
Without this change, the use_frameworks on iOS does not works when a 3P library is imported.
This changes fix the behavior and we need to cherry pick them in 0.79.
## Changelog:
[iOS][Fixed] - Make sure 3p libraries depends on React-renderercss to work with use_frameworks
Reviewed By: fabriziocucci
Differential Revision: D71618395
fbshipit-source-id: 70c12dcbeb2dfa5fd7513c27d5c069a1f3c95966
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50170
This is needed in D71470038 and later, where submodules of `jsinspector-modern` need to operate with CDP message payloads. We functionally split out these files as a library to avaoid a dependency cycle.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D71551561
fbshipit-source-id: 527479399d7563883c1b6599f884b7857e79bd77
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49824
The way this works is each element on the list of `accessibilityElements` says that each element should go before the next element in its list. For example:
Imagine the default focus order:
```
[A, B, C, D, E]
```
If I set `accessibilityElements` to be:
```
[E, D, C, B, A]
```
That's just re ordering the focus order to be reversed, but what happens if I miss elements?
If I set `accessibilityElements` to be:
```
[D, B]
- D should go before B
```
Then my resulting order will be:
```
[A, D, B, C, E]
```
Because we follow the default order, then we find `B` but `D` should go before `B` so we first go to `D` and then finally go back to `B` and then continue our default order
This algorithm works with nested elements and it doesn't need to be exhaustive
We are also borrowing the concepts of Containers and elements from iOS.
We will disable views according to iOS logic to facilitate code shareability
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D70129295
fbshipit-source-id: 5ada03c7e5eb71a7b0a9d205296c2fa4366a3643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50080
I'm renaming ReactNativeFeatureFlagsProviderHolder -> ReactNativeFeatureFlagsJavaProvider to make naming consistent with documentation and remove the concept of "Holder" which is not part of the original design
changelog: [internal] internal
Reviewed By: rubennorte
Differential Revision: D71333170
fbshipit-source-id: be89c3aafe5d9b1c9699aff224c7c8511bdf9327
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50180
Prepare for the change that makes `React.ComponentType` an alias of `component(...Props)`, which comes with stricter checking and making the props automatically readonly.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D71566900
fbshipit-source-id: cefcc10fda9a9777532f25b325412b0d50ebb9b8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50106
## Changelog:
[General] [Added] - Create TurboModuleWithJSIBindings interface
So c++ TurboModules can initialize some private members with reference to `jsi::Runtime`
Reviewed By: lenaic
Differential Revision: D71396842
fbshipit-source-id: 59d32e4cbf2c5081912a4c828acc66ceb8702855
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50158
Compile-out UIManagerModule from FpsDebugFrameCallback
The setViewHierarchyUpdateDebugListener does not exists on Bridgeless and NotThreadSafeViewHierarchyUpdateDebugListener is deprecated and marked for deletion on the new architecture.
The new architecture exposes a different API called ItemDispatchListener that's a sort of replacement for NotThreadSafeViewHierarchyUpdateDebugListener. Although it's not the same.
FpsView is broken in old/new arch and needs to be rebuild, I believe this behavior needs to be rethinked in the future. For now I'm excluding usages of NotThreadSafeViewHierarchyUpdateDebugListener and setViewHierarchyUpdateDebugListener for apps running on the new arch enabled by default.
changelog: [internal] internal
Reviewed By: rshest
Differential Revision: D71050642
fbshipit-source-id: 662deb064ffc2322b560618fac3203ab4e86c277
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50164
Based on analysis this method is only used by legacy architecture, this diff adds an assert if NativeModuleRegistry.onBatchComplete() is used in new architecture
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D71050638
fbshipit-source-id: 7a9791230880d2431e6b136735653a8ab4c34d7d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50160
In this diff we are removing UIManagerModule from NativeAnimatedModule
This code wasn't executing when fabric is enabled, with this change the code that references UIManagerModule will be stripped out
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D71050641
fbshipit-source-id: fbedd5b9e1a9efb45c2fb7558d97fc639897c28c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50157
UIManagerType.DEFAULT is becoming confusings As we are expanding the usage of the New architecture everywhere.
That's why I'm depreacting this constant and introducing UIManagerType.LEGACY.
changelog: [Android][Deprecated] Deprecate UIManagerType.DEFAULT, replaced by UIManagerType.LEGACY
Reviewed By: alanleedev
Differential Revision: D70738948
fbshipit-source-id: 9793a6cce3b931f9c0de4e0c2026852119f392b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50172
This specific warning is only for React Native users.
We don't need this warning on console for RNtester so I'm excluding react-native-github
project from the list of project where this warning gets fired.
Changelog:
[Internal] [Changed] - Do not warn for JSC deprecation on react-native-github
Reviewed By: mdvacca
Differential Revision: D71556035
fbshipit-source-id: 8ab625eb2c090416119903dbc9c29afac51c91bd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50104
Changelog:
[General][Internal] raises an event report when an attempt to open the debugger for not supported apps is made
Reviewed By: robhogan
Differential Revision: D71398802
fbshipit-source-id: 66b90a0286ee0844ced4319381e3a0581ce540b5
Summary:
fix: https://github.com/facebook/react-native/issues/50132
The goal of this PR is to ensure selected TextInput scrolls to the selected range when text or selection change.
The background of this feature check is to implement a rich text editor.
## Changelog:
[IOS][FIXED] - Selection range not respected when changing text or selection when selection is forced
Pull Request resolved: https://github.com/facebook/react-native/pull/50166
Test Plan:
Tested with the sample linked to this pull request.
As TextInput is a controlled component
Here is a video of the sample with the patch: https://drive.google.com/file/d/1lS9_70quNqND_E8MjLFcRG6HoHcDkfmv/view?usp=drive_link
First TextInput shows the initial issue reported in the ticket.
Second TextInput shows the global behavior of the controlled component, the 2 buttons allows to force focus and the force text values
I have also backport this part on 0.77.1 and test it in my app, it works fine for me (let's see if I have QA feedback)
Reviewed By: javache
Differential Revision: D71544064
Pulled By: cipolleschi
fbshipit-source-id: ca49a3a2ca0f5f87307054efda31b0c779c31496
Summary:
Expose eager initialization method on `RCTRootViewFactory` (iOS) so that application can prepare `ReactHost`/Bridge before actually creating a root view. Then creating a root view is significantly faster.
## Changelog:
[IOS] [ADDED] - allow eager initialization of `RCTRootViewFactory`
<!-- 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/49986
Test Plan:
Invoke `initializeReactHostWithLaunchOptions:` before calling `viewWithModuleName:` and measure the time difference vs not using eager initilization:
Before
- calling `viewWithModuleName:`: 63.39ms, 47.91 ms, 60.18ms
After:
- calling `initializeReactHostWithLaunchOptions`: 52.41 ms, 81.03 ms, 60.52 ms
- calling `viewWithModuleName`: 0.49 ms, 0.63 ms, 0.47 ms
Test run 3 times on iPhone simulator on M1 mac.
Reviewed By: javache
Differential Revision: D71548601
Pulled By: cipolleschi
fbshipit-source-id: 86ecfb8bec4c2657537caf32af49545b21d3656b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50131
Outlines and stubs methods on the `NetworkReporter` class, and the `Network.getResponseBody` CDP request on `NetworkIOAgent`. Together, these form the APIs to implement for CDP network debugging.
Also updates internal mutex use to `std::atomic<bool>`.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70708526
fbshipit-source-id: f44bd0d246a38883dd591752fb2d3ed4567de4a0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50115
## 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: mdvacca
Differential Revision: D71348561
fbshipit-source-id: 1c57ba1d40b062712fd53b9dac0bc8ecd60b425d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50113
## 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: mdvacca
Differential Revision: D71348559
fbshipit-source-id: 918f145d817866a5d08087c1a4a0e151f783109e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50112
## 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: mdvacca
Differential Revision: D71347448
fbshipit-source-id: f62a92a35011a7c8de0a7ee35047cc94f23106d1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50109
## 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: mdvacca
Differential Revision: D71347449
fbshipit-source-id: 1fa010fd08a2d0b809f36a4c8df973b86e4610f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50111
## 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: mdvacca
Differential Revision: D71480047
fbshipit-source-id: e36a4dd317bbbf46a6766f01fbf4d69a83a45c17
Summary:
We will use main queue setup of native modules to solve this problem instead.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71341038
fbshipit-source-id: 77e2064c732a5572d063a240f769fa7a79530f1b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50040
This diff implements main queue module setup.
Sometimes, people need to capture uikit things, and use them from javascript. In those cases, people can write main queue modules. These modules will be eagerly initialized on the main queue, during react native init.
## On Necessity
**Sync** dispatches to the main thread from the js thread can deadlock react native. And **async** dispatches to the main thread from the js thread sometimes might not be enough: it could lead to flickery rendering. So, we need to allow people to capture ui thread things, before any js executes.
## Caveat
This api is dangerous and discouraged. All react native surfaces will pay the cost of one surface introducing a main queue module. It could also slow down common/critical interactions in your app, if you're not careful.
We will introduce performance logging for this infrastructure. So that we can monitor and file tasks, when main queue module init starts taking "too long."
Changelog: [General][Breaking]: Introduce beforeload callback arg into ReactInstance::loadScript
Reviewed By: mdvacca
Differential Revision: D71084243
fbshipit-source-id: 8fdb84761ac69468afc428f4f79eff6322449e3c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49957
## Changes
This diff introduces the api for "main queue modules" into turbo modules.
This will occur occurs before any rendering.
## Rationale
Rendering can now include main -> js sync calls. If we allow js -> main sync calls during rendering, react native can deadlock.
With this diff, we can move the js -> main sync calls to before any rendering happens.
## APIs
**Buck API:**
Plugin:
```
react_module_plugin_providers(
name = "AccessibilityManager",
native_class_func = "RCTAccessibilityManagerCls",
unstable_requires_main_queue_setup = True,
)
```
**OSS API:**
[codegenConfig](https://reactnative.dev/docs/the-new-architecture/using-codegen) in package.json:
```
"codegenConfig": {
"name": "<SpecName>",
"type": "<types>",
"jsSrcsDir": "<source_dir>",
"android": {
"javaPackageName": "<java.package.name>"
},
"ios": {
"modules": {
"AccessibilityManager": {
"className": "RCTAccessibilityManager",
"unstableRequiresMainQueueSetup": true
}
}
}
},
```
Changelog: [iOS][Added] Introduce unstableRequiresMainQueueSetup api to modules
Reviewed By: cipolleschi
Differential Revision: D70413478
fbshipit-source-id: 78d89437c2869a979ae5c94f08b01087686dfae7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50140
Extends `react-native-codegen` to support the `.fb` filename suffix used to gate source code that is only relevant for Meta internal use cases.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D70808462
fbshipit-source-id: a6772d6504f76724b8474df6799bc69a76a2f81b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50147
Noticed a couple bugs here, around a crash from assertion internal to the caching map which hashes on the AttributedString, that may or may not be related.
1. We are missing `baseTextAttributes` for both hashing and equality (which is mostly innocuous, but still wrong)
2. We were not hashing or comparing `textAlignVertical`
3. For equality, we were comparing parent shadow view tag and metrics, but for hashing, we were hashing the whole ShadowView.
I think #3 could cause issues, since we could see different hash despite equality, which could break invariants.
Changelog: [Internal]
Reviewed By: lunaleaps
Differential Revision: D71500246
fbshipit-source-id: 462749d5ca10d10bf0dab88089253a2bb8e603fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50139
adding this event to Pressable because it is going to be consumed after to track if pressable location is moved
Changelog:
[General] [Added] - Expose `onPressMove` as base prop for `Pressable`
Reviewed By: thurn
Differential Revision: D71429258
fbshipit-source-id: 79acaa735764a47a21d89042d3e4b9c114c72950
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50117
D70870978 failed the compat check because it modified a union by removing an element in the middle:
```
'global' | 'self'
```
from
```
'global' | 'application' | 'self'
```
This caused the compat check to complain that index 1 in both unions: `self` didn't match `application` and thus it was a type incompatibility.
We should have been comparing these as an unsorted array of options, which first sorts, then treats differences as added/removed elements instead of incompatbile elements.
If in the example above the removed element was the last one from the union, it would have been fine.
Once these are classified as added/removed, the VersionDiffer is able to check whether that change is allowed in fromNative or toNative.
Changelog: [General][Fixed] Compatibility Check: Allow union changes when the new element is in the middle of the union
Reviewed By: makovkastar
Differential Revision: D71433054
fbshipit-source-id: 20a73f0ba0576daf30cec97bae969b31baf7f468
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50135
We settled on a different name here so gotta change some code with the old name. This is not exposed yet so this change is chill
Changelog: [Internal]
Reviewed By: jorge-cab
Differential Revision: D71471884
fbshipit-source-id: c30384802ef51e5aae830b27299859db05f2520b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50075
This is an exploratory change to see how it will look like to build core from SPM.
In this change we are building three pieces of React native (using the Podspec names for simplicity):
- React-jsi
- React-debug
- React-logger
- React-MapBuffer
They depends on a local ReactNativeDependency.xcframework we can build using the prebuild-io script.
## CHANGELOG:
[INTERNAL] - set up initial Swift PM configuration
Reviewed By: cortinico
Differential Revision: D70567840
fbshipit-source-id: 3f65a3e7c3dd39f71f6d4c04726712a5968e0a97
Summary:
This PR fixes https://github.com/facebook/react-native/issues/48657
- Memory usage for creating a blob lowered from _( nearest 2^N greater than the file size)+1KB_ previously To _(file size)+1KB_. This is achieved by avoiding internal calls to java.io.ByteArrayOutputStream.ensureCapacity by creating a buffer based on file size.
- Increases the max file size a Blob can be created from before hitting a OutOfMemoryException.
- Major performance increase by avoiding buffer copying
## Changelog:
[ANDROID] [CHANGED] - Speed and Memory usage improvements to Android Blob support
[ANDROID] [FIXED] - Creating of Blobs from large files now works. File size can now be upto available (free) heap size.
Pull Request resolved: https://github.com/facebook/react-native/pull/50121
Test Plan: Used the App here to test Android Blob creation. https://github.com/giantslogik/blob-large-file-fetch.
Reviewed By: cortinico
Differential Revision: D71464835
Pulled By: javache
fbshipit-source-id: 38de7d83bcaee265fc6e7183f6b1160027cd4cb2
Summary:
In the final XCFramework we no longer need to place resource bundles in a subfolder called Resources - they should be located directly in the framework folder.
This commit fixes this by removing copying to the Resources folder. I also removed a few unneeded tests since we know that we are in a valid folder at this point.
bypass-github-export-checks
## Changelog:
[INTERNAL] - Moved resource bundles up one level
Pull Request resolved: https://github.com/facebook/react-native/pull/50101
Test Plan: Run RNTester with RCT_USE_RN_DEP=1 and verify that it launches
Reviewed By: cortinico
Differential Revision: D71464608
Pulled By: cipolleschi
fbshipit-source-id: 6cfdda0c6785ffeb13c170f9fd2dd9f5b889d490
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49998
We have listeners for EventDispatcher, but we don't have any listener capabilities for synchronous hooks from events on the UI thread.
This proposal adds an affordance for generic event listeners that can be attached by the host platform mounting manager, e.g., to wire events to NativeAnimated event drivers.
## Changelog
[General][Added] - EventEmitter `addListener` and `removeListener` APIs
Reviewed By: javache
Differential Revision: D71050838
fbshipit-source-id: a7f298c71bd882a573781c2fe1fb5a1ae79f301c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50032
In the new architecture, Android dispatches all events with folly::dynamic payloads. Various other callsites in some host platforms similarly dispatch events with folly::dynamic payloads.
Events disptached with folly::dynamic payloads have alignment with the `EventPayload::extractValue` method, added for integration with other capabilities like native animations.
When combined with a general pupose synchronous listener on facebook::react::EventEmitter, this should allow easier integration with host platform native event animation drivers.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D71198197
fbshipit-source-id: 5e49e3b0fb01079870fbc7fc7e74ca0db354cda5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49988
NativeAnimated currently depends on folly::dynamic event payloads for event-driven animations. While some events (e.g., ScrollEvent.h) have an `asDynamic` implementation, not all events do. In practice, NativeAnimated just needs to be able to extract an numeric value from a path to drive an animation.
Rather than converting events to dynamic, or otherwise special casing event handling, this change allows arbitrary payloads to implement `EventPayload::extractValue` to retrieve JS property path values directly from events, without intermediate conversions to dynamic.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D71046682
fbshipit-source-id: 3544335ff9d50da87ced015de587b97204173b57
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49848
Adds a new method to reset the server host in PackageConnectionSettings to its default state rather than relying on providing a blank string
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70584220
fbshipit-source-id: 2862eee5f71bfe318da7199f2288367433d6f887
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50100
While moving the generation of `ReactCodegen.podspec` from Cocoapods to Codegen, we wrongly copied some parts of the script and now it is generating folders with a `,` as a suffix.
This change fixes the problem and prevent the generation of such folders.
## Changelog:
[Internal] - Avoid generating `ios,` folders
Reviewed By: fabriziocucci
Differential Revision: D71395049
fbshipit-source-id: 1e6024af6e24834a682865792e64d056fb94e027
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50068
Note: this involved tightening up some signatures in Kotlin files
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DevSupportManagerBase.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126381
fbshipit-source-id: 01c08e2fc61eff885911fa9c295d504fa7ea334c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50067
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126382
fbshipit-source-id: d90966e62372395e864425c82321dc1fc04c1413
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50066
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made BundleDownloader.java nullsafe
Reviewed By: alanleedev
Differential Revision: D71126383
fbshipit-source-id: 94e9e9dfc1db83d32046e370c895fa889dabf116
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50065
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126388
fbshipit-source-id: a9f08b4ce101202cebe13107cc9c6a660deaf58f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50064
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DebugOverlayController.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126394
fbshipit-source-id: 77bba33f4f14566e133fa9e9649631bcffa3f0c9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50063
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126397
fbshipit-source-id: b1cdea896d6cd9d25f9075e0bf35b9e16bf6ef65
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50062
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made CxxInspectorPackagerConnection.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126386
fbshipit-source-id: 94b6fca6972e5f08c22df7bebe6f853b5ceb20a7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50061
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126390
fbshipit-source-id: 8ab63944b0e6ce3c78b14414e8a992c1321114f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50060
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made DevServerHelper.java nullsafe
Reviewed By: rshest
Differential Revision: D71126391
fbshipit-source-id: 0d39b23d0d96f32f25ac1003d849428000777852
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50059
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126395
fbshipit-source-id: fb42b12dae542bde6e0e9e58baeaab054ed8c49e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50058
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made JSDebuggerWebsocketClient.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126385
fbshipit-source-id: 8707e8c6b8092c0c301dc81a363758b60f38086a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50057
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126392
fbshipit-source-id: 96464734a2edc7ec242cd3f3646222587d89eb2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50056
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made MultipartStreamReader.java nullsafe
Reviewed By: mdvacca
Differential Revision: D71126393
fbshipit-source-id: 3b621be82cd874c608cb610ba35dff0be7cbd195
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50055
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126389
fbshipit-source-id: f41d3fbdfdfcde28a8bfc1d52efaca6a8b0fcb1a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50054
Gone trough all the FIXMEs added in the previous diff by the nullsafe tool, marked the class as nullsafe and ensured no remaining violations.
Changelog: [Android][Fixed] Made StackTraceHelper.java nullsafe
Reviewed By: javache
Differential Revision: D71126387
fbshipit-source-id: 3456dde049b50e48ad703fe8312cf57b8d849515
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50053
Note this diff is only adding FIXMEs that will be removed in the next diff. This diff exists to make the next diff easily reviewable
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D71126384
fbshipit-source-id: 6a2e348f75b0b589de080bf060c4669db82a69c6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50091
Changelog: [internal]
If a library uses mount hooks to perform mount operations, it's possible to get concurrent modifications of the list of pending surface IDs to report.
This fixes that potential error by making a copy of the list before dispatching the mount notifications.
Fixes https://github.com/facebook/react-native/issues/49783.
Reviewed By: javache
Differential Revision: D71387739
fbshipit-source-id: 96c723ef2d6bcc659c4452434b7a4d5af26117ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50090
Changelog: [internal]
I refactored `FabricUIManager` in D54547194 / https://github.com/facebook/react-native/pull/43337 and accidentally removed setting this flag to avoid scheduling redundant tasks in the UI thread to report mount. This fixes it.
Reviewed By: javache
Differential Revision: D71387374
fbshipit-source-id: cad8a3ead2434738325560902cbab817e5d5dde7
Summary:
Headers are currently copied into each arch in the final xcframework. This is not necessary and will cause a lot of duplication since these files are the same for all archs.
This commit fixes this by only copying headers when we build the final XCFramework:
- ReactNativeDependencies.podspec: Changed the prepare script to be more resilient to different header structs, since we have multiple ways of packaging our tarballs locally and on the servers
- build.js: Removed copying headers when building frameworks
- compose-framework.js: Added copying headers once to the root of the XCFramework.
- rndependencies.rb: updated docs with correct ENV vars
bypass-github-export-checks
## Changelog:
[INTERNAL] - Changes the header structure in our XCFramework to avoid duplication
Pull Request resolved: https://github.com/facebook/react-native/pull/50085
Test Plan: Run RNTester with RCT_USE_RN_DEPS=1 to use prebuilt RN Deps.
Reviewed By: javache
Differential Revision: D71385183
Pulled By: cipolleschi
fbshipit-source-id: 160d56dea7f61d1b8d0a45b80f6c0789647358e6
Summary:
We had some issues with the Swift package build step where we saw an error message when we included resources and couldn't find out why this was happening.
After systematically going through the generated swift package file and looking for a reason I found a mistake.
When we generate the Package.swift file we pass all compilerFlags from the configuration of the target to both cpp/c flags - which in the case of the folly target ends up being passed to the dependency scanner which isn't too happy about this c++ flag.
The solution was to split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.
This commit fixes this by:
- split `compilerFlags` into `cCompilerFlags` and `cxxCompilerFlags`.
- Updated configuration with correct settings
- Updated Package.swift generation to use these new flags
- Fixed issue with the copy bundles step that didn't copy the directory in some cases.
## Changelog:
[INTERNAL] - Fixed processing resources in the generated swift package for the RN Dependencies/prebuild
## Test-plan
Test by prebuilding RNDependencies, include the XCFramework in a new app and try to load resource bundles:
```obj-c
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
std::string input = "3.1416 xyz ";
double_conversion::DoubleToStringConverter::EcmaScriptConverter();
LOG(INFO) << "Hello from GLOG";
fmt::print("Hello, world from FMT!\n");
BOOST_ASSERT(100 == 100);
double result;
fast_float::from_chars(input.data(), input.data() + input.size(), result);
LOG(INFO) << "Answer :" << result;
NSArray *frameworks = [NSBundle allFrameworks];
for (NSBundle *framework in frameworks) {
NSString *frameworkName = framework.bundleURL.lastPathComponent;
if ([frameworkName isEqualToString: @"ReactNativeDependencies.framework"]) {
[self loadBundle:framework bundleName:@"ReactNativeDependencies_glog"];
[self loadBundle:framework bundleName:@"ReactNativeDependencies_boost"];
[self loadBundle:framework bundleName:@"ReactNativeDependencies_folly"];
break;
}
}
return YES;
}
- (void) loadBundle:(NSBundle*)framework bundleName: (NSString*)bundleName {
NSBundle *bundle = [NSBundle bundleWithURL:[framework bundleURL]];
NSURL *bundleURL = [bundle URLForResource:bundleName withExtension:@"bundle"];
NSBundle *resourceBundle = [NSBundle bundleWithURL:bundleURL];
NSURL* url = [resourceBundle URLForResource:@"PrivacyInfo" withExtension:@"xcprivacy"];
if (url == nil) {
LOG(ERROR) << "Could not find PrivacyInfo.xcprivacy in the " << [bundleName UTF8String] << " bundle";
} else {
LOG(INFO) << "Found PrivacyInfo.xcprivacy in " << [bundleName UTF8String] << ".";
}
}
```
Pull Request resolved: https://github.com/facebook/react-native/pull/50050
Reviewed By: javache
Differential Revision: D71316215
Pulled By: cipolleschi
fbshipit-source-id: 53093f962874101f5618997fdac3dd4550768da5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50092
`oldProps` can be null, so this is an unsafe dereference. We also typically compare with `_props`, which represents the previous state of the component.
Changelog: [General][Fixed] Fixed crash in RCTPullToRefreshViewComponentView#updateProps
Reviewed By: cipolleschi
Differential Revision: D71388015
fbshipit-source-id: deff9c581ee207c4481056a720c10dfd661f088d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50088
Changelog: [internal]
This fixes a crash when using the `fixMountingCoordinatorReportedPendingTransactionsOnAndroid` feature flag. The problem was that we were accessing the surface handler registry safely, but there were cases where invalid surface handler references were being kept in the registry.
Reviewed By: javache
Differential Revision: D71387111
fbshipit-source-id: 643fcdf10c4c5751d77e276efb37795b7af726bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50077
Currently, `DevServerHelper` will fetch malformed URLs if the supplied `resourcePath` has a leading slash.
This diff adds a warning and automatically trims the leading slash when this happens.
Changelog:
[Android][Changed] - Leading slash supplied to `DevServerHelper.downloadBundleResourceFromUrlSync` will now be trimmed and emit a warning.
Reviewed By: robhogan
Differential Revision: D71333088
fbshipit-source-id: 636c9c6c6919d1e9d4a829ed5ae7253f829e549c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50071
Pull Request resolved: https://github.com/facebook/react-native/pull/50070
Changelog:
[General][Internal] Send code and close reasons when we close the connection to any websockets from the dev middleware
This should improve the debuggability of our code.
Reviewed By: robhogan
Differential Revision: D71314509
fbshipit-source-id: 1d6fc57a8601bcea78e95a87d423c7c46c51e799
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49950
Changelog: [GENERAL][CHANGED] - Changed `react-native-codegen` to support types under `CodegenTypes` namespace
## Summary
Currently, codegen relies on deep importing types under `react-native/Libraries/Types/CodegenTypes` to be properly type-checked. Updating codegen to support types under a single namespace will enable us to provide a single import from the package with access to all relevant types.
Reviewed By: huntie
Differential Revision: D70967809
fbshipit-source-id: 41241dcc51965f4243acd34e8b63475cb56ca67a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50030
In Flow importing Node from react is equivalent importing ReactNode in Typescript. During translation Node is not translated to ReactNode but React.Node is translated to React.ReactNode. The easiest solution is to migrate all "Node" types to "React.Node" so that the translation is correct. To make sure that everyone follow the lint rule is added that checks for Node imports from react.
Changelog:
[Internal] - Added lint rule preventing "Node" imports from react and migrated "Node" types to use React namespace in react-native
Reviewed By: javache, huntie
Differential Revision: D71189533
fbshipit-source-id: baea8feb46be3dc30b6e58bcefe140655ec0530a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50027
Changelog: [IOS][CHANGED] - Overwrite betterHitTest in RCTScrollViewComponentView instead of changing layout metrics of the container view
## Summary:
In https://github.com/facebook/react-native/pull/49855 I changed the container view of `RCTScrollViewComponentView` to be `RCTViewComponentView` instead of `UIView` so the touches would bass through its `betterHitTest` implementation (along with udating its layout metrics so the right path in the function is chosen). This resulted in some issues and the alternative approach of customizing the hit testing of the ScrollView itself might be a better approach.
This PR changes overwrites the `betterHitTest` method in a way that the `containerView` is entirely skipped during hit testing, instead forwarding the call to its children. This way, it won't prevent touches outside its frame from being delivered to children that extend out of the frame.
Reviewed By: cipolleschi
Differential Revision: D71187882
fbshipit-source-id: 9d0c79048f389b9bee37dea1e59226b54ddbe6f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50028
Changelog: [IOS][CHANGED] - Replace a workaround for measuring multiline text with `maximumNumberOfLines` on iOS with a proper solution
## Summary:
In https://github.com/facebook/react-native/pull/49549 support for `numberOfLines` was added to iOS `TextInput`. Along that, a workaround for measuring multiline text with limited number of lines was added to avoid an edge case coming from `NSTextContainer` measuring empty lines even if they are over the line limit.
This PR handles that case properly by counting and measuring individual lines to properly handle the offending edge case.
Reviewed By: NickGerleman
Differential Revision: D71111841
fbshipit-source-id: 6adb4450a13fcc845604622ea76576658a7537aa
Summary:
As discussed with huntie, this is not a breaking change.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: huntie
Differential Revision: D71201094
fbshipit-source-id: 3a27e621ac7718e4574c7981e5d64802e36e74cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50035
changelog: [internal]
to make it easier to write JSDocs, let's export functions directly from index.js instead of using proxy object.
Reviewed By: rubennorte
Differential Revision: D71200977
fbshipit-source-id: 0b53c0d3f73577c19253537b9e884459a4920643
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50022
RCTHostTests.mm calls `makeHermesRuntime`, which is from `hermes.h`. Explicitly include the header so that RCTHostTests isn't getting it indirectly.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D71146426
fbshipit-source-id: 5a5f5a466e1920797c4531773ca23f53eb1203b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50033
changelog: [internal]
All public APIs should be covered with tests, this diff adds tests for Fantom.scheduleTask.
Reviewed By: rubennorte
Differential Revision: D71195921
fbshipit-source-id: dc7f0f889b9633b1e641dc8887fd506bc4753fe5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50013
The diff incorporates event-target-shim types that will be referenced by generated TS types to make sure that the public API does not change unexpectedly. The generated tsconfig contains path property which tells Typescript to use copied types instead of the downloaded event-target-shims types.
Changelog:
[internal] - Moved event-target-shim types to react-native package.
Reviewed By: huntie
Differential Revision: D71044389
fbshipit-source-id: b2837cc880a2161f7ff716470fd6eb4644d514e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50019
Changelog: [internal]
This adds some basic tests for the API to show that it's working correctly.
This was in response to https://github.com/facebook/react-native/issues/49684. If there are use cases that we think are incorrectly handled, we should add them to this test.
Reviewed By: cortinico
Differential Revision: D71128943
fbshipit-source-id: 73876ba514c23ec8f829723500fa408512b90222
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49942
iOS flushes NativeAnimated operations to the UI thread in one of two ways:
1. Some operations flush immediately when the operation is queued, namely startAnimation, stopAnimation, and setValue.
2. Other operations rely on flushing from one of the previous operation types, or a UIManager mount callback.
This behavior leads to non-determinism in flushing of some operations like `setOffset` or `startListeningToAnimatedNodeValue`, where if these operations are created, out-of-band from "flushed" operations, they will not take affect until the next React commit.
This change wires up the `animatedShouldSignalBatch` feature flag to queue operations on the JS thread, and flush them after `NativeAnimated.finishOperationBatch` is called.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D70904592
fbshipit-source-id: 6bc7a8614cbe5e275d4d7bf5310da9f0090c0e10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49989
Changelog: [internal]
This experiment didn't yield any significant wins and there are some failing e2e tests which seem suspicious, so better be safe and keep the current version.
Reviewed By: javache
Differential Revision: D71050517
fbshipit-source-id: da14fdd49e8d39cdcdc1dd579a50af3bf894d08a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50014
This was unintentionally made public during the Kotlin migration (D67791375), revert back to internal visibility, and update some of the deprecation comments.
Changelog: [Android][Removed] TouchesHelper is no longer part of the public API
Reviewed By: Abbondanzo
Differential Revision: D71114176
fbshipit-source-id: 2bd8882039fb972e1c2632a503292080c56a2f22
Summary:
If you use this preset to create library code, it is often helpful to be able to still read the transpiled code, even when sourcemaps are available.
This change adds a compact option which allows for disabling the default behavior that removes whitespace from the transpiled files.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [ADDED] - Add `compact` option to `react-native/babel-preset` to allow disabling whitespace removal
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/49979
Reviewed By: rshest
Differential Revision: D71109024
Pulled By: robhogan
fbshipit-source-id: ab205cca2a82b56955d1e1c55e288dcbe7754f8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50002
Creates a new feature flag, `avoidAnimatedRefInvalidation`, to experiment with changing `useAnimatedProps`, so that the returned ref callback is no longer invalidated when `props` changes.
When we introduced `useAnimatedPropsMemo` and stabilized `AnimatedProps` (which is only invalidated when `AnimatedValue` and shallow `AnimatedEvent` instances are changed in an update), we should have also made this change. It was an oversight that we did not do this.
Avoiding unnecessary invalidation of the ref callback is important to reduce extra work and unpredictable semantics associated with unnecessary detaching and re-attaching of refs.
Changelog:
[Internal]
Reviewed By: lunaleaps, jbrown215
Differential Revision: D71074781
fbshipit-source-id: 82386a79b8e9bed0b74d9b85978af66f453a7ad0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49991
This change adds nightly support for prebuilds.
t works the same way hermes works: if the react native version contains nightly, we try to use that version to download the right tarball.
To work, it needs to use the `RCT_USE_RN_DEP` env variable.
## Changelog
[Internal] - Add Nightly support to consume ReactNativeDependencies
Reviewed By: cortinico
Differential Revision: D71050926
fbshipit-source-id: 9f461b5f17fde960d92b4082bc60f76959e82cdf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49978
This change connects the RNDependencies we prebuild in CI with the other iOS jobs we have.
By doing so, we aim to speed up the build time in CI, saving time and money.
## Changelog:
[Internal] - Connect the ReactNativeDependencies in CI
Reviewed By: cortinico
Differential Revision: D71034587
fbshipit-source-id: 14f1237f4fb57ee103a80be1718042d66ff7b0d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49970
This change add supports to pass a tarball from a local file to the ReactNativeDependencies podspec, so that we can build React Native using a local copy or the RNDependencies and we can use it also in CI.
## Changelog:
[INTERNAL] - Add support for local tarballs
Reviewed By: cortinico
Differential Revision: D71032641
fbshipit-source-id: d83c96c8c12f3add45f8f5ea15fa0eac06d0bedf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49968
Updates all the core podspec to use the new `ReactNativeDependencies` podspec
## Changelog:
[INTERNAL] - Updates Modules in core to use the new dependencies.
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: cortinico
Differential Revision: D71032639
Pulled By: cipolleschi
fbshipit-source-id: e53179a8c1b47ee2b945f5cb5dfaf3f6f2755af2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49971
Updated the Cocoapods infrastructure to use the new the `ReactNativeDependencies.podspec`
## Changelog:
[INTERNAL] - Configured the Cocoapods infra to use the new `ReactNativeDependencies.podspec`
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache, cortinico
Differential Revision: D71032638
Pulled By: cipolleschi
fbshipit-source-id: 154c8891d5b8b4b84952274c169479122a4800b1
Summary:
There are two environment variables that is related to ReactNativeDependencies:
- `RCT_USE_DEP_PREBUILD `: If set to 1, ReactNativeDependencies will be built from source.
- `RCT_DEPS_VERSION`: If set to 1, it will override the version of ReactNativeDependencies to be used.
bypass-github-export-checks
## Changelog:
[INTERNAL] - Introduced functions to configure ReactNativeDependencies in Cocoapods
Pull Request resolved: https://github.com/facebook/react-native/pull/49812
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache
Differential Revision: D70968672
Pulled By: cipolleschi
fbshipit-source-id: bb93e763bd71cec7314565b5a751b226735b404e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49969
Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies.
## Changelog:
[INTERNAL] - Configure folly in a prepare step
Test Plan:
✅ Run Rn-Tester and verify that it works as expected both building deps from source and using prebuilt tarballs
✅ Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities
Reviewed By: javache
Differential Revision: D71032640
Pulled By: cipolleschi
fbshipit-source-id: a34a9b38fa5d5b37a0a193a73659f0d45dd3d660
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50008
The diff adds extraction of triple-slash directives using regex to match and retrieve following reference.
Changelog:
[internal] - Added support for triple-slash directives in generated .d.ts files
Reviewed By: huntie
Differential Revision: D71113674
fbshipit-source-id: 2207d5b455515c44ba585ffecc063914e0818e58
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50011
changelog: [internal]
Majority of time, you want to simply scroll. This diff introduces a convenience method Fantom.scrollTo.
Previously, you would have to write:
```
Fantom.runOnUIThread(() => {
Fantom.enqueueScrollEvent(element, {
x: 0,
y: 60,
});
});
Fantom.runWorkLoop();
```
Now, you can just do:
```
Fantom.scrollTo(element, {
x: 0,
y: 60,
});
```
Reviewed By: rubennorte
Differential Revision: D71113680
fbshipit-source-id: aed49a2f12be8ab30be549235cc7a2b3e35faadb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50009
changelog: [internal]
rename method `scrollTo` to `enqueueOnScrollEvent` to make it obvious that event is only enqueued and not executed.
Reviewed By: rubennorte
Differential Revision: D71027761
fbshipit-source-id: 8a22babc2f5e86196c0b0af75ab65d539048dc72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49975
Removes the "Plugins" category from the non-structural grouping of exports in `index.js`, `index.js.flow`, aligning these with the "APIs" and "Components" categories in our docs.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D71033295
fbshipit-source-id: bd39bb6ff5e30c1ed0a8d56d1ed61d52120fb776
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49990
Changelog: [internal]
This cleans up the flag and makes the Document API essentially part of the DOM APIs flag, after we've verified this is stable in a production experiment.
Reviewed By: sammy-SC
Differential Revision: D68772174
fbshipit-source-id: 3b3d0c4369a648faab3dc7caed8eec2c95fa05b3
Summary:
Android's onAnimationEnd callback is lossy and ocasionally just does not fire. However the LayoutAnimationController maintains a sparse array of animations (with Strong View refs) that is only cleaned when the onAnimationEnd callback is invoked. This results in a leak of Android View objects over time.
To avoid this, the Strong View refs are migrated to WeakReference's and the associated sparse array is cleaned of any invalid layout animations in response to the reset() call.
This closes two leaks:
1. Unbound growth in LayoutAnimationController::mLayoutHandlers
2. Pinning View objects into memory as the sole remaining GC root
## Changelog:
1. Made OpacityAnimation and PositionAndSizeAnimation classes hold weak refs to views only
2. Added a method to LayoutHandlingAnimation to surface if their view ref is gone
3. Added cleanup for Animation with bad view refs
Pick one each for the category and type tags:
[ANDROID] [Fixed]- Fixes memory leak
Pull Request resolved: https://github.com/facebook/react-native/pull/49959
Test Plan: * Primarily code inspection and regression given the intermittent nature of Android's failure to execute the callback.
Reviewed By: alanleedev
Differential Revision: D71037262
Pulled By: javache
fbshipit-source-id: 1fa4eaa2ca839f347a55cb37e2648db972748586
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50001
Updates `react-native/.flowconfig` with the following option:
```
react.runtime=automatic
```
This adjusts Flow to model the current behavior of React and JSX, relaxing the requirement that JSX elements have `React` within scope.
Changelog:
[General][Changed] - Changed Flow for the React Native monorepo, so that `React` no longer has to be in scope when using JSX.
Reviewed By: javache
Differential Revision: D71096283
fbshipit-source-id: 65762ac39206c682b7be5d3f512b2b83f7eb1b49
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50000
This adds some tests that verify that controlled textinput, via text prop, or children creating attributedstring, does not jumble text, so long as JS side does not mutate underlying text content.
The rewriting/max length example does still run into problems here.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71076703
fbshipit-source-id: 85995e8cc087533b1115f158ba5dad67ed008289
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49999
Changelog: [Internal]
Early initialize call to RCTScreenSize which is used by Modal and will read screen size off the UI Thread to avoid main thread deadlocks
Reviewed By: sammy-SC
Differential Revision: D70999156
fbshipit-source-id: 47fb8666c3330ee67cbcb430060f0cec37ec3c7c
Summary:
We were missing some null checks that could cause a crash.
There seems to be some cases where either the parent or the currently focused View are present on Android's hierarchy but not present on the Shadow Tree, in this cases we can just return a nullptr to fall back to default focusing behavior on Android.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D71050870
fbshipit-source-id: a4b4e533c4e9a59c53190feb4b23db4b436b8ae9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49987
I went through the whole changelog for 0.79 and applied categories to all the entries + did some significant cleanup (remove some entries that were actually internals, grouped and sorted various items)..
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D71003373
fbshipit-source-id: 5a95e619f1cf2ffc84263b92104efee16fd74e53
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49941
This diff introduces annotations into the ios codegen config!
## Before
In the new architecture, people can declare module/component codegen config in [package.json](https://reactnative.dev/docs/the-new-architecture/using-codegen#configuring-codegen)
This config contains the following maps:
- modulesConformingToProtocol
- modulesProvider
- componentProvider
```
"codegenConfig": {
"name": "HelloWorldSampleModule",
"type": "all",
"jsSrcsDir": "specs",
"android": {
"javaPackageName": "com.helloworld"
},
"ios": {
"modulesConformingToProtocol": {
"RCTImageURLLoader": [
"RCTHelloWorldImageURLLoader"
],
"RCTURLRequestHandler": [
"RCTHelloWorldURLRequestHandler"
],
"RCTImageDataDecoder": [
"RCTHelloWorldImageDataDecoder"
]
},
"modulesProvider": {
"HelloWorldImageURLLoader": "RCTHelloWorldImageURLLoader",
"HelloWorldURLRequestHandler": "RCTHelloWorldURLRequestHandler",
"HelloWorldImageDataDecoder": "RCTHelloWorldImageDataDecoder"
},
"componentProvider": {
"FooComponent": "RCTFooComponentClass"
}
}
```
## After
This information is a little bit easier to understand if we group it by module/component (into **annotations**):
(that's what this diff does!)
```
"codegenConfig": {
"name": "HelloWorldSampleModule",
"type": "all",
"jsSrcsDir": "specs",
"android": {
"javaPackageName": "com.helloworld"
},
"ios": {
"modules": {
"HelloWorldImageURLLoader": {
"conformsToProtocols": ["RCTImageURLLoader"],
"className": "RCTHelloWorldImageURLLoader"
},
"HelloWorldURLRequestHandler": {
"conformsToProtocols": ["RCTURLRequestHandler"],
"className": "RCTHelloWorldURLRequestHandler"
},
"HelloWorldImageDataDecoder": {
"conformsToProtocols": ["RCTImageDataDecoder"],
"className": "RCTHelloWorldImageDataDecoder"
}
},
"components": {
"FooComponent": {
"className": "RCTFooComponent"
}
},
}
```
## Migration
The old way is still supported (for now). We will deprecate it soon, and eventually remove it from react native!
Changelog: [iOS][Added] - Codegen: Introduce module/component annotations inside package.json
Reviewed By: mdvacca
Differential Revision: D70822061
fbshipit-source-id: 87ec5664a551c54b9300ba92987f237a601ccfbf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49940
This will just make sure that we don't unintentionally break this script.
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D70919549
fbshipit-source-id: 6d9f2acca46486f1c920afed69609c70f53e6b18
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49992
changelog: [internal]
View culling does not play along with view flattening/unflattening. This diff adds a test case for it + fix. Previously, view culling would crash.
There are still untested branches of view flattening/unflattening where I am trying to come up with test cases.
Reviewed By: rubennorte
Differential Revision: D71047032
fbshipit-source-id: 9f52473743755e49e4bfda0783803cb79591ca27
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49908
There are various batching mechanisms across react-native platforms. The NativeAnimated startOperationBatch and finishOperationBatch methods are a useful way to signal that complete animation graphs are established for atomic flushes to the UI thread.
Setting up this feature flag for use across non-Android React Native platforms.
## Changelog
[Internal]
Reviewed By: javache
Differential Revision: D70827938
fbshipit-source-id: 4c4a74e9a11f75090152637d6195092f5af866a0
Summary:
This PR (https://github.com/facebook/react-native/pull/48182) introduced skipping hidden folders during Codegen generation.
However, when using pnpm, all files are stored in the `.pnpm` folder (see explanation here: https://pnpm.io/symlinked-node-modules-structure).
As a result, some libraries that support the new architecture but lack the `ios.codegenConfig.componentProvider` field - like [FlashList](https://github.com/Shopify/flash-list/blob/main/package.json) - will be skipped during Codegen generation.
This PR explicitly includes `.pnpm` to prevent this issue.
## Changelog:
[iOS][Fixed] - Check .pnpm folder when looking for third-party components.
Pull Request resolved: https://github.com/facebook/react-native/pull/49983
Test Plan:
Tested on:
RN 0.78.0
PNPM: 10
Flashlist: 1.7.3
Reviewed By: cipolleschi
Differential Revision: D71047936
Pulled By: cortinico
fbshipit-source-id: fa9caab23dea8c92ef5f23c997812d348eb19e08
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49981
Changelog: [internal]
(because MutationObserver isn't a public API yet)
## Context
`MutationObserver` is a [JavaScript API](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) used to report mutations in the DOM tree. The mutations available on Web are: changing children, changing attributes and changing text. In React Native, only changing children is supported.
Mutation detection needs to happen synchronously when mutations happen (in ShadowTree commits) and the notification is dispatched as a microtask in JS, which means we can only report mutations happening in JavaScript.
There's an assumption that only React (in JS) can change the structure of the tree in Fabric, so we implemented `MutationObserver` considering this assummption.
Unfortunately, while the assumption is correct (we can only mutate children from React) the implementation didn't take into account that commit hooks were triggered from multiple threads, even if the structure doesn't change (e.g.: with Fabric state updates). In this case, we do the checks but we never dispatch the notifications. This can cause crashes (see T217617393) if we try to check for mutations from the main thread while we add new observers in the JS thread (because that logic wasn't thread safe).
This fixes that crash by, in MutationObserver, not only preventing notifications from commits not coming from React, but also preventing the determination altogether.
In order to do this, this modifies the signature of the commit hooks to also pass the commit options, and adds a new field in the commit options with the source of the commit (for now, just "React" or "Unknown").
In `MutationObserver`, before accessing the data structures of the observer, we check if the commit is coming from React, and return early otherwise.
Reviewed By: javache
Differential Revision: D71036705
fbshipit-source-id: 985c8f903375cbf876dce5174e04563f74d7621a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49973
We still depend on the Community CLI directly, supporting local development in `packages/rn-tester`. Bump to latest — contains a number of build improvements, and will align us closer to prod/next.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D71033085
fbshipit-source-id: ddbf7df5a35951b77c36d111cfd12ad64c3b73f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49956
This is no longer being used internally so I think we can just remove this for less complexity
Changelog: [Internal]
Reviewed By: philIip
Differential Revision: D70983663
fbshipit-source-id: 61ca5212cb45dd1c8b96aee62964ad62b410d6f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49854
Changelog: [GENERAL][ADDED] - Codegen utility functions and types are now exported from the root package
Up to this point, third-party libraries needed to use deep imports to access codegen utilities and types This diff exports them from the main entry point, as we want to move away from supporting deep imports in OSS as a part of JS Stable API project.
Reviewed By: huntie
Differential Revision: D70628408
fbshipit-source-id: 5a6e1cb870465ede0fbc9eb8912d255aa90aa2a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49974
Changelog: [internal]
The feature flag system currently logs an error when trying to access common feature flags (flags accessible from everywhere but defined in native) from JS if the native module isn't available.
This forces a pattern in code to check if the module is available before accessing certain feature flags, to avoid showing that error to users in the legacy architecture.
This removes the need for that pattern by adding the check in the feature flag infra itself. If TM infra isn't available, we return default values and don't log the error.
Reviewed By: rozele
Differential Revision: D70975412
fbshipit-source-id: 5544bd96aaaf046ef90ca69bc549bef4e54eb98b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49855
Changelog: [IOS][FIXED] - Fixed touch events not being dispatched to ScrollView's children when they overflow the content container
Closes https://github.com/facebook/react-native/issues/47740.
Changes the ScrollView's container view to be `RCTViewComponentView` instead of `UIView` and sets custom layout metrics to it in a way that it will propagate touch events to all children, even if they overflow its bounds.
Reviewed By: sammy-SC
Differential Revision: D70619894
fbshipit-source-id: 348a1a369489d5208d6037c8d76b223c4ab2d5f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49582
TSIA, this is a fairly straightforward implementation since iOS likes the shape the data is already in. Note I form a stacking context since I need the native view that has `accessibilityElements` to actually be an ancestor of everything under it
Note I am not exposing anything yet on the JS side, since we need to do Android also
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D69625269
fbshipit-source-id: 836f1bb631646408a5726f126be61c0ff6afe1d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49960
Fixes https://github.com/facebook/react-native/issues/49106
RN legacy arch, and web, will clip inline content which appears after elipsized text. This is the correct behavior, compared to new arch, which will put it in a random place depending on the platform.
`line-clamp`: https://jsfiddle.net/7xgdke1b/
`text-overflow`: https://jsfiddle.net/7xgdke1b/2/
Fabric renderer does not, funnily enough, having an `isClipped` field on `TextMeasurement::Attachment` that is never used.
This change propagates state for whether an attachment is beyond elipsized area to this measurement, then when we see it, we set empty layout results with `DisplayType::None` so that we don't create native views. We don't layout child views either, but this seems to work out okay, even when removing and re-adding `numberOfLines`.
Changelog:
[General][Fixed] - Fix New Arch handling of inline views when text truncated
Reviewed By: mdvacca
Differential Revision: D70922174
fbshipit-source-id: 8c1f4aadbf53ff64ce55b44d6c7953d9b2e40bc5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49543
When using `ReactScrollView` or `ReactHorizontalScrollView` Views with `removeClippedSubviews` keyboard navigation didn't work.
This is because keyboard navigation relies on Android's View hierarchy to find the next focusable element. With `removeClippedSubviews` the next View might've been removed from the hierarchy.
With this change we delegate the job of figuring out the next focusable element to the Shadow Tree, which will always contain layout information of the next element of the ScrollView.
Changelog: [Android][Fixed] - Fix keyboard navigation on lists with `removeClippedSubviews` enabled
Reviewed By: joevilches
Differential Revision: D69618406
fbshipit-source-id: 1df7f90066dfc685e74a89b29222937777714b87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49961
As preparation for fixing focus on FlatList we need to prevent the currently focused view from getting clipped. This is because in Android, if the currently focused view gets clipped before transferring focus we crash.
Changelog: [Android][Changed] - Prevent currently focused child from getting clipped when `removeClippedSubviews` is enabled
Reviewed By: NickGerleman
Differential Revision: D70994348
fbshipit-source-id: 8c68eeebd7df8e7d8f788e50a3bbe46b0335ace3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49951
We previously fixed Differentiator generating an incorrect parentTag (https://github.com/facebook/react-native/pull/48055), but this can lead to crashes in Android UI due to reordering that happens in the Android mounting layer. While we have an experiment to disable this reordering (https://github.com/facebook/react-native/pull/46702) this currently has a negative performance impact which needs to be addressed.
As a mitigation, we can make the lookup of parentTag's ViewManager state nullable. We only require this to support `needsCustomLayoutForChildren`, which is not commonly used, and seems acceptable to drop in this scenario.
Changelog: [Android][Changed] Do not crash when parent view state can't be found
Reviewed By: NickGerleman
Differential Revision: D70966621
fbshipit-source-id: 33d0b6a90860788a4c9a8c6cea36c2c72c1392e1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49937
Adding an assert for recycled views still attached to their parent, which would lead to an exception when the view would be added to a new parent.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D70922503
fbshipit-source-id: 7d4daf427306203d603c31999ab138b3aee08e83
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49954
We have a different version of OkHttp internally and in OSS so we need to suppress these for now.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D70975145
fbshipit-source-id: cd2a3ab5cdc52f25c78cb608e917fa3ca378e4f1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49817
changelog: [internal]
Remove feature flag excludeYogaFromRawProps. It did not yield any performance wins and the code to support the feature is spread across multiple classes. Removal simplifies complexity.
Reviewed By: javache
Differential Revision: D70389071
fbshipit-source-id: 21751f56aec8de501ff1e1efafda035069d8ef48
Summary:
Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin.
I moved out `OpacityAnimationListener` as well in this PR to separate concerns and align more with the codebase.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.uimanager.layoutanimation.OpacityAnimation to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49822
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: javache
Differential Revision: D70588884
Pulled By: alanleedev
fbshipit-source-id: 1b70f5e5facd5f47b828090e7c63a218229000cb
Summary:
When using the `login-password` prompt type, there is a TypeScript type mismatch issue. The `callbackOrButtons` parameter returns an object with `{login: string, password: string}` structure, but this type variation is not properly included in the **AlertType** type definition. This causes TypeScript to show type errors when using callback functions that expect credentials in the format `(credentials: {login: string, password: string}) => void`.
## Changelog:
- [General] [Fixed] Add missing type variation `{login: string, password: string}` to **AlertType** type definition to properly support `login-password` prompt callbacks
Pull Request resolved: https://github.com/facebook/react-native/pull/49757
Test Plan: This change is purely type-related and doesn't affect runtime behavior.
Reviewed By: NickGerleman
Differential Revision: D70797036
Pulled By: alanleedev
fbshipit-source-id: 8e27a39f0c8f49083730c683b41b69173715bd68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49927
This change automates updating App's Info.plist with the new `RCTNewArchEnabled` boolean entry. The value depends on how the pod install is set up. In this way, we maintain the previous UX to enable/disable the New Arch.
## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.
However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:
- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...
## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.
## Changelog:
[iOS][Added] -
Reviewed By: cortinico
Differential Revision: D70888212
fbshipit-source-id: 541a818e02ccb96c822de29b0714646d1e69a5a9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49924
This change deprecates the RCT_NEW_ARCH_ENABLEd flag to toggle the New Architecture.
The new approach bring iOS closer to Android: to diasable the New Architecture, user needs to modify the App's Info.plist and add a `RCTNewArchEnabled` boolean entry and set it to `NO`.
The absence of the entry implies that the New Arch is enabled. (Defaults to enabled)
This also deprecates the `RCTSetNewArchEnabled` function because it makes no sense now
## Context
The RCT_NEW_ARCH_ENABLE flag is a compile time flag we used for almost two years to configure the iOS apps and to determine whether the app should build with the New Arch or not.
However, given that we are looking into prebuilding React Native, we have to get rid of all the compilation flags, because they would require us to prebuild a combinatorial number of artifacts for react native. For example:
- New Arch / Hermes
- Old Arch / Hermes
- New Arch / JSC
- Old Arch / JSC
- ...
## Backward compatibility
We are going to keep adding the RCT_NEW_ARCH_ENABLED flag in all the dependencies, through the cocoapods inrastructure, so libraries, which are not prebuilt, will be build for the right architecture by the app itself.
## Changelog:
[iOS][Deprecated] - deprecate the `RCT_NEW_ARCH_ENABLED` and the `RCTSetNewArchEnabled`
Reviewed By: cortinico
Differential Revision: D70885454
fbshipit-source-id: 4b8404ead4900d9787049ebd0b8b3c29b272f913
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49929
X-link: https://github.com/facebook/metro/pull/1459
In the next version of Flow, we will stop bundling many of the builtin libdefs, and they have been moved to flow-typed. This diff checks in them to prepare for the deployment of the next version of Flow.
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D70896122
fbshipit-source-id: aa6bd0b1e653b983a345b0e202c8dad5058a0001
Summary:
GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here.
We can fix the script by dropping the `v` when it is passed to the function.
bypass-github-export-checks
## Changelog:
[Internal] - Fix verifyPackageOnNPM
Pull Request resolved: https://github.com/facebook/react-native/pull/49944
Test Plan: GHA
Reviewed By: cortinico, fabriziocucci
Differential Revision: D70960414
Pulled By: cipolleschi
fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49936
Ensure LegacyArchitectureLogger.assertWhenLegacyArchitectureMinifyingEnabled is called only once per class loading in kotlin
changelog: [internal] internal
Reviewed By: alanleedev
Differential Revision: D70922132
fbshipit-source-id: ce4d68dc2ab0f61266e4bb5cddfc175c364f568a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49938
Recycling a `ReactViewGroup` will lead to all child views being removed from the view. To avoid having view recycling corrupt the clipping state set for the child views, ahead of base view recycling preparation this diff disables `removeClippedSubviews` so that layout changes don't run over all child views that will end up being removed anyway.
The bug reported earlier should already have been resolved by D70672120 since the view recycling of a child view would remove the view from the parent. Meaning the ReactViewGroup can only have subviews that are not prepared for recycling, any recycled view would have been removed from their parent (the ReactViewGroup)
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D70921641
fbshipit-source-id: a8b311169b268c09400d2b62008184e379f6fe79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49934
The typing of internal version of jest and the libdef in react-native has diverged a bit. This diff aligns the typing for `describe`
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D70917375
fbshipit-source-id: 9c2ab98a08394aa187712f4966748a8a60e202b1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49900
This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](https://github.com/facebook/react-native/pull/43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](https://github.com/software-mansion/react-native-reanimated/issues/5715) resurfaces from this change.
Fixes#49838
## Changelog
[Android][Fixed] Fixes issue with z-indexed sibling removal
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D70795631
fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
Summary:
Currently, when integrating into a native app using ReactNativeFactory, when we forget to set `dependencyProvider` we get a random crash exception instructing us (depending on native modules in our app) about an unrecognized selector:

After this change we get a proper error informing us that we for got to set dependencyProvider:

## Changelog:
[IOS] [ADDED] - Useful error message about setting dependency provider
Pull Request resolved: https://github.com/facebook/react-native/pull/49843
Test Plan: CI Green
Reviewed By: cortinico
Differential Revision: D70631515
Pulled By: cipolleschi
fbshipit-source-id: d99c8fa12fdb0624a01fe16c50fe0f2d10554f94
Summary:
Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin.
In this PR I also marked the return of HermesExecutor.initHybridDefaultConfig as non-nullable to keep the conversion without logic changes. I checked that this was changed unintentionally to nullable in 12e321daf0 but I think it was not supposed to be.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.bridge JavaScriptContextHolder & JavaScriptExecutor to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49909
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: javache
Differential Revision: D70871012
Pulled By: Abbondanzo
fbshipit-source-id: 1c15927056baf166e520e896e92bebf664fa0229
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49931
This change fixes the app startup in the Old Architecture by implementing the loadSourceForBridge:onProgress:onComplete method in the RCTDefaultReactNativeFactoryDelegate object.
The method was missing here, so the Bridge was never trying to load the JS bundle from Metro, resulting in an empty app.
## Changelog:
[iOS][Fixed] - Implement the loadSourceForBridge:onProgress:onComplete in the RCTDefaultReactNativeFactoryDelegate.
Reviewed By: cortinico
Differential Revision: D70898811
fbshipit-source-id: 3e5d519a1965e92ace91ca6d5b316a9069279448
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49906
Task.call is equivalent to a try-catch and wrapping the result in a Task. Inlining this is cheaper than creating a TaskCompletionSource and a Runnable.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D70803554
fbshipit-source-id: 0886176be974eff67c983ce1475ad685a8021b14
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49926
Those files can be fully removed as it's not referenced at all in OSS/Internal
Changelog:
[Internal] [Changed] -
Reviewed By: fabriziocucci
Differential Revision: D70888664
fbshipit-source-id: 4cacc449aa141e0465f771bf8c52d573d4227ef5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49922
Spamming the DB with "heartbeat" events with close to 0 ping didn't give us any useful information. Instead, report high ping situations.
Changelog:
[General][Internal] Remove reporting all device and debugger heartbeat events, only report heartbeats with high round trip latency
Reviewed By: GijsWeterings
Differential Revision: D70707457
fbshipit-source-id: 6bc8a55fd32dfa60fb4f7764ac00a6218417dcb5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49907
These tests have been disabled for a while due to feature flags being introduced, fusebox flags with native dependencies, and the removal of Powermock.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D70803553
fbshipit-source-id: d1ae6e4ca6c0d22e6a8c89bf01b28333929fa8a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49912
Changelog: [internal]
This migrates all Fantom tests to use package-relative imports from `react-native` instead of relative paths.
Note that a lot of the current deep imports (e.g.: `import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement'`) will not be necessary when we release those APIs as public.
Reviewed By: sammy-SC
Differential Revision: D70779722
fbshipit-source-id: f0d28e00ca9881dc2a3cd151b75327b26711277e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49911
Changelog: [internal]
The approach in Fantom tests is to use the public API as much as we can, but forcing us to use relative imports in tests makes it harder to see what's the public API and what's not. This disables the lint rule so we can use package imports in Fantom tests without warnings/errors.
Reviewed By: sammy-SC
Differential Revision: D70779721
fbshipit-source-id: b244e6a36060e6bc60318fe285ffcf3a81a78acd
Summary:
- Update ignore micromatch pattern to filter out `__test_fixtures__` from build output
- Remove `babel/plugin-transform-object-rest-spread`
- Remove `babel/plugin-transform-async-to-generator`
- Remove `babel/plugin-transform-destructuring`
The `package.json:engines:node` field is already set to `>=18` which makes the three Babel transforms that were removed redundant.
## Changelog:
[INTERNAL] [CHANGED] - Remove fixtures files and outdated Babel transforms from `react-native/codegen` build output
Pull Request resolved: https://github.com/facebook/react-native/pull/49916
Test Plan: - Ran against Node 18
Reviewed By: robhogan
Differential Revision: D70885090
Pulled By: cortinico
fbshipit-source-id: 328b75a6031a7ca6a9b3ed170061ffb0a47d6d93
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49898
Changelog: [internal]
In the method to access the native node reference from elements, we weren't considering the case where the element is the `documentElement`, which is a special case we were handling correctly in the case of native node references from nodes (where we also handle it possibly being a document node).
Because of this, methods in `Element` and `ReactNativeElement` weren't working correctly on the `documentElement`. We didn't catch this initially because we only tested the traversal methods defined in node in the test for `ReactNativeDocument`.
This fixes the issue.
Reviewed By: javache
Differential Revision: D70792748
fbshipit-source-id: c42d05a066efaffccade94e9d3835fb7172e2335
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49896
This change makes possible to opt-out from the New Architecture.
Env variables are always `string`s in ruby and the check was always failing because it was comparing it with a number (always false)
## Changelog:
[iOS][Fixed] - enable back the opt-out from the New Architecture
Reviewed By: cortinico
Differential Revision: D70789827
fbshipit-source-id: 7d3f96c3db22f2715dec2b649534b20e3273ea3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49860
changelog: [internal]
now that Fantom supports tests with <Modal />, add a test to cover scenario where <ScrollView /> is inside of <Modal />.
Reviewed By: rubennorte, rshest
Differential Revision: D70696834
fbshipit-source-id: 5f51917ac5c6a2cf451906e302ee2b62c15449ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49859
changelog: [internal]
this will be used for testing purposes in Fantom.
This diff also cleans up `ModalInjection.js` which is unused.
Reviewed By: rubennorte
Differential Revision: D69883384
fbshipit-source-id: 4ff278ef174c95fd5a93f70519f14c5190a5ada5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49894
Update `babel` entries in `yarn.lock` and run:
`yarn update-babel-flow-lib-defs`
...from Metro, to regenerate our Flow definitions from Babel source, then sync to RN.
Changelog: [Internal]
Facebook
D70778791 updated some `xplat/js/yarn.lock` Babel entries, which caused `xplat/js/tools/metro/scripts/__tests__/babel-lib-defs-test.js` to start failing only when Yarn had *not* been run in `xplat/js/tools/metro`, because the hoisted `xplat/js` Babel deps were a greater version than the locked `xplat/js/tools/metro` Babel deps.
This realigns them and updates the types to unbreak the test both internally an in OSS.
Reviewed By: vzaidman
Differential Revision: D70785807
fbshipit-source-id: 59ee8adc296f9ca155dde04c1429273656a26244
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49895
Minor thing, but the fact that these fixture `package.json`s for testing a release script reference real Metro packages and versions always trips me up when I'm updating Metro (grepping, etc).
There's no need for them to mention Metro - any non-RN package is sufficient to test that the script preserves other dependencies. This swaps them for dummy packages.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D70789598
fbshipit-source-id: 32f394bf1f783534b76d260908538d7b5716ef1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49885
Updates all `metro*` dependencies to the latest `^0.82.0`.
The breaking changes in this release apply only to frameworks and integrators.
This update brings `package.json#exports` resolution enabled by default, and lazy hashing for much faster Metro startup.
Release notes:
https://github.com/facebook/metro/releases/tag/v0.82.0
Changelog:
[General][Changed] Update Metro to ^0.82.0
Reviewed By: vzaidman
Differential Revision: D70778791
fbshipit-source-id: ffb55ed384d721205aa4d7f528c63c0b0a38abc5
Summary:
acquireWakeLockNow was static before but wasn't marked as static in https://github.com/facebook/react-native/commit/9afad527b831ec0c5d50e88daacbaacbc476d478 when changing code to Kotlin.
This breaks react-native-firebase but I've submitted the bug report there as I guess it might be fixed there too.
## Changelog:
[ANDROID] [FIXED] - Marked acquireWakeLockNow as static
Pull Request resolved: https://github.com/facebook/react-native/pull/49875
Test Plan: No tests as it reverts the broken change
Reviewed By: rshest
Differential Revision: D70773675
Pulled By: javache
fbshipit-source-id: d7363702dfec078b7e6d2693d05b8ab87e818522
Summary:
This PR adds a step in CI to sign the xcframework if we have a certificate available
bypass-github-export-checks
## Changelog:
[Internal] - Sign XCFrameworks in CI
Pull Request resolved: https://github.com/facebook/react-native/pull/49871
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D70734340
Pulled By: cipolleschi
fbshipit-source-id: 244422bdf9a8e0a2075a727a91805f762d4f95c9
Summary:
This pull request includes a minor change to the `React-cxxreact.podspec` file in the `ReactCommon/cxxreact` package. The change corrects a typo in the `HEADER_SEARCH_PATHS` configuration.
## Changelog:
[IOS] [FIXED] - Corrected the path from `"$(PODS_ROOT)/fas_float/include"` to `"$(PODS_ROOT)/fast_float/include"` in the `HEADER_SEARCH_PATHS` configuration.
Pull Request resolved: https://github.com/facebook/react-native/pull/49879
Reviewed By: rshest
Differential Revision: D70773742
Pulled By: javache
fbshipit-source-id: 0823732bf45c8c17ee7d4c0c3542be5c286445ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49873
In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS.
After my changes in [d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil.
This was breaking those modules which started crashing or observing undesired behavior.
This change fixes the issue by making sure that, in those cases, a `nil` value is passed.
Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already.
## Changelog:
[iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules
Reviewed By: javache
Differential Revision: D70723460
fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
Summary:
Fixes https://github.com/facebook/react-native/issues/49819 . Details about how the issue was introduced in the issue description.
bypass-github-export-checks
## Changelog:
[IOS] [FIXED] - Fixed: extraModulesForBridge callback not called when New Architecture enabled
<!-- 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/49849
Test Plan:
Without the change:
1. Open `packages/rn-tester` project
2. In `AppDelegate.mm`, implement `extraModulesForBridge` and add a breakpoint / output something
3. Run the app in iOS <-- Verify that the method is not executed
With the change:
1-3. Same as above <-- verify that the method is called correctly
> [!NOTE]
> As far as I could tell, there is no test suite for this specific codepath, so I didn't write a test for this change. Happy to write one if someone can guide me a little bit.
Reviewed By: rshest
Differential Revision: D70724196
Pulled By: cipolleschi
fbshipit-source-id: cc08798d08cdbd6883347810c7d2697c358770fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49850
`RCTUIImageViewAnimated` has some bugs around reuse.
1. Recycling will set `image` to null, which will no-op on comparison to `self.image`, but `self.image` is always null when the image is animated, because `RCTUIImageViewAnimated` handles rendering the frames itself. This means we don't properly do things like invalidating the DisplayLink when the image is first recycled.
2. If we ever set superclass image to nil, we make some change to the underlying CALayer, which causes the content to remain black, even though we customize our own `displayLayer`. Diffing layer descriptions, we seem to afterward have a `contentsMultiplyColor` and `contentsSwizzle` on the layer that aren't public.
The solution I have in this diff is to, instead of drawing layers ourselves, update backing UIImage image to the frame. I think this would fix some other bugs as well, like tintColor not applying to animated images. My guess is that this shouldn't add too much extra work, since `UIImageView` should just be propagating the `UIImage` to the layer in a same way that we were before. This same bug may have also been possible before when switching between animated and non-animated image sources I think.
Changelog:
[iOS][Fixed] - Fix Recycling of Animated Images
Reviewed By: cipolleschi, joevilches
Differential Revision: D70668516
fbshipit-source-id: f1127da3e03ebab2b6f7584ba492b3e13448c13b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49863
After the creation of the XCFramework, that needs to be signed. After the XCFramework is signed, no further modification can happen or they would break the signature.
## Changelog:
[Internal] - Add function to sign the XCFramework
Reviewed By: cortinico
Differential Revision: D70697279
fbshipit-source-id: c2411ca7d12d4679ba55f124cbb445367b15945a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49858
`prepareToRecycleView` returns nullable, since we may decide a view is not recyclable. We should respect that and return the view returned by super.
Changelog: [Internal]
bypass-github-export-checks
Reviewed By: fabriziocucci
Differential Revision: D70696246
fbshipit-source-id: a8e12320611a3b6a3d05353e4b7556c4da416aea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49851
Android doesn't allow to mount a view that already has a parent. View recycling removes all children from a view. But if some views don't support recycling, they'll keep a reference to their children. Children being recycled will cause an exception when being mounted.
This diff removes the view from its parent when it is being recycled. This guarantees that whatever the parent, the view can be mounted after being recycled.
bypass-github-export-checks
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70672120
fbshipit-source-id: 023d8fb48982d6d9ae7f9c537f7f2bb21cf15066
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49837
Bootstraps the `NetworkReporter` API and `jsinspector_network` library. This will form the common C++ logic for Network Inspection in React Native DevTools.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70554862
fbshipit-source-id: 862e255f61e21871c35b1a848caec3f34e843823
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49816
Previously, we had different versions of "debug" installed in different packages, mostly because of messed up `yarn.lock` entries.
Also, updated the package, receiving some performance improvements (no relevant breaking changes).
Changelog:
[General][Internal] update and dedupe the npm package "debug"
Reviewed By: huntie
Differential Revision: D70402368
fbshipit-source-id: 5e21bc6d92e0cb45ac1d862f100ef6dc0f21dbc1
Summary:
`jscodeshift` is only used in one module (`src/generators/components/GenerateViewConfigJs.js`, but depends on a rather complex dependency chain and has a rather large maintenance burden relative to what it's used for and the value it adds in the codebase.
Since the `GenerateViewConfigJs` module creates simple templates, using `babel/core` (and implicitly `babel/template` and `babel/types`) is a lot simpler and changes little code. The only change this introduces to the output are formatting changes (`singleQuote` and `trailingCommas` options are discarded). The code is otherwise functionally identical.
## Changelog:
[INTERNAL] [CHANGED] - Drop jscodeshift dependency from react-native/codegen
Pull Request resolved: https://github.com/facebook/react-native/pull/49641
Test Plan:
This was tested against a React Native build with the `react-native/babel-plugin-codegen` plugina active and using the snapshots in the repo itself. While the snapshots have changed in formatting, none of the outputs change the code's AST.
<details>
<summary>
Example output from <code>react-native/babel-plugin-codegen</code> to supplement the snapshot tests
</summary>
This is the example bundling output of `AndroidSwipeRefreshLayout`. This demonstrates that both the view config output and the `Commands` export continue to be generated correctly.
```js
var _interopRequireDefault = require(_dependencyMap[0]);
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.__INTERNAL_VIEW_CONFIG = exports.Commands = undefined;
var _codegenNativeCommands = _interopRequireDefault(require(_dependencyMap[1]));
var _codegenNativeComponent = _interopRequireDefault(require(_dependencyMap[2]));
var React = _interopRequireWildcard(require(_dependencyMap[3]));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var NativeComponentRegistry = require(_dependencyMap[4]);
var _require = require(_dependencyMap[5]),
ConditionallyIgnoredEventHandlers = _require.ConditionallyIgnoredEventHandlers;
var _require2 = require(_dependencyMap[6]),
dispatchCommand = _require2.dispatchCommand;
var nativeComponentName = 'AndroidSwipeRefreshLayout';
var __INTERNAL_VIEW_CONFIG = exports.__INTERNAL_VIEW_CONFIG = {
uiViewClassName: "AndroidSwipeRefreshLayout",
directEventTypes: {
topRefresh: {
registrationName: "onRefresh"
}
},
validAttributes: {
enabled: true,
colors: {
process: (req => 'default' in req ? req.default : req)(require(_dependencyMap[7]))
},
progressBackgroundColor: {
process: require(_dependencyMap[8]).default
},
size: true,
progressViewOffset: true,
refreshing: true,
...ConditionallyIgnoredEventHandlers({
onRefresh: true
})
}
};
var _default = exports.default = NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
var Commands = exports.Commands = {
setNativeRefreshing(ref, value) {
dispatchCommand(ref, "setNativeRefreshing", [value]);
}
};
```
</details>
Reviewed By: yungsters
Differential Revision: D70580474
Pulled By: elicwhite
fbshipit-source-id: 85bc6578b685f19a1565ded8d7e56dc2a1ff1999
Summary:
It seems that if we update the scroll state when the state wrapper is null we can get into an out of sync state.
I've replicated the issue in HelpCenter and confirmed with a video this seems to be the case (i.e. when gazing on some cards, their corresponding frame is incorrect)
https://www.internalfb.com/intern/px/p/6xWgl
NOTE: I have accidentally stumbled upon this fix but I could really use a review from someone who has more context around the `ReactScrollViewHelper` because this change might have bigger implications I'm not aware of!
Changelog:
[Android][Fixed] - Fix occasional syncronization issue in ScrollView when rendering dynamic content with content offset
Commits affecting the React Native open source repository must have a changelog
entry in the commit summary. Every React Native release has almost 1000 commits,
and manually categorizing these commits is very time consuming.
In your diff summary, please add a `Changelog:` entry using the format:
The "Category" field may be one of:
- **Android**, for changes that affect Android.
- **iOS**, for changes that affect iOS.
- **General**, for changes that do not fit any of the other categories.
- **Internal**, for changes that would not be relevant to developers consuming
the release notes.
The "Type" field may be one of:
- **Breaking**, for breaking changes.
- **Added**, for new features.
- **Changed**, for changes in existing functionality.
- **Deprecated**, for soon-to-be removed features.
- **Removed**, for now removed features.
- **Fixed**, for any bug fixes.
- **Security**, in case of vulnerabilities.
If your change does not modify React Native's public interface, you can use:
Changelog: [Internal]
For more details, please read the wiki: https://fburl.com/react-native/changelog
Reviewed By: javache
Differential Revision: D70484547
fbshipit-source-id: c314b958eeed4dd96755539f5bbfb8f03e17a525
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49841
Changelog: [internal]
This effectively reverts D62962341 / https://github.com/facebook/react-native/pull/46563 as the experiments didn't provide the expected wins and we don't have bandwidth to iterate on this.
Reviewed By: rshest
Differential Revision: D70622429
fbshipit-source-id: c53c9437448c0a7be8f5b4f04d6369efbd99105a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49810
Changelog:
[Internal]
Migrated StyleSheet namespace content to StyleSheetExport.js to recreate it by importing * as StyleSheet, which aligns with TS namespace definition. Added .flow files that specify base type declarations and will be digested by the flow tooling.
Reviewed By: huntie
Differential Revision: D70391322
fbshipit-source-id: dd974ef282cb984a1e57d5732e3b5bdab6db4564
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49836
We were passing the path to the `RegularFile` instead of the `PublishingArtifacts` to the gradle script.
cortinico why this is not checked at build time? This should be a typing issue that should be caught at build time, also during the test-all jobs, not just when the nightly run...
## Changelog:
[Internal]
Reviewed By: cortinico
Differential Revision: D70617638
fbshipit-source-id: 67ff1aea2bd827fb110db7a0d2f3651b88a1e8cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49835
The implementation of moduleProviderForName is slightly off.
This method was supposed to replace the previous ternary expression and to enhance with the module provider call.
The ternary expression used to be
```
!RCTTurboModuleInteropEnabled() || [self _isTurboModule:moduleName] ? [self _provideObjCModule:moduleName] : nil
```
However, as you can see from the current implementation, instead of calling `RCTTurboModuleInteropEnabled()` we are calling `RCTTurboModuleEnabled()` which is clearly a mistake.
On top of that, I'm also updating the guard around the `getModuleProvider` selector as it was bypassing the other checks, and that's wrong.
## Changelog:
[Internal] - Fix moduleProviderForName method
Reviewed By: RSNara
Differential Revision: D70569552
fbshipit-source-id: ed4055da9ea385ed10323ed8d7a8772010b3a105
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49823
Introduce LegacyArchitectureLogger class, which provides logging functionality to help track and debug usage of legacy architecture components when an app is running on the new architecture. The data provided by this class will help identify classes and methods that are still being used in the new architecture when they shouldn't.
changelog: [Internal] Internal
Reviewed By: rshest
Differential Revision: D70543605
fbshipit-source-id: 56262170c03bb0fd375b8dc3cb34a7c15a69a810
Summary:
Benchmark to test changes from https://github.com/facebook/react-native/issues/49449
Might be nice to have some version of this in the repo.
## Changelog:
[INTERNAL] [ADDED] - Setup a Macrobenchmark for RNTester
Pull Request resolved: https://github.com/facebook/react-native/pull/49486
Test Plan:
### Methodology
Picked various JS file from websites (facebook, instagram) to artificially grow RN tester bundle somewhat realistically. The files are required lazily from a button press callback to simulate the code being included, but not executed, as it would be in a large app that uses lazy requires for the different screens.
I've also made the RN tester screens lazy so all their code is not loaded initially. This is more representative of real apps. Note this is implemented in a hacky way just for the purpose of this test. It would actually be nice to implement this properly.
The tests were made using low end device Samsung Galaxy A03s.
### Compression ON with 10.5 mb bundle
#### Peak allocated memory
60.9 mb
#### ReactInstance.loadJSBundler
148.64 ms
#### Benchmark
timeToFullDisplayMs min 1,825.0, median 1,911.1, max 1,994.8
timeToInitialDisplayMs min 834.9, median 860.9, max 903.9
#### APK
Size: 22.9 mb
Download size: 14.5 mb
### Compression OFF with 10.5 mb bundle
#### Peak allocated memory
51.5 mb
#### ReactInstance.loadJSBundler
946 us
#### Benchmark
timeToFullDisplayMs min 1,752.8, median 1,827.2, max 1,977.5
timeToInitialDisplayMs min 837.7, median 881.3, max 937.2
#### APK
Size: 28 mb
Download size: 14.5 mb
Reviewed By: rshest
Differential Revision: D70002286
Pulled By: cortinico
fbshipit-source-id: 436597f439ba244649373870c1facefdb12297d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49813
Making use of the recently standardised `REACT_NATIVE_DEBUGGER_ENABLED` preprocessor flag, conditionally swap out `HostAgent` for a stub in production (non dev, non profiling) builds. This uses the same private implementation idiom as `HermesRuntimeTargetDelegate`.
This results in a **42.2kiB** size reduction (uncompressed) in production builds, due to excluding the CDP agent components of `jsinspector-modern`.
- Intentionally, we're gating just this logic, rather than several outer integration points/native bindings for `jsinspector-modern`. This is for predictability and maintenance — the Fusebox subsystem is always loaded/bound, but can fork to an empty implementation.
{F1975625351}
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D70495853
fbshipit-source-id: 00253ac71444819a917a3781efe38365acb91e85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49786
Most of these call-sites are only used for exceptional scenarios, so we can just rely on std::to_string and do string concatenation. For a few others that may be more perf-sensitive, I switched over to `snprintf`.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70402439
fbshipit-source-id: 3b90ebb13a7bf1c6cf30722ef636e5e8498a5b26
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49814
`bgWhiteBrigh + t = bgWhiteBright`
seems like no one was using `chalk.bgWhiteBright` before me :)
Changelog:
[General][Internal] fix type on the flow types for "chalk"
Reviewed By: huntie, hoxyq
Differential Revision: D70403987
fbshipit-source-id: 34f65e57fbb2eeadd6030557e0499db0b2603b38
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49815
The pull to refresh component props's casting is imprecise.
This change uses the more precise type for the props.
## Changelog:
[Internal] - cast props to `PullToRefreshViewProps`
Reviewed By: sammy-SC
Differential Revision: D70559080
fbshipit-source-id: c42d3d41a22683a3392813c2af25828781a68401
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49795
# Changelog: [Internal]
I've been able to reliably and consistently record samples with an interval between 2 consecutive ones to be ~0.1-0.2ms, lets bump the sampling frequency to have more frames.
On Windows, Hermes Sampler peaks at ~500Hz, so this won't have much effect.
Reviewed By: huntie
Differential Revision: D70395983
fbshipit-source-id: 9a9e619d75096a3ee75e0e1a2f8b8fff33130268
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49794
# Changelog: [Internal]
Before, we would store all User Timings and Timeline Events in the PerformanceTracer's buffer, and then add Profile event to it as well.
On larger apps, the amount of events buffered could reach ~100k, which inevitably would cause OOM.
With this approach, we will flush out buffered events from PerformanceTracer first, then do JavaScript Profile serialization, then send it over CDP straight away.
Reviewed By: huntie
Differential Revision: D70395982
fbshipit-source-id: 2c17abba421fa9c4afc4d4ca36afd98b1db50905
Summary:
Added a new template `ReactNativeVersion.kt-template.js` to be used to generate the Kotlin template for Android. Updating also the set-rn-artifacts-version script to use this template instead of the Java one.
## Changelog:
[INTERNAL] - Migrate ReactNativeVersion Android template to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49758
Test Plan:
```bash
yarn test-android
yarn android
node ./scripts/releases/set-version.js 1000.0.0
```
Reviewed By: huntie, rshest
Differential Revision: D70486775
Pulled By: cortinico
fbshipit-source-id: 5dd1e0e2ecf4d848dc24e6c47df243a1259ab559
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49751
fast_float promises significant improvements in float parsing performance and is already what's being used in folly internally. Unifying all percentage parsing on the new css parser logic, which can use fast_float internally.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70392268
fbshipit-source-id: 56147e5478d008bc2c34579df035ec7acf8744bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49775
Upgrading this dependency to match folly and to enable using this for number parsing across Fabric.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D70482373
fbshipit-source-id: 64429595c1126e6a06436701a7562bdf6dd962d5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49807
This change fixes a copy-and-paste mistake in passing the right parameter for publishing the ReactNativeDependencies dSYMs.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D70552858
fbshipit-source-id: fc103814420d94180d26c89ba9b405693864a64b
Summary:
X-link: https://github.com/facebook/yoga/pull/1791
Disabling RTTI for Yoga is causing std::exception to don't work properly in OSS.
Fixes: https://github.com/facebook/react-native/issues/48027
Not sure why we originally disabled RTTI for Yoga, but we have it enable for the whole
React Native build so it probably makes sense to have it enabled for Yoga as well.
Changelog:
[Internal] [Changed] - Enable RTTI to fix exception pointer issue on React Native
bypass-github-export-checks
Reviewed By: javache, NickGerleman
Differential Revision: D70386744
fbshipit-source-id: 36e3a1ddb38346d31979d5c1b77d6e9796d6a855
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49803
This refactors the whole ReactCommon to use the `target_compile_reactnative_options` macro we just introduced.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386740
fbshipit-source-id: 1f15ea7e182d79bbb0bedce653284808e3309e4f
Summary:
Found this issue while releasing 0.79.0-rc.0 (see [job](https://github.com/facebook/react-native/actions/runs/13649159968/job/38156418752)).
bypass-github-export-checks
```
SyntaxError: Invalid destructuring assignment target
at new AsyncFunction (<anonymous>)
at callAsyncFunction (/__w/_actions/actions/github-script/v6/dist/index.js:15143:16)
at main (/__w/_actions/actions/github-script/v6/dist/index.js:15236:26)
at /__w/_actions/actions/github-script/v6/dist/index.js:15217:1
at /__w/_actions/actions/github-script/v6/dist/index.js:15268:3
at Object.<anonymous> (/__w/_actions/actions/github-script/v6/dist/index.js:15271:12)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
```
## Changelog:
[Internal] -
Reviewed By: cipolleschi
Differential Revision: D70552301
fbshipit-source-id: b50e3d76c7497cc218e379400d5870531669abe1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49761
LayoutAnination classes are not used on the new architecture, this diff marks the as LegacyArchitecture to drive its removal
Changelog: [Internal] internal
Reviewed By: rshest
Differential Revision: D70410096
fbshipit-source-id: cda84958985c4133c926455a5c9611773a0d32ec
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49792
This removes the `$` from the `event` and `payload` identifier inside codegen.
This is causing the `-Wdollar-in-identifier-extension` warning to fire.
As I'm looking into enabling `-Wall -Werror` for React Common, this should be addressed as well.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D70500543
fbshipit-source-id: c593680961b1b98561c3985f92ade5d6ba448ac9
Summary:
This is causing the `-Wno-nullability-extension` warning to fire.
As I'm looking into enabling `Wall Werror` for ReactCommon, this should be fixed as it's causing the build to fail.
We don't use nullability extensions at all in the other JNI_OnLoad files, so it's fine (and probably better) we
replace them with a function that also doens't specify a Nullability annotation.
This is impacting only the OSS So Merging toolchain.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: cipolleschi
Differential Revision: D70500544
fbshipit-source-id: 2d5b52d8f34ec026a25e8625bd0c6a1812221dea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49797
Backing D70314889 as it was breaking some internal tests.
I verified that before the backout the tests were failing and after the backout they were not.
## Changelog:
[iOS][Changed] - Reverted fix: avoid race condition crash in [RCTDataRequestHandler invalidate].
Reviewed By: Abbondanzo
Differential Revision: D70511155
fbshipit-source-id: 276f6947aa6bb648c9c9eeb5c342f336acc8a26f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49650
- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages iOS
- Overload initWithDelegate to add optional releaseLevel parameter
- Add Obj-C enum for Release Level
- Use static variables to keep the context on whether a ReactNative Factory has been created and with which flags it has been created.
- Crash in case we try to create multiple factories with different feature flags.
- Creating multiple factories with the same feature flags is allowed
Changelog: [iOS] [Added] - On `RCTReactNativeFactory` add `initWithDelegate` overload with argument to specify release level for an application
Reviewed By: cipolleschi
Differential Revision: D70106210
fbshipit-source-id: 14fe4c8571621a75a7064f1ffd02a07270cea43a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49745
It turns out we want those flags to be available also inside ReactCommon so I'm moving it there.
This will allow us to reference them also inside ReactCommon and will make sure Common does not depend on Android
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386742
fbshipit-source-id: 3675c01f5e3f6515af6423d75e3fe145ba3d8936
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49743
Those 3rd party CMake libraries were not using our compiler flags correctly.
This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D70386743
fbshipit-source-id: e35688f7eb3fa9bcdda1180023006d267782ceaf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49791
The cache for RNTester is broken because the matrix parameters used to test RNTester are not part of the job_id that is used to create the cache keys to restore the Podfile.lock.
This means that we have a race condition on which job of the matrix manages to save the cache. However, those caches are not always valid for the other jobs that presents different matrix parameters.
This change should fix the issue.
## Changelog:
[Internal] - Fix test-rn-tester cache Cache
Reviewed By: cortinico
Differential Revision: D70493507
fbshipit-source-id: 1db6e00507b3e9abe4400831ee1b048c620b9102
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49780
Now that we're using a minimum Metro version of 0.81.3, Metro will dynamically assert `import` or `require` based on the style of the import at source.
Asserting both is likely to cause issues with `babel/runtime` and potentially other packages - see https://github.com/facebook/metro/pull/1447.
Changelog:
[Internal] metro-config: Assert import/require dynamically when using `unstable_enablePackageExports` with Metro.
Reviewed By: hoxyq
Differential Revision: D70473577
fbshipit-source-id: b3e6fbd78e2b6fc0f9a16ec3db2c19698848e6d1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49788
Release of 0.78 was successful but it failed to verify the package of NPM because of some error in the JS files.
Preparing for 0.79, I discovered some other issues in the NPM checking scripts.
This change should fix them.
## Changelog:
[Internal] - Fix publishing scripts
Reviewed By: fabriziocucci
Differential Revision: D70489717
fbshipit-source-id: 02a37d9a86fe108c7f7d2d634b8c0727dabb153d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49746
This flag is no longer necessary since RN 0.73 so I'm cleaning it up.
Changelog:
[Internal] [Changed] -
Reviewed By: rshest
Differential Revision: D70386741
fbshipit-source-id: c2c8f998fa7b97985396b26345cfcf3474effc7b
Summary:
When setting `USE_THIRD_PARTY_JSC=1`, we don't return anything from createJSRuntimeFactory function:

It's meant to be overwritten, but we must satisfy the compiler.
## Changelog:
[IOS] [FIXED] - return nullptr when USE_THIRD_PARTY_JSC is set to true
Pull Request resolved: https://github.com/facebook/react-native/pull/49781
Test Plan: CI Green
Reviewed By: cortinico
Differential Revision: D70486837
Pulled By: cipolleschi
fbshipit-source-id: c09622f75608dc203d41167fc375a000a2f12e37
Summary:
Upstreaming a fix by ntre that fixes a crash we saw internally related to `[_queue cancelAllOperations]`.
>Calling [_queue cancelAllOperations] will release all references to any active operations.
>If the blocks of those operations have a reference to itself, it will result in dangling pointers, which could conceptually trigger a later crash if there's a race between the operation completing and it being pulled out of the queue.
>
>Add explicit strong reference while block is running.
>For good measure, fix same pattern also in RCTFileRequestHandler.
>
>Note: separately, that this code is passing the op itself as a requestToken to [delegate URLRequest:] methods is suspect. That delegate can retain said token.
## Changelog:
[IOS] [FIXED] - avoid race condition crash in [RCTDataRequestHandler invalidate]
Pull Request resolved: https://github.com/facebook/react-native/pull/49705
Test Plan: Tested internally, we no longer saw the crash after this fix.
Reviewed By: javache
Differential Revision: D70314889
Pulled By: cipolleschi
fbshipit-source-id: ebcecb4675bd1dda3d9ee60d69967feb4e05e11b
Summary:
This PR makes React Native not relying on the `window` property in AppDelegate. When running in SwiftUI lifecycle mode / SceneDelegate mode there is window property on AppDelegate. This PR fixes crashes that happen because RN asserts window property is there.
## Changelog:
[IOS] [FIXED] - make React Native work without AppDelegate window property
Pull Request resolved: https://github.com/facebook/react-native/pull/49748
Test Plan: CI Green
Reviewed By: javache
Differential Revision: D70389691
Pulled By: cipolleschi
fbshipit-source-id: fe39f123b47014ba91a080239ccd298192c92a6a
Summary:
When downloading artifacts using a pattern, GHA, by default, creates a folder for each artifacts and copies the artifacts in that folder.
This breaks the maven publishing which expects the artifacts in the `artifact` folder and not i a subfolder.
The `merge-multiple` option allow for the artifacts to be downloaded in the specified folder, without the extra folder in the path
## Changelog:
[Internal] - Avoid the creation of intermediate folder when downloading the artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/49760
Test Plan:
GHA
<img width="791" alt="Screenshot 2025-03-02 at 11 08 33" src="https://github.com/user-attachments/assets/cfc85b27-117f-4d21-97ef-67493615a5a1" />
Reviewed By: fabriziocucci
Differential Revision: D70462254
Pulled By: cipolleschi
fbshipit-source-id: ed310a90bcdea55e466d4d71942a25abc6e6986a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49726
The `InspectorProxy` debug logging became incredibly spammy making it almost unuseful unless the output is manipulated so this commit batches all these cdp messages and only desplays how many were received in the span of 5s. If no messages are received, the throttle is not triggered.
To get the actual CDP messages logged, we still log these to `Metro:InspectorProxyCDPMessages`.
Changelog:
[General][Internal] batch debug logging for cdp messages
Reviewed By: robhogan
Differential Revision: D70324724
fbshipit-source-id: a269302f52e18af6c4be651758c042596abdbad8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49755
The artifacts are uploaded without the .tar.gz extension and the gradle script fails to upload them to sonatype.
This change adds the extensions.
## Changelog:
[Internal] -
Reviewed By: sammy-SC
Differential Revision: D70443149
fbshipit-source-id: c16d1842688b82ac216ffb90ecf2b75f562cca64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49753
Sonatype cannot sign folders. It needs a file to be signed.
To make it happen, we are compressing the xcframeworks and the dSYM with tar, and we are uploading those files instead of the folders
I also observed that the cache keys were not computed correctly, so I'm fixing them.
## Changelog:
[Internal] - use tar.gz instad of folders for dSYM and xcframeworks
Reviewed By: bvanderhoof, mofeiZ
Differential Revision: D70409314
fbshipit-source-id: 20a5ee4f24b644f4f087974ad6b0831d5769b1d9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49749
This change configures gradle and CI to properly publish the RNDependencies artifacts to Maven Central
## Changelog
[Internal] - Configure gradle to publish on Maven Central
Reviewed By: cortinico
Differential Revision: D70390191
fbshipit-source-id: fc1e1070325240584cb07fb17e58118c4c583fa9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49731
This change runs the prebuilds in all the workflows we need:
- test-all
- nightlies
- create-release
## Changelog:
[Internal] - connect the rebuild-ios workflow with the other workflows
Reviewed By: cortinico
Differential Revision: D70331579
fbshipit-source-id: 6505a32672d43d06e29e68d37bd0ceff21bd7386
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49530
This change introduces the workflow to prebuild iOS artifacts.
This will be a reusable workflow, so we can then call it as it is from test-all, nightlies and publish-release
## Changelog:
[Internal] - Create prepare artifacts workflows
Reviewed By: cortinico
Differential Revision: D69854568
fbshipit-source-id: 5dc532fa564fe7e0987ba5d133da42e04237c3cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49711
Changelog: [IOS][CHANGED] - Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline
Reviewed By: huntie
Differential Revision: D70314397
fbshipit-source-id: ef7dbf0c4bb3d5053328d81b7d5b8208e92ee7f5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49680
changelog: [internal]
add an end to end test for AppState module.
Reviewed By: rshest
Differential Revision: D70184850
fbshipit-source-id: ead1388ceb1018e7615e50f846f3c95224be97d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49643
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
Aligns `useAnimatedValue.js` with its manual .d.ts types.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D70096210
fbshipit-source-id: c3cd517eccf1cb68400772ddde6e5891861c927d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49741
While the test delay `PAGES_POLLING_DELAY` is usually enough to be equal to `PAGES_POLLING_INTERVAL`, in some cases we need extra time to sync that with the polling in `Devices.js`.
Changelog:
[General][Internal] - fix test
Reviewed By: huntie
Differential Revision: D70384823
fbshipit-source-id: ccb18884d32dc27636dbbb3a9786412056f90830
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49730
Changelog: [internal]
This removes all the types from "bom" that are actually not implemented in RN. For now, we're just stripping whole interfaces and not looking into specific methods/properties in interfaces that we do implement but not 100%.
`Performance`, `PerformanceObserver`, `MutationObserver` and `IntersectionObserver` are implemented but not stable yet, so they aren't exposed as globals in the types.
Reviewed By: huntie
Differential Revision: D70329185
fbshipit-source-id: 63bac619e100ca66b41df071df80dfa73d0f9651
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49737
Changelog: [internal]
Just a minor change to align with similar other option bags and TypeScript definitions.
Reviewed By: huntie
Differential Revision: D70355669
fbshipit-source-id: 37c44338c7b358eb2d25e8a14c75a78545b34bf1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49727
Changelog: [internal]
React Native doesn't define or use Service Workers, so this entire section for types is unnecessary.
Reviewed By: cortinico
Differential Revision: D70327703
fbshipit-source-id: b998eade21d19ed124824cb255a37cb9e805d151
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49724
Changelog: [internal]
This moves the type definitions for the globals defined by React Native from the repository root to the `react-native` package, in the same directory as the existing TypeScript definitions. This will make it easier for end users to configure the globals from RN using the right source of truth.
Reviewed By: huntie
Differential Revision: D70322032
fbshipit-source-id: 932df75ded0c254f2acb32e865cbbb9474c94159
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49685
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D70237239
fbshipit-source-id: f552490cb6bb721c6163272689ec9b6c68386574
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49742
Seems like publishing jobs are not happy with Gradle Config Caching.
I'm disabling it for now till we find out what's the root cause.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D70385662
fbshipit-source-id: 532c46ea1e578bab5f3e5d6814a7f7193e67a7ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49738
**Context**
- D70012142 added TM module provider support
- This was causing RN MacOS to silently fail to load any platform modules since it didn't implement the delegate method
Changelog:
[iOS][Fixed] - Add guard for custom module provider lookup in TMManager
Reviewed By: sbuggay
Differential Revision: D70357542
fbshipit-source-id: 5b338616655ecb84cdb3c60e243fdb99444af657
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49735
I always get confused when I open this file. One of the main reasons is the order of contents is quite random, so I decided to reorder things. I tried to find a style guide on this but the [google ones](https://google.github.io/styleguide/javaguide.html#s3.4.2-ordering-class-contents) really just say do something that is logical so...
In general what I did was
* All instance variables, class variables, class constants, etc. are at the top of the class
* The constructor, `setDelegate`, `resetDelegate` methods are at the top of the class since these all deal with creating or destroying instances of this class
* Nested enums towards the bottom of the class so they are not in the way of people trying to reason about the methods and other contents (they are quite long)
* Delete random extra spaces / unneeded comments
* Move some private methods to be closer to the public methods that call them
Changelog: [Internal]
Reviewed By: mlord93
Differential Revision: D70345882
fbshipit-source-id: a8425c7b90c5d4fbea5ee5daa3c4ff9f7f189ce5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49649
- Added a new template to React Native's Feature Flag's script for Canary and Experimental prerelease stages
- Added a parameter to `DefaultNewArchitectureEntryPoint.kt` to select prerelease stage
Changelog: [Android] [Added] - On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application
Reviewed By: rubennorte, mdvacca
Differential Revision: D69412971
fbshipit-source-id: 1a76ac723e1e06b40aad5910604e0384b208d3a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49729
# Changelog: [Internal]
The only data source for non-bridgeless setup is JavaScript samples.
Chrome DevTools frontend is built around an assumption that thread should have at least single timeline or user timing event to be represented on a timeline view. They do it for filtering out unnecessary workers threads and other.
We will emit 2 synthetic Trace Events that should cover these requirements and recorded traces that contain only JavaScript samples should now be displayed correctly.
This is where trace bounds are calculated - https://github.com/facebookexperimental/rn-chrome-devtools-frontend/blob/3adf51aa915c2deb26f5d373751a15b4d0c8f259/front_end/models/trace/handlers/MetaHandler.ts#L169-L173
Reviewed By: huntie
Differential Revision: D70328681
fbshipit-source-id: 8eca0017d85de9ecbfb49074b439d5c4fee4aa56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49624
This change improves the iOS infra so that there is no need to modify the Swift AppDelegate or to create a Bridging Header.
## Problem
As of today, it is not possible to create a pure C++ TM and to register it through a Swift AppDelegate
## Solution
We can create a pod that can be imported in a Swift AppDelegate and that offer some pure Objective-C classes.
These classes contains a provider that can be instantiated in Swift.
The TurboModule manager delegate will ask the AppDelegate about the presence of some provider that can instantiate a pure C++ turbomodule with a given name.
The provider has an empty interface, but the implementation contains a function that can actually instantiate the TM. The function is implemented in an Objective-C++ class that imports the pure C++ turbomodule and creates it.
The TMManager extends the provider through a category to attaach the signature of the function that is implemented by the provider.
The last diff in this stack contains an exaple on how to implement this.
## Changelog:
[iOS][Added] - Wire codegen to the new TM provider to automatically register CXX modules.
Reviewed By: javache
Differential Revision: D70082999
fbshipit-source-id: 11d829450e1d17984d6f22ee5b8907073c59d008
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49611
This Change connects the pod created previously to the `RCTTuboModuleManager` so that it can ask the delegate about the CxxTurboModuleProviders.
We had to introduce a `RCTFullTurboModuleManagerDelegate` that implements both the old `TurboModuleManagerDelegate` and the new Swift compatible one.
## Problem
As of today, it is not possible to create a pure C++ TM and to register it through a Swift AppDelegate
## Solution
We can create a pod that can be imported in a Swift AppDelegate and that offer some pure Objective-C classes.
These classes contains a provider that can be instantiated in Swift.
The TurboModule manager delegate will ask the AppDelegate about the presence of some provider that can instantiate a pure C++ turbomodule with a given name.
The provider has an empty interface, but the implementation contains a function that can actually instantiate the TM. The function is implemented in an Objective-C++ class that imports the pure C++ turbomodule and creates it.
The TMManager extends the provider through a category to attaach the signature of the function that is implemented by the provider.
The last diff in this stack contains an exaple on how to implement this.
## Changelog:
[iOS][Added] - Added the React-SwiftCompatibleNativeModules pod
Reviewed By: javache
Differential Revision: D70012142
fbshipit-source-id: db96c4cd3cdd1062b12f11131b7c6c51ecd74bc7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49712
Just keeping AGP up to date to the latest patch version
Changelog:
[Android] [Changed] - Bump AGP to 8.8.2
Reviewed By: cipolleschi
Differential Revision: D70316244
fbshipit-source-id: 6e447bd04841d09717a1c6153b7e5c977a10787c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48315
# Changelog: [Internal]
> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.
Use newly added serializer and record Trace Events for profiles.
Reviewed By: huntie
Differential Revision: D67353586
fbshipit-source-id: f3738418ec1d47ef4435f00120823845ea5e2fe5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49191
# Changelog: [Internal]
In this diff we are adding another serializer, that will receive local sampling profile (in tracing domain), and will record corresponding Trace Events with `PerformanceTracer`.
It encapsulates the logic of transforming list of samples to `"Profile"` and `"ProfileChunk"` trace events, which will be parsed by Chrome DevTools later.
Reviewed By: huntie
Differential Revision: D68439735
fbshipit-source-id: 0b3f2b3aff5b79a921e0350759e93f5b05e34d8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49084
# Changelog: [Internal]
> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.
Added public methods to `PerformanceTracer` instance for registering `Profile` and `ProfileChunk` Trace Events.
Also created data structs in `TraceEvent.h` to simplify serialization process for objects like call frames / samples / etc.
Reviewed By: huntie
Differential Revision: D68558805
fbshipit-source-id: f5eca0435c56828909f99ec0b47841d24ee907b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49082
# Changelog: [Internal]
> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.
In this diff we will:
- Call newly added API in Hermes from `HermesRuntimeTargetDelegate.cpp`
- Define format for local Sampling Profile that will be used in Tracing domain
- Implement formatter for Hermes Profile -> Tracign Profile
Reviewed By: bgirard
Differential Revision: D68414421
fbshipit-source-id: 05d76e9bcff46f88a2338490a9d858cb121f72cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49436
# Changelog: [Internal]
We will record event loop ticks and register corresponding `"RunTask"` Trace Event with our Trace Event engine.
Since this is hot path, I've added some gating under macros that are being used for Fusebox initialization.
There are also plans to add a public method to `PerformanceTracer` to get tracing status, so we could avoid cost of serialization / saving timestamps if trace is not being recorded. I believe rubennorte had plans on this, we will add it on top of that.
> Q: Why not add this to TraceSection?
Long-term, we will have a solution that will be one layer above TraceSection and this `EventLoopTaskReporterRAII`, it is risky now to modify existing `TraceSection` and rely on event names and attempt to map them to Trace Events.
Reviewed By: rubennorte
Differential Revision: D69399955
fbshipit-source-id: b26ac0c376e7dcb5755f36a27bf00dcca6cbff60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49395
# Changelog: [Internal]
Adding a new method to `RuntimeTarget` that will register it for Tracing.
In our case, it will schedule a callback on JS executor that will register JavaScript thread with `PerformanceTracer`.
Reviewed By: huntie
Differential Revision: D69530984
fbshipit-source-id: 58cffe9e9c4482b494cfcfd3405f7bffa40cdc56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48836
# Changelog: [Internal]
When `Tracing.start` CDP method is received, here is what happens next:
- `TracingAgent`, which intercepts the event will propagate this status to `Instance` by calling `startTracing()` on `InstanceAgent`.
- `InstanceAgent` will propagate it to `Runtime` entities. The only difference, there is no concept of tracing for Runtime, it will only have an API for starting sampling profiler.
When `Tracing.end` CDP method is received, it is propagated in the same order.
There is also `collect*()` methods for collecting profiles.
This has multiple benefits:
- We can control when `Runtime` or `Instance` are recreated and can ask them to start recording trace profiles right away. This may be required when we would add support for Reload and Profile from Performance panel.
- We might leverage this setup in the future, once we add instrumentation for Network panel. `InstanceAgent` will get notified when tracing started and will correspondingly notify other part of the infrastructure that will be responsible for recording network calls.
- We remain being fully agnostic to the actual `Runtime`, see corresponding `RuntimeTargetDelegate` for `V8`. We don't have the capacity for implementing and maintaining sampling profiler capabilities for it, but this approach unblocks it from technical perspective, if someone would want to invest into this.
`InstanceProfile` is a superset of `RuntimeSamplingProfile`. In the future, `InstanceProfile` may also include things like `NetworkProfile`, or similar stuff.
The definition for `RuntimeSamplingProfile` will be added in D68414421 and relies on the availability of new API for sampling profiler in Hermes.
Reviewed By: huntie
Differential Revision: D68327630
fbshipit-source-id: f8446057f88d87b4394fb692c28b89f1b8ce4eea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49714
Changelog: [internal]
This package was only needed for testing but it's actually not used.
Reviewed By: hoxyq
Differential Revision: D70318040
fbshipit-source-id: b57ec74932029368117520646972bfee83706017
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49693
Allow setting the ReactNativeInternalFeatureFlags from a Fantom test using the `fantom_internal_flags` pragma.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D70242739
fbshipit-source-id: 17a69edbd58b93f8b8060192b9881e62febf9635
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49697
Changelog: [internal]
These classes cannot be instantiated directly, but having access to them allows users to do `instanceof` checks, e.g.:
```
if (ref.current instanceof Element) {
ref.current.getBoundingClientRect();
}
```
Reviewed By: yungsters
Differential Revision: D70244966
fbshipit-source-id: 3c1e3698b8851ef9ce3c2865e7435b000984c8f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49696
Changelog: [internal]
This is just a change for convenience, as Flow is currently typing `textContent` in `Node` as `string` instead of as `string | null` as we were doing.
Our behavior was more correct, as `Document` extends `Node` and it returns `null` in that case, but to ensure a smooth migration we'll adopt the existing definition.
Reviewed By: huntie
Differential Revision: D70244963
fbshipit-source-id: ad8325d6e00c221e858e4e2d45085666ff0a0ce7
Summary:
Solves the iOS part of https://github.com/facebook/react-native/issues/47186.
`onContentSizeChanged` event is sent inside the `updateLayoutMetrics` method every time it's invoked. A change in layout metrics doesn't mean that the content size also changes, like changing the position of the input.
This PR adds a condition that the content size must have changed before sending the event.
|Before this change|After this change|
|-|-|
|<video src="https://github.com/user-attachments/assets/743e1502-e13e-474e-b4a6-ef6873bf9619">|<video src="https://github.com/user-attachments/assets/fe3d3ef5-3951-4ba2-b9a1-c41439ab455c">|
In the reproducer from the issue, `SafeAreaView` is used, which at first renders its content without any insets until its state is updated with the correct insets. Both of these layouts change the layout metrics of the text input, resulting in two events before this change and a single one after.
## Changelog:
[IOS] [FIXED] - Fixed TextInput's `onContentSizeChange` event being dispatched multiple times with the same size
Pull Request resolved: https://github.com/facebook/react-native/pull/49695
Test Plan: Tested on the reproducer from the issue
Reviewed By: NickGerleman
Differential Revision: D70247460
Pulled By: j-piasecki
fbshipit-source-id: 8a1e0d0f55b6b3f8a6d0bb176ed50e47e3b51035
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49699
Changelog: [internal]
Just a minor optimization in `ReactNativeElement`, to stop creating an unnecessary object in the prototype chain for the `super()` removal optimization.
Reviewed By: huntie
Differential Revision: D70250804
fbshipit-source-id: 1f8104f8e17f12264326cd715e07877a371f9dc5
Summary:
This PR implements a C API to switch JS Engines that can be used from Swift.
Here is an example:
```swift
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
import UIKit
import RCTRuntime
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
override func createJSRuntimeFactory() -> JSRuntimeFactory {
jsrt_create_jsc_factory() // Easily switch engines here
}
}
```
## Changelog:
[IOS] [ADDED] - js runtime C API for Swift
Pull Request resolved: https://github.com/facebook/react-native/pull/49489
Test Plan: CI Green
Reviewed By: huntie
Differential Revision: D69976988
Pulled By: cipolleschi
fbshipit-source-id: 9333ec62ca99a28c3121f558bbff1ce0457779e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49702
In the next version of Flow, we will stop bundling many of the builtin libdefs, and they have been moved to flow-typed. This diff checks in them to prepare for the deployment of the next version of Flow.
Changelog: [Internal]
Reviewed By: alexmckenley
Differential Revision: D70256694
fbshipit-source-id: 44e0772cc982add44723c252ea547a9cea0641e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49666
This change moves the index.js file to the `releases` folder, giving it a meaningful name.
It also rename the prebuild folder to ios-prebuild to be more descriptive.
It finally removes the old scripts that this refactoring supersedes.
bypass-github-export-checks
## Changelog:
[INTERNAL] - Move the infdex.js to the prepare-ios-prebuilds script.
Reviewed By: cortinico
Differential Revision: D70176043
fbshipit-source-id: e0c3f3bd53adf97fa388c37a746d274fd678f690
Summary:
This change refactors the script to prebuild ios dependencies by:
- remove the manually maintained Package.swift
- add script to generate it starting from the configurations that we have
bypass-github-export-checks
## Changelog:
[INTERNAL] - Factor out script to generate Package.swift file
Reviewed By: cortinico
Differential Revision: D70175760
Pulled By: cipolleschi
fbshipit-source-id: a1b0fc6dcdc1860b04ab260697f259c297338f41
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49657
For some use-cases we still want to log using the internal fbsystrace API which allows backdating of events.
This feels a bit weird putting it in `ReactPerfettoLogger`, but maybe we should rename that to something like `TraceLogger` (like we have `TraceSection`).
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70109680
fbshipit-source-id: 7757b81ec5032e3800446a88198c7da135afdd0e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49691
Changelog: [internal]
This adds a new getter for `document` in the `Root` class in Fantom tests to easily access the document instance for the root.
This isn't very useful at the moment, but will be very useful when we introduce `document.getElementById`, so we can access arbitrary nodes very easily.
Reviewed By: javache
Differential Revision: D69307130
fbshipit-source-id: 2650bc03e143ee9f0b29d0f284a2f9079ab9f765
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49690
Changelog: [internal]
We're shipping this soon and most tests already using DOM APIs to make assertions, so it's easier if we just "ship" in tests.
Reviewed By: javache, sammy-SC
Differential Revision: D69307129
fbshipit-source-id: 75d0be013703cff7bc2bad5cd16c26bc6471e547
Summary:
Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin.
Note: To keep the logic the same as in Java, I had to make the params of RequestBodyUtil.createProgressRequest non-nullable again which were made nullable by mistake in https://github.com/facebook/react-native/pull/49584.
## Changelog:
[INTERNAL]- Migrate com.facebook.react.modules.network.ProgressRequestBody to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49682
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: rshest
Differential Revision: D70239855
Pulled By: cortinico
fbshipit-source-id: 03c5e0bd5c66a4d5df5e4304d4479ec576d350fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49687
Changelog: [internal]
Just a minor type rename to better reflect what this type will become soon.
Reviewed By: cortinico
Differential Revision: D70185597
fbshipit-source-id: d5a67eda44dc88dd32a5290f1d0b292ed7014006
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49633
Changelog: [internal]
This replaces the definition of `HostInstance` to use an interface instead of an object, to better represent the underlying type (an instance of `ReactFabricHostComponent`) and simplify the migration to the new DOM API.
Reviewed By: huntie
Differential Revision: D70023947
fbshipit-source-id: bf312abf02fec48b2b5afb41053593ce542f7324
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49658
This bumps the version of Node that we use to build React Native from 18 to 20.
We'll still be supporting building with 20, but we'll moving our toolchain to Node 20 becuase 18 is at EOL soon.
Changelog:
[General] [Changed] - Bump Node 18 -> 20 to build React Native in OSS
Reviewed By: javache, cipolleschi
Differential Revision: D70168003
fbshipit-source-id: b64ee583b2d2e72d25393119ae9e9029a74d5b13
Summary:
Reland of https://github.com/facebook/react-native/issues/49413 which was reverted due to an internal crash. I've attempted to do a solution to keep backwards compatibility but doesn't seem to work – keeping the original solution for now, perhaps something else can be cleaned up to avoid the breakage.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.uimanager.ReactClippingViewGroup to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49607
Test Plan:
```bash
yarn test-android
yarn android
```
Verified that the update changes do not cause a crash.
Test flow:
- login to BizApp using Instagram account
- on home screen scroll down to Insights section
- it should show without crashing
Reviewed By: arushikesarwani94
Differential Revision: D70200000
Pulled By: alanleedev
fbshipit-source-id: 89bc948c1b91d9419d4b6e1885d949c4a3c20986
Summary:
## Summary
> [!NOTE]
> This only modifies types, so shouldn't have an impact at runtime.
Some time ago we moved some type definitions from React to React Native
in #26437.
This continues making progress on that so values that are created by
React Native and passed to the React renderer (in this case public
instances) are actually defined in React Native and not in React.
This will allow us to modify the definition of some of these types
without having to make changes in the React repository (in the short
term, we want to refactor PublicInstance from an object to an interface,
and then modify that interface to add all the new DOM methods).
## How did you test this change?
Manually synced `ReactNativeTypes` on top of
https://github.com/facebook/react-native/pull/49602 and verified Flow
passes.
DiffTrain build for [9dd378ff1222335ff133bab2d61001fcc84a1c56](https://github.com/facebook/react/commit/9dd378ff1222335ff133bab2d61001fcc84a1c56)
Reviewed By: poteto
Differential Revision: D70091830
fbshipit-source-id: 2cc49d8ed89e8ee2531dbc4094ef9720fc3040ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49678
In this diff I'm undeprecating SynchronousEventReceiver and marking it as UnstableReactNativeAPI, to properly describe the status of this API.
changelog: [internal] internal
Reviewed By: mlord93
Differential Revision: D70193235
fbshipit-source-id: c4818c89eecef135e9e1f82d35e7f1e2d46b1637
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49683
Use of these types will trigger `[internal-type]` error in the next version of Flow. This diff cleans them up ahead of the time.
Changelog: [Internal]
Reviewed By: gkz
Differential Revision: D70202028
fbshipit-source-id: 97b7217040b63514f20888fb20c86596235a82a6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49632
changelog: [internal]
Add gating to experiment with removal of `_turboModuleManagerDelegateMutex`.
# Why remove _turboModuleManagerDelegateMutex?
- It is not consistently used in the class. Here is a case where access to _delegate is not protected by the mutex: https://fburl.com/code/9tay04fn
- From inspecting individual implementations of RCTTurboModuleManagerDelegates, it is not needed to synchronise access.
- It may lead to deadlocks under following conditions:
- **A)** JavaScript thread gets hold of the `_turboModuleManagerDelegateMutex` and then tries to dispatch a block on the main thread synchronously (calling `RCTUnsafeExecuteOnMainQueueSync`). For example, when a new native module is created lazily because JavaScript used it and the native module requires main thread setup.-
- **B)** The main thread tries to get hold of `_turboModuleManagerDelegateMutex` when it is creating a native module ([[RCTModuleRegistry moduleForName:lazilyLoadIfNecessary:]](https://fburl.com/code/lioi5zei)) from Obj-C.
Reviewed By: javache, cipolleschi
Differential Revision: D70087779
fbshipit-source-id: 1780b2f48537dd578260a96f8f498dbe11529689
Summary:
The class is still in Java and also lacks of some tests so adding them to make it safer to migrate or for future refactors.
## Changelog:
[INTERNAL] - Add `ProgressResponseBodyTest` test cases
Pull Request resolved: https://github.com/facebook/react-native/pull/48675
Test Plan:
```bash
yarn test-android
```
Reviewed By: alanleedev
Differential Revision: D68205423
Pulled By: rshest
fbshipit-source-id: edb1dcf4da34377b7b1dcfc68a6e08861421964b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49635
Changelog:
[General][Internal] - report proxy idle state in heartbeat events
The proxy is considered Idle if it didn't receive any messages for 10 seconds.
Reviewed By: robhogan
Differential Revision: D70078637
fbshipit-source-id: 5b8d9a3a6e3e2568e40b3ada0a41e76b277fe66d
Summary:
`NSUnderlinePatternDash`/`NSUnderlinePatternDot` are [deprecated](https://developer.apple.com/documentation/uikit/nsunderlinepatterndash). Use their drop-in replacements (`NSUnderlineStylePatternDash` and `NSUnderlineStylePatternDot`) instead.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[IOS] [DEPRECATED] - Update deprecated enums in RCTTextPrimitivesConversions.h
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/49648
Test Plan: Local build
Reviewed By: cortinico
Differential Revision: D70153675
Pulled By: cipolleschi
fbshipit-source-id: e64c9df1a5282a3f33f742a455c64c002f0c8044
Summary:
After this change: https://github.com/facebook/react-native/pull/49078 UIWindowSceneDelegate is no longer needed.
This wasn't removed in the original PR.
## Changelog:
[iOS] [Removed] - Remove no longer needed UISceneDelegate
Pull Request resolved: https://github.com/facebook/react-native/pull/49628
Test Plan: CI GREEN
Reviewed By: cortinico
Differential Revision: D70102384
Pulled By: cipolleschi
fbshipit-source-id: e33185a4becd949a9f0ec1eabeeb4fe85ef3ee79
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49516
Merge global.d.ts and globals.d.ts into one file and align some definitions with implementations.
Changelog:
[General][Changed] - Improve TypeScript types for `global` objects
Reviewed By: huntie
Differential Revision: D69772463
fbshipit-source-id: 4771e27a97e1e9cbc33d8f75ba11cffd4d200124
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49637
The dtslint requires that the minimum typescript version of 4.9 is used.
Changelog:
[General][Changed] - Increase minimum typescript version in index.d.ts
Reviewed By: huntie
Differential Revision: D69749044
fbshipit-source-id: be255d108c2e9e9452808ba3dea981a7fac0bc21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49655
This tripped me up since this if hits for TextViews in general, not just EditText
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70139349
fbshipit-source-id: 1993dda4c6472265c5e61fa4cad4f2beaf4a9930
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49654
This is a lint error, so figured I would fix it
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D70138099
fbshipit-source-id: 489bedc28ac15bed8f98cc3eceb9e393cd4598e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49587
This is a reland diff for D69805065.
The problems with the original diff were:
- wrong header search path in the `React-NativeModuleApple.podspec`
- adding an implementation `RuntimeExecutor.cpp` file to implement a function that is used by an inline function in the `RuntimeExecutor.h`.
I believe that the last point specifically was creating issues to the linker which was not able to resolve the symbols properly in transitive dependencies.
The fix was to move the implementation of `getMainThreadMutex` to be `inline`.
## Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D69922771
fbshipit-source-id: 285ce1f232e8c94b99d80aafe1ffbc473921d52f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49639
Changelog: [internal]
This refactors some code in the performance API and Perfetto to avoid doing unnecessary work when not tracing (e.g.: string manipulation for tracks).
It also reduces the cost of logging marks/measures to tracing backends if not actively tracing (e.g.: moving the check to outside the lock).
Reviewed By: bgirard
Differential Revision: D69246772
fbshipit-source-id: 141a13f609f12be7ab8ca00f7aa1892b34770bbb
Summary:
Fixes assert crash in https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
We can temporarily downgrade _LIBCPP_HARDENING_MODE to _LIBCPP_HARDENING_MODE_EXTENSIVE, it disables strict weak ordering check in debug mode. Actually, when we sort animation mutations, we don't need it to satisfy strict weak ordering.
https://libcxx.llvm.org/Hardening.html#id3
Another solution is we make sort satisfy it, but we don't have any key to compare when two mutation is the same mutation type but not the same parentTag. Maybe we can use pointer of muation to compare?
## Changelog:
[IOS] [FIXED] - Fabric: disable React-Fabric stable_sort strict weak sort check in debug mode
Pull Request resolved: https://github.com/facebook/react-native/pull/49422
Test Plan: Fixes https://github.com/facebook/react-native/issues/46568#issuecomment-2653747732.
Reviewed By: sammy-SC
Differential Revision: D69984937
Pulled By: cipolleschi
fbshipit-source-id: 2a3d17970def513c4ba915068f25338169db82d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49559
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
Renames `Animated.js` to `AnimatedExports.js`, and introduces an intermediate file that reexports `* as Animated` as a default. This should have equivalent runtime behavior, but allows for a common interface file: `Animated.js.flow` to reinterpret the module as having single exports. TypeScript treats this as a namespace.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D69849314
fbshipit-source-id: cdaa605ba5361d3349c6dd0e84fd0fbfee263941
Summary:
## Summary
The `flow-api-translator` from the `hermes` repo does not support flow
type spreads. It is currently not able to digest the ReactNativeTypes
file as it contains unsupported syntax. The simplest solution is to
change the type of the `TouchedViewDataAtPoint` to equivalent, yet
supported by the Flow tooling. In this case the intersection can be used
as
the `TouchedViewDataAtPoint` and `InspectorData` have no common
property.
## How did you test this change?
Run yarn flow native
DiffTrain build for [e670e72fa076449e40172e20d17cc67c1c15419c](https://github.com/facebook/react/commit/e670e72fa076449e40172e20d17cc67c1c15419c)
Reviewed By: rickhanlonii
Differential Revision: D69661050
fbshipit-source-id: 1732bd9ac9c1af1e4c0b95758e92d9ccf3b807e6
Summary:
fix: https://github.com/facebook/react-native/issues/49368
description is provided inside the ticket.
When we use TextInput on ios and manage selection with the selection prop, TextInput is reset when we change selection.
## Changelog:
[IOS] [FIXED] - Fix selection makes TextInput clear its content when using children
Pull Request resolved: https://github.com/facebook/react-native/pull/49450
Test Plan:
Tested with sample provided in ticket.
I also test it with my app on both android and ios, but I cannot share video
Reviewed By: sammy-SC
Differential Revision: D69984616
Pulled By: cipolleschi
fbshipit-source-id: a17169608f9df0ea1cb579e6038345f8e48bbc27
Summary:
The js prop name is `shouldRasterizeIOS` https://reactnative.dev/docs/view#shouldrasterizeios-ios, so we should change the prop name when parsing the props.
## Changelog:
[IOS] [FIXED] - Fabric: Fixes shouldRasterizeIOS prop of View not work on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/49615
Test Plan:
Enable `shouldRasterizeIOS` should work in Fabric:
```
<View shouldRasterizeIOS={true}>
```
Reviewed By: rshest
Differential Revision: D70085480
Pulled By: javache
fbshipit-source-id: 499524b7812f932b0da4a4f239ff6a79043b2f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49629
I don't think `RCTSampleTurboCxxModule_v1` does anything useful anymore since we no longer use the `getTurboModuleWithJsInvoker:` API anywhere.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D70088150
fbshipit-source-id: 6391531c412dec18c63948db883aba07ab21499e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49602
Changelog: [internal]
This just prepares for the removal of some types from `ReactNativeTypes`, and defines some types in `ReactNativePrivateInterface` that `ReactNativeTypes` expects to be defined after https://github.com/facebook/react/pull/32446
Reviewed By: huntie
Differential Revision: D69996009
fbshipit-source-id: 3c156b4dede8e217d6a828ab310533a2f8bfd42c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49601
Changelog: [internal]
This creates a new module in React Native to define some of the types related to `HostInstance` that are currently defined in `ReactNativeTypes` (synced from the React repo).
We want to remove the types from `ReactNativeTypes` so this is a necessary initial step.
Reviewed By: huntie
Differential Revision: D69996010
fbshipit-source-id: 21cfed4c222e22332936e56aca895fe578809792
Summary:
`TextInput` component has been missing support for `numberOfLines` prop on iOS, this PR adds it.
## Changelog:
[IOS] [ADDED] - Add support for `numberOfLines` prop on `TextInput`
Pull Request resolved: https://github.com/facebook/react-native/pull/49549
Test Plan: Tested on RNTester and added a new case utilizing the prop
Reviewed By: cipolleschi
Differential Revision: D69915133
Pulled By: j-piasecki
fbshipit-source-id: b6a86bc64bd3c2129a64e99c9bcec9cf5bfde3bc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49618
Changelog:
[General][Internal] - create a heartbeat for device, and not only for debugger.
Introducing a heartbeat for the connection between the proxy and the device similarly to the one between the proxy and the debugger. This will allow us to:
* Most importantly I'd like to track the ping-pong roundtrip to the device as well, to see if we have any anomalies there
* Terminate the connection if it is abandoned for 60seconds- this might have a real effect in some case where the device runs remotely
* Also keep that connection alive if the other side disconnects after a period of inactivity. While a no-op in our case, this is an implementation detail. It is a no-op because the WebSocket on the Device is implemented by us and is not supposed to drop connections like the browser does.
Reviewed By: robhogan
Differential Revision: D69990715
fbshipit-source-id: 6bb3a2ed3eaffff9535aa2d0fc8cff0262af022f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49612
`[UIApplication sharedApplication]` is not allowed in Mac Catalyst. This #ifdef's it out which is a common pattern elsewhere.
Changelog: [Internal]
Reviewed By: shwanton
Differential Revision: D69971189
fbshipit-source-id: 89dbc0a02ed2a06936f910fbfc13e1fb91972540
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49605
changelog: [internal]
Calling `RCTUnsafeExecuteOnMainQueueSync` while holding a lock can lead to a deadlock. In this diff, we remove it from RCTKeyWindowValuesProxy.
Reviewed By: javache
Differential Revision: D69997888
fbshipit-source-id: a09fc641c9fb2aec59aef34e4047e1ef11cdaf02
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49381
A much improved version of my previous attempt in D68306316 (https://github.com/facebook/react-native/pull/48773).
Instead of LinkMovementMethod which makes TextViews scrollable if they overflow, this implementation uses `ExploreByTouchHelper`'s `onVirtualViewKeyboardFocusChanged` and `onPerformActionForVirtualView` to handle focus changes and clicks on virtual views (aka spans in our case). This impl will correctly ellipsize text and allow tab to nav through the links.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D69551206
fbshipit-source-id: 6a88ccd507dc5534c1f494e3303c6bfc2bae5e9f
Summary:
Whenever we remove a link in some text we do not properly update the accessibility delegate to respond to this change. As a result we still think that there are nodes to access around the spans
Changelog: [Android][Fixed] - Fix text link accessibility on state update removal
Reviewed By: NickGerleman, mdvacca
Differential Revision: D69551906
fbshipit-source-id: f43fcf72219e76d2d0bbb29d31ab219d73413671
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49377
ReactAccessibilityDelegate exists to handle much of the accessibility tasks in the various Views in RN. There is quite a bit of text specific logic, mostly related to virtual views and nested links within a TextView.
I decided to subclass this into a TextView-specific version because I need this delegate to reference TextView or ReactClickableSpan, which live under `react/views` while ReactAccessibilityDelegate live under `react/uimanager`. The former depends on the latter, so making the latter depend on the former would for a dependency cycle that would break builds. I thought about making a separate package for this but both `react/views` and `react/uimanager` need to include ReactAccessibilityDelegate so we would still have a cycle.
mAccessibilityLinks is only set on ReactTextViewManager, so this is purely a text thing. Subclassing is not the most ideal as it extends the inheritance chain some more but I do not see a better option.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D69499115
fbshipit-source-id: 1720d20bb56ba1e1b5bd114d32bc70e80e3b4558
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49581
I need to be able to find a View with a specific nativeId as part of my implementation of accessibility ordered children. This already exists in Android in `ReactFindViewUtil.kt`.
Not much to this implementation. Recursive tree searching. I do not think perf is a big deal here but if we want to optimize this we could implement some nativeId registry and try and get the UIView * from that at the expense of storing that map somewhere.
Changelog: [Internal]
Reviewed By: vincentriemer
Differential Revision: D69868430
fbshipit-source-id: b3648a8dca351bed50534cac2144d7e8ea0a207f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49590
This feature flag was used to validate a fix for handling of events during
gesture on pressable. It can now be removed as the flag has been set to true for several
internal app (Twilight among others) for several months.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D69983235
fbshipit-source-id: 89b96b3e4c98ae258982341f56ddc13aa2fe51bd
Summary:
Opening this as a separate PR, since I'm not sure if I'm missing something, or if there's any intention behind this.
`react-native/metro-babel-transformer` is used by `react-native/metro-config` and is referenced in code there and as a dependency there. It's also sometimes mentioned as package for community CLI users to install directly. However, there's seemingly no reason `react-native/metro-babel-transformer` needs to depend on it, or any code that relies on it directly.
## Changelog:
[INTERNAL] [CHANGED] - Remove extraneous `react-native/metro-babel-transformer` dependency from community-cli-plugin
Pull Request resolved: https://github.com/facebook/react-native/pull/49558
Test Plan: - n/a
Reviewed By: robhogan
Differential Revision: D69926109
Pulled By: huntie
fbshipit-source-id: b89b54890248de4954e5c0ce4afe3a5cb5bfa2c1
Summary:
Update androidx app compat to the latest version.
This is needed as part of https://github.com/facebook/react-native/pull/49486 to have access to `fullyDrawnReporter`.
## Changelog:
[ANDROID] [CHANGED] - Update androidx app compat to 1.7.0
Pull Request resolved: https://github.com/facebook/react-native/pull/49594
Test Plan: Tested in RN tester that it builds fine and works properly.
Reviewed By: Abbondanzo
Differential Revision: D69988202
Pulled By: cortinico
fbshipit-source-id: 0329aa84a76327db535ddba8acf059ebbf1dbdfc
Summary:
This package does not seem to be referenced by anything but the tests in `packages/dev-middleware`, so seems like a pretty straightforward change to drop it from `dependencies`.
It only seems to be referenced in `packages/dev-middleware/src/__tests__/ServerUtils.js`
## Changelog:
[INTERNAL] [CHANGED] - Remove selfsigned from dev-middleware dependencies
Pull Request resolved: https://github.com/facebook/react-native/pull/49556
Test Plan: - n/a
Reviewed By: cipolleschi
Differential Revision: D69925928
Pulled By: huntie
fbshipit-source-id: bba41f81dba054505ebf196ad37c7a718a6b16da
Summary:
While `readline` is referenced in `packages/community-cli-plugin/src/commands/start/attachKeyHandlers.js`, this references the `node:readline` module by default. The extra package seems to have been installed and included accidentally, as the `attachKeyHandlers` file uses an export from `node:readline` that's never been present in `npm:readline`.
Since the name matches but Node.js will always prefer built-in/code modules, this dependency is dangling and can never be reached, since it's name is shadowed (as also stated in their readme). This can be reproduced by comparing `require('readline')` and `require('../../node_modules/readline')` in `packages/community-cli-plugin`. The flow types also confirm this.
This overall seems highly safe to drop.
## Changelog:
[INTERNAL] [CHANGED] - Remove shadowed and unused readline npm package from community-cli-plugin
Pull Request resolved: https://github.com/facebook/react-native/pull/49557
Test Plan:
Prior to changes applied:
```sh
$ node -e 'console.log(require("readline") === require("node:readline"))'
true
```
Reviewed By: cipolleschi
Differential Revision: D69925999
Pulled By: huntie
fbshipit-source-id: 802fdaa396630b44d5aacefeb9c2473fb53d167e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49589
We should not be attempting to compile anything related to the annotation
processor in either Kotlin or Java.
This excludes those folders from the Kotlin compilation task as the
CI is currently red because of it.
Changelog:
[Internal] [Changed] -
Reviewed By: huntie
Differential Revision: D69981620
fbshipit-source-id: 7e2d534023ab1c00e5aadf8546440a4cc4c01ec0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49572
Changelog: [internal]
This adds a test to verify the behavior of 2 feature flags: synchronous state updates and UI consistency.
Reviewed By: javache
Differential Revision: D69932313
fbshipit-source-id: 341cfff3fa533503a293f6ccd0282442ba63d430
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49586
Reverting https://github.com/facebook/react-native/pull/49413 as it was causing a crash with assertion failure in ReactViewGroup.addViewWithSubviewClippingEnabled()
Changelog:
[INTERNAL] revert Kotlin conversion due to crash
Reviewed By: sbuggay
Differential Revision: D69953848
fbshipit-source-id: b438fb928a4849f3dbad6a9d59d0f48449035fd6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49570
This diff creates a initial version of the annotation processor to output the list of types that are annotated with LegacyArchitecture
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D69929875
fbshipit-source-id: 90a8d299f4667ab8d103c061d287991dbdb291df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49569
In this diff I'm annotating a subset of bridge classes with LegacyArchitecture
The goal is to test the annotation processor in next diffs
changelog: [internal] internal
Reviewed By: cortinico, Abbondanzo
Differential Revision: D69929878
fbshipit-source-id: 8be4d010f6519617d334da361983dce0fa66e3b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49568
The goal of this annotation processor is to generate a file with all the types that belong to Legacy Architecture of React Native
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D69929876
fbshipit-source-id: c21bf1a868258b20be91721006d7fc8fa85adcd1
Summary:
This upstreams a change from [RNTV](https://github.com/react-native-tvos/react-native-tvos/) to allow the glog prepare script to work on both iOS and tvOS.
## Changelog:
[Internal][Changed] make iOS glog script compatible with tvOS
Pull Request resolved: https://github.com/facebook/react-native/pull/49539
Test Plan:
- This change works well on the TV repo
- CI should pass, and iOS compilation and operation should be unchanged
Reviewed By: cortinico
Differential Revision: D69928586
Pulled By: cipolleschi
fbshipit-source-id: b5fec438151e659e98834a83effbc7e166df6aa5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49552
Changelog:
[General][Internal] - expand debugger events to have DebuggerSessionIDs
Also moved the handling of these to a shared function
Reviewed By: huntie
Differential Revision: D69917817
fbshipit-source-id: 2374ac5b5dc0040b0e15028ab89fbe78026bc296
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49515
changelog: [internal]
_currentSafeAreaInsets should be initialised as part of `startObservingSafeArea` to make sure it is set before accessed.
Even though, right now _currentSafeAreaInsets is always set before it is read because notification RCTUserInterfaceStyleDidChangeNotification fires eagerly, it might change in the future and introduce a bug.
Reviewed By: lenaic
Differential Revision: D69846681
fbshipit-source-id: f8be8a53e82020112abd170b9f20429bf7ba7011
Summary:
When building `react-native-windows` our code analysis tools complained about an implicit `double` to `PointerIdentifier` in NativeDOM.cpp.
This PR adds an explicit cast.
Temporary downstream patch: https://github.com/microsoft/react-native-windows/commit/5957d0af6944d64513cead28186dfbcc74bbfea0
## Changelog:
[GENERAL] [FIXED] - Add explicit casts for pointerIds for PointerEvents in NativeDOM
Pull Request resolved: https://github.com/facebook/react-native/pull/48578
Test Plan: React Native Windows builds with this change and no more warnings.
Reviewed By: rubennorte
Differential Revision: D69920656
Pulled By: cipolleschi
fbshipit-source-id: 1d81f1fbfd91fadfb676d3e65c3c9cb729c1d3dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49553
The new React-renderercss pod is an header only pod. These are not allowed by Cocoapods, because it will not materialize the framework when building with then turned on.
the solution is to just add an empty source file to frorce cocoapods to materialize the .framework file and solve the dependency graph properly.
## Changelog:
[Internal] - Add dummy file to React-renderercss
Reviewed By: huntie
Differential Revision: D69920318
fbshipit-source-id: e5cc092a480f7c86eeb295ed966f85b6f55fdc54
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49554
For some reason, this diff completely breaks the linker on iOS.
I tried to look for a fix forward, but unsuccessfully.
I'm reverting this diff to get CI green again, but this requires more investigation.
## Changelog:
[Internal] - Revert D69805065
Reviewed By: sammy-SC, huntie
Differential Revision: D69920338
fbshipit-source-id: 8e1d34b5314d8ead51c127208ae2d2250f7d3724
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49522
While testing the script, sometime I obtained undesired results because I was passing the wrong values for the arguments.
This change add a simple validation function to inform the user when the arguments that are passed are not valid.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D69851416
fbshipit-source-id: c378a3ca5db942cca5178274204a0d01d1eefdf7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49523
There was a typo when checking the configuration. The default parameter is `all`, not `All`.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D69851429
fbshipit-source-id: 7f16f5f89c90824ceb57f9980bc38a31be33ccfe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49524
If there is already an XCFramework in the current location. xcodebuild fails to create and override the xcframework.
This change allows us to override an old xcframework and to iterate more quickly.
## Changelog:
[Internal] -
Reviewed By: cortinico
Differential Revision: D69851428
fbshipit-source-id: 723b3035cec008e2bd177da4f960f2bb085ff493
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514
This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.
Changelog:
[Internal] [Changed] -
Reviewed By: NickGerleman
Differential Revision: D69846848
fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49535
changelog: [internal]
Add a unit test to cover scenario where ScrollView's parent has a transform
Reviewed By: NickGerleman
Differential Revision: D69860855
fbshipit-source-id: 1b64665c5b15ad2e5e068d4c6d56f9694ac7cf03
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49546
Right now we rely on the ViewConfig processor to fire an invariant if the values are incorrect. We really don't want to redbox in the future on invalid properties, and this won't be around for the native CSS parsing path.
This code has some problems, like... radian parsing allowing potential out-of-bounds reads, firing a native assert for valid 9 digit matrices, or the layers in conjunction treating `0.5r.degoggos00` as a valid way to say 0.5 radians. Wheeee!
This change mostly just ports over the checks from `processTransform` to validate parameters before we use them, treating the whole transform list as invalid if any part of it is broken. I moved radian and percentage parsing the the CSS data type parsers as well.
I avoided changing props structures again here.
Changelog:
[General][Changed] - Add validation to Fabric parsing for transform options
Reviewed By: javache
Differential Revision: D69823064
fbshipit-source-id: 87c6da448a4b55e0507382b98aabd62ce3e4587f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49545
During tokenization we use 32 bit integers to store the digits before and after a decimal place.
Code interpolating strings may produce float strings with the part after digits being greater than max int, in which case we encounter integer overflow caught by UBSAN.
I was curious how libc functions for decoding floats handled this, and musl libc goes really out there, storing each intermediate digit in an array of 128 or more digits, and later using `long double`, in a shockingly complicated function. https://github.com/kraj/musl/blob/1880359b54ff7dd9f5016002bfdae4b136007dde/src/internal/floatscan.c#L63
We... probably don't need to go that far, but storing these intermediate digits as doubles should be precise enough and allow large enough values in the vast majority of cases.
Changelog: [Internal]
Reviewed By: sammy-SC, jorge-cab
Differential Revision: D69881560
fbshipit-source-id: b2158ce2c5d85157426cea9850c7f62c2eee5611
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49509
Currently if we hit a deadlock in sync rendering due to a TurboModule initialization that requires main queue setup we don't get any information about which TurboModule caused the issue.
To help us know which TurboModules we need to fix, this instead will crash with the name of the TurboModule.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D69805065
fbshipit-source-id: f75df44f9a603a5f53a008382d32b2b5285c1162
Summary:
Okay the title is a bit clickbaity, but this is actually true. (on Android)
We (Janic, Szymon, Ruby and Me) discovered something interesting. React Native uses `mmap` for mapping the JS bundle to RAM, to avoid having to load the entire thing instantly at app startup.
Ruby doubted that this was true - so we investigated.
Apparently on Android, resources are **compressed**. And if the JS bundle is stored compressed, it has to be uncompressed before it can be loaded into RAM, hence not allowing it to be mmapp'ed! (see [`_CompressedAsset::getBuffer`](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/libs/androidfw/Asset.cpp;l=903?q=Asset.cpp))
So with this PR, we now add `.bundle` files to `noCompress` in the react-native gradle plugin, which disables compression for the JS bundle.
We discovered while improving the performance of one of our clients: **Discord**.
In our tests, **this improved the TTI of the Discord app by 400ms!! (or 12%)** 🤯🚀
NOTE: Yes, the .apk will now be bigger. But; Google Play compresses it anyways, so the **download size** of your .apk will likely not increase by much. It will be bigger on disk though.
## Changelog:
[ANDROID] [CHANGED] Add option to disable bundle compression to improve startup time
<!-- 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/49449
Test Plan:
### 1. Verify compression is disabled
Build two apps, one with this patch and one without. When I did this using the RN community template, the one without this patch was 47,6 MB, and the one with this patch was 48 MB in size. So the .apk got bigger, which is what we expected
### 2. Verify app startup is faster
Use tools like react-native-performance or custom markers to measure TTI. In our tests, we shaved off 400ms from the startup time, which was about 12% of Discord's total TTI. (on a low-end Android device)
In Expensify, we improved the TTI by 14-20% with this change (source: https://github.com/Expensify/App/pull/56930)
Reviewed By: javache, cipolleschi
Differential Revision: D69742221
Pulled By: cortinico
fbshipit-source-id: bd59d77662bd30a3acdbb2e9f8d8f23db922c3f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49534
Moving the U+200E character ensures that it gets the same font style as other fragments in the LogBox inspector. This solves an issue where the line height differential is causing issues on some out-of-tree platforms (e.g., Windows).
## Changelog
[Internal]
Reviewed By: shwanton
Differential Revision: D69857916
fbshipit-source-id: 5bc70dc0282f3ef9e9b2767ab8094e9923638e99
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49532
I've done a pass with Android Studio and removed automatically all the `public` modifier
that are not really needed.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D69857731
fbshipit-source-id: 5098a3454a66e5f1eb58ccf07006558cba360066
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49533
Android Studio is telling us that those modifiers are not sorted according to the 'canonical order'.
This is quite annoying while editing so I'm sorthing them all using the IDE inspection.
We should add a rule inside ktfmt for this, but that's another work.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D69857730
fbshipit-source-id: 3aae3d5b114cf4c629c8320a697d17fff686730b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49542
When fusebox loads, we display this static message on apple platforms:
```
Debugger integration: iOS Bridgeless (RCTHost)
```
We are running RN MacOS using the xplat `RCTHost` and want to show the correct platform
[Changelog] [Internal] - Use current apple platform name instead of hardcoding 'iOS'
Reviewed By: robhogan
Differential Revision: D69867335
fbshipit-source-id: 5973882c710447fdb7ef18e82ff304e4cd16a85c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49541
changelog: [internal]
`RCTSurfacePresenter` may be initialised from a background thread. This breaks the requirement of `RCTInitializeUIKitProxies`, which must be always called on the main thread.
Differential Revision: D69874923
fbshipit-source-id: 098f543bd3a849ee9ee1b63b567290f67c0109cd
Summary:
This fixes an issue in Fabric where changing the layout direction and then reloading the JS bundle did not honor the layout direction until the app was restarted on iOS. This now calls `_updateLayoutContext` whenever RCTSurfaceView is recreated which happens on bundle reload. This is not an issue on the old architecture because the layout direction is determined within the [SurfaceViews](https://github.com/facebook/react-native/blob/acdddef48eb60b002c954d7d2447cb9c2883c8b3/packages/react-native/React/Views/RCTRootShadowView.m#L18) which were recreated on bundle reload.
## Related Issues:
- https://github.com/react-native-community/discussions-and-proposals/issues/847
- https://github.com/facebook/react-native/issues/49451
- https://github.com/facebook/react-native/issues/48311
- https://github.com/facebook/react-native/issues/45661
## How can we take this further?
If we want to make it so that it doesn't require an entire bundle reload for RTL to take effect I believe these are the steps that would need to be taken:
- Make it so [RCTI18nManager](https://github.com/facebook/react-native/blob/acdddef48eb60b002c954d7d2447cb9c2883c8b3/packages/react-native/React/CoreModules/RCTI18nManager.mm#L52) exports isRTL as a method instead of consts
- Send Notification Center notif when RTL is forced on or off
- Listen for that notification RCTSurfaceView and call _updateLayoutContext similar to UIContentSizeCategoryDidChangeNotification.
## Changelog:
[iOS] [FIXED] - Layout direction changes are now honored on bundle reload.
<!-- 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/49455
Test Plan:
On the new architecture change force the layout direction and reload the bundle:
```
import React, { useCallback } from "react";
import { Button, I18nManager, StyleSheet, Text, View } from "react-native";
import RNRestart from "react-native-restart";
export default function Explore() {
const onApplyRTL = useCallback(() => {
if (!I18nManager.isRTL) {
I18nManager.forceRTL(true);
RNRestart.restart();
}
}, []);
const onApplyLTR = useCallback(() => {
if (I18nManager.isRTL) {
I18nManager.forceRTL(false);
RNRestart.restart();
}
}, []);
return (
<View style={styles.area}>
<Text>Test Block</Text>
<View style={styles.testBlock}>
<Text>Leading</Text>
<Text>Trailing</Text>
</View>
<Button title={"Apply RTL"} onPress={onApplyRTL} />
<Button title={"Apply LTR"} onPress={onApplyLTR} />
</View>
);
}
const styles = StyleSheet.create({
area: {
marginVertical: 50,
paddingHorizontal: 24,
},
testBlock: {
paddingVertical: 10,
flexDirection: "row",
justifyContent: "space-between",
},
});
```
https://github.com/user-attachments/assets/0eab0d79-de3f-4eeb-abd0-439ba4fe25c0
Reviewed By: cortinico, cipolleschi
Differential Revision: D69797645
Pulled By: NickGerleman
fbshipit-source-id: 97499621f3dd735d466f5119e0f2a0eccf1c3c05
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49540
changelog: [internal]
it is dangerous to call RCTUnsafeExecuteOnMainQueueSync while holding a lock. We can avoid that by keeping only the checks into shared state under a lock and rest is without lock.
This also aligns implementation with other proxy objects.
Reviewed By: javache
Differential Revision: D69856171
fbshipit-source-id: 5f7fd1ebeb642796169d77a437fbc215c3c59795
Summary:
This diff reverts D69836482
D69836482: [react-native][PR] Make `RCTLog` & `ExceptionDataHelper` internal by cortinico causes the following build failure:
Tests affected:
- [automation_twilight_x86_debug](https://www.internalfb.com/intern/test/562950071241129/)
Here's the Multisect link:
https://www.internalfb.com/multisect/21397772
Here are the tasks that are relevant to this breakage:
T215694436: Some CI signals failing for oculus_twilight
The backout may land if someone accepts it.
If this diff has been generated in error, you can Commandeer and Abandon it.
bypass-github-export-checks
Reviewed By: cortinico
Differential Revision: D69860031
fbshipit-source-id: dedaba77f77467eebad279076add13bfcde45ef0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49478
changelog: [internal]
Move all main thread resources that RCTDeviceInfo needs to RCTKeyWindowValuesProxy class. That way, RCTDeviceInfo does not needs to use RCTUnsafeExecuteOnMainQueueSync and doesn't require main thread setup.
Reviewed By: javache
Differential Revision: D69747829
fbshipit-source-id: e8280d2f50258ee59043b5c3865b8a95496be8b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49518
`react-native/community-cli-plugin` depends on `createDevServerMiddleware` from `react-native-community/cli-server-api`.
`react-native/community-cli-plugin` currently [declares an optional peer dependency](https://github.com/facebook/react-native/blob/bae895500052bda2f55e1832b0c8a63a1b449de3/packages/community-cli-plugin/package.json#L39-L45) on `react-native-community/cli-server-api`, however because the latter isn't a dependency of `react-native` or the community template, the peer dependency is not available to package managers that enforce isolated node_modules - see https://github.com/facebook/react-native/issues/47309.
Rather than add an unnecessary dependency to the template (like [this](https://github.com/react-native-community/template/pull/105)), my proposal is to switch to a peer dependency on only `react-native-community/cli`, because that *is* a dependency of the community template and therefore will be resolvable.
Because `react-native-community/cli` doesn't re-export `createDevServerMiddleware` from its dependency on `cli-server-api`, we need to resolve the latter through the former. This can be cleaned up once a re-export lands - https://github.com/react-native-community/cli/pull/2605.
Changelog:
[GENERAL][FIXED] Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules.
Reviewed By: huntie
Differential Revision: D69848688
fbshipit-source-id: 009b8ffd43b2ab2d84fcc71e9e48382eb8950bb1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49526
Changelog: [Internal]
Introduce a binary tester for Fantom that will be used in runner when ready so OSS can run integration tests.
Here:
- Add BUCK target
- Add CMake target
Reviewed By: cortinico
Differential Revision: D69800975
fbshipit-source-id: 57e135e2a1cbfb88e0141ddc7859b9a29365ee1f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49499
Changelog:
[General][Internal] - warn when user tries to open DevTools, when not in debug mode
Reviewed By: huntie
Differential Revision: D69784836
fbshipit-source-id: aa60762f08f5dea1f91f4fd1ffc86eeb7f94e2fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49520
changelog: [internal]
Adds a new callback to EventBeat that is triggered in EventBeat::induce (that is when the UI thread is about to go IDLE). This will make state updates applied synchronously before the OS has a chance to paint but they will be batched. If two state updates happen in single UI tick, the will be executed at the end of UI's run loop.
The state updates are still not batched into a single commit. If two state updates happen on the same component, they are coalesced. If two state updates happen on two different components, they will generate two transactions. This is a follow up optimisation.
This feature is hidden behind `ReactNativeFeatureFlags::enableSynchronousStateUpdates` which is a preexisting feature flag. The feature flag was not rolled out yet and is not being used in any QEs at the moment.
Reviewed By: rubennorte
Differential Revision: D69848997
fbshipit-source-id: 870fd21f1d9d73d84861ddeac95b932a7fe1f5fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49498
This change handles the destinations and the configurations parameter when passed to the script.
## Changelog:
[Internal] - Handle `configuration` and `destination` parameters
Reviewed By: cortinico
Differential Revision: D69787469
fbshipit-source-id: 5c4ae766dad84640fbf5340efc296355c4944e1c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49492
Was looking at more places we could be using `HybridClassBase`, and figured out how to simplify ReadableMapBuffer constructors to remove the need for explicit soloading.
Changelog: [Android][Removed] `RuntimeExecutor` and `RuntimeScheduler` constructors are now private, `MapBufferSoLoader` was removed as no longer required.
Reviewed By: cortinico
Differential Revision: D69776110
fbshipit-source-id: 11eac4c59897a02283e021ac1457ef8299b6f480
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49474
changelog: [internal]
Can move setup to the background setup:
1. Use RCTTraitCollectionProxy to access current trait collection to check if force touch is available.
2. UIDevice.currentDevice is thread safe and can be read safely from a background thread.
Reviewed By: rshest
Differential Revision: D69744257
fbshipit-source-id: 8857a827c3d3e03a9b2ced15e6970d728693a043
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49473
changelog: [internal]
Add RCTTraitCollectionProxy which synchronises access to current trait collection. This way, RCTAppearance does not need main thread setup and RCTUnsafeExecuteOnMainQueueSync
Reviewed By: javache
Differential Revision: D69750211
fbshipit-source-id: 8457904fa1672d4bf811c04ef69969a8f8f4d87f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49469
This PR updates the changelog for 0.78 by combining all the RC into 0.78.0 stable, in preparation of the release in a couple of days.
This also adds categories to the commits and sort them alphabetically.
## Changelog:
[Internal] - Update vchangelog for 0.78
Reviewed By: cortinico, fabriziocucci
Differential Revision: D69745703
fbshipit-source-id: 825190c7a9573939ec7f1e388448142f8a8caf25
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49497
This change honors the task provided as an argument.
If `all` is passed, we execute all the commands.
If a specific task is passed, we only execute that command.
## Changelog:
[Internal] - Honor the task passed to the preopare-ios-script
Reviewed By: cortinico
Differential Revision: D69787470
fbshipit-source-id: 0dec13ad0b5f2cc23cc72b4a899405ac1acf4f86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49496
This change prepare the argument parsing to the prepare-ios-prebuilds so we can customise the behavior to simplify usage in CI.
It also adds the --help command to provide.
##changelog:
[Internal] - adds the help mfunction and argument parsing
Reviewed By: cortinico
Differential Revision: D69779877
fbshipit-source-id: d66bc19ee556229eb7167f2075b77bacce2ad5c4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49495
This change extracts the dependencies array to a separate file. This is helpful because we can use this file as cache-key to determines whether we have to rebuild the artifacts or not.
This file is also bound to grow so it will make the script more manageable.
## Changelog:
[Internal] - Move the dependencies for ios prebuilds on a separate file
Reviewed By: cortinico
Differential Revision: D69779522
fbshipit-source-id: 7ce60e426d428859f6f759d8e7b1ea499c36eff9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49475
changelog: [internal]
RCTNetworking does not need main thread setup, it doesn't access any main thread only resources.
Reviewed By: rshest
Differential Revision: D69744400
fbshipit-source-id: 25652c28d178a9e26fa0ede9b03fb87072094fb0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49500
changelog: [internal]
When crossing ScrollView boundary, cullingContext.transform must be reset to Transform.identity. Views are only culled within scroll view.
Reviewed By: NickGerleman
Differential Revision: D69787820
fbshipit-source-id: 5d502f764a2b1885ee4b49fc0c9ebb9d27de65dd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49418
This adds some missing validation for negative blurs which should be considered parse error. Unit tests added for the forked props parsing code to validate more generally.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69628917
fbshipit-source-id: 1451b53cfa673443f01d38bd0097c4e85c83db8b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49505
I want to go home 😭.
This is not very pretty, while we are both keeping the old path, and trying to keep the props data types undisturbed for now, and support some of the stranger syntax we ended up supporting as inputs to filters.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69562718
fbshipit-source-id: db8ff2c240b66e93a52ce2ac98e4a9ff2e7aeb4b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49503
Relanding this change, now checking for the existing of FeatureFlags native module before checking it, with the assumption when the native module is unavailable (legacy arch) we will never do native processing, or even use the SVC.
This aligns with the approach taken in `setupTimers` for the event loop, but is probably not the right long term solution for flags API.
This also inlines a couple fixes originally up the stack, of missing propagation of inline state, and missing the gating in ReactNativeStyleAttributes.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69804412
fbshipit-source-id: 1f285994132cff75b6845b64cf26fceae37d4c92
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49448
I noticed that when inset shadows have a smaller blur radius than spread its wrong and there is a gap between the edge of the box and the shadow. I think the outer rect is just defined incorrectly and we should be adjusting the paddingBox as opposed to the innerRect. The innerRect is just the padding box insetted by the spread, so that is why we see gaps if blur < spread
Changelog: [Android][Fixed] - Fix inset boxShadow when blur < spread
Reviewed By: jorge-cab
Differential Revision: D69688508
fbshipit-source-id: 911258edd9a8403c70992800c3e1a5ea044e1f3b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49463
We've started accumulating mode-files in many different directories, group them all under xplat/mode/react-native for consistency
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69658995
fbshipit-source-id: 70c842d24886b9b0ef8432d105ca64cac68078db
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49484
This is the last diff to add support for Gradle Configuration caching.
The last missing part here was the execution of the `config` command during Gradle configuration time.
Using Java processes API is not supported as the correct way to do external commands that are CC-friendly
is through the `.providers.exec` API which I'm using here.
Closes https://github.com/facebook/react-native/issues/45154
Changelog:
[Android] [Added] - Add support for Gradle Configuration caching
Reviewed By: cipolleschi
Differential Revision: D69753889
fbshipit-source-id: af1e844b38444659a908abce4029d43ad899c03d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49491
Changelog: [General][Breaking] Deep imports to modules inside `Libraries/DevMenu` using `require` may need to be appended with `.default`
Reviewed By: cortinico
Differential Revision: D69778671
fbshipit-source-id: 19362fbb003e53609881fc19e8d2cb96677b3006
Summary:
Currently we observed many iOS app crashes caused by the `[RCTFileRequestHanlder invalidate]` method, just as the below screenshot.
<img width="1008" alt="image" src="https://github.com/user-attachments/assets/d2d6714f-63d9-40ae-8de5-742cfe718a36" />
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [FIXED] - app crash caused by the `[RCTFileRequestHanlder invalidate]` method
Pull Request resolved: https://github.com/facebook/react-native/pull/48350
Test Plan: I am not able to reproduce this issue locally either, so the changes in this PR are totally from my inference, I am not sure if it really makes sense, so please help take a deeper look, thanks.
Reviewed By: javache
Differential Revision: D69751695
Pulled By: cipolleschi
fbshipit-source-id: aa4654a30f5dfac99b72ed1bda0dae1e0dc881c9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49479
changelog: [internal]
Notification UIApplicationDidBecomeActiveNotification is always delivered on the main thread, no need for dispatch.
Reviewed By: javache
Differential Revision: D69750103
fbshipit-source-id: 070fa7f95d8ecddff5d56ba317c8ed4f0ad880f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49470
Adds a `packages/react-native/index.js.flow` file.
**Motivation**
This is on the critical path to generating TypeScript types, and a full API snapshot, from `index.js.flow`.
As we iterate, this new file will move to closely matching `types/index.d.ts` by adding type exports (missing today) — giving us an equivalent public API in both languages.
**Motivation for this pattern**
Having a type index file:
- Will become the entry point for `yarn build-types`.
- Enables us to bypass the `module.exports` pattern in `index.js` without a runtime breaking change.
- This pattern is preferable because:
- 1/ Aligns with existing manual TypeScript definitions (i.e. these are **already restricted** to `import` syntax in user code)
- 2/ Allows doc comments on original types to propagate to IDEs/users.
**Implementation notes**
NOTE: This diff has **no effect** on compiled code at runtime, and **no effect** on the current manual TypeScript API of `react-native`. It only has an effect on Flow usage in fbsource — most of which are deep type imports today.
- Exports are grouped and sorted identically to each pre-existing getter in `index.js`.
Changelog: [Internal] - Redefine root `react-native` type exports, affecting Flow usages only
Reviewed By: rubennorte
Differential Revision: D69659837
fbshipit-source-id: c65e30d1ac5c4f322cfde9335dbee80a8c9efda8
Summary:
ref: https://github.com/facebook/react-native/pull/28266
Currently, SVG is not recognized as an image in the CLI bundle command, as defined in [assetPathUtils.js](https://github.com/facebook/react-native/blob/main/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js#L43-L50) . This is the correct behavior, as it ensures that SVG files are copied to the raw folder for Android resources.
However, there is an inconsistency with Image.resolveAssetSource, which does not follow the same classification. Instead, it resolves SVG assets to the drawable folder, leading to blank svg rendering errors in some scenario (codepush).
## Changelog
[Android][Fixed] - getAndroidResourceFolderName() should return raw folder for svg file
Pull Request resolved: https://github.com/facebook/react-native/pull/49452
Test Plan:
1. Use svg file this way `<LocalSvg asset={require('./react-logo.svg')} />`
2. Use `react-native bundle` command to make a bundle and sideload that bundle from sdcard. The svg file should render correctly.
Reviewed By: cortinico
Differential Revision: D69750779
Pulled By: Abbondanzo
fbshipit-source-id: 3af8d4a5da07213cdbb968b070d2507ed897d194
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49370
# Changelog: [Internal]
When we start tracing, we will record metadata event for current process.
We will base it off the assumption that the thread where we handle `Tracing.start` event is the main one.
We can't register the main thread yet:
1. We can't assume that CDP messages are handled on it - this is not the case for Windows and in a long term Inspector will be moved to its own thread
2. We don't have any similar mechanism as Runtime Executor, but for Main thread. This will require Host providing an executor for it.
I've validated at the top of the stack that not registering the main thread should not affect how trace is displayed in CDT.
Reviewed By: rozele
Differential Revision: D69465926
fbshipit-source-id: 103de1da9d00564bf201456ad04a465387c1d542
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49083
# Changelog: [Internal]
> NOTE: Some CI jobs are expected to fail, because changes in Hermes D67353585 should be landed first, and then grafted to Static Hermes.
Added 2 new public methods to `PerformanceTracer` instance for registering metadata Trace Events for processes and threads.
Reviewed By: huntie
Differential Revision: D68439733
fbshipit-source-id: dd9f0e72e2414b8c665c57a542cbbfe7df34a516
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49309
# Changelog: [Internal]
Use newly added module to get real OS-level process and thread ids.
We will keep process id on an instance, because I don't think it could change over time? For thread id, we will get it at the time of event registration.
Reviewed By: rozele
Differential Revision: D69316094
fbshipit-source-id: e12f2ea147ee8bf5a0a13ef293b8d85a0b64fc02
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49302
# Changelog: [Internal]
Added OS-agnostic module that will implement 2 basic capabilities:
- Getting current process id
- Getting current thread id
Reviewed By: javache
Differential Revision: D69316093
fbshipit-source-id: 114d235f1137eaf9c41d95df76f15532766d1bc8
Summary:
Recently, I've introduced `RCTReactNativeFactory` in this PR: https://github.com/facebook/react-native/issues/46298, which is a good successor for `RCTAppDelegate`.
### Why?
`RCTAppDelegate` introduced strong coupling between React Native and AppDelegate pattern. From iOS 13+ there is a newer equivalent (Scene Delegate) which is not possible to achieve with current architecture. The proposed solution involves migration to a `RCTReactNativeFactory` a class that encapsulates initialization logic of React Native.
This migration will make brownfield initialization easier by making it more flexible and simpler to integrate into already established apps.
### Deprecation plan
The plan I've discussed with cipolleschi involves:
- Deprecation of `RCTAppDelegate` in 0.79 (current main)
- Migration off `RCTAppDelegate` to SceneDelegate + `RCTReactNativeFactory` in 0.80
## Changelog:
[IOS] [DEPRECATED] - deprecate RCTAppDelegate
Pull Request resolved: https://github.com/facebook/react-native/pull/49078
Test Plan: Not needed
Reviewed By: cortinico
Differential Revision: D69061022
Pulled By: cipolleschi
fbshipit-source-id: b02a0ff3f26be9320da749f38c9cf083804f9f30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49426
This is a nit, but I'm following up on a review comment that was left behind.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69656370
fbshipit-source-id: 76de4d77d9993bd9a35d7df019a6cebcce13d632
Summary:
an effort of lean core for jsc: https://github.com/Kudo/discussions-and-proposals/blob/%40kudo/lean-core-jsc/proposals/0836-lean-core-jsc.md. this pr tries to decouple all jsc code when `USE_THIRD_PARTY_JSC=1` on ios
this pr includes these changes:
- exclude `React-jsc` pod and pod dependency when `USE_THIRD_PARTY_JSC=1`
- in objcpp code, remove `JSCExecutorFactory` / `RCTJscInstance` references when `USE_THIRD_PARTY_JSC=1`. it throws c++ errors like `No JSRuntimeFactory specified.` when no engine is specified (USE_HERMES=0 && USE_THIRD_PARTY_JSC=1). people need to override delegate methods to specify a JSRuntimeFactory.
## Changelog:
[IOS] [CHANGED] - Decouple JSC when `USE_THIRD_PARTY_JSC=1`
Pull Request resolved: https://github.com/facebook/react-native/pull/49371
Test Plan:
- ci passed
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=1 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 USE_FRAMEWORKS=dynamic bundle exec pod install`
- rn-tester build success for `RCT_NEW_ARCH_ENABLED=0 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 bundle exec pod install`
Reviewed By: cortinico
Differential Revision: D69662457
Pulled By: cipolleschi
fbshipit-source-id: b272f46dde896d0981cfca75c9bfcf6775507307
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49461
Flow now supports Package Exports 🎉. This means we can delete the compatiblity pattern in each of our build-enabled Node.js packages.
This simplifies the internal package structure needed to support Flow while developing from source in the monorepo — no prod impact.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D69741143
fbshipit-source-id: 070715cb6beb00eb393186dbf95856ceb87fabef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49441
Changelog:
[General][Internal] - keep heartbeat between inspector proxy and debugger going even if not idle
When heartbeat was only used to keep the connection alive and to detect debugger timeouts, it was enough to send a ping every time the connection was idle for 10 seconds.
Now, when we use the heartbeat as a way to track how good is the round trip time between the inspector proxy and the debugger, we would like to make this tracking more reliable by sending a ping 10 seconds after each pong, even if the connection is not idle.
It also simplifies the code and makes it more clear by removing the confusing `shouldSetTerminateTimeout` variable.
Reviewed By: hoxyq
Differential Revision: D69665738
fbshipit-source-id: c8175b54d2b3df32ee60b316ec7bcf7bc0f0a1ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49439
This is the next part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).
Here I'm removing the `onlyIf` lambdas to make some tasks CC friendly.
The problem is that some `onlyIf` lambdas can't easily be serialized. Here I'm cleaning up
the problematic one to move the condition checks at execution time
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69664732
fbshipit-source-id: a457b2fae8114568ec4e04d772c9944022b1e1a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49438
This is the second part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).
Here I'm making the exec tasks CC friendly.
The problem is that previously we were using explicit streams which are not CC friendly
for stderr/stdout. The solution is to create a custom task and handle files as input
properties.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69662246
fbshipit-source-id: ad7e82e52b12d508ee15b68408882fdc3516d287
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49421
This is a first part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).
Here I'm making all those tasks `prepare*` CC friendly.
Those tasks were not CC friendly as they were referencing an external variable inside their body.
We don't need to know the library version, we can just substring after the first folder
and the tasks will behave as before.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69655168
fbshipit-source-id: 801d7817c7e2d7380342f175565cc9b1ff30c5d0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49458
Changelog: [Internal]
Sorts the entry points in the TS generator script and adds `Clipboard` and `AccessibilityInfo` which, as far as I can see, require no changes for their types to align with OSS.
Reviewed By: huntie
Differential Revision: D69663092
fbshipit-source-id: cfdb9ab5c07105497a1cdf4ebdc8de1e34b510bd
Summary:
Problem: Duplicate issues were notified on discord channel in issue triaging section.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging
Root cause:
- The cron job (cron: "0 /6 * *") is expected to run every 6 hours.
- Expected runs: 5:54 AM → 11:54 AM → 5:54 PM.
- However, the second run happened earlier at 11:37 AM instead of 11:54 AM.
- This caused duplicate pings for issues created around 5:42:24 AM.
Pull Request resolved: https://github.com/facebook/react-native/pull/49407
Test Plan: Tested action locally
Reviewed By: cortinico, NickGerleman
Differential Revision: D69667174
Pulled By: cipolleschi
fbshipit-source-id: 3dcadc25783335c32cba8acdda26e1c755294629
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48585
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to determine updateStateIfNeeded with AndroidTextInputShadowNode
As a preparation for https://github.com/facebook/react-native/pull/48165 this aligns the implementation of those 2 methods
Reviewed By: javache
Differential Revision: D68004755
fbshipit-source-id: 519247de0d081f37b5ef8ad6093b43d2c735a50e
Summary:
An internal crash report notified us that we were getting an `IllegalArgumentException` in Android's `BlurMaskFilter` used in Box Shadows. The only requirement for the arguments there are that the blur radius is positive. We ensure that, but pass to `sigmaToRadius` afterwards, which does NOT ensure that. This updates that conversion so that
* We will never return negative numbers, regardless of what `PixelUtil.toDIPFromPixel` is doing
* Small enough numbers ( < 0.5) will just go through as 0.0, which is what Android does in https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/libs/hwui/utils/Blur.cpp;l=34
* Ensure shadows check that we have a POSITIVE blur radius AFTER conversion. sigmaToRadius can still return 0 which with also throw, so gotta make sure we change our checks. Filter blurs and dropShadow should be ok, renderEffect does not mention anything about being > 0 in the docs.
Changelog: [Android] [Fixed] - Fix issue where boxShadow crashes with small blur radius
Facebook
Post alerting us of this: https://fb.workplace.com/groups/rn.panelapps/permalink/1136446121310146/
Reviewed By: NickGerleman
Differential Revision: D69683031
fbshipit-source-id: 92f0938fea65e1af280bdb12b6c3d2b9014e89c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49445
This diff marks a subset of LayoutAnimations classes with LegacyArchitecture, since these classes should not be called, loaded nor included in apk that are running in new archtictecture by default
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D69674674
fbshipit-source-id: 84c71c7491064abf8d70f52b14ddb81bd0515227
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49443
This diff introduces an internal annotation called LegacyArchitecture that will be used to document what classes are part of Legacy or new architecture
changelog: [internal] internal
Reviewed By: cortinico
Differential Revision: D69538444
fbshipit-source-id: 5037ba03cd3b1675544f432c3981503c28606f19
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49435
This change adds a Package.swift file that allows to consume the binary from a local path.
As soon as we publish this on Maven, we will update the path to the url.
## Changelog:
[Internal] - Add the Package.swift file to consume the binary
Reviewed By: cortinico
Differential Revision: D69660943
fbshipit-source-id: c76ff3272d106236b6cf713b7e054070a3d45176
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49434
This change adds a function to create the xcframework sarting from the various .framework's slice built before.
## Changelog:
[Internal] - Add function to create the xcframework
Reviewed By: cortinico
Differential Revision: D69660662
fbshipit-source-id: f58034c75cce3d242910d0ec1512be28059771ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49433
This change adds the logic to copy the Headers files from the dependency folder to the generated frameworks folder.
There is a slight possibility that this function will be implemented by the Swift PM build system, as I open [this question](https://forums.swift.org/t/xcodebuild-does-not-generate-headers-if-the-source-is-swift-pm/77856) on the Swift forums.
In that case, we would be able to drop this.
## Changelog:
[Internal] - Add function to copy headers over to the .frameworks
Reviewed By: cortinico
Differential Revision: D69656046
fbshipit-source-id: e9d4f0f53ea57bc0df86fc9194cdf9fc1f372730
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48724
changelog: [internal]
A change in D68154908 caused issues where AnimatedValue would oversubscribe to native module, bring apps to halt.
This is unit test to prevent that.
Reviewed By: yungsters
Differential Revision: D68265033
fbshipit-source-id: 60cc93a619a5c654dc1bf77b00b2d9be2c482894
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49402
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` or `Utilities/SceneTracker.js` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69599636
fbshipit-source-id: 0c450996f908d8139dd0c48677f58e07243d6150
Summary:
Fix `react-native-community/cli` not being found in pnpm setups
## Changelog:
[GENERAL] [FIXED] - Fix `react-native-community/cli` not being found in pnpm setups
Pull Request resolved: https://github.com/facebook/react-native/pull/47304
Test Plan:
1. Clone/check out this branch: https://github.com/microsoft/rnx-kit/pull/3409
2. Run `yarn react-native config`
Reviewed By: cortinico
Differential Revision: D65209065
Pulled By: robhogan
fbshipit-source-id: 2ceb73ad140b4afe193e879779c2d8a4b9adf3fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49400
We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.
This fixes it for the `GenerateCodegenArtifactsTask` task.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69592464
fbshipit-source-id: 72bab3f29299313875f2e7abd1b701c9d74bd2a1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49399
We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.
This fixes it for the `GenerateCodegenSchemaTask` task.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69592463
fbshipit-source-id: 56e78b1bdc113ae402cc90960faa05cd73d5b97d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49398
We should not invoke anything on the `project` property inside thet task.
That will break Gradle Configuration Caching which is becoming the default in the next version of Gradle.
This fixes it for the `BuildCodegenCLITask` task.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D69592465
fbshipit-source-id: fc69896b61968ace7b7762f873cfa7eaa50c8b17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49417
In this diff I'm introducing a fantom benchmarking test to verify impact of props parsing in Fabric (testing for 100, 1000 and 1500 nested views)
changelog: [internal] internal
Reviewed By: lenaic
Differential Revision: D69624243
fbshipit-source-id: fe71668fe97558d2b6072fe49c9910cb978f7f78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49415
Refactoring NAME -> TAG for consistency with other classes
changelog: [internal] internal
Reviewed By: Abbondanzo
Differential Revision: D69622546
fbshipit-source-id: 314db29ddfdbbd7fc614b355b9b18c0a8afe31df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49414
In this we are enforcing that that ViewManagers using codegen override getDelegate() method.
For now we are logging a softException to get signal from production without crashing the app
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D69621301
fbshipit-source-id: 1434fb3f3c7e5ebebee172ec1d7ad6c21eb453ae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49363
This change adds the `build()` function that calls xcodebuild to prepare the ReactNativeDependencies.framework
This functio creates the frameworks in the /react-native/third-party/.build folder
## Changelog:
[Internal] - Add build folder to the `prepare-ios-script`
Reviewed By: cortinico
Differential Revision: D69533218
fbshipit-source-id: edc9281e9270970084aa0f56b52ced4579df3473
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49361
This change adds the Package.swift file that we will use to build the dependencies for React Native
## Changelog:
[Internal] - Swift PM file to build ReactNativeDependencies
Reviewed By: cortinico
Differential Revision: D69518776
fbshipit-source-id: 85006c3c5933cc6a5fd772f7b014a823d7bb99b3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49360
We don't need the whole dependencies archiveto build the dependencies. But usually we only need a subset of them.
This change add a functionality to the script to remove the unnecessary files.
## Changelog:
[Internal] - Add feature to remove unnecessary files from 3p dependencies.
Reviewed By: cortinico
Differential Revision: D69518656
fbshipit-source-id: b071626a1894261b75023023b7f7eeb2730282a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49336
This change adds the step to download the glog dependency and run the prepare_glog script that we have in the codebase
## Changelog:
[Internal] - Download Glog and patch it.
Reviewed By: cortinico
Differential Revision: D69466238
fbshipit-source-id: df0b4e29d4ff7d0d61f92a52141935472fa964fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49335
This change adds a function in the prebuild script to download a 3p dependency in the react native monorepo.
## Changelog:
[Internal] - Add function to download 3rd party dependencies
Reviewed By: cortinico
Differential Revision: D69464429
fbshipit-source-id: 2d035168c2390eb9fa9e2338976fce15d86fb68c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49334
This diff adds a script in the `react-native/script/releases` folder that we will use as base to prepare prebuilds for iOS
The script can be invoked from the repository root with
```
node scripts/releases/prepare-ios-prebuilds.js
```
## Changelog:
[Internal] - Add scripts to prepare ios prebuilds
Reviewed By: cortinico
Differential Revision: D69461691
fbshipit-source-id: 8d33955dd799f95c43de565e48360558d7d946d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49408
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates Utilities/deepFreezeAndThrowOnMutationInDev.js, Utilities/defineLazyObjectProperty.js, Utilities/DeviceInfo.js & Utilities/FeatureDetection.js to use the export syntax.
- Updates deep-imports of files that were migrated to a single export default to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Utilities/deepFreezeAndThrowOnMutationInDev`, `Utilities/defineLazyObjectProperty`, `Utilities/DeviceInfo` or `Utilities/FeatureDetection` with `require` syntax may need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69602536
fbshipit-source-id: 7ec06995a1d244b95d4f970551955d9e6013de13
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49306
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates `Libraries/Utilities/Platform.*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/Platform` with `require` syntax needs to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69404025
fbshipit-source-id: f21501ca5b7e8e6a9e3e501781ed36e7d2bfd4a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49406
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates Utilities/infoLog, Utilities/logError, Utilities/mapWithSeparator & Utilities/warnOnce to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Utilities/infoLog`, `Utilities/logError`, `Utilities/mapWithSeparator` or `Utilities/warnOnce` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69601174
fbshipit-source-id: 821f9ae59d4f898c95631eb7a9aeed138ace3567
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49403
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` & `Utilities/RCTLog` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` or `Utilities/RCTLog` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69600476
fbshipit-source-id: 3f8ac3a35031e8b20446abc8f52a2817cb31b6d2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49369
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates `Libraries/Utilities/BackHandler.*.js`, `Utilities/DevLoadingView.js` and `Utilities/HMRClient*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/BackHandler`, `Utilities/DevLoadingView.js` or `Utilities/HMRClient*.js` with `require` syntax needs to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D69539527
fbshipit-source-id: c10b3523bbcc52bba5b6c27721c33b1e0d9d5104
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49405
This diff removes legacy codegen of $PropSetter classes for ShadowNode classes when the app has UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE enabled
These classes are not used in the new architecture, let's just remove them from the apk.
This change won't affect OSS
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D69569205
fbshipit-source-id: 178051b9f10576226fd746f9eab1b56b2934ea0b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49404
This diff disables codegen of legacy $PropSetter for viewManagers that implement the interface com.facebook.react.uimanager.ViewManagerWithGeneratedInterface.
This logic will only be enabled for apps that are configured with BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE = true
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67412734
fbshipit-source-id: 682725714dc41f5f34d95d4d9a13ab09726b28f7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49386
It appears that `currentActivity.decorView` sometime is not attached to a window during the process of creating a Dialog for currently unknown reasons causing a crash.
Add check to skip call to `syncSystemBarsVisibility()` in such case as current code cannot function without valid RootWindowInsets.
Changelog:
[Android][Fixed] - fixed crash with Modal when trying to call syncSystemBarsVisibility()
Reviewed By: cortinico
Differential Revision: D69578581
fbshipit-source-id: de23e2ba9f485e38b7014dd7151253e56976ad43
Summary:
On the new architecture the `RCTParagraphTextView` is used to draw text on iOS but React doesn't know about it. The hit test stops propagation on the first encountered UIView of this type. The suggested solution is to add a dummy hit test for `RCTParagraphTextView` that returns always `null`, allowing further search of the touch target.
## 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] - Fixed onPress for Text with nested View.
Pull Request resolved: https://github.com/facebook/react-native/pull/49393
Test Plan:
| Before | After |
|--------------|--------------|
|<video src="https://github.com/user-attachments/assets/745f555a-d4b6-4285-91a7-0e9ea9f43d84"> | <video src="https://github.com/user-attachments/assets/9896848f-13ca-4b57-bcc9-bead478ab078"> |
<details>
<summary>code</summary>
```ts
import {SafeAreaView, StyleSheet, Text, View, findNodeHandle} from 'react-native';
function App() {
return (
<SafeAreaView style={styles.container}>
<Text
ref={e => console.log(`Outer Text: ${findNodeHandle(e)}`)}
>
With Nested View
<View ref={e => console.log(`View: ${findNodeHandle(e)}`)}>
<Text
ref={e => console.log(`Inner Text: ${findNodeHandle(e)}`)}
onPress={() => {
console.log('1. text pressed');
}}
style={styles.pressableText}
>
Pressable Text
</Text>
</View>
</Text>
<Text>
Without Nested View
<Text
onPress={() => {
console.log('2. text pressed');
}}
style={styles.pressableText}
>
Pressable Text
</Text>
</Text>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
gap: 10,
},
pressableText: {
fontSize: 18,
color: 'blue',
backgroundColor: 'transparent',
},
nestedView: {
backgroundColor: 'red',
height: 100,
},
pressable: {
backgroundColor: 'blue',
height: 100,
width: 100,
},
});
export default App;
```
</details>
Reviewed By: cipolleschi
Differential Revision: D69591520
Pulled By: coado
fbshipit-source-id: eb75c2d8a01a82d4493a1a982e98ca74efc9d94f
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore
This PR adds `jsitooling` package that third party JS engines can use (in that case javascriptcore). It's required because React-Runtime needs to depend on third-party engine on iOS, and the third-party engine needed to depend on React-Runtime to get access to the `JSRuntimeFactory` and Cocoapods doesn't support circular dependencies...
Now third-party engine can depenend on jsitooling package and provide JSRuntimeFactory
## Changelog:
[INTERNAL] [ADDED] - jsitooling package
Pull Request resolved: https://github.com/facebook/react-native/pull/49348
Test Plan: CI Green
Reviewed By: cortinico
Differential Revision: D69535475
Pulled By: cipolleschi
fbshipit-source-id: f8d68b7957b7d69c13246ce3040a08256f2ebcd6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49364
We're not actively using/maintaining this package. Let's clean it up.
We can still restore if necessary.
Changelog:
[Internal] [Changed] -
bypass-github-export-checks
Reviewed By: cipolleschi
Differential Revision: D69533629
fbshipit-source-id: 940057df9a5fffa738435c92136e95a764ec98ff
Summary:
This PR encapsulates device info listeners removing additional logic from RCTAppDelegate which is a prerequisite for https://github.com/facebook/react-native/pull/49078
Now we use KVO (Key Value Observation) to listen to window size changes making this module's logic encapsulated + allows to use it in brownfield scenarios.
To keep backward compatibility RCTDeviceInfo still emits `RCTWindowFrameDidChangeNotification`
## Changelog:
[IOS] [ADDED] - encapsulate device info listeners
Pull Request resolved: https://github.com/facebook/react-native/pull/49162
Test Plan: Check if window size change listener is fired
Reviewed By: sammy-SC
Differential Revision: D69116660
Pulled By: cipolleschi
fbshipit-source-id: b9a57c70826b10cd27d102337eb1e35da1b365c9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49303
Changelog: [General][Breaking] Deep imports to modules inside `Libraries/StyleSheet` using `require` may need to be appended with `.default`
Reviewed By: huntie
Differential Revision: D69400980
fbshipit-source-id: 053f40a8677ac877b93c27e87422ea0ef540c272
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49358
When the network is under strain, the code responsible for detecting if the inspector proxy's connection to the client has been lost may incorrectly assume the connection is dead. This false positive occurs because the system assumes that if a pong is not received within 5 seconds of a ping, the other side has disconnected. However, I was able to consistently reproduce scenarios where a delay of more than 5 seconds (even more than 20 seconds) was followed by a return to normal ping-pong communication without any issues.
Since I can't think of any issues with increasing this number, I'm increasing it to 60s.
Changelog:
[General][Fixed] - Disconnections of DevTools when the network is under significant strain.
Reviewed By: robhogan, huntie
Differential Revision: D69523906
fbshipit-source-id: 50db1e7bbe690b42421bc226aa30fd6571ba2257
Summary:
When generating documentation using dokka, I found out that some references to classes in the comments were not linking correctly anymore after the files were migrated to Kotlin. In this PR I'm migrating the JavaDoc `link` references to Kotlin KDoc `[]` syntax.
## Changelog:
[INTERNAL] - Fix up KDoc annotations post Kotlin migrations
Pull Request resolved: https://github.com/facebook/react-native/pull/49375
Test Plan: Manually review that the references link correctly in the Kotlin files
Reviewed By: arushikesarwani94
Differential Revision: D69549229
Pulled By: mdvacca
fbshipit-source-id: 6b7727f00a28ecfe2fca86948245d1f4e88e935c
Summary:
Migrate com.facebook.react.modules.network.OkHttpClientProvider to Kotlin. Also, as follow up from https://github.com/facebook/react-native/pull/48958 I'm cleaning up the reflection on `OkHttpClientProviderTest` as we can make `sClient` and `sFactory` internal.
## Changelog:
[INTERNAL] - Migrate com.facebook.react.modules.network.OkHttpClientProvider to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/49108
Test Plan:
```bash
yarn test-android
yarn android
```
Reviewed By: cortinico
Differential Revision: D69050956
Pulled By: javache
fbshipit-source-id: 62dcf8e8f999f3b687c57ed02e9ac1f2db8183ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49340
This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.
This is useful for:
- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native
Check out the Readme for more information
Changelog: [General][Added] Open Sourcing React Native's Compatibility Check
Reviewed By: panagosg7
Differential Revision: D69476742
fbshipit-source-id: 8af6039839c5475c1258fa82d9750a9320cf0751
Summary:
This updates the Issue Triaging bot to ping the oncall
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/49359
Test Plan: Nothing to test
Reviewed By: cipolleschi
Differential Revision: D69527137
Pulled By: cortinico
fbshipit-source-id: 7291054a734bf9f7240002773b716b2057aa8eca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49353
This change adds an opt-in to restore JavaScript log streaming via the Metro dev server, [removed from React Native core in 0.77](https://reactnative.dev/blog/2025/01/21/version-0.77#removal-of-consolelog-streaming-in-metro).
Users can opt into this legacy behaviour by adding the `--client-logs` flag to `npx react-native-community/cli start`.
- The default experience remains without streamed JS logs.
- The existing "JavaScript logs have moved! ..." notice is printed in all cases, and we do not advertise the new flag for new users.
- Under non-Community CLI dev servers (i.e. Expo), log streaming is restored implicitly.
We will clean up this functionality again when we eventually remove JS log streaming over `HMRClient`, tasked in T214991636.
**Implementation notes**
- Logs are always sent over `HMRClient` (previous status quo), even with log streaming off in the dev server. This is a necessary evil to be able to flag this functionality in a user-accessible place, and to move fast for 0.78.
- Necessarily, emitting `fusebox_console_notice` moves to the dev server itself, on first device (Fusebox) connection.
Changelog:
[General][Added] - Add opt in for legacy Metro log streaming via `--client-logs` flag
Reviewed By: robhogan
Differential Revision: D69469039
fbshipit-source-id: be99d02a3b1c977a59bf7d2726f0e6cf2e60b28a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49275
This is a copied guava class and is only used in one spot. Remove it and just count directly in ProgressRequestBody.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D69323277
fbshipit-source-id: 5260004a4431f03733882b6ee83a341d8bf29bb0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49332
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates `Libraries/Utilities/differ/*.js` to use the export syntax.
- Updates deep-imports of these files to use `.default`
- Updates codegen with a compat layer
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to `Libraries/Utilities/differ/...` with `require` syntax need to be appended with '.default'.
Reviewed By: yungsters
Differential Revision: D69467423
fbshipit-source-id: 2e58a0b9711e9bdf5ca907a5b2252584f6fec9bc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49349
Follow-up on D69454101 to add more test coverage for `$ReadOnlyArray<UnsafeMixed>` as a component prop. The new type was missing from the CodegenSchema, which revealed some gaps in tests.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D69488035
fbshipit-source-id: 19895e55e5ec4d89a790f1c388de9eea025a316c
Summary:
Fix `react-native-community/cli-platform-*` packages not being found in monorepos.
Note that we are making the assumption that `process.cwd()` returns the project root. This is the same assumption that `react-native-community/cli` makes. Specifically, `findProjectRoot()` has an optional argument that defaults to `process.cwd()`:
- [`findProjectRoot()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-tools/src/findProjectRoot.ts)
- Which gets called without arguments in [`loadConfig()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli-config/src/loadConfig.ts#L89)
- `loadConfig()` gets called from [`setupAndRun()`](https://github.com/react-native-community/cli/blob/14.x/packages/cli/src/index.ts#L196), also without project root set
As far as I can see, the project root argument is only ever used in tests.
## Changelog:
[GENERAL] [FIXED] - Fix `react-native-community/cli-platform-*` packages not being found in monorepos
Pull Request resolved: https://github.com/facebook/react-native/pull/47308
Test Plan:
1. Clone/check out this branch: https://github.com/microsoft/rnx-kit/pull/3409
2. Cherry-pick https://github.com/facebook/react-native/pull/47304
3. Cherry-pick https://github.com/facebook/react-native/pull/47308
4. Run `react-native config` inside `packages/test-app`
5. Verify that `projects` is populated
**Before:**
```js
"healthChecks": [],
"platforms": {},
"assets": [],
"project": {}
}
```
**After:**
```js
"healthChecks": [],
"platforms": {
"ios": {},
"android": {}
},
"assets": [],
"project": {
"ios": {
"sourceDir": "/~/packages/test-app/ios",
"xcodeProject": {
"name": "SampleCrossApp.xcworkspace",
"path": ".",
"isWorkspace": true
},
"automaticPodsInstallation": false,
"assets": []
},
"android": {
"sourceDir": "/~/packages/test-app/android",
"appName": "app",
"packageName": "com.msft.identity.client.sample.local",
"applicationId": "com.msft.identity.client.sample.local",
"mainActivity": "com.microsoft.reacttestapp.MainActivity",
"assets": []
}
}
}
```
Reviewed By: cortinico
Differential Revision: D69465533
Pulled By: robhogan
fbshipit-source-id: 3d6cf32752a7a41d9c7e84f35b0f26ae7d7a971f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49345
This diff is causing an error to be logged for every user. Even if it's noise, its more trouble than its worth. Let's revert until feature flags check fixed.
Changelog: [Internal]
Reviewed By: makovkastar
Differential Revision: D69504966
fbshipit-source-id: 13caf715cef9a4cc6c9b7c68d3003fbced870d34
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49338
This doesn't cover all cases, but is a good start.
Where relevant, I call out inline places where there are KPs with LogBox that will be fixed separately.
## Changelog
Changelog: [internal]
Reviewed By: rubennorte
Differential Revision: D69443040
fbshipit-source-id: 7281f30aa705ae812d5b5f5f9ad03b37358de059
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49337
*Note: This diff adds helpers and updates the one test we have. The next diff adds a bunch of tests, see that diff for how these helpers are used to scale to a large number of tests.*
-----
## Overview
Adds helpers for the LogBox e2e test to make it easier to write simple, readable, tests with a healthy level of abstraction over the e2e APIs.
## API
The helpers expose an ability to render a component, and return methods to get the UI state:
```
// Returns the LogBox inspector UI as an object.
getInspectorUI: () => ?InspectorUI,
// Returns the LogBox notification UI as an object.
getNotificationUI: () => ?NotificationUI,
```
These return objects that represent the main text elements in the UI like `title` and `message`.
The helpers also provide methods for interacting with the LogBox UI:
```
// True if the LogBox inspector is open.
isOpen: () => boolean,
// Tap the notification to open the LogBox inspector.
openNotification: () => void,
// Tap to close the notification.
dimissNotification: () => void,
// Tap the minimize button to collapse the LogBox inspector.
mimimizeInspector: () => void,
// Tap the dismiss button to close the LogBox inspector.
dismissInspector: () => void,
// Tap the next button to go to the next log.
nextLog: () => void,
// Tap the previous button to go to the previous log.
previousLog: () => void,
```
## Example test
This allows writing tests like:
```
test('should log error', () => {
const logBox = renderLogBox(<ComponentThatErrors />);
// Should show notification
expect(logBox.isOpen()).toBe(false);
expect(logBox.getNotifciationUI()).toEqual({
count: '!',
message: 'error message',
});
// Tap the notification
logBox.openNotification();
// Should show log
expect(logBox.isOpen()).toBe(true);
expect(logBox.getInspectorUI()).toEqual({
header: 'Log 1 of 1',
title: 'Console Error',
message: 'error message',
stackFrames: [
'ComponentThatErrors'
],
componentStackFrames: [
'<ComponentThatErrors />',
],
isDismissable: true,
});
})
```
## Changelog
Changelog: [internal]
Reviewed By: rubennorte
Differential Revision: D69443041
fbshipit-source-id: c81ccd56a39d01d61814d29515b587096c0509c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49343
Raise source and target version of annotation processor from 7 to 11
This is unused in OSS
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D69478025
fbshipit-source-id: 28c6ed5889db423c43a36ccee396083ae7e78e5f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49317
This hooks into `enableNativeCSSParsing()` to optionally bypass viewconfig processor, and lets us parse the raw strings (or objects composed of string) in native.
Right now, to not disturb too much while this is in experimentation, this is just a facade over existing types and props storage, and we ignore any non-px lengths.
Also need to prepend
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69337482
fbshipit-source-id: 6093e312e0d1dc1855713da20b72bf75b98af3ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49316
This hooks up some build logic for `react/renderer/css`. A bit funky right now since header only, and might need to change later (it isn't neccesarily guaranteed to be header only in the future).
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D69426450
fbshipit-source-id: 77e0ef409f34daf003d28a5cd70de935bd180440
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49333
The rollout of "new architecture everywhere" should be enabled in OSS canary releases. This diff updates the ReactNativeFeatureFlags.config.js to reflect that all of the feature flags used by the new architecture are enabled by default in experimental and canary releases. Note that these feature flags were already enabled in OSS when new architecture was enabled.
changelog: [internal] internal
Reviewed By: rubennorte, NickGerleman
Differential Revision: D69419662
fbshipit-source-id: 6ecf9e38bb2fd0d3c0f7129ae16fcef8755b5da2
Summary:
> [!NOTE]
> This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore
This PR centralizes the setup of js engine dependencies which need to be defined when building with dynamic frameworks. This will allow us to change linked framework if using a third party one in the future
## Changelog:
[INTERNAL] [CHANGED] - centralize JS engine dependency configuration
Pull Request resolved: https://github.com/facebook/react-native/pull/49297
Test Plan: CI Green (Build needs to go properly)
Reviewed By: javache
Differential Revision: D69396641
Pulled By: cipolleschi
fbshipit-source-id: deedd12084f563f73f12f8617fdca0a6d680bf5a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49262
Changelog: [General][Breaking] Deep imports into `react-native/virtualized-lists` with require syntax may need to be appended with `.default`
Reviewed By: huntie
Differential Revision: D69308532
fbshipit-source-id: 6de15d46e0931616bc9849edbccb7cf745e15dd5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49204
Changelog: [internal]
We don't copy the options object and just access the individual properties, so using an interface is enough, and has the benefit of not having to create object copies to pass down to subclasses.
Reviewed By: yungsters
Differential Revision: D69182824
fbshipit-source-id: 9819e5627d72761c78d0f39a1861a3239066dbb2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49311
This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.
This is useful for:
- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native
Check out the Readme for more information
Changelog: [General][Added] Open Sourcing React Native's Compatibility Check
Reviewed By: yungsters
Differential Revision: D69277991
fbshipit-source-id: 886a983d4b17609ce771cdd93b75f34bbd8417dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49035
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates files in `Libraries/Modal/*.js` and `Libraries/Network/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/Modal` and `Libraries/Network` with `require` syntax may need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68827032
fbshipit-source-id: 98149055f82edad96e74371a79f05f88a8ab3b66
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49324
Provide Android component codegen a bit more flexibility by allowing `$ReadOnlyArray<UnsafeMixed>` and avoid casting in the view manager.
Changelog: [General][Added]
Reviewed By: fabriziocucci
Differential Revision: D69454101
fbshipit-source-id: c210647deffeb01b7db8aa07266e58c42acf14ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49301
The hermesc logging is extremely noisy and not relevant for the users. I'm disabling it for the task that runs metro+hermesc (only for the hermesc) part.
Changelog:
[Internal] [Changed] - Disable console logging for hermesc
Reviewed By: robhogan
Differential Revision: D69399156
fbshipit-source-id: e5f8722b33d30675aba5a8aa82c456be21254b0c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49300
With the refactor of the AppDelegate in favor ReactNativeFactory, the users can now instantiate multiple instances of react native.
However, currently, if you try to run multiple instances, the app will crash with the message:
```
libc++abi: terminating due to uncaught exception of type std::runtime_error: Feature flags cannot be overridden more than once
```
This happens also when the feature flags we would like to set are the same that we already applied. This should be an allowed scenario because reapplying the excatly same features flags should have no effect on React native and that's not the use case we want to forbid.
With this change, we are creating a static variable that checks whether we already apply that set of feature flags and it allows you to create multiple instances by keeping the same flags
## Changelog:
[iOS][Fixed] - Allow multiple RN instances to run at the same time
Reviewed By: rubennorte
Differential Revision: D69398441
fbshipit-source-id: a377c6a1402d38d66d348fa8c6a65e645973aadc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49308
changelog: [internal]
move TinyMap class to its own file in internal folder.
Reviewed By: NickGerleman
Differential Revision: D69402458
fbshipit-source-id: e16d5f33ef0e704e3336cf6f13f510206d7f5e5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49307
changelog: [internal]
There were parts of Differentiator that were leaking outside of "mounting" module. This diff moves them to "internal" folder and changes buck so they can't be imported from outside the module.
Reviewed By: NickGerleman
Differential Revision: D69401878
fbshipit-source-id: 8aa8c96e91b088dab4f9c8b9a5e6937e09be7eb4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49304
changelog: [internal]
View culling must take transform into account when calculating whether a frame is visible or not. This diff adds that.
Reviewed By: NickGerleman
Differential Revision: D69394909
fbshipit-source-id: 4c588a64f2c8e2d35fb7d606d26adc09d3502780
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49278
The previous diff (https://github.com/facebook/react-native/pull/49272) fixed an issue where we used frame to get the size of a sublayer. This is problematic in that it scales things twice if a scaling transform is applied. I looked to see where else we do this and we have this problem (sometimes) with background color and filter.
To fix this in the general case I created a helper to size a layer to the same shape as the View's layer - so using bounds for the size, (0,0) for position on the frame, and cornerRadius/mask for border radius considerations. The only 3 layers that should be the exact same size are backgroundColorLayer, backgroundImageLayer, and filterLayer
Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform
Reviewed By: jorge-cab
Differential Revision: D69321790
fbshipit-source-id: 70b5d18fa01967896b1bfffdb5684c2c907f3549
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49272
Turns out bounds does not account for the proper size if a scaling transform is applied while frame does. Using the example listed in https://github.com/facebook/react-native/issues/49134, the size of the frame is the expected 240, but the size of the bounds is 200.
We had a mismatch where we use bounds everywhere in shadow image creation, but use the frame when asking for the size of the box shadow layer. What ends up happening is we have a 240x240 layer that is getting scaled again.
I refactored the shadow creation to just take a CGSize instead of a whole CALayer (which we had only used for its size anyway) so that we can be consistent with frame and bounds, and use bounds everywhere so that we only scale once.
Changelog: [iOS] [Fixed] - Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform
Reviewed By: jorge-cab
Differential Revision: D69320213
fbshipit-source-id: a913e0df91d78ec9665752acefcae755ab607ac8
Summary:
Changelog: [Internal]
This is an automatically generated fixup patch to bring fbsource back into sync with
facebook/react on GitHub. Please 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
diff-train-source-id: 7e59b47d91fda2c6ef8946499d9e4457522a90d5
Generated by: https://www.internalfb.com/intern/sandcastle/job/4503601290447444/
GitHub Repo: facebook/react
Reviewed By: mofeiZ
Differential Revision: D69418289
fbshipit-source-id: 48636ba5bedfef7a09e0802f2a640be0417cdb7c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49284
All of the CMake library names in the "renderer" directory use "render" for the name, missing the last two letters of the directory name.
eye_twitch
I don't think fixing that should be breaking, since 3p libraries need to rely on the merged library anyway, so let's fix that and find/replace all these.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D69338892
fbshipit-source-id: d3b306ad0ea191728dfbacf9e2aaa12b00caa619
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49313
When the flag is enabled, we expect legacy native viewconfigs to add processor, where SVCs do not, and instead parse in native. Don't emit warnings in this case.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D69337802
fbshipit-source-id: f4c354c3b7b6ecbe4a8a72a37ea6d60dcc336b67
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49314
Add a flag which we will use to prefer Fabric CSS parser to ViewConfig processors. We will use this to experiment on iOS, where we are using Fabric props (until Props 2.0 for Android).
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69337803
fbshipit-source-id: e3d4faeecbadb138c0a58f3fca6dba79eb7b13fa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49250
The TurboModule System decided to ignore the Null values when they are coming to JS. However, in iOS, null value can be mapped to `[NSNull null];` and this value is a valid value that can be used on the native side.
In the old architecture, when the user were sending a null value from JS to a native module, the Native side was receiving the value.
In the New Architecture, the value was stripped away.
This change allow us to handle the `null` value properly in the interop layer, to restore the usage of legacy modules in the New Arch.
I also tried with a more radical approach, but several tests were crashing because some modules do not know how to handle `NSNull`.
See discussion happening here: https://github.com/invertase/react-native-firebase/issues/8144#issuecomment-2548067344
## Changelog:
[iOS][Changed] - Properly handle `null` values coming from NativeModules.
Reviewed By: sammy-SC
Differential Revision: D69301396
fbshipit-source-id: be275185e2643092f6c3dc2481fe9381bbcf69e9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49046
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates files in `Libraries/PermissionsAndroid/*.js` and `Libraries/PushNotificationIOS/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/PermissionsAndroid` and `Libraries/PushNotificationIOS` with `require` syntax has to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68832494
fbshipit-source-id: 4c44667856f5ad76b32a27a603a6538704c3192c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49292
changelog: [internal]
remove feature flag enableGranularShadowTreeStateReconciliation which was introduced in August 2023 and isn't rolled out.
Reviewed By: rshest
Differential Revision: D69393016
fbshipit-source-id: a1730f9811b1d8476d845e0303647b4d85f6b4a0
Summary:
Reland https://github.com/facebook/react-native/issues/48496 .
## Changelog:
[IOS] [FIXED] - Fabric: Fixes crash of dynamic color when light/dark mode changed
Pull Request resolved: https://github.com/facebook/react-native/pull/49265
Test Plan: RNTester -> PlatformColor example -> changed the dark/light mode in the system settings -> go back to App and pop and push the PlatformColor example, it would crash:
Reviewed By: javache
Differential Revision: D69309825
Pulled By: cipolleschi
fbshipit-source-id: 7a533a73ef343b071000388b653b2d1d0c54ae88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49295
Motivated by https://github.com/facebook/react-native/issues/49287.
This improves on the less useful output of "fetch failed" currently. We expect failing to make a request to the dev server (made from the dev server!) to be a rare edge case, in which case we want to log as much info as possible.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D69395983
fbshipit-source-id: ee96d72ade5a887d190397c3b798a5b545152587
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49268
changelog: [internal]
ShadowView has three shared_ptr and copying those can be avoided here. Let's use std::move.
Reviewed By: NickGerleman
Differential Revision: D69303346
fbshipit-source-id: b13103369f6423610dd8f8ccb293e59f04acc5dc
Summary:
The performance of `_getFreeIndex` is quite terrible since the `timersID` array can get quite large when you spawn a lot of promises or timers. We profiled our application for 28 seconds on RN 0.71.11 and noticed that the `indexOf` into this array was consuming almost a second.
The hermes version that we are using has a pretty slow `indexOf` compared to other engines, and the static hermes will improve it by 12x but for the time being, this is a perf issue. https://github.com/facebook/hermes/pull/1447
We avoid having to use `indexOf` by maintaining a list of the free ids.
**Before - Samsung Galaxy A52 for 28 seconds of profiling**

**After - Samsung Galaxy A52 for 28 seconds of profiling**

## Changelog:
[INTERNAL] [FIXED] - Improve performance of _getFreeIndex
Pull Request resolved: https://github.com/facebook/react-native/pull/48925
Test Plan: - Tests pass, promises resolve and reject correctly, setTimeout works as expected
Reviewed By: javache
Differential Revision: D69059102
Pulled By: cipolleschi
fbshipit-source-id: d7de2c4adcf4dfc1d15e597e2a801e23c8d652aa
Summary:
Was going through some tests and I notice several files that use `RobolectricTestRunner` unnecessarily. This PR cleans that up.
## Changelog:
[INTERNAL] - Remove unnecessary RobolectricTestRunner usage
Pull Request resolved: https://github.com/facebook/react-native/pull/49290
Test Plan:
```
yarn test-android
```
Reviewed By: cipolleschi
Differential Revision: D69383948
Pulled By: cortinico
fbshipit-source-id: 6102319115240267ba83a086d03a850d1b7cdae5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49283
In this diff I'm introducing a new BuildConfig called UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app at build time, fully enabled means:
- no interop
- all view managers migrated to new API
- all native modules migrated to new API
- legacy architecture can be stripped
This BuildConfig is different from ReactNativeFeatureFlags.enableBridgelessArchitecture() because the latter is controlled at runtime, BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE is used at the build system level and it can be accessed from proguard to optimize code that's unused when the app is fully running in the new architecture. Additionally we will use the BuildConfig to assert that some classes and methods are not loaded or executed.
changelog: [Android][Changed] Introduces BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app
Reviewed By: cortinico
Differential Revision: D69206248
fbshipit-source-id: f60a059be8333d3051eb7d2efac79939a479f6f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49280
We were incorrectly consuming an `E` at the end of number tokens, even if not followed by a digit, which breaks dimension tokens where the unit starts with "E", like `em`. Follow the spec the right way:
https://www.w3.org/TR/css-syntax-3/#consume-number
> If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E) or U+0065 LATIN SMALL LETTER E (e), optionally followed by U+002D HYPHEN-MINUS (-) or U+002B PLUS SIGN (+), followed by a digit, then...
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69330975
fbshipit-source-id: a9bd5bceac9efbf02c1b7fb60659093774bb7228
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49279
I ended up using this same pattern for filter parsing where the logic betweeen functions is very similar. Let's deduplicate the logic for transform parsing a bit. This also separates `rotate()` and `rotateZ()` types, to be handled the same at a different layer.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D69326443
fbshipit-source-id: 9bf910c6d4e07748ff032433167576f9d58cd8d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49276
This diff replaces the remaining `React$` global types in the codebase, in preparation for their removal in Flow.
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D69322418
fbshipit-source-id: 058a2489ce8e6bf59df2ec4e61e9708f63561671
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49271
This error is somewhat expected, so causing the red box error popup is a bit too disruptive. Flip it to a no-crash exception.
Changelog: [Internal]
Reviewed By: Abbondanzo
Differential Revision: D69125274
fbshipit-source-id: 0dc7ac59ac8637bdabde25bd8886b1aebf175395
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49277
Replaces the `-1` magic number representing unset children with a named constant
Changelog: [Internal]
Reviewed By: zeyap
Differential Revision: D69324509
fbshipit-source-id: 64fb6c920a7715f5d15d3955564a8bf2b6ce404a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49274
In this diff I'm updating all the non-codegen ViewManagerInterfaces to extend ViewManagerWithGeneratedInterface to make it consistent with codenerated ViewManagerInterfaces
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D69206247
fbshipit-source-id: 6a577d9ee7410be990a03e78847333b61b429e88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49261
Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D69307514
fbshipit-source-id: 686935ed4ba1334d445217fd2f8a303b774b6c4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49198
changelog: [internal]
The work done on the main thread should scale with what is on the screen. React Native shouldn’t block the main thread for off screen elements that do not affect what is shown to the end user. When React schedules a commit, only views needed to achieve a screen full of content should be materialised and added to the host platform’s view hierarchy.
With Fabric View Culling, views that do not contribute pixels to the screen will not materialize and updates to them will be skipped. React Native will focus system resources on what is visible to the end user.
Fabric View Culling maximises benefits from view recycling. Each UI element such as text, image, or video is recycled individually. As soon as an item goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements. Such recycling reduces the need of having multiple view types and improves memory usage and scroll performance.
In the example bellow, view B will not be mounted because the user can't see it.
{F1974949953}
The difference in number of allocated views:
Please note, the screenshots below are from Xcode View Hierarchy debugger. To show how many views are allocated in memory, I disabled [removeClippedSubviews](https://reactnative.dev/docs/scrollview#removeclippedsubviews) flag globally.
|Before|After:
| {F1974949979}| {F1974949981}
# Disclaimer, this is not a complete implementation
This implementation is not complete and it is missing to handle edge cases.
Things that are missing:
- Transform style is not taken into account.
- removeClippedSubviews is not respected. Fabric View Culling happens unconditionally for every scroll view.
- Fabric View Culling does not respect when ScrollView has overflow set to visible.
- Fabric View Culling is only performant enough on iOS.
- [enableSynchronousStateUpdates](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js#L248) must be enabled for Fabric View Culling to work correctly.
Reviewed By: javache
Differential Revision: D63458372
fbshipit-source-id: c93ec434081f2be8a446212e2c0681f8ae4e90f9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49197
changelog: [internal]
Adds new method to LayoutMetrics that calculates frame adjusted for overflow inset.
For example, for the following view hierarchy. it would produce a frame that would fully contain view A and view B.
```
┌─────────────┐
│<View A /> │
│ ┌───────┴─────┐
└─────┤<View B /> │
│ │
└─────────────┘
```
See tests for more details
Reviewed By: javache, lenaic
Differential Revision: D68775683
fbshipit-source-id: b8f7c42cfca7dba8dcae75cae5e6944bd1082957
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49258
Updates dependency resolution in `yarn build-types` to happen after the `translateFlowToFlowDef` step. This means that we prune all non-type imports, massively reducing the input files of the program when building types only.
Changelog: [Internal]
Reviewed By: j-piasecki
Differential Revision: D69302812
fbshipit-source-id: aa80bea17cb584b747cb31c003e87fe00afd1e16
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49257
Adds minimal dependency resolution to `yarn build-types`.
- This enables us to opt in React Native APIs by entry point, with the build script resolving all necessary dependencies. Improves correctness and removes concern of globbing paths manually.
Other notes:
- The `ActionSheetIOS.js` entry point is temporarily disabled as input; needs further work.
Changelog: [Internal]
Reviewed By: j-piasecki
Differential Revision: D69255015
fbshipit-source-id: 2d99c014b50e41e4695549f46ca874a2b546f545
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49241
In auditing differences between `InteractionManager` and `InteractionManagerStub` (used to evaluate to entirely remove the former all together), I noticed a behavioral disparity with how errors are handled.
In `InteractionManager`, the promise that's returned is never rejected, whereas `InteractionManagerStub` propagates errors by rejecting the promise that's returned. This changes `InteractionManagerStub` to behave like `InteractionManager` for the purpose of comparing apples-to-apples.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D69275495
fbshipit-source-id: 05439a0cadc1f76b34a3f1457f7db31d6bda2a90
Summary:
Fantom was disabling Metro hierarchical lookup in all cases when `JS_DIR` is set. The intention is that `node_modules` folders other than the configured `JS_DIR/public/node_modules` are not used.
However, this leads to incorrect resolution where a transitive dependency is not hoisted. If the origin of the resolution is already inside `node_modules`, we must perform a hierarchical lookup to avoid picking up just whichever version happens to be hoisted to `node_modules` root.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D69303559
fbshipit-source-id: 12068fb0bebb8c2f81b64c23b952a623cb6fd792
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49252
Changelog: [internal]
This adds a Fantom test placeholder for LogBox, which shows what type of tests we could be writing for this.
It also adds a few ids in LogBox components so we can inspect them in tests and make assertions on them.
Reviewed By: javache
Differential Revision: D69301572
fbshipit-source-id: 89a332a47c300c1dc18937cd91206ce6d820b6aa
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49251
Changelog: [internal]
Components like `AppContainer` require passing the rootTag as a prop, but we don't have access to it from Fantom unless we render something in the root and access it via the RootTagContext. This exposes the rootTag of the Root as a method so we can use it in initial render too.
Reviewed By: javache
Differential Revision: D69301571
fbshipit-source-id: 429fb56d937d3dffeb3c17a70d136ba4925ece8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49254
Changelog: [internal]
This is just a convenience method to do:
```
Fantom.dispatchNativeEvent(node, 'click');
```
Instead of:
```
runOnUIThread(() => {
enqueueNativeEvent(node, 'click');
});
runWorkLoop();
```
Which is too verbose and people rarely need this level of granularity in tests.
Note that, in Fabric, we have methods called `dispatchEvent` that don't match 1:1 with this API. In that case, `dispatchEvent` is more aligned with Fantom's `enqueueNativeEvent`.
Reviewed By: javache
Differential Revision: D69302382
fbshipit-source-id: 6f71a5ace11c81f551df2c2837881dbc6f48e7ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49253
Changelog: [internal]
Renaming this low level method as `enqueue` is more accurate in this case than `dispatch`, which is misleading because it actually doesn't dispatch it to JS.
We should also rename this in Fabric, but that's a larger and breaking change, so just making the change in Fantom for now. This is a trade-off between convenience/ergonomics of the testing API vs. alignment with the internal nomenclature. In this case we favor the first.
Reviewed By: javache
Differential Revision: D69302383
fbshipit-source-id: 7e163920ace709503367bf68baab5e9f2bf8ae3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49231
Those public modifier have no meaning as the class is internal. I'm removing them.
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D69252048
fbshipit-source-id: b51e5ac20338a01291d6cd04ee4c990cc8a6a755
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49229
This interface was converted to Kotlin, but the single method should have been converted to a `val`.
People kotlin consumers could call ReactOverflowView.overflow; now they need to call getOverflow().
Changelog:
[Internal] [Changed] - Undo a breaking change on ReactOverflowView
Reviewed By: NickGerleman
Differential Revision: D69250226
fbshipit-source-id: 5c7cca8c83f5c76a9cc1d254f8aa51409150c356
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49233
I'm converting the function inside ReactPointerEventsView from `fun` to `val`.
This Kotlin conversion resulted in a breakign change for Kotlin consumer which I believe can be prevented
if we do this change instead.
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D69252562
fbshipit-source-id: b277c6720f3156ed532bf5f2253d54cd72e38050
Summary:
I wanted to test exclusion of .d.ts files in https://github.com/facebook/react-native/pull/49227, but it also has node_modules so it will not test that condition correctly.
## Changelog:
[INTERNAL] [FIXED] - Fix exclude .d.ts test in GenerateCodegenSchemaTaskTest
Pull Request resolved: https://github.com/facebook/react-native/pull/49238
Test Plan: Run tests
Reviewed By: cipolleschi
Differential Revision: D69291695
Pulled By: cortinico
fbshipit-source-id: 46b9367f3466b9cd49232a0565e5778a06b43990
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49216
Should be able to replace `processTransformOrigin`.
As part of this, I discovered `processTransformOrigin` has a bug where it does not correctly support `center left` or `center right` syntax since it assumes first occurrence of `center` is for the horizontal
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69204030
fbshipit-source-id: 8001ef4f0b54fcbe93855920260e077b89669f6d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49189
Allow parsing the set of currently supported transform functions, and lists of them, using `CSSTranformFunction` (which may decompose to e.g. `CSSScaleX`), and `CSSTransformList`.
A bit more duplication than I would like here, but a lot of these have subtle differences.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69153280
fbshipit-source-id: ef8e93c8a49a7f1b98bd7c57614aa1c84417120d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49230
Those public modifier have no meaning as the class is internal. I'm removing them.
Changelog:
[Internal] [Changed] -
Reviewed By: tdn120
Differential Revision: D69251378
fbshipit-source-id: 4c3747510d18330dcdb8a0798e92736c4ab65a03
Summary:
While triaging issues in the React Native repository, we face two major challenges:
- Missing Issues: The large volume of issues makes it difficult to ensure that none are overlooked.
- Ownership: There is no structured process to determine who should handle which issue.
To address these challenges, we are setting up this action.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[GENERAL] [ADDED] - Added a new workflow to monitor new issue in repo.
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Here we are using this github action: https://github.com/react-native-community/repo-monitor to monitor new issues and then notify it on specific discord server to notify someone.
Currently this action runs every 6 hours.
Requirements:
- We need following inputs to make this workflow run:
- `DISCORD_WEBHOOK_URL` to be added in secrets [Needed for posting message in specific channels]
- `role_id`: To notify a group.
Pull Request resolved: https://github.com/facebook/react-native/pull/49225
Test Plan: NA
Reviewed By: cipolleschi
Differential Revision: D69254130
Pulled By: cortinico
fbshipit-source-id: 43a57f8f3bf161042a9432d02f292896ea8f7622
Summary:
In some projects we have conventions of using .tsx extension even for files without react components, we had issues where codegen wasn't updated properly.
I debugged the files included in a large project and made some improvements:
- Include tsx and jsx files
- exclude nested node_modules
- exclude ts type def files
## Changelog:
[ANDROID] [FIXED] - Improve input files for codegen gradle task
Pull Request resolved: https://github.com/facebook/react-native/pull/49227
Test Plan: Tested in a large app using codegen. I inspected the files that are included in the task inputs and made sure it works with first party and 3rd party modules.
Reviewed By: cipolleschi
Differential Revision: D69254204
Pulled By: cortinico
fbshipit-source-id: 368408e9719e9b5c9839dd873430b86ae4a062c7
Summary:
Just a minor typo in the changelog for 0.78
## Changelog:
[Internal] [Changed] -
Pull Request resolved: https://github.com/facebook/react-native/pull/49232
Test Plan: ¯\\_(ツ)_/¯
Reviewed By: cipolleschi
Differential Revision: D69252846
Pulled By: cortinico
fbshipit-source-id: 97010601482199c87d7a9da06e5e32a4bfa8a552
Summary:
`loadSourceForBridge` is broken after we refactor the appdelegate. So let's add it back.
## Changelog:
[IOS] [FIXED] - Added custom load js block in bridge mode
Pull Request resolved: https://github.com/facebook/react-native/pull/48845
Test Plan: Custom Appdelegate's `loadSourceForBridge` can be called in bridge mode.
Reviewed By: robhogan
Differential Revision: D68832046
Pulled By: cipolleschi
fbshipit-source-id: dcea791e6d8243fdb2f45a33af175aee1a4e1223
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49224
Refactor / quality pass.
- Remove `micromatch`, replace with glob ignores.
- Move and simplify platfom-specific file logic: mutate `files` as a single `Set`, reduce iterations.
- This is reconfigured so that the input file path globs need only match `*.js` sources.
- Introduce `debug` logs and expose convenience `--debug` script flag.
- Move output error detection into inner function implementation.
Changelog: [Internal]
Metro changelog: Internal
Reviewed By: j-piasecki
Differential Revision: D69240543
fbshipit-source-id: c2faef8212a2995936362b3d33d189c405bd879d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49222
Changelog: [internal]
This implements `test.only` in Fantom benchmarks, so we can focus on a specific case to speed up iteration.
Reviewed By: sammy-SC
Differential Revision: D69241220
fbshipit-source-id: 42b02fcb4d693988da4fa15a0c6bd7e90e473b9f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49223
Changelog: [internal]
Renames `suite.add()` as `suite.test()` for symmetry with Jest.
We'll also allow `test.only` in a following change for quick iteration.
Reviewed By: rshest
Differential Revision: D69241221
fbshipit-source-id: d141f80dc0c8e51b419ce233bca68bf0755fd356
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49212
Currently, developers can't use `popup-menu-android` at all because the Gradle file we publish is referencing
internal machinery.
I'm adding a pre-publish script that manipulates the Gradle. This is the easiest solution without having to do
crazy setup inside RNGP or having duplicated version codes around in the monorepo.
Fixes https://github.com/facebook/react-native/issues/49112
Changelog:
[Android] [Fixed] - Fix react-native/popup-menu-android not building for 3rd party developers
Reviewed By: cipolleschi
Differential Revision: D69192874
fbshipit-source-id: 9f9e8a0a6e76308e598a09f4c70dbc659c238b00
Summary:
Hey!
Since new architecture introduced View Flattening on iOS, props responsible for disabling this feature on specific views should be defined in cross platform interface.
Reference: https://github.com/reactwg/react-native-new-architecture/discussions/110
## Changelog:
[GENERAL] [CHANGED] - move view flattening props to cross platform type interface
Pull Request resolved: https://github.com/facebook/react-native/pull/49220
Test Plan: N/A
Reviewed By: fabriziocucci
Differential Revision: D69239454
Pulled By: javache
fbshipit-source-id: a89cb9fbaec63bbcb7691df067d5d3a375a8a66e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49213
Update the version of Jest used in React Native and Metro's own tests from `^29.6.3` to `^29.7.0`
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D69188217
fbshipit-source-id: 0748db5428e422c048454b7d129cbdd4dab6d687
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49146
Runtime Reference ShadowNode Update is enabled by default and no longer referenced in the RN holdout. This diff:
- removes the feature flag
- removes all references to the feature flag, enabling it
- updates the unit test for RSNRU
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D69061234
fbshipit-source-id: 0dab0b5cae99e83297f34645dee58ae9b3c0dc5f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49211
Add more control over view recycling behavior by splitting out each component that currently supports it.
Changelog:[Android][Added] Feature flags for recycling View, Text components separately
Reviewed By: sammy-SC, mdvacca
Differential Revision: D69190841
fbshipit-source-id: 6d85fee7103bf928e4f5bf6946bab3ff4cae4053
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49184
D65645985 shipped a refactor to `Animated`, so that it would use a custom `useAnimatedPropsMemo` instead of `useMemo`. This significantly improved update performance by no longer invalidating the `AnimatedProps` on effectively every update to `Animated` components.
However, this was measured to increase memory usage. After a few experiments, we identified that use of the in-band state update was responsible for the memory regression. While this requires further root cause investigation, this diff attempts to mitigate the memory regression.
This diff introduces a feature flag that enables an implementation that minimizes duplicated work, such as unnecessarily computing `compositeKey` or creating new instances of `AnimatedProps`. In addition, this implementation strives to do so without significantly degrading when an update is interrupted by a concurrent update.
Changelog:
[General][Changed] - Introduced a feature flag to test an optimization in `Animated` to reduce memory usage.
Reviewed By: rickhanlonii
Differential Revision: D69135223
fbshipit-source-id: a2699a314625e7570698bc41455b139711cfd7e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49141
This diff extends ReactNativeFeatureFlags to support prereleaseChannels, the goal is to be able to configure what release channel each feature flag will be enabled / disabled
changelog: [internal] internal
Reviewed By: rubennorte
Differential Revision: D68583324
fbshipit-source-id: 09fde8511dcf5dff63821f15afe0a2530a0845fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49183
The feature has been released to all for quite some time now and the holdout group has finally been unlinked. This removes all references to the feature flag and a few indicators that the feature is enabled/disabled from RNTester
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D69146787
fbshipit-source-id: 8a7f01016a715e61541910630d8c3ceb84ec5c82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49203
There are some leftover references to CircleCI in some comments. Let's remove it.
## Changelog:
[Internal] - Remove remaining CircleCI references from comments
Reviewed By: huntie
Differential Revision: D69182573
fbshipit-source-id: ea6cfe98422527d094ad4410cdd2a1a87dd61ddb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49202
There are some leftover references to CircleCI in these scripts. Let's remove it.
## Changelog:
[Internal] - Remove remaining CircleCI references from npm-utils scripts
Reviewed By: huntie
Differential Revision: D69182550
fbshipit-source-id: d8707abba3e01c26c8d7170522333dcbc039c19d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49201
There are some leftover references to CircleCI in these scripts. Let's remove it.
## Changelog:
[Internal] - Remove remaining CircleCI references from CI scripts
Reviewed By: huntie
Differential Revision: D69182535
fbshipit-source-id: 4e825b65b5f5ca6ce16f5c7ac2f79088cf2d1ace
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49200
Changelog: [Internal]
Update to `toBeCalled` and `toBeCalledTimes` aliases - forward them using prototype so number of frames matches when thrown.
Reviewed By: rubennorte
Differential Revision: D69182276
fbshipit-source-id: c20469959dc2e0f5c3686c90e27cd80117ad5fb7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49205
Changelog: [Internal]
Updates how name shadowing works for the TS type generation prototype to align more with how Flow does it - `.js.flow` files shadow every other file with the same name, then `.js` file (if exists) is treated as the common interface.
The script still uses `.flow.js` for common interface, which will be changed in another diff.
Reviewed By: huntie
Differential Revision: D68958772
fbshipit-source-id: caa390711f2bcd7666d875703fc316d874500a0d
Summary:
`yarn install` is failing sporadically with a 500. This should mitigate this flakyness.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/49199
Test Plan: CI
Reviewed By: rubennorte
Differential Revision: D69180877
Pulled By: cortinico
fbshipit-source-id: 5276e2744c73df896b4bcadfecf3db61d57d198c
Summary:
One of the steps we perform when doing a release is to run `npm view react-native` to verify that the release has been published and it is available with the right tag.
As of today, we check this manually.
This change aims at automating this check so that we don't have to do it manually ourselves.
## Changelog:
[Internal] - Releases: automate the npm view check
Pull Request resolved: https://github.com/facebook/react-native/pull/49164
Test Plan:
Created a veriftyReleaseOnNPM-tests.js jest test to verify that the script works fine.
<img width="667" alt="Screenshot 2025-02-04 at 15 18 24" src="https://github.com/user-attachments/assets/cf08155f-80da-4e15-a922-5c16f3fd806e" />
Reviewed By: cortinico
Differential Revision: D69118622
Pulled By: cipolleschi
fbshipit-source-id: a8d40cd2fcb164d8f7174de680b340510f3e8551
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49192
Changelog: [internal]
We refactored the public API of Fantom benchmarks in https://github.com/facebook/react-native/pull/49014 but that refactor broke test only mode, as we started overriding the options after setting them. This fixes that.
Reviewed By: javache
Differential Revision: D69176983
fbshipit-source-id: 9afc2d2f27fb2ee0aa452d4b02c28531acf40b8e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49188
This allows creating lists of a compound data type, storing each element as a variant of the possible types, instead of as the specified type.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69142157
fbshipit-source-id: d742d81a6517b24f24827727cd777550f2ad274f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49187
`tolower` is not `constexpr`. Share some quick utilities for char to lowercase, and case insensitive comparision that does not create new string.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69134770
fbshipit-source-id: 57a84f2d1a441e5a4c07c0db96cb6c133770fb51
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49186
Next up for transforms, and for some future cases, it is convenient to be able to export a single marker type like `CSSTransform`, that can expand to a variant of multiple possible types of different shape (e.g. `CSSMatrix3D` vs `CSSScale`).
It is also best (for code size) to only have a single representation of compound types (e.g. `<CSSLength, CSSPercentage>` generates a separate copy of code compared to `<CSSPercentage, CSSLength>`).
This diff introduces `CSSCompoundDataTypes` which allows composing types, which are then flattened out to discrete types during parsing. For simplicity, `CSSCompoundDataType` cannot currently be nested inside of other `CSSCompoundDataType`, though this could be added in the future.
```
/**
* Marker for the <length-percentage> data type
* https://drafts.csswg.org/css-values/#mixed-percentages
*/
using CSSLengthPercentage = CSSCompoundDataType<CSSLength, CSSPercentage>;
```
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69089416
fbshipit-source-id: 8645009f06eb14b1ac4437a4fc4dd6b9ad3f88a2
Summary:
This centralizes the invocation of yarn install to be via the `actions/yarn-install`.
It will make it easier to add a retry if we want for all the `yarn install` steps in all the workflows.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/49174
Test Plan: CI
Reviewed By: NickGerleman
Differential Revision: D69121525
Pulled By: cortinico
fbshipit-source-id: 135da2e172cdf95b2a0ef8fd3d25996ab9317167
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49155
This does some code cleanup for CSS keywords to reduce boilerplate, duplication, better isolate namespace, fix a typo, and ensure we get a warning (unused variable) if we miss handling a defined keyword.
We technically don't need `CSSKeyword` at all anymore, and don't need to overlay each keywords values to be the same, though having a pattern where each keyword set uses ordinal values from CSSKeyword forces folks to look and add the enum to the list, and include the header defining the data types for keyword sets, instead of each set looking a little magic.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69083181
fbshipit-source-id: b2764e87c2a127d73f816327c4edd45151ea8d82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49151
This diff is... maybe an argument against a global list of interned keywords (it works better in some other contexts though), and this structure is likely to change later when we reintroduce what was previously `CSSPropertyDescriptor` (a list of allowed keywords per property).
But... we're going to roll with this for now to replace the ViewConfig processor (which string splits) in the most over-engineered way possible.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68851566
fbshipit-source-id: 71022f051b112adc03bd182d433e3d890e6023f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49152
For parsing a variable number of whitespace separated data types.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68849561
fbshipit-source-id: be3314990d9e7c202c02deba463d79e50985c0b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48991
This adds support for parsing the `<shadow>` data type. In combination with `CSSCommaSeparatedList`, we can now parse box shadow expressions.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68744811
fbshipit-source-id: bac7be0faf8cd8eee04f21651180151edeef7294
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48987
Adds a data type parser for a variable number of values of a given single data type (at least 1).
E.g. `CSSCommaSeparatedList<CSSShadow>` will represent the syntax of `<shadow>#` (ie the value produced by box-shadow).
Changelog: [internal]
Reviewed By: lenaic
Differential Revision: D68738165
fbshipit-source-id: 6dd17b3da24b1c24808e49834a29a237c0115fab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48986
This adds a new `consume()` function to data type parsers which passes a raw parser. This can be used for types which are compounds of other data types, where we may want to accept more than the first token.
This will be used for shadow parsing, but also fixes a hypothetical future bug with ratios. E.g. `calc(foo) / calc(bar)` may be a valid ratio, not starting with a token. We instead just want to try to parse a number data type from the stream.
The form of parsing a preserved token + rest is removed, with the assumption that anything parsing more than a single token should use compound parsing.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68735370
fbshipit-source-id: 660e0b4a496136c8a559f4ba47bc1bd8d17aa116
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48985
This reverts some of the behavior I added in D68357624, since peeking a component value is non-obviously more expensive than manually copying the parser, and needing to peek will be a pain for flat lists of values (like for box-shadow).
Changelog: [internal]
Reviewed By: lenaic
Differential Revision: D68733518
fbshipit-source-id: 7b4a061d1649019274441ae0e82609f771dd2916
Summary:
Support distributing Expo Dev Clients to TestFlight. Expo Dev Clients are like custom versions of Expo Go that you can use to connect to a dev server or test remote updates with. Currently they can only be distributed through AdHoc provisioning because Apple rejects the use of private symbols. The symbols in question are used for simulator builds to support reloading when the "R" key is pressed (amongst other features). This is not imperative since there are a number of systems for reloading the app such as pressing R in the CLI window, but it's also not relevant to a physical phone where there is no keyboard.
## Changelog:
[IOS] [FIXED] - Remove private symbols for non-simulator and non-catalyst builds.
<!-- 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/49154
Test Plan:
- I built an deployed an app with this patch enabled to TestFlight to ensure the submission wouldn't fail. This can be reproduced locally with:
- `npx create-expo`
- Add the patch (ensure it's set with a `prepare` script).
- Following `eas.json`:
```json
{
"cli": {
"version": ">= 14.7.0",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"resourceClass": "large",
"autoIncrement": true
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {},
"development": {}
}
}
```
- Then building and deploying to TestFlight: `npx eas-cli@latest build -p ios -s --profile development`
Reviewed By: huntie
Differential Revision: D69106388
Pulled By: cipolleschi
fbshipit-source-id: 773a897ff5061929367b72188f06a08213c7dd46
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49161
Avoid special strings, and default to null to mean undefined or unknown. This save us from bridging an unnecessary string but also makes the fallback name for logging network requests clearer.
Changelog: [Internal]
Reviewed By: bgirard
Differential Revision: D69058211
fbshipit-source-id: d83f424e0c2c23842554a8e4e616cad39719f311
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49125
Changelog: [internal]
This adds support for taking JS memory heap snapshots from Fantom tests via `Fantom.saveJSMemoryHeapSnapshot`. This can be used in one-off tests to do memory analysis and determine the existence of leaks:
```
// Warm up
Fantom.saveJSMemoryHeapSnapshot('/path/to/my/1.heapsnapshot');
// Do work
Fantom.saveJSMemoryHeapSnapshot('/path/to/my/2.heapsnapshot');
// Clean up
Fantom.saveJSMemoryHeapSnapshot('/path/to/my/3.heapsnapshot');
```
Load these snapshots in Chrome and select "Objects allocated between 1 and 2" in the dropdown to see the potentially leaked objects.
In the future we could introduce additional utilities to analyze the snapshots and do the detection automatically, e.g.:
```
// Warm up
const baseline = Fantom.takeJSMemoryHeapSnapshot();
// Do work
const before = Fantom.takeJSMemoryHeapSnapshot();
// Clean up
const after = Fantom.takeJSMemoryHeapSnapshot();
const leaks = findMemoryLeaks(baseline, before, after);
expect(leaks.sizeKB()).toBeLessThan(THRESHOLD);
```
Reviewed By: rshest
Differential Revision: D68953788
fbshipit-source-id: 6b3899297837c582a7b7235909d59b3e1631913d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49140
Similar to the change made in `useAnimatedProps`, except for `useAnimatedPropsMemo`. (This is just split out to make the changes easier to review.)
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D69058338
fbshipit-source-id: 033853673d8fe1442b37bb0c0adc7cb22557c334
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49143
Within the implementation of Animated, the `allowlist` value passed into `unstable_createAnimatedComponent` and `useAnimatedProps` is stable, meaning that it cannot change from commit to commit. However, this semantic is not codified because `allowlist` is a prop.
This refactors `useAnimatedProps` to be created by a new `createAnimatedPropsHook` function which accepts an `allowlist` argument, codifying that its value is stable for the lifetime of the hook returned.
This permits React to avoid checking whether `allowlist` has changed from commit to commit.
For now, I've left `useAnimatedProps` as a deprecated module that returns a hook with an empty `allowlist`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D69058336
fbshipit-source-id: dbcf4ca4e389f3682864a9794eacbe0af23659db
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49121
This change removes the scripts/circleci folder and the last poll-maven script which was not used.
## Changelog:
[Internal] - Remove the circleci folder script
Reviewed By: cortinico, huntie
Differential Revision: D69047603
fbshipit-source-id: a4f1f100d71d792edf42c8d4cb6a0b8d8e7e5260
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123
Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.
## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder
Reviewed By: cortinico, huntie
Differential Revision: D69047581
fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49122
This change updates the Release testing and the release scripts by removing any reference to CircleCI
## Changelog:
[Internal] - Remove CircleCI references from Release and Release testing scripts
Reviewed By: cortinico, huntie
Differential Revision: D69047479
fbshipit-source-id: 14a394b879c03cd81a8d043036c43839a38602c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49119
This change removes the .circleci folder and the workflow that we run on CircleCI
## Changelog:
[Internal] - Remove CircleCI config
Reviewed By: cortinico, huntie
Differential Revision: D69047483
fbshipit-source-id: 0020a4ff69d035e939e01079059ba2743aee55fe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49118
We finished the migration away from CircleCI, so we are cleaning up the codebase.
This change updates references to CircleCI from gradle.
## Changelog:
[Internal] - Remove references from CircleCI in RNGP
Reviewed By: cortinico
Differential Revision: D69047484
fbshipit-source-id: 4ab40be62e6769eb3a8f65136464eed6628d47a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49101
Changelog: [internal]
We can move this out of the deprecated directory. Also added a `.npmignore` entry so this won't be published to npm with the package.
Reviewed By: lenaic
Differential Revision: D68896208
fbshipit-source-id: ec85236aeeabdc9abcd870f0f4c1322eeb3cc659
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49100
Changelog: [internal]
This API isn't part of the DOM standard so can be moved out.
Reviewed By: huntie
Differential Revision: D68896484
fbshipit-source-id: 5d275beb909ce5c5ce0eddb6c6e04cf7491aa1cb
Summary:
Fixes a `ConcurrentModificationException` when iterating over `TextWatcher` `mListeners` array.
If you open Android open source code (`TextView` class), then we can see that Android iterates with `for/n` loop (not `for/:`):
```java
void sendAfterTextChanged(Editable text) {
if (mListeners != null) {
final ArrayList<TextWatcher> list = mListeners;
final int count = list.size();
for (int i = 0; i < count; i++) {
list.get(i).afterTextChanged(text);
}
}
notifyListeningManagersAfterTextChanged();
hideErrorIfUnchanged();
}
```
<hr>
We can catch the `ConcurrentModificationException` with old code, when for example we have 3 listeners:
- 0 is `EmojiTextWatcher` (seems like it's added by OS);
- 1 is `OnlyChangeIfRequiredMaskedTextChangedListener` (added by `react-native-text-input-mask`);
- 2 is a listener that attached by `react-native-keyboard-controller`.
On every afterTextChanged [input-mask-android](https://github.com/RedMadRobot/input-mask-android/tree/df452edc0c52a37e5082adcfc3d05d77b5aa34e8) [removes](https://github.com/RedMadRobot/input-mask-android/blob/df452edc0c52a37e5082adcfc3d05d77b5aa34e8/inputmask/src/main/kotlin/com/redmadrobot/inputmask/MaskedTextChangedListener.kt#L212) the listener and [adds](https://github.com/RedMadRobot/input-mask-android/blob/df452edc0c52a37e5082adcfc3d05d77b5aa34e8/inputmask/src/main/kotlin/com/redmadrobot/inputmask/MaskedTextChangedListener.kt#L231) it back.
The oversimplified version of the code can be next:
```java
public class MyClass {
public static void main(String args[]) {
ArrayList<Integer> mListeners = new ArrayList<>();
mListeners.add(0);
mListeners.add(1);
mListeners.add(2);
Iterator<Integer> iterator = mListeners.iterator();
while (iterator.hasNext()) {
Integer listener = iterator.next();
// Check if the listener is equal to 1
// 1 is OnlyChangeIfRequiredMaskedTextChangedListener and we simulate the behavior of this class
if (listener == 1) {
int i = mListeners.indexOf(listener);
if (i >= 0) {
mListeners.remove(i);
}
// Add the removed element at the end
mListeners.add(listener);
}
}
// Print the modified list
System.out.println(mListeners);
}
}
```
Key points are:
- if we have only [0, 1] listener, then it works well and `ConcurrentModificationException` will not be thrown, because we modify last element;
- if we have `[0, 1, 2]` then exception will be thrown.
So in this PR I decided to re-work code to match what Android has. With `for/n` approach `ConcurrentModificationException` will not be thrown, because we don't check array immutability in this case.
More information also can be found here: https://github.com/kirillzyusko/react-native-keyboard-controller/issues/324
## Changelog:
[ANDROID] [CHANGED] - avoid `ConcurrentModificationException` when iterating over `mListeners` `TextWatcher` array
Pull Request resolved: https://github.com/facebook/react-native/pull/49109
Reviewed By: cortinico
Differential Revision: D69050984
Pulled By: javache
fbshipit-source-id: 9c6a7a428467fa5e546d70549dfcc91d6b2e58d2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49132
Follows D68780147 and D68953084. We're able to safely remove this API by relocating the implementation into the one dependent internal test call site.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D69049203
fbshipit-source-id: 82c4b15d7f6736aed21171eeec1c197d2f34b33e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49072
We have instance of apps crashing when enabling the New Architecture because of the TurboModule interop layer.
What's happening is that when the module is loaded, the TM Interop Layer tries to parse the method definition to expose them in JS. However, for some libraries in the Legacy Architecture, it is possible to define a method in Objective-C and to define a different signature in Swift.
For example, the [`RNBluetoothClassic` library](https://github.com/kenjdavidson/react-native-bluetooth-classic) defines a selector in objective-c which [has the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.m#L134-L136)
```
RCT_EXTERN_METHOD(available: (NSString *)deviceId
resolver: (RCTPromiseResolveBlock)resolve
rejecter: (RCTPromiseRejectBlock)reject)
```
And the method is inmplemented in Swift with [the signature](https://github.com/kenjdavidson/react-native-bluetooth-classic/blob/main/ios/RNBluetoothClassic.swift#L502-L505):
```
func availableFromDevice(
_ deviceId: String,
resolver resolve: RCTPromiseResolveBlock,
rejecter reject: RCTPromiseRejectBlock
)
```
When the TurboModule interop layer tries to parse the method, it receives the `accept:resolver:rejecter:` signature, but that signature is not actually defined in as a method in the module instance, and it crashes.
This crash was not happening in the Old Architecture, which was handling this case gracefully. Notice that the specific method from the example is not working in the Old Architecture either. However, the app is not crashing in the old architecture.
This change adds the same graceful behaviors plus it adds a warning in development to notify the developer about which methods couldn't be found in the interface.
Fixes:
- https://github.com/facebook/react-native/issues/47587
- https://github.com/facebook/react-native/issues/48065
## Changelog:
[iOS][Fixed] - Avoid crashing the app when the InteropLayer can't find some methods in the native implementation.
Reviewed By: javache
Differential Revision: D68901734
fbshipit-source-id: 844d1bf29423d5c601b583540e86d57dfffd1428
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49041
Prevent the class of issues seen in D68797482 by making `#if FOO` where `FOO` is not defined an error.
Changelog: [Internal]
Reviewed By: NickGerleman, sammy-SC
Differential Revision: D68824244
fbshipit-source-id: 1291c5f2f84ecb023ba76a015716cc7c9ae0f89e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49127
These tests are marked as noexcept, but they can indeed throw exceptions: they trigger synchronous commits, which may cause exceptions in the mounting layer.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D69049587
fbshipit-source-id: 02c6187c8d0e043c9840aad9c9e4d27866898b4a
Summary:
As pointed out by RyanCommits the ReactNativeFactory PR removed `enableFixForViewCommandRace` feature flag by mistake. Reference: https://github.com/facebook/react-native/pull/46298/files
This PR re-adds the feature flag.
## Changelog:
[IOS] [FIXED] - Re-enable enableFixForViewCommandRace feature flag
Pull Request resolved: https://github.com/facebook/react-native/pull/49126
Test Plan: Not needed, the feature flag was there before refactor.
Reviewed By: huntie
Differential Revision: D69049668
Pulled By: cipolleschi
fbshipit-source-id: b7bf382c76878e72619145283fa8cc2c1046b486
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49081
Follows D68780147. We are depending on this API in one internal E2E test. Rename as `__setInterceptor_DO_NOT_USE`.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D68953084
fbshipit-source-id: 66b685a90b6e7f18646752dc90892963d16f9a83
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49102
Moves this script one level up. In the next diff, will be used to support execution of scripts themselves, as well as `packages/`.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D68960279
fbshipit-source-id: 7b62420c269dc1c1366ac9a827db078d34cb86c5
Summary:
Working on migrating some of the com.facebook.react.modules.network classes to Kotlin, I'm creating some test cases here for `CountingOutputStream` before migrating that class.
## Changelog:
[INTERNAL] - Add CountingOutputStream tests
Pull Request resolved: https://github.com/facebook/react-native/pull/49058
Test Plan:
```bash
yarn test-android
```
Reviewed By: cortinico
Differential Revision: D68903427
Pulled By: rshest
fbshipit-source-id: f71926cf526a65b2434aaa762007e0b4ca5dd1a4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49087
I'm moving the whole module to be in Kotlin and updating the BUCK file.
Those files also have 0 usages in OSS so not a breaking change.
Changelog:
[Internal] [Changed] -
Reviewed By: robhogan
Differential Revision: D68953731
fbshipit-source-id: d8238bf805661cbdd6fb070a60f3e32b44ec9832
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49079
The rule disallows using CommonJS exports in react-native and assets/registry package.
## Changelog:
[Internal] - Created a lint rule that prevents using CommonJS exports
Reviewed By: huntie
Differential Revision: D68951212
fbshipit-source-id: 1c9a1581af951d2a876b348981f0e5a81c99109a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49064
Update `public-api-test` to disregard all object/type members prefixed with an underscore (`_`). These are considered existing internal APIs.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D68895376
fbshipit-source-id: db581df7cc37802fa5f7d3aa4d7c07514223209a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49060
We want to hide private properties from JS public API interface. The stripPrivateProperties transform removes all private nodes of type ObjectTypeProperty, Property, PropertyDefinition and MethodDefinition. There is also a change in transforms reducer that incorporates `print` function from hermes-transform which modifies the code base on the transformed ast (transformed.mutatedCode seems to be a code before the transform operation).
## Changelog:
[Internal] - Added transform that strips private properties in build-types script
Reviewed By: huntie
Differential Revision: D68892853
fbshipit-source-id: 5035fd4339aa6294d972e7aff0eb563f48d4c3d2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49062
Another round of cleanup for the `public` keyword that I found around.
Those are unnecessary here as those classes are `internal` and we should remove them.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D68894182
fbshipit-source-id: 6f7bac6051e17785a1bfb0d544950250429c71cb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49019
Removes the `JSInspector` class and its dependencies.
- This was related to the legacy `ReactCommon/inspector/` subsystem (D4021490) — which added a compat layer from JavaScriptCore to CDP for an earlier version of Chrome debugging.
- The JS components of this system (`JSInspector.js`, `NetworkAgent.js`) were added in D4021516.
`ReactCommon/inspector/` has since been deleted and these components are no longer load bearing.
- We intend to replace this logic (at least, the archaic `XHRInterceptor` behaviour, which worked at one point) with native debugger `Network` domain support in our C++ layer.
**Changes**
- Remove all modules under `Libraries/JSInspector/`.
- Remove all `XHRInterceptor` call sites.
- Remove the `JSInspector.registerAgent()` mount point in `setUpDeveloperTools.js`.
- Exclude `Libraries/Core/setUp*` from `public-api-test` (these are side-effect setup files with no exported API).
Changelog:
[General][Breaking] - Remove legacy Libraries/JSInspector modules
Reviewed By: christophpurrer
Differential Revision: D68780147
fbshipit-source-id: 3d11cc89886a91055e6b69ac6f0609c288965801
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49074
This used to not be noticeable when we were clipping the background even without a border, after fixing that, we got line when the width/height was 0
This is again not an issue with new Background and Border since they take a slightly different approach
Diff that caused the issue D68279400
ie.
{F1974794589}
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68843649
fbshipit-source-id: a25ace46b604690e3385c49d6f4bb3a4163bc594
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49020
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates the `Libraries/EventEmitter/*.js` and `Libraries/Image/*.js` files to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/EventEmitter` and `Libraries/Image/*.js` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68780876
fbshipit-source-id: bd8e702aba33878e38df6d9c89bec27e7c8df0ac
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49065
Changelog: [internal]
Cleaning up the flag because it's no longer necessary.
Reviewed By: sammy-SC
Differential Revision: D68892995
fbshipit-source-id: 4e0290bfb11181dc388e6590af1b82581588b9ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49063
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Updates react-native-codegen to generate ViewConfigs that are compatible with react-native both before and after the export syntax migration.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D68894819
fbshipit-source-id: fca46c1b91c15e22f1e1128ce8621c05341e2fe6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49012
Changelog: [internal]
(This is internal for now, until we rollout the DOM APIs in stable).
This refines the concept of root elements from the merged proposal for [DOM Traversal & Layout APIs](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0607-dom-traversal-and-layout-apis.md).
The original proposal included a reference to have the root node in the tree as `getRootNode()` and no other methods/accessors to access it.
This makes the following changes:
* The root node is a new abstraction in React Native implementing the concept of `Document` from Web. `node.getRootNode()`, as well as `node.ownerDocument` now return instances to this node (except when the node is detached, in which case `getRootNode` returns the node itself, aligning with the spec).
* The existing root node in the shadow tree is exposed as the `documentElement` of the new document instance. It would be the first and only child of the document instance, and the topmost parent of all the host nodes rendered in the tree.
In terms of APIs:
* Implements `getRootNode` correctly, according to the specified semantics.
* Adds `ownerDocument` to the `ReadOnlyNode` interface.
* Adds the `ReactNativeDocument` interface, which extends `ReadOnlyNode` (with no new methods on its own, which will be added in a following PR).
NOTE: This is currently gated under `ReactNativeFeatureFlags.enableDOMDocumentAPI` feature flag, which is disabled by default.
Reviewed By: yungsters
Differential Revision: D67526381
fbshipit-source-id: dff3645469e7ea2b2026dbbaa94d9fd0e00291be
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49011
Changelog: [internal]
This exposes the new `getPublicInstanceFromRoot` method from the React renderer in our RN façades, preparing for the new change to implement the document interface in RN.
Reviewed By: javache
Differential Revision: D68767143
fbshipit-source-id: 9a3403f9bc1612b402305695d084497a46ee4480
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49021
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates files in `Libraries/LayoutAnimation/*.js` and `Libraries/Linking/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates jest mocks
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/LayoutAnimation` and `Libraries/Linking` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68782429
fbshipit-source-id: c9ea4fadbc44587a165d311b054fcd03444842c8
Summary:
`dev-middleware` uses `invariant` but does not declare it as a dependency. Under certain hoisting scenarios, or when using pnpm, this will cause `dev-middleware` to fail while being loaded.
## Changelog:
[GENERAL] [FIXED] - add missing `invariant` dependency
Pull Request resolved: https://github.com/facebook/react-native/pull/49047
Test Plan: n/a
Reviewed By: cortinico
Differential Revision: D68835789
Pulled By: huntie
fbshipit-source-id: 13718f4970ed55e6e062b7c2bd719be977abdd0c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49049
ReactBridge can be internalize, there are no usages in OSS
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D68540710
fbshipit-source-id: ce7fe6ca52186414650dcc529c5891dc59cab51a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49050
Changelog: [internal]
We added support for feature flags that don't have a native module definition so we could handle cases where the JS changes progressed faster than native ones, but we recently saw that when native catches up, the API starts logging an error through `console.error` about the native module method not being available.
That's an expected result of this feature and it's when we can clean up the code in JS, so we shouldn't be logging errors in that case.
This removes the error for them specifically.
Reviewed By: elicwhite
Differential Revision: D68843247
fbshipit-source-id: 730f3eba8c26959825cd9c3897f055a02a5f9591
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49018
Changelog: [internal]
Migrates the mounting layer logs from C++ (640 lines of code) to Fantom (248 lines!!!).
This is 1:1 translation of the test.
Reviewed By: javache
Differential Revision: D67549200
fbshipit-source-id: 735fa3203cd04dd5b3b4b5174e0c96fdc2354993
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49017
Changelog: [internal]
The debug string for props doesn't log `nativeID` so we can't access it in Fantom. This fixes that to simply future tests.
Reviewed By: javache
Differential Revision: D68779903
fbshipit-source-id: 9800ef2b6d173e2fc8e21d3d910139a30ae91342
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49016
Changelog: [internal]
This replaces the existing string-based logs with something more structured, and increases the coverage to properly log all operations.
As part of this work I had to refactor how we record mutations so they would be done while applying the mutations, and not before/after where necessary metadata might not be available yet/anymore.
Reviewed By: sammy-SC
Differential Revision: D67549201
fbshipit-source-id: 0bcb1642a6b3d7e704f4ee24a550d4189c406aed
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49015
Changelog: [internal]
This name better reflects the fact that we're emptying the buffer when calling it.
Reviewed By: javache
Differential Revision: D67549202
fbshipit-source-id: 7523a130f26bced122acd4f50b45c2b61a39bba9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48930
Changelog: [internal]
This creates new versions of `XMLHttpRequest`, `FileReader` and `WebSocket` that extend the new built-in `EventTarget` implementation, instead of the implementation from the `event-target-shim` package.
It also sets up a test to choose between the 2 implementations at runtime to verify correctness and performance. This doesn't use the RN feature flags infra because we use this flag very early on startup, before we have a chance to set overrides. We could use a native feature flag instead but it'd slow down the rollout of the test.
Reviewed By: yungsters
Differential Revision: D68625226
fbshipit-source-id: bff715c43a237b65d5a02a3fdb56f3275689ea46
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49045
Changelog: [internal]
Making some objects read-only to reflect usage and allow callers to pass both read-only and writable objects.
Reviewed By: yungsters
Differential Revision: D68831136
fbshipit-source-id: e9a2d96ec0abd13f609d26d376e6da946f802011
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48928
Changelog: [internal]
Just a minor change to reduce the number of Flow errors we will get when we refactor XHR soon.
Reviewed By: javache
Differential Revision: D68625224
fbshipit-source-id: e952f3f52de8081a0773ef3a01e1259c3be67a92
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49022
These modules support the in-app Inspector Overlay.
Breaking change that's unlikely to hit any users. Unreferenced by Expo.
Changelog:
[General][Breaking] Move `Libraries/Inspector/` modules to `src/private/`
Reviewed By: cortinico
Differential Revision: D68781896
fbshipit-source-id: 8fcd72d56684319019f64a375c2e2ef317a47c13
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49010
Changelog: [internal]
This adds a stub method for `ReactNativePrivateInterface.createPublicRootInstance`, which just returns `null` for now, so we can synchronize the React renderer that will try to use it to create root instances.
Initially, this will not do anything and React will just pass the `null` value around. When we implement the document API, we will return a proper instance and React will pass it to `createPublicInstance` so we can link things at runtime.
Reviewed By: javache
Differential Revision: D68561173
fbshipit-source-id: 632a7c3523910059a1f63f35b5f0f52f5660a961
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49009
Changelog: [internal]
Native APIs so far have returned instance handles from React to reference nodes in the rendered UI tree, but now that we're adding support for the document API, this isn't sufficient to represent all types of nodes. Both for the document and for its `documentElement`, we don't have an instance handle from React that links to the node, but we're going to represent that differently.
This is a refactor so the existing methods use a mostly opaque `NativeNodeReference` type so we can implement it as a union of React instance handles and the future types we're going to introduce to support document.
Reviewed By: javache
Differential Revision: D67704855
fbshipit-source-id: 0568143d9ce39be65986e1a4b92fdaebd79e4f66
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49008
Changelog: [internal]
We're modifying some core APIs in the RN render in following diffs, so this adds a simple benchmark as a safety mechanism to verify those don't regress performance significantly.
Reviewed By: yungsters
Differential Revision: D68772175
fbshipit-source-id: 3bc446e68495dc04590b613297baa00589fb5f8d
Summary:
The `maxFontSizeMultiplier` prop for `Text` and `TextInput` was not handled in Fabric / New Architecture as documented in https://github.com/facebook/react-native/issues/47499.
bypass-github-export-checks
## Changelog:
[GENERAL] [FIXED] - Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture
Pull Request resolved: https://github.com/facebook/react-native/pull/47614
Test Plan:
I have not added any automated tests for this change but try to do so if requested. I have however added examples to RN Tester for both the Text and TextInput components, as well as compared the behaviour with Paper / Old Architecture. Both on version 0.76.
Noticed now I didn't do exactly the same steps in both videos, oops! Be aware that reapplying changes made in the Settings are currently half-broken on the new architecture, thus I'm restarting the app on Android and iOS. But this issue is unrelated to my changes. I've tested on main branch and it has the same issue.
Here are comparison videos between Paper and Fabric on iOS *after* I've made my fix.
### Text
| Paper | Fabric |
| ------------- | ------------- |
| <video src="https://github.com/user-attachments/assets/f4fd009f-aa6d-41ab-92fa-8dcf1e351ba1" /> | <video src="https://github.com/user-attachments/assets/fda42cc6-34c2-42a7-a6e2-028e7c866075" /> |
### TextInput
| Paper | Fabric |
| ------------- | ------------- |
| <video src="https://github.com/user-attachments/assets/59b59f7b-25d2-4b5b-a8e2-d2054cc6390b" /> | <video src="https://github.com/user-attachments/assets/72068566-8f2a-4463-874c-45a6f5b63b0d" /> |
Reviewed By: Abbondanzo
Differential Revision: D65953019
Pulled By: cipolleschi
fbshipit-source-id: 90c3c7e236229e9ad9bd346941fafe4af8a9d9fc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49032
Add a native API to validate the RuntimeScheduler has no pending tasks, and automatically validate after every test that there's no pending tasks left to execute.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D68797481
fbshipit-source-id: dbbef894a57bd29eb5a033ac8aaeedef770dcba2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49030
Overwriting another RawProps object via `operator=` is rarely what we want, and these objects should be considered immutable once constructed.
This will catch issues such as D68633985
Changelog: [General][Changed] Removed `RawProps::operator=`
Reviewed By: sammy-SC
Differential Revision: D68797484
fbshipit-source-id: 766a65db1dbf4485c78007f8f69cc9426d27a943
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49029
This was never being compiled, because we didn't import the header that set `RN_DEBUG_STRING_CONVERTIBLE`
Will look at enabling `-Wundef` to catch these.
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D68797482
fbshipit-source-id: 6a01192c799903b6f956f9b0acea94bd93183f3b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49033
Those methods are not used at all in the codebase, let's clean them up.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68826893
fbshipit-source-id: 36e2f0ae247ed72305c1d9d346c6cf32cef6f8f2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49034
This class was still in Java. I'm converting it to Kotlin + I'm making it internal.
As this class was inside the `com.facebook.react.internal.turbomodule.core` package,
we don't consider this a breaking change.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68826892
fbshipit-source-id: b1f7aea984ab333faea66a9e8ccbb1492767333e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49024
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates files in `Libraries/Lists/*.js` to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/Lists` with `require` syntax may need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68783945
fbshipit-source-id: 7563155254fed40b6fe7d280d9e040ea24a5c870
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49007
# Changelog: [Internal]
Before sending `Tracing.start`, CDT will also send `Debugger.disable`.
You don't want to hit your breakpoints when you are profiling an appplication, this is by design.
We won't just delegate this to Hermes to handle. We will explicitly check that this condition is satisfied on React Native side. This is done to avoid regression in case the implementation details will change on CDT side.
Later in D68414421, we will also check that samples JavaScript stack don't contain debugger frames. This is necessary to distinguish garbage collector frames from debugger frames, which share the same type in Hermes VM - "Suspend".
We need garbage collector frames. If debugger frame was found we would throw an error, because this is unexpected after Debugger domain was disabled.
Right now Hermes is not disabling local VM Debugger on `Debugger.disable` method - this is a known bug, which I am addressing in a stack from D68772900.
Reviewed By: huntie
Differential Revision: D68776863
fbshipit-source-id: 4346ac5eb850578265a179b5fd687539ae7d15bc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48988
The only unitless `<length>` value allowed is `0`, so most of the examples in the `processBoxShadow` unit tests are parse errors on web 🫠. Lets update the tests, and disallow these invalid values.
Changelog:
[General][Breaking] - Disallow invalid unitless lengths in box shadows
Reviewed By: jorge-cab
Differential Revision: D68740553
fbshipit-source-id: ea935819f773c5d516dd9b3367e5d2c808941c28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48984
Noticed this in conjunction with another change, that I misinterpreted the ratio spec a bit. Ratios with a part less than zero are parse errors, while degenerate ratios are not (Chrome and Firefox both treat like this).
Removing usage of visitorless `consumeComponentValue()` here in preparation for next diff.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68733519
fbshipit-source-id: 9afc7b7295b067a3e1469e2f80f5c9a6bea41fae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49027
Make constants more specific to `METAHash` (avoid potential conflicts) and unify the APIs with a shared attribute definition (will be used to mark these APIs as unavailable from Swift).
## Changelog:
[iOS] [Changed] - Change prime constants to have prefix in order to avoid any potential conflicts
Reviewed By: adamjernst
Differential Revision: D68790450
fbshipit-source-id: 69c8b73063cf57d6a4ec25f6cd52a906c77694f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49000
Just found those nits around while looking at the codebase.
This clears things out and should have no runtime impact.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D68768384
fbshipit-source-id: bd3a30f1792a6f662d1f5b25855c89b6d43e72bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48650
## Motivation
Modernising the RN codebase to allow for modern Flow tooling to process it.
## This diff
- Migrates the `Libraries/ReactNative/*.js` files to use the `export` syntax.
- Updates deep-imports of these files to use `.default`
- Updates the current iteration of API snapshots (intended).
Changelog:
[General][Breaking] - Deep imports to modules inside `Libraries/ReactNative` with `require` syntax need to be appended with '.default'.
Reviewed By: huntie
Differential Revision: D68109193
fbshipit-source-id: 3444bf6b2152f7ed72d2923149a10041d718aaf0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49001
In {D42973408}, `Debugger.scriptParsed` was tweaked to be intercepted in `inspector-proxy`, which:
1. Rewrote the `sourceMapURL` to be relative to debugger.
2. Attempted to fetch the contents of the source map from `sourceMapURL` after re-writing again to a server-relative URL, and if successful replaced `sourceMapURL` with a base64 data URL.
1 is still needed until we have `Network.loadNetworkResource`, but 2 was only needed for frontends that did not support http fetch, and is not needed with Fusebox.
Changelog: [General][Changed] `Debugger.scriptParsed` now includes the field `sourceMapURL` as a (rewritten) remote url as opposed to base64 data url
Reviewed By: robhogan
Differential Revision: D68708899
fbshipit-source-id: 95242582c79ce4e9a573d4a3e639b0dc3290869e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49004
This just converts yet another class to Kotlin.
Changelog:
[Internal] [Changed] -
Reviewed By: tdn120
Differential Revision: D68772336
fbshipit-source-id: 428cb3a0d54bf7a22f0e4eb07268cdc27ef6f2c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48905
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates `Libraries/StyleSheet/processColorArray.js` to use `export` syntax.
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updated View Config codegen (requires an MSDK bump).
- Updates the public API snapshot *(intented breaking change)*
Changelog:
[General][Breaking] - Files inside `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: robhogan
Differential Revision: D68564304
fbshipit-source-id: 2fbd058be1a715cccfce4f2a68146118d8ac66ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48807
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: huntie
Differential Revision: D68436127
fbshipit-source-id: e3496fe69d66932dd4ed82f41d810f3ef1f850f5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49003
Changelog: [internal]
I was adding a benchmark for rendering thousands of views and it was surprisingly fast, until I realized I wasn't wrapping the call to `root.render` in `runTask`, which means the benchmark wasn't really doing the rendering, only scheduling a microtask that was never executed.
This is a safety mechanism to prevent those mistakes.
Reviewed By: sammy-SC
Differential Revision: D68771170
fbshipit-source-id: 5bd8e6ba9e1168db2320572c99b3a01ebd6aeeed
Summary:
This is another attempt at fixing the Android HMR client for HTTPS proxied Metro instances. The previous one unintentionally [caused the following error](https://github.com/facebook/react-native/pull/48970#issuecomment-2617047184):
```
java.lang.AssertionError: Method overloading is unsupported: com.facebook.react.devsupport.HMRClient#setup
```
This PR removes the overloading, and only adds the `scheme` property as a parameter to the existing `.setup` method. Aligning with the exact behavior we have on iOS.
The alternative fix, which should NOT be backward breaking (if this is) - is to move this "infer the protocol from the bundle URL" to the JS side of the HMR client. Where we don't just always default to `http`, but instead default to `https IF port === 443, otherwise http`. It's a bit more hacky, but shouldn't cause any other issues. _**Ideally**_, we have the same working behavior on both Android and iOS without workarounds.
<details><summary>Alternative workaround</summary>
See [this change](https://github.com/facebook/react-native/compare/main...byCedric:react-native:patch-2).
<img width="1179" alt="image" src="https://github.com/user-attachments/assets/47c365bc-6df8-43e6-ad7d-5a667e350cd4" />
</details>
See full explanation on https://github.com/facebook/react-native/issues/48970
> We've noticed that the HMR on Android doesn't seem to be connecting when using a HTTPS-proxied Metro instance, where the proxy is hosted through Cloudflare. This is only an issue on Android - not iOS - and likely caused by the HMR Client not being set up properly on Android.
>
>- On Android, we run `.setup('android', <bundleEntryPath>, <proxiedMetroHost>, <proxiedMetroPort>, <hmrEnabled>)` in the [**react/devsupport/DevSupportManagerBase.java**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L689-L691) file.
>- On iOS, we run `[self.callableJSModules invokeModule:@"HMRClient" method:@"setup" withArgs:@[ RCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled), scheme ]];` in the [**React/CoreModules
/RCTDevSettings.mm**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/React/CoreModules/RCTDevSettings.mm#L488-L491) file.
>
>Notice how Android does not pass in the scheme/protocol of the bundle URL, while iOS actually does? Unfortunately, because the default protocol (`http`) mismatches on Android when using HTTPS proxies, we actually try to connect the HMR client over `http` instead of `https` - while still using port 443 - which is rejected by Cloudflare's infrastructure even before we can redirect or mitigate this issue. And the rejection is valid, as we basically try to connect on `http://<host>:443` (the source URL is `https`, so the port is infered as `443`).
>
>This change adds scheme propagation to Android, exactly like we do on iOS for the HMR Client.
## Changelog:
[ANDROID] [FIXED] Pass the bundle URL protocol when setting up HMR client on Android
<!-- 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/48998
Test Plan:
See full explanation on https://github.com/facebook/react-native/issues/48970
> It's a little bit hard to test this out yourself, since you'd need a HTTPS-based proxy and reject HTTP connections for HTTPS/WSS Websocket requests.
>
>You can set this up through:
>- `bun create expo@latest ./test-app`
>- `cd ./test-app`
>- `touch .env`
>- Set `EXPO_PACKAGER_PROXY_URL=https://<proxied-metro-hostname>` in **.env**
>- Set `REACT_NATIVE_PACKAGER_HOSTNAME=<proxied-metro-hostname>` in **.env**
>- `bun run start`
>
>Setting both these envvars, the bundle URL in the manifest is set to `https://...` - which triggers this HMR issue on Android. You can validate the **.env** setup through:
>
>```bash
>curl "http://localhost:8081" -H "expo-platform: android" | jq .launchAsset.url
>```
>
>This should point the entry bundle URL towards the `EXPO_PACKAGER_PROXY_URL`.
Reviewed By: cortinico
Differential Revision: D68768351
Pulled By: javache
fbshipit-source-id: 49bf1dc60f11b2af6e57177141270632d62ab564
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48940
The PerformanceObserver (marks and measures) example clears it's output each time a new PerformanceObserver event fires, which makes it not particularly useful.
This change makes it so the output is only updated if a non-empty list of performance events is observed.
## Changelog
[Internal]
Reviewed By: rubennorte
Differential Revision: D68634361
fbshipit-source-id: 71b97e1c66aabd090cae63d55c8fa0a425d0c2f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48931
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling
## This diff
- Updates files in Libraries/Inspector to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Inspector` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: robhogan
Differential Revision: D68629285
fbshipit-source-id: ee0904ea5e8f9389aecfb197d05225c88137fb08
Summary:
Currently, the class OkHttpClientProvider is still in Java. Adding some tests before migrating it to Kotlin
## Changelog:
[INTERNAL] - Add OkHttpClientProvider tests
Pull Request resolved: https://github.com/facebook/react-native/pull/48958
Test Plan:
```bash
./gradlew :packages:react-native:ReactAndroid:test -Dtest.single=com.facebook.react.modules.network
```
Reviewed By: javache
Differential Revision: D68706173
Pulled By: cortinico
fbshipit-source-id: 7b4b1cbe17ff39d3775075682dcb8d253892e062
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48995
This change adds an extra parameter to the codegen script that allow our users to trigger codegen for Apps or for Libraries.
When running codegen for Apps, we have to generate some extra files that are not needed by the Libraries. This is causing issues to our library maintainers and this change will provide more flexibility in the DevX of libraries.
The default value is App, so if the new parameter is not passed, nothing will change in the current behavior.
## Changelog:
[iOS][Added] - Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries.
Reviewed By: cortinico
Differential Revision: D68765478
fbshipit-source-id: 8030b4472ad4f5058e58b1c91089de5122a4f60a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48934
This class is publicly exposed but effectively unused at all (neither internally, nor externally).
I'm removing it as this should not affect anyone.
Changelog:
[Android] [Breaking] - Removed `RuntimeConfig` class for Hermes which was unused.
Reviewed By: tdn120
Differential Revision: D68631945
fbshipit-source-id: 6a62ccda9e62f4bae650c11bc17a95efc8c88baf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48980
Changelog: [internal]
This will be properly removed soon, but disabling for now to avoid showing up in all PRs.
Reviewed By: cortinico
Differential Revision: D68719573
fbshipit-source-id: 6a631ba2556f1399d0ade52f19b79f5a3212e007
Summary:
Fixes https://github.com/facebook/react-native/issues/37801
This PR fixes the system bars visibility not being in sync as with the activity it is displayed on.
Here I am also taking into account the feedback given in [this PR](https://github.com/facebook/react-native/pull/36854) which was also aiming to address this issue. Unfortunately, I tried in multiple ways to get this to work by simply extending the whole system bars behaviour in the dialog with the activity system bars behaviour but found out that that solution won't work as we [currently clear the flag "FLAG_NOT_FOCUSABLE"](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt#L314) and unless we remove that line, extending the behaviour won't work. Removing that line is not an option as it would cause other side effects in the dialog itself.
With the above said, I ended up doing this in a more explicit way, by checking whether the status or navigation bars are hidden in the activity and then hiding then as well in the dialog or otherwise, similar as we are currently doing with the status bars appearance.
## Changelog:
[ANDROID] [FIXED] - Sync Modal system bars visibility with current activity
Pull Request resolved: https://github.com/facebook/react-native/pull/48516
Test Plan:
In order to test this, you need to trigger any method that hides or shows the system bars using `window.insetsController`. Here a very small example of it:
```kt
fun toggleSystemBarsVisibility(shouldHide: Boolean) {
val window = currentActivity?.window
val controller = window?.insetsController
if (shouldHide) {
controller?.hide(WindowInsets.Type.systemBars())
} else {
controller?.show(WindowInsets.Type.systemBars())
}
}
```
You can do this optionally from JS to make testing different cases easier. Below is a screen recording of how the solutions looks like:
<details>
<summary>Screen recording showcasing the solution in the test plan</summary>
https://github.com/user-attachments/assets/c497c1cb-5e65-4f31-98cc-aefd2d7b0339
</details>
Reviewed By: mdvacca, Abbondanzo
Differential Revision: D67906071
Pulled By: alanleedev
fbshipit-source-id: cbb2d15520d7729a9e9eafb5f5efb8d20d796c60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48982
We were missing a conversion to px on the `getOutline()` function of `CompositeBackgroundDrawable` which led to incorrect elevation prop rendering
Changelog: [Android][Fixed] - Elevation prop on android has incorrect border-radius
Reviewed By: NickGerleman
Differential Revision: D68724947
fbshipit-source-id: b3a7a4919bfd7c60fac7c3d6e3ba760e3f74d190
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48054
Web debugging should be fully removed as of recent, so lets remove some of the gunk that was powering it, and checks for that environment.
I did some string searches for the following:
* isAsyncDebugging
* debugRemotely
* isDebuggingRemotely
* isRemoteDebuggingAvailable
* WebSocketExecutor
* JavaJSExecutor
* ProxyJavaScriptExecutor
* RELOAD_APP_EXTRA_JS_PROXY
* getJSBundleURLForRemoteDebugging
* onReloadWithJSDebugger
* setRemoteJSDebugEnabled
* WebsocketJavaScriptExecutor
* createRemoteDebuggerBundleLoader
1. `expo-modules-core` exposes its own `isAsyncDebugging` by checking for `nativeCallSyncHook`, but does not depend on `DebugEnvironment`.
2. `expo-dev-menu` does read `isDebuggingRemotely` from `DevSettings`.
3. Realm does a check in Native using `objc_lookUpClass("RCTWebSocketExecutor")` but will gracefully handle `nil` if it does not exist
4. Some more usages (e.g. `onReloadWithJSDebugger`) in vendored packages of `expo-dev-launcher` for RN 0.74
I created an issue for Expo mentioning both here: https://github.com/expo/expo/issues/33371
Changelog:
[General][Breaking] - Remove some web debugging remnants
Reviewed By: huntie
Differential Revision: D66553934
fbshipit-source-id: deec382b1c8bda393fddb8682aa91b26afd9fbe3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48913
This brings us to parity with normalize-color, and is mostly similar to hsl, with the notable exception there is not a separate alpha variant, and only modern function syntax is supported. Again, I took the math from normalize-color, and sanity tested it against reference function provided by Color Spec.
I'm going to let that cap off color function support for now, and leave the rest as TODO.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68594471
fbshipit-source-id: 95702d576e068655d34e52a714d38e4fd718bbc9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48912
The implementation of `hwb()` color functions added in https://github.com/facebook/react-native/pull/34600 is pretty flawed.
`hwb()` color functions do not allow comma delimited values. So most of the examples in the unit test here will fail to parse on web. Like `hsl()`, these should also allow numeric non-hue components (instead of just %), and angle values for hue (instead of just numbers), and this is also missing support for alpha values, though these are less dangerous compared to allowing and encouraging incorrect delimiters.
https://www.w3.org/TR/css-color-4/#the-hwb-notation
These were added for web compat, and the examples fail to parse on web, so I'm opting to just remove this incorrect support before implementing this more correctly in the Fabric CSS parser in next diff. I did not attempt to fix the other issues I discovered with the PR implementation in the last couple diffs, around mixing and matching syntax allowed in legacy/modern, along with allowing inconsistent delimiters.
Changelog:
[General][Breaking] - Remove incorrect hwb() syntax support from normalize-color
Reviewed By: lenaic
Differential Revision: D68591172
fbshipit-source-id: 36d670b096ae9fac4bc24938877ad083d4dd336a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48878
Creates a new `scheduleAnimatedCleanupInMicrotask` feature flag to experiment with deferring the `AnimatedProps` cleanup using the microtask queue.
This is different from the previous approach of deferring invocation of the completion callback, which impacted the timing of composite animations such as `Animated.parallel` and `Animated.sequence`, because we are deferring detaching the `AnimatedNode` graph instead. This will only impact the timing of completion callbacks as a result of invalidating `AnimatedProps` (either by passing in new `AnimatedValue` instances or unmounting the component).
This should minimally impact scheduling and have lower risk of user-visible behavior change because React already provides minimal guarantees around when updates are committed (and effects attached/detached).
This also enables us to significantly simplify the current convoluted dance we do to optimized around reference counting in the AnimatedNode graph.
Changelog:
[General][Changed] - When an Animated component is updated or unmounted, `AnimatedNode` instances will now detach in a microtask instead of synchronously in the commit phase of React. This will cause the completion callback of finished animations to execute after the commit phase instead of during it.
Reviewed By: rickhanlonii
Differential Revision: D68527096
fbshipit-source-id: 99346b8ddbf6a01725376c692b0351be679b9e89
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48975
After cutting 0.78-stable, we need to bump the monorepo packages to `0.79.0-main`
## Changelog:
[Internal] - Bump monorepo packages to `0.79.0-main`
Reviewed By: cortinico, huntie
Differential Revision: D68715005
fbshipit-source-id: cb5abbf05e8638683687be8d61d66b3037111572
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48973
changelog: [internal]
This test is broken, let's disable it until it is fixed.
Reviewed By: javache
Differential Revision: D68709385
fbshipit-source-id: f61b287ad7ef921dd26fa290cc7a484d0b550091
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48968
I've noticed we have a lot of `public` and `protected` modifiers for classes that are actually `internal`.
Those are unnecessary as the class itself is `internal` and there is no way to extend the visibility of single fields.
Changelog:
[Internal] [Changed] -
Reviewed By: mdvacca
Differential Revision: D68707255
fbshipit-source-id: 5b93d01dceba1b5031ac608e58ec898c1a1eaf51
Summary:
We've noticed that the HMR on Android doesn't seem to be connecting when using a HTTPS-proxied Metro instance, where the proxy is hosted through Cloudflare. This is only an issue on Android - not iOS - and likely caused by the HMR Client not being set up properly on Android.
- On Android, we run `.setup('android', <bundleEntryPath>, <proxiedMetroHost>, <proxiedMetroPort>, <hmrEnabled>)` in the [**react/devsupport/DevSupportManagerBase.java**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java#L689-L691) file.
- On iOS, we run `[self.callableJSModules invokeModule:@"HMRClient" method:@"setup" withArgs:@[ RCTPlatformName, path, host, RCTNullIfNil(port), @(isHotLoadingEnabled), scheme ]];` in the [**React/CoreModules
/RCTDevSettings.mm**](https://github.com/facebook/react-native/blob/53d94c3abe3fcd2168b512652bc0169956bffa39/packages/react-native/React/CoreModules/RCTDevSettings.mm#L488-L491) file.
Notice how Android does not pass in the scheme/protocol of the bundle URL, while iOS actually does? Unfortunately, because the default protocol (`http`) mismatches on Android when using HTTPS proxies, we actually try to connect the HMR client over `http` instead of `https` - which is rejected by Cloudflare's infrastructure even before we can redirect or mitigate this issue.
This change adds scheme propagation to Android, exactly like we do on iOS for the HMR Client.
## Changelog:
[ANDROID] [FIXED] Pass the bundle URL protocol when setting up HMR client on Android
<!-- 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/48970
Test Plan: It's a little bit hard to test this out yourself, since you'd need a HTTPS-based proxy and reject HTTP connections for HTTPS/WSS Websocket requests.
Reviewed By: fabriziocucci
Differential Revision: D68711137
Pulled By: javache
fbshipit-source-id: 230c1c91c8189c0a109d20defe085966ac8f5721
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48922
Changelog: [internal]
This is a basic subclass of Event that allows setting custom values (as opposed to `Event` that is meant to be used as a superclass).
Reviewed By: yungsters
Differential Revision: D67804060
fbshipit-source-id: 9e140cc436f8e230f37275a74df23efd4841071b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48962
Changelog: [internal]
We moved away from private fields for `EventTarget` for performance, in favor of normal fields prefixed with underscore, but this would pollute the global scope when we make it extend `EventTarget`.
This refactors the implementation to use symbols for all properties to avoid that problem, leaving only `addEventListener` and `removeEventListener` as regular properties in the prototype.
Performance-wise this is neutral or a slight improvement according to the existing benchmark.
Reviewed By: javache
Differential Revision: D68672215
fbshipit-source-id: b329548efce6059ae2b9f33afa0719e057d3b8ba
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48918
Changelog: [internal]
Makes the constants read-only and accessible through `Event.prototype` as well.
Reviewed By: yungsters
Differential Revision: D67830012
fbshipit-source-id: 730622a642f08f532cebd4c183d859ccb2ca0641
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48426
Changelog: [internal]
This improves the performance of DOM `Event` interface implementation by migrating away from private fields.
Reviewed By: yungsters
Differential Revision: D67751821
fbshipit-source-id: e58e5a9cbb04e7d91cbc676ec7d1b00fff357e2e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48427
Changelog: [internal]
The `ReactNativeElement` class was refactored for performance reasons, and the current implementation does **NOT** call `super()`, and it inlines the parent constructor instead.
When it eventually extends `EventTarget`, things won't work as expected because the existing `EventTarget` implementation has constructor dependencies.
This refactors the current implementation of `EventTarget` to eliminate those constructor side-effects, and eliminates the constructor altogether.
This breaks encapsulation, but it has some positive side-effects on performance:
1. Creating `EventTarget` instances is faster because it has no constructor logic.
2. Improves memory by not creating maps to hold the event listeners if no event listeners are ever added to the target (which is very common).
3. Improves the overall runtime performance of the methods in the class by migrating away from private methods (which are known to be slow on the babel transpiled version we're currently using).
Extra: it also simplifies making window/the global scope implement the EventTarget interface :)
## Benchmark results
Before:
| Latency average (ns) | Latency median (ns) | Samples | Task name | Throughput average (ops/s) | Throughput median (ops/s) |
| ---|--- |--- |--- |---|---|
| 8234.22 ± 0.27% | 8132.00 | 121445 | dispatchEvent, no bubbling, no listeners | 122323 ± 0.02% | 122971 |
| 9001.22 ± 0.41% | 8883.00 | 111097 | dispatchEvent, no bubbling, single listener | 111981 ± 0.02% | 112575 |
| 51777.94 ± 0.58% | 51247.00 | 19314 | dispatchEvent, no bubbling, multiple listeners | 19393 ± 0.04% | 19513 |
| 8256.65 ± 0.29% | 8152.00 | 121115 | dispatchEvent, bubbling, no listeners | 122031 ± 0.02% | 122669 |
| 9064.32 ± 0.44% | 8933.00 | 110323 | dispatchEvent, bubbling, single listener per target | 111265 ± 0.02% | 111944 |
| 51879.66 ± 0.27% | 51447.00 | 19276 | dispatchEvent, bubbling, multiple listeners per target | 19325 ± 0.04% | 19437 |
After:
| Latency average (ns) | Latency median (ns) | Samples | Task name | Throughput average (ops/s) | Throughput median (ops/s)|
| ---------------------|---------------------|---------|--------------------------------------------------------|----------------------------|--------------------------|
| 5664.62 ± 0.50% | 5588.00 | 176535 | dispatchEvent, no bubbling, no listeners | 178219 ± 0.02% | 178955 |
| 7232.86 ± 0.50% | 7131.00 | 138258 | dispatchEvent, no bubbling, single listener | 139540 ± 0.02% | 140233 |
| 50957.51 ± 0.71% | 50336.00 | 19625 | dispatchEvent, no bubbling, multiple listeners | 19751 ± 0.04% | 19866 |
| 5692.36 ± 0.50% | 5618.00 | 175675 | dispatchEvent, bubbling, no listeners | 177315 ± 0.02% | 177999 |
| 7277.82 ± 0.38% | 7181.00 | 137404 | dispatchEvent, bubbling, single listener per target | 138560 ± 0.02% | 139256 |
| 50493.64 ± 0.28% | 50105.00 | 19805 | dispatchEvent, bubbling, multiple listeners per target | 19855 ± 0.04% | 19958 |
Reviewed By: yungsters
Differential Revision: D67758408
fbshipit-source-id: f8da1788251c9e21377de5ab730875bcc7610361
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48431
Changelog: [internal]
Adds a regression test to make sure we implement the correct spec-compliant behavior for a possible bug in ~~the Web spec~~ __Chrome__: https://github.com/whatwg/dom/issues/1346
Edit: the bug is in the Chrome implementation, not in the spec.
Reviewed By: javache
Differential Revision: D67758702
fbshipit-source-id: ecaeacac3bce286e692880f05d70297ba0c2c736
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48429
Changelog: [internal]
This implements a (mostly) spec-compliant version of the [`Event`](https://dom.spec.whatwg.org/#interface-event) and [`EventTarget`](https://dom.spec.whatwg.org/#interface-eventtarget) Web interfaces.
It does not implement legacy methods in either of the interfaces, and ignores the parts of the spec that are related to Web-specific quirks (shadow roots, re-mapping of animation events with webkit prefixes, etc.).
IMPORTANT: This only creates the interfaces and does not expose them externally yet (no `Event` or `EventTarget` in the global scope).
Reviewed By: yungsters
Differential Revision: D67738145
fbshipit-source-id: c86db29821552cc1a1b6e1023cc3a21ae55febd5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48965
Running codegen should not be a Cocoapods responsibilities, but it should be something that runs before Cocoapods to ensure that the code is already in the right place.
This change moves the invocation of Codegen to the react-native's core-cli-utils so that frameworks can integrate better with it.
It should also make it easier to migrate away from Cocoapods.
## Changelog:
[iOS][Changed] - Invoke Codegen as part of the Core-cli-utils package
Reviewed By: cortinico
Differential Revision: D68706136
fbshipit-source-id: 548c9ffad62bc561fcc948babaf75de5dad82f86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48966
In our previous fix for concurrent-ruby, we have been a bit too strict. Version 1.3.4 is a valid and working version. The broken version is 1.3.5.
## Changelog:
[iOS][Changed] - Fix Gemfile versions
Reviewed By: cortinico
Differential Revision: D68706060
fbshipit-source-id: 8ab7a4df0eb83a82603729ff8460e64908ddc465
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48961
One of Cocoapods responsibility is to run Codegen while creating the Xcode workspace. Moving away from Cocoapods, this is a step we need to move to a different place.
This change let us to disable running codegen at cocoapods time when we pass the `RCT_SKIP_CODEGEN=1` or when we pass the `RCT_IGNORE_PODS_DEPRECATION=1` flag calling pod install.
When calling `pod install` with `RCT_IGNORE_PODS_DEPRECATION` we are either:
* using one of the Scripts provided by Expo or by the Community CLI
*or*
* we are preparing the project using the legacy mode and, therefore, we want to keep running codegen.
## Changelog
[iOS][Changed] - Stop running codegen when running pod install
Reviewed By: cortinico
Differential Revision: D68704604
fbshipit-source-id: 252e90544886c3dbfd7eff38c344dd4784a0af38
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48960
We are moving away from Cocoapods toward alternative solution.
We are adding this deprecation message to help inform our users that this change is happening.
Part of the Cocoapods tasks will be moved to an alternative script that will be invoked by Expo and by the Community CLI. The warning message tells the users what to do as an alternative to `pod install`.
## Changelog:
[iOS][Deprecated] - deprecate calling `pod install` directly
Reviewed By: cortinico
Differential Revision: D68704127
fbshipit-source-id: df93008afc055254d0c0da09566c84af99248310
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48933
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling
## This diff
- Updates files in Libraries/Interaction to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Interaction` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: huntie
Differential Revision: D68629953
fbshipit-source-id: 526b18d9b64c4b27b6e3198a9725075fa11e345a
Summary:
Changelog: [General][Fixed] Update tests to support new `didOpen` delegate fn
Add support for the new `didOpen` delegate function in tests.
To follow up separately: the borked tear down sequence when these two tests are ran together (they pass when ran individually)
```
buck2 test @//fbobjc/mode/buck2/ios-tests fbsource//xplat/js/react-native-github/packages/react-native/ReactCommon/jsinspector-modern:testsAppleMac -- ReactInstanceIntegrationTest RuntimeTargetDebuggerSessionObserverTest
```
Reviewed By: hoxyq
Differential Revision: D68632974
fbshipit-source-id: 59da6d9e2d09f2c7e219c1902dd6f9b8ddfee9dc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48943
changelog: [internal]
A new helper function on Fantom flushAllNativeEvents, which will flush all pending native events.
Reviewed By: javache
Differential Revision: D68566753
fbshipit-source-id: 6cb19416e39807b9b381ff068cea5c2458101174
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48907
changelog: [internal]
Introduce new function `Fantom.scrollTo`, which will fake a scroll to particular position.
Calling the method will call onScroll event using codepath that iOS uses. It will also set C++ state so the new scroll position is observable from JavaScript.
Reviewed By: javache
Differential Revision: D68554703
fbshipit-source-id: 2fc71e96836a03ec343053ceed85764c4bc2f5c7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48917
Cleaning up this flag which has already been rolled out
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D68622852
fbshipit-source-id: 5767515d02ce9804976a1363532e1e626aeae0d8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48916
Cleaning up this feature flag since we no longer require this gating. This was already fulled rulled out as default.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D68621578
fbshipit-source-id: 3fd3ad007b8beb8e2525ffa7b4da372be1dbbd94
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48877
This is a minor refactor to hoist logic that is not actually specific to the `AnimatedProps` lifecycle out of the hook named `useAnimatedPropsLifecycle`.
This will make it easier to iterate on the implementation of `useAnimatedPropsLifecycle` using a feature flag in a subsequent diff.
This has no behavior change.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D68516034
fbshipit-source-id: 2cd6d9b0f2a5c0ada10cf01c8c14ed5510fbf25a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48919
I suspect this class is unused and we should not be building it.
The same `AndroidUnicodeUtils.java` is provided by facebook/hermes instead.
Changelog:
[Internal] [Changed] -
Reviewed By: tdn120, mdvacca
Differential Revision: D68623307
fbshipit-source-id: 0a290d31e3b1103947a9dd3c46821958be9223e7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48665
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling
## This diff
- Updates files in Libraries/Utilities to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks of the `Platform` module, which happened to touch a lot of test files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Utilities` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: huntie
Differential Revision: D68152910
fbshipit-source-id: 07f3a0957f1dbaf44f53974c6f28b273558406eb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48901
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` to use `export` syntax.
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot *(intented breaking change)*
Changelog:
[General][Breaking] - Files inside `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: huntie
Differential Revision: D68562844
fbshipit-source-id: bd71a341e33d3629121aa61549139c4b1cd62c3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48926
# Changelog: [Internal]
Leverage [`devtools` field](https://developer.chrome.com/docs/devtools/performance/extension#devtools_object) inside [`detail` object](https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure#detail) to make extension tracks work.
Right now we are only specifying track name, later we could use many more fields:
```
interface ExtensionTrackEntryPayload {
dataType?: "track-entry"; // Defaults to "track-entry"
color?: DevToolsColor; // Defaults to "primary"
track: string; // Required: Name of the custom track
trackGroup?: string; // Optional: Group for organizing tracks
properties?: [string, string][]; // Key-value pairs for detailed view
tooltipText?: string; // Short description for tooltip
}
```
In the next few diffs I will extend the spec of the local implementation for `performance.measure` and `performance.mark` to get this propagated correctly.
Reviewed By: huntie
Differential Revision: D68624603
fbshipit-source-id: 99a5d233ee1dbcd690ad8a6802ca993071f63f2c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48923
# Changelog: [Internal]
Starting from this diff, React Native will emit inspector traces, the ones that will have the same UI as if it was recorded in a browser.
We are going to fake it by sending "TracingStartedInPage" event. For a corresponding logic on Chrome DevTools Frontend side, see [this](https://github.com/ChromeDevTools/devtools-frontend/blob/192673131cf3e6e0bcdb4a97bd0bd39c75f1b3c2/front_end/models/trace/handlers/MetaHandler.ts#L68-L80) as a starting point.
Because of this, custom tracks are now grouped under "Timings" track, although with a better color scheme:
- We no longer need the logic for placing tracks under arbitrary thread ids to have them grouped.
- The real support for extension tracks (custom tracks for Performance panel) will be added in the next diff.
Reviewed By: huntie
Differential Revision: D68439734
fbshipit-source-id: 8e5c525a71578375904edc6d473308eb710b5867
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48927
changelog: [internal]
Remove explicit calls to root.destroy() in favour of automated system that will call it and check for memory leaks.
Reviewed By: rubennorte
Differential Revision: D68624917
fbshipit-source-id: 44be1dee9a56ec31bea5a9eefdda086a4cb4248f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48889
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in `Libraries/Core` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections
- Appends `.default` to requires of the changed files.
- Changed `* as ExceptionsManager` to `ExceptionsManager` in import statements throughout product code.
- Updates test files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Core` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
[General][Breaking] - `Libraries/Core/ExceptionsManager` now exports a default `ExceptionsManager` object, and `SyntheticError` as a secondary export.
Reviewed By: huntie
Differential Revision: D68553694
fbshipit-source-id: 51c9a404b2762cb1cdb5f56cae3a683ccdfffc7f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48854
Changelog: [internal]
Moves the internals to access instance handle and shadow node from public instances from `ReadOnlyNode` to `NodeInternals` so it's more obvious when people are reaching into internal APIs/state.
Reviewed By: javache
Differential Revision: D67654404
fbshipit-source-id: 1063bc9451eeacb79af34614df3be02466f93fa3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48795
# Changelog: [Internal]
Splitting `PerformanceTracer::stopTracingAndCollectEvents()` into 2 separate methods.
Once we add logic for starting and stopping tracing on `InstanceAgent`:
- We would need to stop tracing everywhere synchronously
- Populate data sources in `PerformanceTracer`, like JavaScript samples
- Collect all events from different data sources in one payload via `PerformanceTracer::collectEvents()`
Reviewed By: huntie
Differential Revision: D68331485
fbshipit-source-id: 0d6b21a522d841f7f734e2fad2e0fc533097fdee
Summary:
On older Android versions clipping doesn't have anti-aliasing by default which means that clipping with no border will always make the background not have anti-aliasing.
This is fixed by default on new Background and Border drawables since rendering logic is separated
Moving the clipping logic so it only runs when we have a border.
https://github.com/facebook/react-native/issues/41226
Changelog: [Android] [Fixed] - Fixed anti-aliasing not showing on older Android versions
Reviewed By: javache
Differential Revision: D68279400
fbshipit-source-id: e2383c71bd1ca89f66f42630b3712bb4cc5cd7ac
Summary:
This was causing links to not ellipsize and be scrollable. Gonna revert while I see if I can workaround
Changelog: [Internal]
Reviewed By: NickGerleman
Differential Revision: D68596950
fbshipit-source-id: 432a059d0b10acbb45d34e0c98763680d280937b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48872
enableDeletionOfUnmountedViews feature flag has been enabled for 4 months with no errors on production, also it's been enabled in OSS since 0.76.
This diff removes the feature flag and fully rollout this fix
bypass-github-export-checks
changelog: [internal] internal
Reviewed By: sammy-SC
Differential Revision: D68511227
fbshipit-source-id: a42481c57aaab2e8c45b952af5e044bf60740df3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48843
Adds support for hsl() and hsla() funtions. This supports more modern syntax options than normalize-color, like number components, optional alpha, and fills in missing support for angle units. The underlying math was lifted pretty much directly from normalize-color though.
An aside, std::remainder for these is not guaranteed to be constexpr, but Clang is still okay with rgb function parsing to be contexpr because we never try to evaluate non-constexpr function?
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68473990
fbshipit-source-id: 2a71d8367b22f9d1ba6a66598d40ef2683847704
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48842
This is a result of inlining isinf previously but we can never be negative infinity because we can never be less than zero.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68474836
fbshipit-source-id: bfce78c4bd269ff2afac99c03250ede676ee1029
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48841
Right now during parsing we can ask for a next component value, with a delimeter, and even if we don't have a component value to consume, we will consume the delimeter.
This is kind of awkward since e.g. trailing comma can be consumed, then we think syntax is valid. Let's try changing this.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68474739
fbshipit-source-id: 47a942681bc8472ca28470eba821d4d95306ae5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48839
In the last diff I mixed and matched `<legacy-rgb-syntax>` and `<modern-rgb-syntax>` a bit to keep compatiblity with `normalze-color`.
Spec noncompliant values have only been allowed since https://github.com/facebook/react-native/pull/34600 with the main issue being that legacy syntax rgb functions are allowed to use the `/` based alpha syntax, and commas can be mixed with whitespace. This seems like an exceedingly rare real-world scenario (there are currently zero usages of slash syntax in RKJSModules validated by `rgb\([^\)]*/`), so I'm going to instead just follow the spec for more sanity.
Another bit that I missed was that modern RGB functions allow individual components to be `<percentage>` or `<number>` compared to legacy functions which only allow the full function to accept one or the other (`normalize-color` doesn't support `<percentage>` at all), so I fixed that as well.
I started sharing a little bit more of the logic here, to make things more readable when adding more functions.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68468275
fbshipit-source-id: f1dfab51b91a3f64436c2559daa3d1e8891db889
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48828
1. Rename `CSSComponentValueDelimeter` to `CSSDelimeter` bc the names are getting way too long.
2. Make the distinction between `Whitespace` and `OptionalWhitespace`. Note that for property values, and function blocks, the value parser will already remove trailing/leading whitespace, but it's weird that whitespace unlike others was not required to be present
3. Add `CSSDelimeter::CommaOrWhitespaceOrSolidus` for simpler parsing in the common pattern of alpha values, and move CSSColor function parsing to use that
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68461968
fbshipit-source-id: 388056e47dfe6ca6003b44e82e00fe416706330b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48835
D65907786 ended up regressing a bit of the performance gains from new Background and Border Drawables. changing back to the previous approach.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68354292
fbshipit-source-id: f2db6d7ad5c1590d5d4d8261d76281f3592f488a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48891
changelog: [internal]
add two tests covering onScroll: one for the case where onScroll is triggered multiple times during one UI tick and one where it is triggered once per UI tick.
Reviewed By: rubennorte
Differential Revision: D68499566
fbshipit-source-id: ee25227b620569e3a43038575f04b0a325e5e38b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48801
changelog: [internal]
Adds isUnique option to Fantom.dispatchNativeEvent.
isUnique controls whether only the last event of the same type and target is dispatched to JavaScript or all events are queued and dispatched.
Reviewed By: rubennorte
Differential Revision: D68416157
fbshipit-source-id: 415e7db7d258d60a6bc510d929091153bfdccb3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48888
We have a report from OSS where Images are not displayed properly in case they are saved on disk with no extension.
We previously had a fix attempt iwith [this pr](https://github.com/facebook/react-native/pull/46971), but this was breaking some internal apps.
This second attempt should work for both cases.
## Changelog:
[iOS][Fixed] - Load images even when the extension is implicit
Reviewed By: cortinico
Differential Revision: D68555813
fbshipit-source-id: bc25970aafe3e6e5284163b663d36e00b3df3d82
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48896
This comment is not exact and should be updated.
Changelog:
[Internal] [Changed] -
Reviewed By: yungsters
Differential Revision: D68556425
fbshipit-source-id: 67427ff325809907fdeba1c6a90b84b97713bf5e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48894
## Motivation
In our efforts to migrate the RN codebase to modern Flow (to enable ingestion by modern Flow tooling) I stumbled upon the `AnimatedWeb.js` file, which does not seems to be imported anywhere throughout the monorepo.
Searching on GitHub for imports to this file in OSS projects returned no results.
In case this file has actual uses outside of Meta (e.g. in OSS), I'll abandon the diff 🙌
## This diff
- Removes `Libraries/Animated/AnimatedWeb.js` file
Changelog:
[General][Breaking] Removed `Libraries/Animated/AnimatedWeb.js` file.
Reviewed By: cortinico
Differential Revision: D68558237
fbshipit-source-id: 319b5e59eb83e518cd123b9f74642e90f0003a4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48648
# Changelog: [Internal]
This is the pre-requisite before adding a formatter for conversion from Hermes format-agnostic API for JavaScript samples to Trace Events.
This struct will probably be used a lot around this module and big enough for a separate header.
Reviewed By: huntie
Differential Revision: D68104202
fbshipit-source-id: 93f2816de5a87471c5f7761468ccc52a34a895d6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48882
Changelog: [internal]
The current hint for benchmarks is that the test body contains `unstable_benchmark` calls, but some benchmarks that need to use feature flags define their test bodies in a separate file, so the file containing the call to `unstable_benchmark` isn't the `-itest.js` one.
This adds a new hint to opt into optimized builds that uses the name of the test instead of its contents. If it contains `-benchmark` then we consider it a benchmark and do the opt in.
Reviewed By: andrewdacenko
Differential Revision: D68102300
fbshipit-source-id: 4c0909969f76b8a7d563959cccf686aefaef700d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48808
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot *(intented breaking change)*
- Synchronizes `GoodwillVideoEditorCandidateImage.js` with www, as it was using `require`s that would result in invalid code after this Diff's changes. Added `ReactNativeImage` shim.
Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: yungsters
Differential Revision: D68436611
fbshipit-source-id: 14f33e375e60429ea2340fb49ddf9dc6eb79594f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48884
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in `Libraries/WebSocket` to use `export` syntax
- Appends `.default` to requires of the changed files.
- Updates mocks.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/WebSocket` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: cortinico
Differential Revision: D68554260
fbshipit-source-id: 90a660fe9e76b255171189101819253521354fda
Summary:
Found this while I was trying to make my own react native info for CI. For android Podfile.lock is being read instead of gradle.properties
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[INTERNAL][FIXED] - Fixed React native info where Podfile.lock was being read for android
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/48876
Reviewed By: blakef
Differential Revision: D68553964
Pulled By: cortinico
fbshipit-source-id: 7d6391195dab0c2230fe86fb465de6d3f94ccbef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48815
In an effort to reduce the responsibility of Cocoapods in React Native, we are moving the generation of the Reactcodegen podspec from Cocoapods itself to the codegen infrastructure.
This reduce the responsibility of Cocoapods and allow us to migrate away from it with more ease.
## Changelog:
[iOS][Changed] - Generate the ReactCodegen.podspec as part of codegen instead of as part of pod install.
Reviewed By: cortinico
Differential Revision: D68418268
fbshipit-source-id: 004ac5b6b3563bf96cc38942f2b48b6f269541c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48855
changelog: [internal]
add event category argument to Fantom.dispatchNativeEvent.
This gives tests option to control whether an event is continuous, discrete etc.
Reviewed By: rubennorte
Differential Revision: D68413879
fbshipit-source-id: f0c365df505a325440693ca7c3408dd612614946
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48871
# Changelog: [Internal]
Forward-fixing D68380665.
Requirements:
- `setUpReactDevTools` should be called before `setUpErrorHandling` to avoid React DevTools mutating `console.error` call arguments.
- `setUpReactDevTools` should be called after `setUpTimers`, because it is using `queueMicrotask`, see https://fb.workplace.com/groups/rn.panelapps/permalink/1120810879540337/.
- `setUpTimers` should be called after `polyfillPromise`, because it uses on `global.Promise`.
I went over bundles, which are not using `InitializeCore` and using either `setUpErrorHandling` or `setUpDeveloperTools` and updated their order of initialization accordingly.
Reviewed By: javache
Differential Revision: D68510100
fbshipit-source-id: 4331dcc7a7cb1dc438ca2ed5ccae49e736c41b2a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48773
This diff contains 2 fixes with regards to clickable text accessibility on Android.
1. It allows nested `Text` links to be accessible via keyboard. The accessibility here is a bit unique. The clickable text is not focused in the classical since that Android provides on `View`s (after all, the part being focused is not even a `TextView`. Its a `Span` in a `TextView`). However, it is [selected](https://developer.android.com/reference/android/widget/TextView#setSelected(boolean)), and pressing enter while it is selected will press the text, so for all intents and purposes it is focused. Some quirks here, though, are that you cannot press tab to cycle through the links in text, you have to use arrow keys. And the arrow keys no longer let you move around to the next item (as they are stuck being used to navigate the links). I *could* override this behavior but I do not see much of a point as long as one can actually get to everything on screen in a semi-logical way. Anyway, the fix here is using [`LinkMovementMethod`](https://developer.android.com/reference/android/text/method/LinkMovementMethod) to navigate between clickable spans, which is exactly what that class exists for. Note that I override this class so that touching the links does not actually highlight them like you see in the videos.
2. In the case we state update and remove the "click-ability" of the text, this diff makes it so that Explore By Touch no longer can focus on the link. The code was in the same area so I decided to just lump that together :P
Changelog: [Android] [Fixed] - Allow text links to be navigable via keyboard by default
Reviewed By: javache
Differential Revision: D68306316
fbshipit-source-id: a72145f6b60caf2a8077e1bd2ca987bdde0b82ab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48794
changelog: [internal]
Add payload argument to Fantom.dispatchNativeEvent. For example, in `TextInput.onChange` event, new value of input field must be present in the event payload.
Reviewed By: rubennorte
Differential Revision: D68410469
fbshipit-source-id: eb915f9f961efdfe9902f060173072c6259b7eea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48840
MSVC unicode handling is causing our windows test to fail. To fix,
simply replace the special characters with the their explicit UTF-16
encoding.
Changelog: [Internal]
Reviewed By: neildhar
Differential Revision: D68466808
fbshipit-source-id: 1bfc689972e1e5862fe6525bc48d5ebc508a95da
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45552
In this diff I'm overriding the getDiffProps for ViewProps.
The goal is to verify what's the impact of calculating diffs of props in Android, starting with ViewProps.
Once we verify what are the implication we will automatic implement this diffing.
The full implementation of this method will be implemented in the following diffs
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D59969328
fbshipit-source-id: ce141528581e46e9ced4175dca040ddf8bed5ddb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48868
Original commit changeset: ac48be3305eb
Original Phabricator Diff: D68093083
Changelog: [iOS][Removed] - Removed workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter
Reviewed By: javache
Differential Revision: D68452788
fbshipit-source-id: 9d3466950c43a10f36ca594997ae5a586d1a2a00
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48866
Changelog: [internal]
The current test to create a snapshot of the public API was recently modified to include `src/private` but excluding certain directories from it.
This replaces the opt-out with an opt-in mechanism, where we only use it where necessary (new DOM APIs, etc.).
Reviewed By: huntie
Differential Revision: D68496269
fbshipit-source-id: 6ae056008a6189b493cb27811d21a8619e79009d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48859
Changelog: [internal]
Just to make it easier to distinguish between public and private APIs, until we have proper support to extract that automatically.
Reviewed By: huntie
Differential Revision: D68496270
fbshipit-source-id: 83cdf95f7f33eab8835b0913cc468ccaf5e47730
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48774
[Changelog] [Internal] - Fix data race in TraceSection.h
## Issue
The `instrumentsLogHandle` variable is a static variable that is initialized lazily when the `getOrCreateInstrumentsLogHandle()` function is called. However, this initialization is not thread-safe. Multiple threads may call this function simultaneously, leading to a data race on the `instrumentsLogHandle` variable.
Reviewed By: lyahdav, javache
Differential Revision: D68366837
fbshipit-source-id: d61b85a0299a8d42b9fbcfdbecae78eb410d748f
Summary:
Adds `getConcretePropsShared()` to `ConcreteShadowNode.h`.
I need this in Nitro Views to update state in-place without throwing away the old state object and creating a new one each time.
From reading the code it seems like you use this pattern a lot tho where you create new State objects each time - so let me know if my thing is a bad idea..
## Changelog:
- [INTERNAL] [ADDED] Add `getConcretePropsShared()` to `ConcreteShadowNode.h`
<!-- 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/48710
Test Plan: Use in Nitro
Reviewed By: sammy-SC
Differential Revision: D68495697
Pulled By: javache
fbshipit-source-id: e2caa34befcaef2191ec161442c40596cc7de132
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48509
Cleans up the following feature flags from `Animated`:
- `enableAnimatedAllowlist`
- `enableAnimatedPropsMemo`
- `useInsertionEffectsForAnimations`
This will significantly simplify some future planned work here (e.g. T209740497).
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D67867115
fbshipit-source-id: adf35c70d95f42c240342fda3b4f2e9b4bdfe30a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48851
Changelog: [internal]
Remove the feature flag to disable the event loop on bridgeless, as we no longer have a use case for it. From now on, we can be 100% certain that Bridgeless == Event Loop!
Reviewed By: sammy-SC
Differential Revision: D68270102
fbshipit-source-id: c661bf11f51d4044f9f485b971c43f03197e2983
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48853
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates the `ReactNativeVersion` template to use `export` syntax.
- Regenerates the `ReactNativeVersion.js` file with the new template.
- Updates jest mock.
- Updates the public API snapshot *(intented breaking change)*
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D68492723
fbshipit-source-id: daa55d3d553aca562cf2e091cd24546681a8db2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48856
Refactor setLayoutAnimationEnabledExperimental in BridgelessUIManager.js to be a no-op in the new architecture
Changelog:
[Android][Fixed] - Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless
Reviewed By: javache
Differential Revision: D68313694
fbshipit-source-id: 7a79fad72b1eeda5af3ff629a609d53e4f08f26d
Summary:
changelog: [internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/48793
Adds new method `dispatchNativeEvent` to Fantom give option to dispatch fake native events.
The API is expanded in subsequent diffs. The version introduced in this diff supports only dispatching event without payload and without any options.
Reviewed By: rubennorte
Differential Revision: D68331986
fbshipit-source-id: 075360e1d6874794ba6df966087fbe6a0a820cbc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48767
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: yungsters
Differential Revision: D68335872
fbshipit-source-id: eb0c67039edfe92e9e133726f6b01900dd2c2322
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48837
ViewHierarchyUtil is a class with package visibility and it is not used, let's delete it
changelog: [internal] internal
Reviewed By: shwanton
Differential Revision: D68467507
fbshipit-source-id: d1bd5b279a26fcecb4fed590ad2de75937b54aa6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48827
This teaches the CSSColor parser how to handle these functions.
There are a surprising amount of edge cases here, including many syntactic options added by the CSS Color Module 4 spec, and some technically invalid examples supported by normalize-color, sometimes working in Chrome.
I used the combination of the spec, and existing functionality and tests for `normalize-color`, with the end result supporting a superset of the functionality of both, while being a bit more permissive than either.
I still need to add support for the other color functions, and will probably want to share code here, but for now, just implemented everything for the rgb values as a start.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D68362477
fbshipit-source-id: 62973ba2f8361b6a43c7cf9a96029147f84582d2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48826
This ends up being a not uncommon pattern, so lets make it a bit easier.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68359563
fbshipit-source-id: 94283c8815cf9dd2f6c0d52762d21232383fb311
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48825
Right now we preserve the state of the CSSSyntaxParser across multiple data type parse attempts, so long that a data type parser consumes an additional component value. This requires data type parsers to be careful to not consume additional forward tokens if it may lead to parse error. We can make this model a lot simpler by instead resetting the parser to original state on data type parse error.
We also introduce `peekComponentValue`, and visitor-less `consumeComponentValue` as a convenience, to allow data type parsers to view future component values without advancing, even if the data type parser does return a value, without needing to manually clone the parser.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68357624
fbshipit-source-id: 6ff77bab8ac9eabd5dccea52daa85bbd32b5f2b6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48823
This diff is fixing the execution of Events that are sent early in the rendering of surfaces.
This diff fixes a bug in the queueing of events that are built with not surfaceId (-1), the fixes is to call getSurfaceManagerForView() to retrieve the proper surfaceId (as we do in the execution of events)
calling getSurfaceManagerForView() has a perf hit, we believe this won't be a problem because this method will only be called in edge cases (no surfaceId and early execution of events)
changelog: [Android][Fixed] Fix execution of early InteropEvents
Reviewed By: shwanton, lenaic
Differential Revision: D68454811
fbshipit-source-id: a79be0b392004e645c48d1683bba774b6b597ca0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48819
Currently, `VirtualizedList-test.js` has a subtle dependency on how asynchronous operations are queued. Specifically, it depends on...
- `Batchinator` to use `setTimeout` for...
- `InteractionManager` to use `setImmediate` for...
- `InteractionManager` to resolve a promise via microtask.
As a consequence, any changes to this queueing logic (e.g. eliminating the unnecessary `setImmediate` and microtask) unnecessarily breaks these unit tests.
This changes the Jest unit tests to instead use `jest. advanceTimersToNextTimer(<step>)` instead of `jest.runOnlyPendingTimers()` so that the unit tests are no longer dependent on these specific queueing logic.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D68449850
fbshipit-source-id: 382b1c0a0d8fade873ccf17a9deb3622a83b8163
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48800
This just converts yet another class from Java to Kotlin
Changelog:
[Internal] [Changed] -
Reviewed By: javache
Differential Revision: D68417564
fbshipit-source-id: 167a27f7f80125cc81a4a0ad57952f1149ef4d7d
Summary:
This collapses all the 0.77 changelog from the various RCs into a single entry.
## Changelog:
[Internal] [Changed] -
Pull Request resolved: https://github.com/facebook/react-native/pull/48811
Test Plan: N/A
Reviewed By: robhogan
Differential Revision: D68438948
Pulled By: cortinico
fbshipit-source-id: 0ef57432901198602863e9769cd2662a0f4e30f6
Summary:
This PR adds missing nonnull annotations to make working with Swift better 👍🏻
## Changelog:
[IOS] [ADDED] - Missing nonnull annotations for RCTArchConfiguratorProtocol, RCTUIConfiguratorProtocol.h
Pull Request resolved: https://github.com/facebook/react-native/pull/48817
Test Plan: CI Green
Reviewed By: cortinico, dmytrorykun
Differential Revision: D68443519
Pulled By: cipolleschi
fbshipit-source-id: 53bf128c65421789034f45f637a08ed996684c6f
Summary:
The `ReactNativeVersion.h` file currently contains a `struct` that holds the React Native version (e.g. `1000.0.0`, as individual ints).
For some libraries, we need to conditionally compile out code when using an older React Native version, and that's where library authors usually set compiler flags that hold the react native version - those are usually resolved using a `node require.resolve` script in the Podspec or build.gradle, adding unnecessary complexity.
With this PR this becomes obsolete as we now create a `#define` that holds the React Native version directly - so e.g.
```cpp
#define REACT_NATIVE_VERSION_MAJOR 0
#define REACT_NATIVE_VERSION_MINOR 67
#define REACT_NATIVE_VERSION_PATCH 1
```
..which we can then use to conditionally compile some code in our libraries:
```cpp
#include <React/ReactNativeVersion.h>
#if REACT_NATIVE_VERSION_MINOR >= 76
// new stuff
#else
// fallback
#endif
```
## Changelog:
[INTERNAL] [ADDED] - Added `REACT_NATIVE_VERSION_*` C++ defines to `ReactNativeVersion.h`
<!-- 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/48813
Test Plan: Just import the header in a library and check if the defines exist!
Reviewed By: cortinico
Differential Revision: D68441049
Pulled By: javache
fbshipit-source-id: 55ac8875e1a3f8ad8b9d12795fed4204e9c5bb77
Summary:
As in the title, follow up from https://github.com/facebook/react-native/issues/48075 which added unit tests for this class.
## Changelog:
[INTERNAL] - Convert com.facebook.react.modules.network.ResponseUtil to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/48781
Test Plan:
```bash
./gradlew :packages:react-native:ReactAndroid:test -Dtest.single=com.facebook.react.modules.network
```
Reviewed By: javache
Differential Revision: D68393938
Pulled By: Abbondanzo
fbshipit-source-id: ed214b29ad9248c2da2e2653e75447b0a7e05a26
Summary:
Was looking into improving some of the type definitions for the `ToastAndroid` component and found out also that some of the options don't work anymore from API 30 – I revamped a bit these definitions to reflect that as I saw questions about it online. These updates could also be added to the website later.
## Changelog:
[GENERAL][CHANGED] - Improve ToastAndroid jsdocs
Pull Request resolved: https://github.com/facebook/react-native/pull/48779
Test Plan: Check the jsdocs look good when using the `ToastAndroid` component in the code.
Reviewed By: cortinico
Differential Revision: D68393949
Pulled By: Abbondanzo
fbshipit-source-id: 4be318062483db5be3825b7b21f540030f6c5b10
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48765
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates a handful of components in `Libraries/Components` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates test files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Components` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: cortinico
Differential Revision: D68330077
fbshipit-source-id: 6bf00c82f72dbcaaa26470d7ea0917639fc3de4a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48763
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: cortinico
Differential Revision: D68329075
fbshipit-source-id: 7079a54ce3631171f8d7559bc33cab014df1d16d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48761
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in Libraries/Blob to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Blob` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: cortinico
Differential Revision: D68326103
fbshipit-source-id: ff0b5e0125987ed44b34c35f39af1eefa9799d8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48799
This change moves the same scripts we have to prepare the HelloWorld project to RNTester.
This is something we forgot to do when we were decoupling the reacrt-native from the community CLI.
This is also the base to start deprecating cocoapods and add more configuration steps for the project.
## Changelog:
[Internal] - Copy cli.js script from HelloWorld to RNTester
Reviewed By: cortinico
Differential Revision: D68413419
fbshipit-source-id: 7cf19d86bd3c1beb0c1e7f3380331174352a1651
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48787
For reasons that will become clear in the next diff, I'm adding more assertions for things like LogBox being called, and the console being called. I also updated the patterns of things like `toHaveBeenCalledWith` vs `toBeCalledWith` so they're consistent throughout the file.
## Changelog:
[internal] - Add tests to ExceptionManager
Reviewed By: hoxyq
Differential Revision: D68397529
fbshipit-source-id: b05073630969c40a86546a6f5c4244836b636ee1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48784
React requires React DevTools to be the first patch for console methods, because it assumes it is the _last_ on the stack called before calling the real console.
This is because React DevTools adds additional formatting for things like StrictMode dimming, and component stack formatting for browser specific consoles like Chrome and Firefox, where the DevTool extension runs.
If it's not the first patch, then other patches (like logging, or LogBox) will pick up the DevTools additions and include them, which breaks other tools (like the issue show in the screen below).
This diff ensures React DevTools is patched before the React Native console reporter by moving it to `setupErrorHandling`.
## Changelog:
[General] [Fixed] - Always patch React DevTools first so StrictMode dim chars are excluded from logs/logbox.
## Other places?
I'm not sure how we should handle this for the console polyfill or inside useAlwaysAvailableJSErrorHandling yet.
## Screens
### Before
3 errors, 1 with ANSI dim chars:
{F1974436874}
### After
Just 1:
{F1974436879}
Reviewed By: hoxyq
Differential Revision: D68380665
fbshipit-source-id: 4f5353bb8da0038088c05ef7414bf91e965c73e2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48785
## Overview
This change adds code frames for component stacks if it differs from the call stack frame.
## Background
After adding native stack based stack frames, which we already symbolicate, we had the capability to show a code frame for component stacks as well as the stack frame (if they differ).
However, this usually wasn't that useful, because the native component stack was unlikely to be more useful than the component stack (see the comparisons below for key errors).
## Owner stacks
With owner stacks the component frame is a lot more useful and in many cases are better at showing the location than the call stack frame.
## Example Screens
Before:
{F1974436645}
After (with owner stacks):
{F1974436723}
Changelog:
[General][Added] - Add owner stack code frames to LogBox
Reviewed By: hoxyq
Differential Revision: D68285627
fbshipit-source-id: 541cecbd4786fffd1970d2e85e659757e3f81604
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48782
React currently has a babel transform to replace all `console.error` calls with a special function for RN and www. The function adds component stacks, which doesn't make sense in an owner stack world because:
- not all console.error calls are replaced, creating inconsistency
- oss web users don't append component stacks to console.log any more
- component stacks can be accessed for DEV modals like logbox with `captureOwnerStack`
- owner stacks are already added to the console with createTask if you use console.error directly
- the redirection is the single greatest source of fragility in the logbox reporting pipeline
So we're removing this as part of the owner stack rollout. This should only be enabled with owner stacks.
## Example Screen
Before:
{F1974436644}
After:
{F1974436645}
## Changelog:
[General] [Added] - Add full owner stack support to React Native
Reviewed By: hoxyq
Differential Revision: D68285628
fbshipit-source-id: 9772593d7ac6e012392d18c6796580c14c852074
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48770
Splits CSSValueParserTest to be file per data type to better match new structure, before we introduce more complexity and tests for CSS colors.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D68351049
fbshipit-source-id: 1a4218e49c8c8adb056fac1dd67f064a4f890775
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48769
Must function notations do not require delimiting commas, with color function "legacy" syntax being an exception.
E.g.
```
rgb() = [ <legacy-rgb-syntax> | <modern-rgb-syntax> ]
rgba() = [ <legacy-rgba-syntax> | <modern-rgba-syntax> ]
<legacy-rgb-syntax> = rgb( <percentage>#{3} , <alpha-value>? ) |
rgb( <number>#{3} , <alpha-value>? )
<legacy-rgba-syntax> = rgba( <percentage>#{3} , <alpha-value>? ) |
rgba( <number>#{3} , <alpha-value>? )
<modern-rgb-syntax> = rgb(
[ <number> | <percentage> | none]{3}
[ / [<alpha-value> | none] ]? )
<modern-rgba-syntax> = rgba(
[ <number> | <percentage> | none]{3}
[ / [<alpha-value> | none] ]? )
```
Theoretically, this should mean an expression like `rgb(1, 2 0)`, which mixes both comma and whitespace delimeters would be malformed, but both Chrome, and RN's existing `normalize-color` package support this, so to make this pattern easier, we add the ability to scan based on using either whitespace or comma as component value delimiter.
Interestingly, the current spec revision also allows `rgb` function with alpha, or `rgba` function without alpha, which Chrome correctly supports, but `normalize-color` does not.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D68349385
fbshipit-source-id: 05cd756ee20227af4d9ec20edc9e7cfc8cc2c071
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48768
Right now, if something like `CSSColor` accepted a function notation block (e.g. for `rgb()` syntax), it is given a syntax parser which may extend beyond the scope of the current function block.
This is confusing, but also problematic for the `CSSSyntaxParser` block visiting logic to validate a correct scope exit.
This change makes it so that the `CSSSyntaxParser` passsed to `CSSDataTypeParser` for function and simple blocks is limited to the syntax within the given block. This prevents extra visiblity beyond the block we are trying to parse, and allows the function/simple block visitor to reliably fail parsing if the block is not correctly terminated, or there are unconsumed component values within the block not handled by the data type parser.
Changelog: [Internal]
Reviewed By: joevilches
Differential Revision: D68340127
fbshipit-source-id: 402f2eabdf6df7bce99223c966f22c2158103be5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48737
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling.
## This diff
- Updates files in Libraries/AppState and Libraries/BatchedBridge to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks.
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/BatchedBridge` and `Libraries/AppState` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Reviewed By: robhogan
Differential Revision: D68275767
fbshipit-source-id: 97dc84c04a8dd9c9022e53fc4595302efc848338
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48745
This is the first step in a series of diff to make RNGP more Gradle-compliant (specifically for the sake of configuration caching).
Specifically the problem in those 2 tasks is that we're accessing `project.copy()` and other
functions from the `project` field.
The project should never be accessed at execution time. See more on this here:
https://docs.gradle.org/8.12/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
This diff fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68282777
fbshipit-source-id: 6d474f266b5bc50fba57c8cd478173c995864bbc
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48764
When working on the [commit](https://github.com/facebook/react-native/commit/eced906bedf0c3d2bbc592cc27965c88278abae3) I forgot a bit that makes sure the New Architecture was the default.
This is change set the New Arch as default properly in RCTAppDelegate. Plus it refreshes the GHA caches by updating the Podfile.lock
## Changelog:
[Internal] - Ensure that the New Arch is turned on in RCTAppDelegate
Reviewed By: alanleedev
Differential Revision: D68329797
fbshipit-source-id: 9df5f805f7d3506129909f0adae5ff597f33ce3c
Summary:
In the `displayModeToInt()` function, there is no default case defined which is causing the following warning in React Native Windows when trying to build on the New Architecture:
```
##[error]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Error C2220: the following warning is treated as an error
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): error C2220: the following warning is treated as an error [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
##[warning]node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): Warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value
D:\a\_work\1\s\node_modules\react-native\ReactCommon\react\renderer\uimanager\primitives.h(163,1): warning C4715: 'facebook::react::displayModeToInt': not all control paths return a value [D:\a\_work\1\s\vnext\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj]
```
Adding the default case removes the warning and resolves the issue. Not sure if using the -1 value in this case is appropriate.
## 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] - Add default case to `displayModeToInt()` function
Pull Request resolved: https://github.com/facebook/react-native/pull/48711
Test Plan: Tested on React Native Windows New Arch application and was able to build successfully.
Reviewed By: javache
Differential Revision: D68265335
Pulled By: rshest
fbshipit-source-id: 4724a4c7391b9bf651a122f5de227a0c5e0b6212
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48753
[This commit](https://github.com/facebook/react-native/commit/cc89ddd50bed869013082ad98eb0555a386cf7c9) introduced a dependency between RCTFabric and RCTAnimation because RCTFabric is now using `RCTInterpolateColorInRange` which is defined in `RCTAnimation`.
To unblock the CI, I'm adding the dependency to the RCTFabric.podspec
However, I'm not convinced that this is the proper fix. We should move the function to a common dependency between RCTFabric and RCTAnimation. Probably in `RCTUtils`.
## Changelog:
[Internal] - Fix CI by making RCTFabric depend on RCTAnimation
Reviewed By: GijsWeterings
Differential Revision: D68322935
fbshipit-source-id: 57c8833e348fb69dc1b1703ffeedd3383405b4f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48754
The React-FabricComponent was importing some non-existent files when we build for iOS with cocoapods.
This change fixes it.
## Changelog
[Internal] - Only include ReactCommon and ios platform for TextInput
Reviewed By: GijsWeterings
Differential Revision: D68319960
fbshipit-source-id: 45ddd7765f6afc0efef6dc1dadea782871fbd779
Summary:
- Adds support for color transition hint syntax in linear gradients. e.g. `linear-gradient(red, 20%, green)`
- Adds `px` support. Combination of `px` and `%` also works.
- Simplified color stops parsing.
- The `processColorTransitionHint` and `getFixedColorStops` is moved to native code so it can support combination of `px` and `%` units as it requires gradient line length, which is derived from view dimensions and gradient line angle.
- Follows CSS [spec](https://drafts.csswg.org/css-images-4/#coloring-gradient-line) (Refer transition hint section) and implementation is referred from [blink engine source](https://github.com/chromium/chromium/blob/a296b1bad6dc1ed9d751b7528f7ca2134227b828/third_party/blink/renderer/core/css/css_gradient_value.cc#L240).
## Changelog:
[GENERAL] [ADDED] - Linear gradient color transition hint syntax and `px` unit support.
Pull Request resolved: https://github.com/facebook/react-native/pull/48410
Test Plan:
Added testcase in processBackgroundImage-test.ts and example in LinearGradientExample.js
<img width="500" alt="Screenshot 2025-01-05 at 11 38 13 PM" src="https://github.com/user-attachments/assets/62858bb7-1dbf-40cf-8dd4-ec0daf84ac1b" />
## Todo
Add testcases for `getFixedColorStops` and `processColorTransitionHint` in native code for both platforms. That's the only downside of moving it out of JS 🤦
Reviewed By: NickGerleman
Differential Revision: D67870375
Pulled By: joevilches
fbshipit-source-id: b91d741f3108c25df8000d220726bf180c64be60
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48718
This diff looks a bit scary, but it's mostly just structural changes of existing code and some deletion, on a well tested path 😅.
The current parser implementation tries to special case "basic" data types. When I was looking at how to add in support for more complex values, such as lists, function notations, and more compounded types, this distinction ends up not making much sense.
Instead of treating some types as basic, this diff instead moves to a model where a user can declare any structure as a `CSSDataType`, so long as they also supply a parser, which may be visited when iterating through CSS syntax blocks (preserved tokens, function blocks, or simple blocks, which probably won't be used). The user then specifies a list of supported CSS data types to parse, which invokes said parser, calling any defined methods for specific syntax. E.g.
```cpp
struct CSSNumber {
float value{};
};
template <>
struct CSSDataTypeParser<CSSNumber> {
static constexpr auto consumePreservedToken(const CSSPreservedToken& token)
-> std::optional<CSSNumber> {
if (token.type() == CSSTokenType::Number) {
return CSSNumber{token.numericValue()};
}
return {};
}
// Could also accept function block here as well (e.g. for future math
// expressions)
};
static_assert(CSSDataType<CSSNumber>);
```
```cpp
// Can be one of std::monostate (variant null-type), CSSWideKeyword,
// CSSNumber, CSSLength, or CSSPercentage. In this case, a CSSLength.
auto value = parseCSSProperty<CSSNumber, CSSLength, CSSPercentage>("5px");
```
This breaks a whole lot of assumptions I made a year ago, especially around `CSSValueVariant` which must now be able to handle arbitrary values. For now, for the sake of simplicity, I threw this out, and migrated parser code to use plain-old `std::variant`, which has a downside of being a bit less optimized in terms of storage. I also ended up completely throwing out `CSSDeclaredStyle`, since it would majorly need to change, and we're not going to be migrating style storage quite yet. This change also broke the `CSSProperties.h` property definitions and parsing shorthand a bit, which we will need for value processing later. I also opted to delete this for now (a big centralized list is the wrong structure anyways), but will likely copy bits from its source history later.
Another particular hairy bit, that likely won't bite us in practice, is that some strings may be parseable under different data types. This just adds caller requirement to order the types correctly, instead of precedence being implemented as part of the parser.
Changelog: [Internal]
Reviewed By: lenaic
Differential Revision: D68245734
fbshipit-source-id: 132b11053cf41f57483c89176a9a6dceebb69fad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48716
`transparent` is specced as a special `<named-color>` outside the table the others were derived from. Let's add it, since it is supported today by `normalizeColor`.
https://www.w3.org/TR/css-color-4/#named-colors
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D68246770
fbshipit-source-id: 3ff7ed68ebb3d6bc59b24a25d35342620670f0c3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691
We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68206014
fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48739
Follow-up to https://github.com/facebook/react-native/pull/48603
I realized there is one last `tasks.creating` invocation inside `hermes-engine` that needs migration. This fixes it.
Changelog:
[Internal] [Changed] -
Reviewed By: alanleedev
Differential Revision: D68276984
fbshipit-source-id: d58cf64cf41c7943464f15d12c7a04c3cc43ec7d
Summary:
https://github.com/facebook/react-native/issues/48225 fixed the same problem on Mac Catalyst build, but this crash also happen on a iOS build app running on Apple Silicon Mac.
The weak event emitter in AttributedString attributes is causing a serialization error when typing into a TextInput in a iOS build app running on Apple Silicon Mac.
## Changelog
[iOS][Fixed] - Workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter
## 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
Pull Request resolved: https://github.com/facebook/react-native/pull/48583
Reviewed By: javache
Differential Revision: D68093083
Pulled By: cipolleschi
fbshipit-source-id: ac48be3305eb01ff2b62d63283b929e8ab6b250c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48543
Introduces a shared interface for methods that need to be called by the `ReactScrollViewAccessibilityDelegate`
Changelog: [Internal]
Reviewed By: alanleedev
Differential Revision: D67948151
fbshipit-source-id: 9bafaa0b5f9ad5ba2fd73b7b1929d784fa4951c9
Summary:
Since we updated Gradle, I've noticed several warnings related to configuration avoidance API:
https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
We should be using tasks.registerting rather than tasks.creating as this is going to break in Gradle 9/10.
This PR fixes it.
## Changelog:
[INTERNAL] -
Pull Request resolved: https://github.com/facebook/react-native/pull/48603
Test Plan: CI
Reviewed By: javache
Differential Revision: D68270870
Pulled By: cortinico
fbshipit-source-id: 0ed44d903692c20d102143082fd0939f4dbeaa88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48712
Currently, all scroll events can be throttled by the `scrollEventThrottle` value when the intention is only to throttle `onScroll` calls. As a result, the scroll view helper unintentionally drops events unrelated to scrolling, like momentum begin/end. It's imperative that these momentum events dispatch so the scroll view does not lock itself in an "animated" state on the JS side; if locked in an animation state, children of the scroll view will not receive touch events. This can happen when the throttle is sufficiently high and momentum scrolling completes before the throttle time has elapsed.
Changelog:
[Android][Fixed] - Scroll view throttle no longer impacts events other than `onScroll`
Reviewed By: javache, rshest
Differential Revision: D68234045
fbshipit-source-id: d5c11412d3f273811a45e6f61af08d3fcf9f61d5
Summary:
Continuing our usual journey, this time migrating MessageQueueThread. Was not expecting to see that many assertions in ReactContext.
One important thing to note on this PR: I had to add an extra Throw RuntimeException to `startNewBackgroundThread`. It already had one from the`dataFuture.getOrThrow()`, but if your thread is not associated with a Looper, calling `myLooper` (Line 203 of MessageQueueThreadImpl) Can return null. Until now, this would have been a `NPE`, i just decided to make it a `RuntimeException` with the message `Looper not found for thread`. Let me know if you want me to make that function return a nullable, or throw another message or exception, or if you want me to treat Looper as Nullable in the whole class.
## Changelog:
[INTERNAL] [FIXED] - Migrate MessageQueueThread and MessageQueueThreadImpl to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/48652
Test Plan: <img width="1318" alt="Screenshot 2025-01-13 at 21 03 00" src="https://github.com/user-attachments/assets/462cc8af-4648-4437-9260-5ffa6c69e763" />
Reviewed By: tdn120
Differential Revision: D68155120
Pulled By: rshest
fbshipit-source-id: 1082a832df5b1d8ee64ca7be26e4b85e79152f88
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48723
## Changelog:
[Internal] -
In certain scenarios `TouchEvent` can be initialized with "unexpected" event actions, such as `ACTION_SCROLL`.
This caused an exception , even though such scenarios may be legitimate.
Reviewed By: javache
Differential Revision: D68265040
fbshipit-source-id: d31881e03d9110bb4f6af38548a4f73a41c54d2b
Summary:
The testing script is making unnecessary call to `input keyevent 82` which causes the Android device to
open the menu.
## Changelog:
[Internal] [Changed] -
Pull Request resolved: https://github.com/facebook/react-native/pull/48707
Test Plan: Tested local with local device
Reviewed By: cipolleschi
Differential Revision: D68215641
Pulled By: cortinico
fbshipit-source-id: 3e2653d8aa0c1e6606d9921f7b3794d0d27ef3f0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48715
{D68154908} fixed a problem with the `onAnimatedValueUpdate` listener not being correctly attached if `__attach` were called before `__makeNative` (which sets `__isNative` to true).
We're potentially seeing production symptoms of stuttering interactions and user responsiveness, after queuing up many operations. Our hypothesis is that in scenarios where `ensureUpdateSubscriptionExists` is being called during `__makeNative` (instead of during `__attach`), a backup of operations occurs leading to these symptoms.
This diff attempts to validate and mitigate this hypothesis by deferring `ensureUpdateSubscriptionExists` to when an `AnimatedValue` instance has had both `__attach` and `__makeNative` invoked.
Changelog:
[Internal]
Differential Revision: D68236594
fbshipit-source-id: 2089100a773ebfc161fb5b567123eb58a893939f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48708
{D68171721} [facebook/react-native#48678](https://github.com/facebook/react-native/pull/48678) mitigated the bug that necessitated this revert.
Changelog:
[General][Changed] - (Reapply) The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects.
Reviewed By: sammy-SC
Differential Revision: D68217144
fbshipit-source-id: 6796440f2839d897158528642e07869951651327
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48703
## Motivation
Modernising the react-native codebase to allow for ingestion by modern Flow tooling
## This diff
- Updates files in Libraries/Alert and Libraries/ActionSheetIOS to use `export` syntax
- `export default` for qualified objects, many `export` statements for collections (determined by how it's imported)
- Appends `.default` to requires of the changed files.
- Updates Jest mocks of the related modules
- Updates the public API snapshot (intented breaking change)
Changelog:
[General][Breaking] - Files inside `Libraries/Alert` and `Libraries/ActionSheetIOS` use `export` syntax, which requires the addition of `.default` when imported with the CJS `require` syntax.
Differential Revision: D68210738
fbshipit-source-id: a984034b165908f75485f2bad33fcccadd865494
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48678
While diagnosing a recent issue in which `AnimatedValue` instances were not being correctly updated as expected, the insertion effects feature flag was identified as a root cause.
Upon further investigation, it appears that this is because the `onUserDrivenAnimationEnded` listener was not implemented the same way in the two feature flag states:
- When `useInsertionEffectsForAnimations` is disabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in a passive effect, after all nodes have been attached.
- When `useInsertionEffectsForAnimations` is enabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in an insertion effect when attaching nodes.
The bugs occurs because `useAnimatedProps` checks whether native driver is employed to decide whether to listen to `onUserDrivenAnimationEnded`. However, we do not know whether native driver will be employed during the insertion effect. (Actually, we do not necessarily know that in a passive effect, either... but that is a separate matter.)
This fixes the bug when that occurs when `useInsertionEffectsForAnimations` is enabled, by moving the listening logic of `onUserDrivenAnimationEnded` into a passive effect. This is the same way that it is implemented when `useInsertionEffectsForAnimations` is disabled.
Changelog:
[Internal]
Reviewed By: javache, sammy-SC
Differential Revision: D68171721
fbshipit-source-id: 50b23348fd4641580581cacebc920959651f96a7
Summary:
Whenever I run `yarn lint --fix` I noticed that this test is not formatted correctly. This fixes it.
## Changelog:
[Internal] [Changed] -
Pull Request resolved: https://github.com/facebook/react-native/pull/48692
Test Plan: CI
Reviewed By: sammy-SC
Differential Revision: D68207001
Pulled By: cortinico
fbshipit-source-id: 2a6c44ca02249f6662b03c87f0c4d4f3eb5a3054
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48690
We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68205691
fbshipit-source-id: 22a3416335052a4bf6a76faa6e6af622254a6e56
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48689
We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.
Changelog:
[Internal] [Changed] - RNGP - Cleanup prealpha logic from the Gradle Plugin
Reviewed By: cipolleschi
Differential Revision: D68205665
fbshipit-source-id: 81d5257544df97b566421164944e3b6e71f06635
Summary:
In the old arch, stylistic sets were supported however in the new arch support was not added. It seems that fontVariant support was actually initially missed on iOS fabric however a limited version was added in https://github.com/facebook/react-native/pull/44112 . I referenced that PR and also old arch implementation for these changes.
<img width="480" alt="Screenshot 2025-01-14 at 11 15 18 AM" src="https://github.com/user-attachments/assets/ec32a356-fadd-4281-83b9-15871bbcd18f" />
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [ADDED] - Support stylistic sets for fontVariant
Pull Request resolved: https://github.com/facebook/react-native/pull/48674
Test Plan:
- Verified that the "Unsupported FontVariant" native log no longer displays on both platforms
- On iOS was easy to test in the tester app as SF supports stylistic sets by default:
```
<Text>
Stylistic{'\n'}
<Text>Normal: ${'\n'}</Text>
<Text style={{fontVariant: ['stylistic-four']}}>
Stylistic Four: $
</Text>
</Text>
```
<img width="391" alt="Screenshot 2025-01-14 at 11 59 29 AM" src="https://github.com/user-attachments/assets/1ede258e-783f-448f-8300-4c8c710796ef" />
- On Android I could not find any system fonts that support stylistic sets by default so I added Raleway and confirmed with a W character

I did not add font variant example to the tester apps as I felt it could be confusing for people at a glance to understand why there is only a system font example on iOS and why I chose the specific stylistic set.
Reviewed By: cipolleschi
Differential Revision: D68205738
Pulled By: javache
fbshipit-source-id: 03ce572d3c8ecafca71fe00fc0e88eeafc2558bb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48664
Simplify ViewManager base-class by making `ViewManager`'s delegate non-nullable and using a single path for updating properties.
The ViewManagerDelegate API can map back to the original ViewManagerSetter API transparently, allowing us to remove the codepath from `ViewManagerPropertyUpdater`.
Changelog: [Android][Removed] `ViewManagerPropertyUpdater.updateProps` is deprected, use the related ViewManager APIs instead
Reviewed By: mdvacca, rshest
Differential Revision: D68120420
fbshipit-source-id: cd8b906dc36d4803dbe09ee0283654285eb81fd4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48658
Migrate to Kotlin before I make further changes to this. Generics are really tricky due to our previous usage of raw generics on the Java side, but were worked around by some combination of unchecked cast and `Nothing`
Changelog: [Internal]
Reviewed By: mdvacca, rshest
Differential Revision: D68102210
fbshipit-source-id: 90013f09db0826f571a4e2a84132ae3b49fa299d
Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.
## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/48637
Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator
Reviewed By: cortinico
Differential Revision: D68161477
Pulled By: cipolleschi
fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48547
For some unknown reason, we have been swallowing [`requestFocus`](https://developer.android.com/reference/android/view/View#requestFocus(int) calls since `TextInput` is a controlled component - meaning you can control this components value and focus state from JS. This decision was originally made pre 2015 and I cannot find the reason why
I do not think this makes sense. We can still request focus from JS, while allowing the OS to request focus as well in certain cases and we would still be controlling this text input.
This is breaking keyboard navigation. Pressing tab or arrow keys will no-op if the next destination is a `TextInput`. This is because Android will call `requestFocus` from [here](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/view/ViewRootImpl.java;l=7868?q=performFocusNavigation) when handling key events. Notably, Explore By Touch (TalkBack) swiping gestures WOULD focus `TextInputs` since they go through `ExploreByTouchHelper` methods which we override to call the proper `requestFocusInternal()` method.
**In this diff**: I move the logic in `requestFocusInternal()` into `requestFocus`.
Changelog: [Android] [Fixed] - TextInputs can now receive focus via external keyboard
Reviewed By: NickGerleman
Differential Revision: D67953398
fbshipit-source-id: 506006769a7c8a63f0a9b7ce27cfbe8578777790
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48677
E2E tests are flaky again.
Let's bump maestro to see if stability improves.
This will also remove some noise from the logs, make them easier to read.
## Changelog
[Internal] - Bump maestro version
Reviewed By: cortinico
Differential Revision: D68160005
fbshipit-source-id: 40a25f974dfda75785bf08d8d236e771b44d13cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48672
## Changelog:
[General] [Fixed] - Buttons becoming unresponsive when transform is animated
# The problem
D67872307 changes when `ensureUpdateSubscriptionExists` is called to in `__attach`. This breaks the functionality because `__attach` is called before flag `__isNative` is set and subscriptions are never setup.
# Fix
The diff sets up subscriptions in `__makeNative` method.
Reviewed By: yungsters
Differential Revision: D68154908
fbshipit-source-id: e2ac108b064a66dda08902653d6bd20286f92458
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48666
The New Architecture sample is getting too big and the two views are not visible anymore.
I'm fixing this but having buttons side by side.
Changelog:
[Internal] [Changed] -
Reviewed By: cipolleschi
Differential Revision: D68153245
fbshipit-source-id: 5557fd40f81078fe3994d8efe0e73784e043ed78
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48670
The `LICENSE-docs` was needed when this repo was also containing the reactnative.dev docs.
As this is not the case anymore, this file is unncessary.
Changelog:
[Internal] [Changed] - Remove unnecessary LICENSE-docs
Reviewed By: cipolleschi
Differential Revision: D68156336
fbshipit-source-id: 489bf2cb95916c20eb61bfb00e34b8e271bc08e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48656
While working on 0.78, I realize we were not testing the template app with JSC.
This change should fix this.
## Changelog:
[Internal] - Disable Hermes for the JSC E2E tests with Maestro
Reviewed By: cortinico, fabriziocucci
Differential Revision: D68147849
fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8
Summary:
On bridgeless mode, `reactHost` is kept in memory even after destroying the `DefaultReactNativeHost` in brownfield scenario. Since it keeps references to the modules, they are not deallocated, and their `initialize` methods are not fired again when creating new instance of `react-native` later. It breaks the behavior of e.g. `react-native-screens`, which wants to listen for mutations and should get new `FabricUIManager`: https://github.com/software-mansion/react-native-screens/blob/20b7e83782cd5f79ddd0d61dadc13eeb4db4b258/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt#L45.
In this commit we change the `DefaultReactNativeHost.clear()` method to also invalidate the instance retained inside `DefaultReactHost`
## Changelog:
[ANDROID] [FIXED] - Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost
Pull Request resolved: https://github.com/facebook/react-native/pull/48338
Test Plan: In brownfield scenario, destroy the instance of RN and see that modules are also destroyed.
Reviewed By: cipolleschi
Differential Revision: D67977140
Pulled By: cortinico
fbshipit-source-id: 1804f093ab1a905bef499078ddec32a13c50cc85
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48659
Changelog:
[Internal] - Replaced ExactReactElement_DEPRECATED with React.Node as a children type in ScrollViewStickyHeader
Reviewed By: fabriziocucci
Differential Revision: D68151420
fbshipit-source-id: d4406de67176ae1fea95b8b2ea85f41dc7f5045e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48660
RN-Tester is currently instacrashing on release due to a migration to Kotlin for HermesExecutor
This fixes it.
Changelog:
[Internal] [Changed] - Fix crash for Hermes Release due to HermesExecutor migration
Reviewed By: javache
Differential Revision: D68151666
fbshipit-source-id: 31f404ec518831cf2151dc670cdf8553427ae8ab
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48609
# Motivation
This is an attempt at modernizing the export syntax in some of the files in `Libraries/StyleSheet/`. It will allow these files to get properly ingested by modern Flow tooling.
# This diff
- Migrates the use of `module.exports` into `export default` for files located in `Libraries/StyleSheet/*.js`. Some files were omitted due to ballooning complexity, but will be addressed in other Diffs.
- Updating internal *require*s to use ".default", no product code seems to be affected.
- Migrating `require`s into `import`s where applicable, taking into account the performance implications (context: https://fb.workplace.com/groups/react.technologies.discussions/permalink/3638114866420225/)
- Updates the current iteration of API snapshots (intended).
- Updates `react-native-codegen`'s require of processColorArray, analogous to D42346452.
Changelog:
[General][Breaking] - Deep imports from some files in `StyleSheet/` can break when using the `require()` syntax, but can be easily fixed by appending `.default`
Reviewed By: javache
Differential Revision: D68017325
fbshipit-source-id: 3c5b94742f101db0b2914c91efab6003dba2b61a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48602
See context in D64532446 / https://github.com/facebook/react-native/pull/47086
These argument types were already consumed as nullable in various OSS libraries, which prevents correct Kotlin migration of this code.
Changelog: [Android][Changed] Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand
Reviewed By: mdvacca
Differential Revision: D67277871
fbshipit-source-id: a0743584891c7b2b4b50fff11de15da0078d5a1a
Summary:
Migrating HermesExecutor and it's factory to Kotlin. Not sure if the TAG in HermesExecutorFactory is needed anymore or not, but the rest of the changes are pretty bog standard
## Changelog:
[INTERNAL] [FIXED] - Migrate HermesExecutor and HermesExecutorFactory to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/48617
Test Plan:
`./gradlew test`:
<img width="1266" alt="Screenshot 2025-01-11 at 04 01 12" src="https://github.com/user-attachments/assets/c0f1402c-796b-45fa-9ee3-41c5a5ffc356" />
Reviewed By: tdn120
Differential Revision: D68094681
Pulled By: cortinico
fbshipit-source-id: 16eae5c7c24886421cbd2cbf213295134a9c01cf
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48634
Changelog: [internal]
Just a placeholder to add new tests in the future.
Reviewed By: sammy-SC
Differential Revision: D68093342
fbshipit-source-id: 1e1d7fd71865763ef66b3bb1c76ff8b8ebca9fd9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48631
This step is already carried out by [generate-artifact-executor](https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/codegen/generate-artifacts-executor.js#L385) if needed.
We can remove it from cocoapods and this will make it easier to migrate away from them.
For 3rd party apps that uses a specific version of React Native, codegen is shipped in NPM as already built in the react-native/codegen package.
This change really affects only the React Native monorepo.
## Changelog
[Internal] - Remove build codegen step from cocoapods
Reviewed By: cortinico
Differential Revision: D68019743
fbshipit-source-id: 7aaf9275886ba8b86d38d943d2b26bd8eed11aa8
2025-01-13 07:00:12 -08:00
3269 changed files with 202920 additions and 94680 deletions
This directory was home to the Circle CI configuration files.
In July 2024 we moved to GitHub Actions, and week this folder for backward compatibility, as we want to keep on using Circle CI for the release of React Native <= 0.74.
* Please [search for similar issues](https://github.com/facebook/react-native/issues) in our issue tracker.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type:textarea
id:description
attributes:
@@ -69,10 +69,10 @@ body:
- type:textarea
id:react-native-info
attributes:
label:Output of `npx react-native info`
description:Run `npx react-native info` in your terminal, copy and paste the results here.
label:Output of `npx @react-native-community/cli info`
description:Run `npx @react-native-community/cli info` in your terminal, copy and paste the results here.
placeholder:|
Paste the output of `npx react-native info` here. The output looks like:
Paste the output of `npx @react-native-community/cli info` here. The output looks like:
...
System:
OS: macOS 14.1.1
@@ -109,8 +109,8 @@ body:
- type:input
id:reproducer
attributes:
label:Reproducer
description:A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label:MANDATORY Reproducer
description:A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
Do not attempt to open a bug in this category if you're not using the New Architecture as your bug will be closed.
Make sure that your issue:
* Have a **valid reproducer** (either a [Expo Snack](https://snack.expo.dev/) or a [empty project from template](https://github.com/react-native-community/reproducer-react-native).
* Have a **valid reproducer** (See [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug)).
* Is tested against the [**latest stable**](https://github.com/facebook/react-native/releases/) of React Native.
Due to the extreme number of bugs we receive, we will be looking **ONLY** into issues with a reproducer, and on [supported versions](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native.
🚨 IMPORTANT: Due to the extreme number of bugs we receive, issues **without a reproducer** or for an [**unsupported versions**](https://github.com/reactwg/react-native-releases#which-versions-are-currently-supported) of React Native **will be closed**.
- type:textarea
id:description
attributes:
@@ -81,10 +81,10 @@ body:
- type:textarea
id:react-native-info
attributes:
label:Output of `npx react-native info`
description:Run `npx react-native info` in your terminal, copy and paste the results here.
label:Output of `npx @react-native-community/cli info`
description:Run `npx @react-native-community/cli info` in your terminal, copy and paste the results here.
placeholder:|
Paste the output of `npx react-native info` here. The output looks like:
Paste the output of `npx @react-native-community/cli info` here. The output looks like:
...
System:
OS: macOS 14.1.1
@@ -121,8 +121,8 @@ body:
- type:input
id:reproducer
attributes:
label:Reproducer
description:A link to a Expo Snack or a public repository that reproduces this bug, using [this template](https://github.com/react-native-community/reproducer-react-native). Reproducers are **mandatory**.
label:MANDATORY Reproducer
description:A link to either a failing RNTesterPlayground.js file, an Expo Snack or a public repository from [this template](https://github.com/react-native-community/reproducer-react-native) that reproduces this bug. Reproducers are **mandatory**, issues without a reproducer will be closed.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const{
prepareFailurePayload,
sendMessageToDiscord,
}=require('../notifyDiscord');
describe('prepareFailurePayload',()=>{
it('should handle undefined failures',()=>{
constmessage=prepareFailurePayload(undefined);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should handle empty failures array',()=>{
constmessage=prepareFailurePayload([]);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
});
});
it('should format a single failure correctly',()=>{
constfailures=[
{
library:'react-native-reanimated',
platform:'iOS',
},
];
constmessage=prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] react-native-reanimated',
});
});
it('should sort multiple failures by platform and library name',()=>{
constfailures=[
{
library:'react-native-reanimated',
platform:'iOS',
},
{
library:'react-native-gesture-handler',
platform:'Android',
},
{
library:'react-native-screens',
platform:'iOS',
},
{
library:'react-native-svg',
platform:'Android',
},
];
constmessage=prepareFailurePayload(failures);
// The failures should be sorted: first Android (alphabetically), then iOS
// Within each platform, libraries should be sorted alphabetically
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [Android] react-native-gesture-handler\n❌ [Android] react-native-svg\n❌ [iOS] react-native-reanimated\n❌ [iOS] react-native-screens',
});
});
it('should handle failures with missing properties',()=>{
constfailures=[
{
// Missing library
platform:'iOS',
},
{
library:'react-native-gesture-handler',
// Missing platform
},
{
// Both missing
},
];
constmessage=prepareFailurePayload(failures);
expect(message).toEqual({
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n❌ [iOS] Unknown\n❌ [Unknown] react-native-gesture-handler\n❌ [Unknown] Unknown',
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited toreproduce your bug.</li></ul>`,
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Reproducers are **mandatory** and we can accept only one of those as a valid reproducer: <br/><ul><li>For majority of bugs: send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul><br/>You can read more about about it on our website: [How to report a bug](https://reactnative.dev/contributing/how-to-report-a-bug).`,
console.log('Successfully sent message to Discord');
return;
}else{
consterrorText=awaitresponse.text();
console.error(
`Failed to send message to Discord: ${response.status}${errorText}`,
);
thrownewError(`HTTP status code: ${response.status}`);
}
}
/**
* Prepares a formatted Discord message payload from a list of failures.
* @param {Array<Object>} failures - List of failures to format
* @returns {Object} - The formatted Discord message payload
*/
functionprepareFailurePayload(failures){
if(!failures||failures.length===0){
return{
content:
'⚠️ **React Native Nightly Integration Failures** ⚠️\n\nNo failures to report.',
};
}
// Sort failures by platform and then by library name
constsortedFailures=[...failures].sort((a,b)=>{
// First sort by platform
constplatformA=a.platform||'Unknown';
constplatformB=b.platform||'Unknown';
if(platformA!==platformB){
returnplatformA.localeCompare(platformB);
}
// Then sort by library name
constlibraryA=a.library||'Unknown';
constlibraryB=b.library||'Unknown';
returnlibraryA.localeCompare(libraryB);
});
// Format the failures into a message
constformattedFailures=sortedFailures
.map(failure=>{
constlibrary=failure.library||'Unknown';
constplatform=failure.platform||'Unknown';
return`❌ [${platform}] ${library}`;
})
.join('\n');
return{
content:`⚠️ **React Native Nightly Integration Failures** ⚠️\n\nThe integration of libraries with React Native nightly failed for the following libraries:\n\n${formattedFailures}`,
needs:[prepare_hermes_workspace, build_hermes_macos]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on:macos-14
needs:[prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
needs:[prepare_hermes_workspace, build_hermes_macos]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
runs-on:macos-14
needs:[prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]# prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
This change fixes the script that updates the RN Version to also update the Codegen snapshots so that they are in sync with the current version of React Native.
It also updates the Snapshot as it was failing in rc.0
## Changelog:
[Internal] - Fixed script that updates the react native versions
## Test Plan:
Tested locally by running `node ./scripts/releases/set-rn-artifacts-version --built-type release --to-version 0.80.0-rc.0` and verifying that the snapshot file was getting updated. I then run the `yarn test
generate-artifacts-executor-test.js` command to verify that the tests were passing.
@@ -1174,7 +1174,7 @@ Heads-up: the Facebook internal team is [currently working on a rewrite of some
- Restrict `WebView` to only http(s) URLs: ([634e7e11e3](https://github.com/facebook/react-native/commit/634e7e11e3ad39e0b13bf20cc7722c0cfd3c3e28), [23f8f7aecb](https://github.com/facebook/react-native/commit/23f8f7aecb1f21f4f5e44fb9e4a7456ea97935c9))
- Node 8 is now the minimum required version ([c1e6f27823](https://github.com/facebook/react-native/commit/c1e6f278237e84c8ed26d3d2eb45035f250e2d40))
- Upgrade React to v16.4.1, sync React Renderer to revision ae14317 ([c749d951ad](https://github.com/facebook/react-native/commit/c749d951ada829c6f6fb76f35e68142e61054433))
- Update new project template's Flow config to fix `Cannot resolve module X` isse due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Update new project template's Flow config to fix `Cannot resolve module X` issue due to removal of `@providesModule` ([843a433e87](https://github.com/facebook/react-native/commit/843a433e87b0ccaa64ab70d07e22bffbabad8045))
- Upgrade Flow to v0.75 ([3bed272a62](https://github.com/facebook/react-native/commit/3bed272a620ac806a6142327013265ea8138641a), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8), [6264b6932a](https://github.com/facebook/react-native/commit/6264b6932a08e1cefd83c4536ff7839d91938730))
- Upgrade Prettier to v1.13.6 ([29fb2a8e90](https://github.com/facebook/react-native/commit/29fb2a8e90fa3811f9485d4b89d9dbcfffea93a6), [bc2f12c68c](https://github.com/facebook/react-native/commit/bc2f12c68cf8cfdf8c060354e84392fd9a3645d8))
@@ -1745,7 +1745,7 @@ Below is a list of the remaining, low-level changes that made it into this relea
- Changes to RCTShadowView to increase RCTSurface performance ([f96f9c5fd6](https://github.com/facebook/react-native/commit/f96f9c5fd692000f561e87cba68642ef7daf43e7) by [@shergin](https://github.com/shergin))
- Designated methods to control dirty propagation ([af226ef949](https://github.com/facebook/react-native/commit/af226ef949f3a21ef68a6e6b9fbd4cc06fa05152) by [@shergin](https://github.com/shergin))
- Add missing tvOS header ([49cbca7464](https://github.com/facebook/react-native/commit/49cbca7464e27c34105122459ae29cc3b1247513) by [@grabbou](https://github.com/grabbou))
- On Android, seperate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- On Android, separate logic to initialize JS from starting the app ([4996b9aeb4](https://github.com/facebook/react-native/commit/4996b9aeb4127892b7579b45927dec14833b8b4d) by [@axe-fb](https://github.com/axe-fb))
- ♻️ JS linting was cleaned up: removed unused libs, strengthened the rules, removed unneeded rules, prevent disabled tests, and more ([2815ada238](https://github.com/facebook/react-native/commit/2815ada23872fc28dc8dd5a9833962cb73f452eb), [183c316f4c](https://github.com/facebook/react-native/commit/183c316f4c869804b88cffe40614c84ac0a472d0), [9c67e749d8](https://github.com/facebook/react-native/commit/9c67e749d8f63cf14ece201ec19eee4676f96a85), [79902f99b8](https://github.com/facebook/react-native/commit/79902f99b81f538042b38a857182c2e5adbfd006), [9a36872f0c](https://github.com/facebook/react-native/commit/9a36872f0c7ba03a92fabf65e4d659d6861ea786), [67a3c42d1a](https://github.com/facebook/react-native/commit/67a3c42d1a29b6fa1375f7445d1c9b4429939bae), [b826596700](https://github.com/facebook/react-native/commit/b82659670041d0e472f68c0a14b3ef5b962db09b), [a1a0a69546](https://github.com/facebook/react-native/commit/a1a0a6954635141ce6c167816b67674aa5c31062), and [11a495cb32](https://github.com/facebook/react-native/commit/11a495cb3235ebbc2ad890e92ec612fd5316bffb) by [@TheSavior](https://github.com/TheSavior))
- 👷 Separate JS lint and flow checks from tests ([5ea5683d01](https://github.com/facebook/react-native/commit/5ea5683d01487b49c814fca6e11a818b9a777239) by [@hramos](https://github.com/hramos))
- 👷 Fix Buck in build config to enable CI ([796122d8f3](https://github.com/facebook/react-native/commit/796122d8f3b825c0bf0c138c662f3477f8bab123), [7c3a61f3b6](https://github.com/facebook/react-native/commit/7c3a61f3b610e219fd798eccd330deb9a2471253), [82b123e744](https://github.com/facebook/react-native/commit/82b123e744b87cc59c96b4e82af9ed03981b4f42) by [@grabbou](https://github.com/grabbou))
- **Runtime:** Add useShadowNodeStateOnClone and updateRuntimeShadowNodeReferencesOnCommit ([22a4e060d5](https://github.com/facebook/react-native/commit/22a4e060d5cf6b31d940f39f6e4776c14192d240) by [@lenaic](https://github.com/lenaic))
### Fixed
- **layout:**Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([f7a5db3c06](https://github.com/facebook/react-native/commit/f7a5db3c063b952321826ea431d3d238ef0de65d) by [@NickGerleman](https://github.com/NickGerleman))
- **Blob:**Make sure that URLs are parsed following the node specs ([6d8a02a666](https://github.com/facebook/react-native/commit/6d8a02a66606bd0a3931626aff0e76f7c3b31caa) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Fix codegen ImageSource require ([4d7c4bd6e8](https://github.com/facebook/react-native/commit/4d7c4bd6e8bf79f069970ca4f54ae3f4c92b80e0) by [@jakex7](https://github.com/jakex7))
#### Android specific
- **layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([0683206927](https://github.com/facebook/react-native/commit/068320692748f0c46867625786a780366fdbb1d6) by Thomas Nardone)
- **Native Modules:** Prioritise local OnLoad.cpp, falling back to default-app-setup ([8b1f049879](https://github.com/facebook/react-native/commit/8b1f04987936ab2bc7dcf62adc92bf394d35f77b) by [@timbocole](https://github.com/timbocole))
- **runtime:** Remove feature flag for allowRecursiveCommitsWithSynchronousMountOnAndroid ([fb7f87ecb2](https://github.com/facebook/react-native/commit/fb7f87ecb27f9006e2018b9622d329feb1ba23a4) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **TextInput:** Fixing TextInput `maxLength` not working in old arch ([9ecf290d27](https://github.com/facebook/react-native/commit/9ecf290d270598e45832a75f657d73cf20088a37) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.77.0-rc.6
### Fixed
#### Android specific
- **JSC:** Fixes RNTester JSC Debug instacrashing ([17a5d2be5a](https://github.com/facebook/react-native/commit/17a5d2be5a96703ed1c76d89990a8f1e37abd4d4) by [@cortinico](https://github.com/cortinico))
- **C++:** Fixes C++ TurboModules: Prioritise OnLoad.cpp, falling back to default-app-setup ([5a64bde701](https://github.com/facebook/react-native/commit/5a64bde701e28615a79ad52d0631de62ce6cab92) by [@timbocole](https://github.com/timbocole))
## v0.77.0-rc.5
### Fixed
#### iOS specific
- **TextInput:** Fixes numeric TextInput not triggering `onSubmitEditing` ([0bcb0c2b2f](https://github.com/facebook/react-native/commit/0bcb0c2b2f460ed1a9d525d1a5b343f4b71f9347) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixed problem with third party libraries overwriting `inputAccessoryView` ([d34032b6c0](https://github.com/facebook/react-native/commit/d34032b6c0bb3564a7b77ef270cc3289d99365f2) by [@kirillzyusko](https://github.com/kirillzyusko))
## v0.77.0-rc.4
### Fixed
#### Android specific
- **Layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([e3970a4bb3](https://github.com/facebook/react-native/commit/e3970a4bb3f39ec5652277d78d8c58c89e87dc30) by [@tdn20](https://github.com/tdn20))
## v0.77.0-rc.3
## v0.79.1
### Changed
#### Android specific
- **deps:** Gradle to 8.11.1 ([490db92562](https://github.com/facebook/react-native/commit/490db92562df3baf6dc38737778179065f378715) by [@cortinico](https://github.com/cortinico))
### Fixed
- **Codegen:** Skip hidden folders when looking for third party components. ([8ab524312a](https://github.com/facebook/react-native/commit/8ab524312ab3bf1192b94ae6e30d296a85baa944) by [@cipolleschi](https://github.com/cipolleschi))
#### Android specific
- **runtime:** Handle removal of in-transition views. ([f402ed17fa](https://github.com/facebook/react-native/commit/f402ed17fa6d75aea24e2ad99a8b8d8ad20840e3) by [@kkafar](https://github.com/kkafar))
- **DevSupport:** Change `defaultJSExceptionHandler`'s type to `JSExceptionHandler` on the `ReleaseDevSupportManager` ([9eb75d4bd5](https://github.com/facebook/react-native/commit/9eb75d4bd553bdc166118110d095b98bef811d4e) by [@alanjhughes](https://github.com/alanjhughes))
#### iOS specific
- **infra:** Enable hermes debugger by configuration type instead of configuration name ([eda4f185b3](https://github.com/facebook/react-native/commit/eda4f185b381f7569a1029b7697f9a1c8bc6d108) by [@benhandanyan](https://github.com/benhandanyan))
- **TextInput:** Workaround for Mac Catalyst TextInput crash due to serialization attempt of WeakEventEmitter ([e04738b7ec](https://github.com/facebook/react-native/commit/e04738b7ecec9e7da3aab49bb24a6336b9496b94) by [@rozele](https://github.com/rozele))
## v0.77.0-rc.2
- **TextInput:** Typing into TextInput now will not cause the caret position to update to the beginning when a zero-length selection is set. ([7771317e5c](https://github.com/facebook/react-native/commit/7771317e5cf49bda65275ea1149160a45c607803) by [@ouchuan](https://github.com/ouchuan))
### Fixed
#### Android specific
- **Headless Tasks:** Fix crash on HeadlessJsTaskService on old architecture ([4560fc0497](https://github.com/facebook/react-native/commit/4560fc049748a345d5945bc08d43f4b61ca51ff3) by [@cortinico](https://github.com/cortinico))
- **Codegen:** Do not generate Apple specific file for Android ([b2bacc4a9f](https://github.com/facebook/react-native/commit/b2bacc4a9f3b97a4f59126a229477d3c952b3f44) by [@cipolleschi](https://github.com/cipolleschi))
## v0.77.0-rc.1
#### iOS specific
### Fixed
- **Codegen:** Do not generate ReactCodegen.podspec for libraries ([f3c280442d](https://github.com/facebook/react-native/commit/f3c280442dc49e13b24baa2348f6b8c802045178) by [@cipolleschi](https://github.com/cipolleschi))
- **Animated:** Replace Object.hasOwn usages to fix Animated on JSC ([e996b3f346](https://github.com/facebook/react-native/commit/e996b3f346462a394012a722ce19990cdf9c3d9a) by [@robhogan](https://github.com/robhogan))
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([f791fb9e66](https://github.com/facebook/react-native/commit/f791fb9e660fe15bccf55029045c48f4bbcbc5cb) by [@foyarash](https://github.com/foyarash))
- **infra:** Fix "punycode is deprecated" warning by replacing `node-fetch` with native `fetch` ([881d8a720f](https://github.com/facebook/react-native/commit/881d8a720fb24241d7b2127273ca6116833bf176) by [@jbroma](https://github.com/jbroma))
## v0.79.0
### Added
- **Codegen:** Allow UnsafeMixed as Array value in codegen ([abd7259de4](https://github.com/facebook/react-native/commit/abd7259de4c11f2615788e8bb258b0459c57eeed) by [@javache](https://github.com/javache))
- **DevX:** Add inspector proxy events for debugger heartbeat (sampled) and abandoned connections ([84f3cf95ea](https://github.com/facebook/react-native/commit/84f3cf95ea9ad17ba5c0014ea35d0b8e98af56fe) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Add inspector proxy info logs in regards to CDP connection to device and DevTools ([29419ce8f0](https://github.com/facebook/react-native/commit/29419ce8f095e3d763adb5073140b115fecb66e2) by [@vzaidman](https://github.com/vzaidman))
- **Flow:** Added explicit type for _lastNativeRefreshing and changed React import syntax in RefreshControl ([a24f9ef825](https://github.com/facebook/react-native/commit/a24f9ef825a0291b7fec20d9ab190c67c94f3260) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for _memoizedRenderer and changed React and View import in FlatList ([b634fa1edb](https://github.com/facebook/react-native/commit/b634fa1edb56bd01724d24dee4b0243c68ddc4d2) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for argument in _captureRef in SectionList ([e31ff4212b](https://github.com/facebook/react-native/commit/e31ff4212b62e4b7dc3ed746d790645e893fbd11) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type for Symbol.iterator in URLSearchParams ([89af3e804f](https://github.com/facebook/react-native/commit/89af3e804f2da3874bc1c20ff1e3ba892efe3ea3) by [@coado](https://github.com/coado))
- **Flow:** Added explicit type to supported commands in TextInputNativeCommands ([1126bbb149](https://github.com/facebook/react-native/commit/1126bbb1493dbea04addfdcc809ace01aecab604) by [@coado](https://github.com/coado))
- **Flow:** Added type for exported object in AssetRegistry ([44d84f2af6](https://github.com/facebook/react-native/commit/44d84f2af60392684d0ff4b4e65ae797fad5b456) by [@coado](https://github.com/coado))
- **Flow:** Added types in TouchHistoryMath ([b9df812b67](https://github.com/facebook/react-native/commit/b9df812b67a22d459e85511962ac507a80f67f29) by [@coado](https://github.com/coado))
- **Infra:** Open Sourcing React Native's Compatibility Check ([60e3921f9c](https://github.com/facebook/react-native/commit/60e3921f9cf0a91edd54c269f3157d81d0d4467a) by [@elicwhite](https://github.com/elicwhite))
- **Layout:** Linear gradient color transition hint syntax and `px` unit support. ([cc89ddd50b](https://github.com/facebook/react-native/commit/cc89ddd50bed869013082ad98eb0555a386cf7c9) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Layout:** Support stylistic sets for fontVariant ([c09b71b990](https://github.com/facebook/react-native/commit/c09b71b99038bacfbc2a1dca521a9220afa3dcb4) by [@LeviWilliams](https://github.com/LeviWilliams))
- **LogBox:** Add full owner stack support to React Native ([967ef32154](https://github.com/facebook/react-native/commit/967ef321548321c184432221e38c2f0394d4e264) by [@rickhanlonii](https://github.com/rickhanlonii))
- **LogBox:** Add owner stack code frames to LogBox ([0affa544c3](https://github.com/facebook/react-native/commit/0affa544c334aa6804cc787324decac45ba82cce) by [@rickhanlonii](https://github.com/rickhanlonii))
- **Metro:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([0d66c524cf](https://github.com/facebook/react-native/commit/0d66c524cfdf4f3abd742b3b8bc6b39f24f7c214) by [@huntie](https://github.com/huntie))
- **TextInput:** Adds the escape key to the key press event handler payload. ([e566c1ec06](https://github.com/facebook/react-native/commit/e566c1ec067188f36f36d7ffd087e7ac06c69617) by [@sbuggay](https://github.com/sbuggay))
#### Android specific
- **Codegen:** Fix IOException in `BuildCodegenCLITask` ([9147b0753a](https://github.com/facebook/react-native/commit/9147b0753a6c3afb2480b079f91614cd7189a28a) by [@vonovak](https://github.com/vonovak))
- **Docs:** Improve ToastAndroid jsdocs ([299a7a959d](https://github.com/facebook/react-native/commit/299a7a959d34cda9900acb7318aabf7262acc23e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Gradle:** Add support for Gradle Configuration caching ([e41887e62f](https://github.com/facebook/react-native/commit/e41887e62fcaf5a8d6bfc2817f88298b49d1b7a5) by [@cortinico](https://github.com/cortinico))
- **Initialization:** On `DefaultNewArchitectureEntryPoint` class add property to specify the desired release level for an application ([19c18eb995](https://github.com/facebook/react-native/commit/19c18eb9957f711ab63a9e3a334972389162bde8) by [@jorge-cab](https://github.com/jorge-cab))
- **Initialization:** Set ReactSurface and ReactRootView to ReactDelegate when created via ReactNavigationActivityDelegate ([a302fbcaaf](https://github.com/facebook/react-native/commit/a302fbcaaf69c8f019a212f7b9b839fa1ddd6b2f) by Maddie Lord)
## v0.77.0-rc.0
#### iOS specific
- **Initialization:** Encapsulate device info listeners ([7dc85d0e97](https://github.com/facebook/react-native/commit/7dc85d0e9765e7f633285843506b8832ff13db9f) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Inform users about JSC being moved to a different repo ([13177b3025](https://github.com/facebook/react-native/commit/13177b3025d06c93fb2634a19e0033b8ac4f67a7) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Js runtime C API for Swift ([a6607c07cd](https://github.com/facebook/react-native/commit/a6607c07cda6bb24c12b41761598b84ce8e028cd) by [@okwasniewski](https://github.com/okwasniewski))
- **Runtime:** Added custom load js block in bridge mode ([1e9ac296a5](https://github.com/facebook/react-native/commit/1e9ac296a59f3698ca656ef0161e93ba9dc941c8) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Missing nonnull annotations for RCTArchConfiguratorProtocol, RCTUIConfiguratorProtocol.h ([0141a44026](https://github.com/facebook/react-native/commit/0141a44026a62074d1288963d243a55216c2e4d7) by [@okwasniewski](https://github.com/okwasniewski))
- **TextInput:** Add support for `numberOfLines` prop on `TextInput` ([dcaa33e6d9](https://github.com/facebook/react-native/commit/dcaa33e6d9d59b7d32bbdc14a91b297b6d68cee1) by [@j-piasecki](https://github.com/j-piasecki))
### Breaking
- **APIs:** Deep imports to modules inside React Native libraries with `require` syntax will now require to append an explicit `.default`. Here the list of affected modules:
- `Libraries/Alert` and `Libraries/ActionSheetIOS` ([c89c5d7e3d](https://github.com/facebook/react-native/commit/c89c5d7e3d981e5e11ae926bdd83567cbe61201a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BatchedBridge` and `Libraries/AppState` ([135277ace1](https://github.com/facebook/react-native/commit/135277ace118b1fbc11e222624f871221d1a3b72) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Blob` ([9a70bc0418](https://github.com/facebook/react-native/commit/9a70bc041889d961c2c5ee3f58d6a135111bc0a4) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/BugReporting`, `Libraries/vendor`, `Libraries/Vibration` and `Libraries/YellowBox` ([09700327f7](https://github.com/facebook/react-native/commit/09700327f7294ed5242fb6af7804e124183ebc64) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([9eeef22a67](https://github.com/facebook/react-native/commit/9eeef22a67ff74ccc2d20647624bee26211a3ab5) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([aac312da8e](https://github.com/facebook/react-native/commit/aac312da8e23b865027e89a93ecb9cc89bfb9860) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([ce412746b1](https://github.com/facebook/react-native/commit/ce412746b1635dce3162eb798f59f604dd1bbb03) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Components` ([da695f3a20](https://github.com/facebook/react-native/commit/da695f3a2084f9742d2c75e1b6c5dfa0dba23580) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/DevMenu` ([ce84922236](https://github.com/facebook/react-native/commit/ce849222365a5990b0127fe62739cb2794b31568) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/EventEmitter` and `Libraries/Image/*.js` ([8783196ee5](https://github.com/facebook/react-native/commit/8783196ee540f8f78ce60ad20800338cc7645194) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Interaction` ([bdc23fa2b4](https://github.com/facebook/react-native/commit/bdc23fa2b44401c0c6e66d8cf9a0df542ee2c871) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/LayoutAnimation` and `Libraries/Linking` ([4d6785bdb5](https://github.com/facebook/react-native/commit/4d6785bdb53a94d650364ef7b5821fab16c39ae3) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Lists` ([e767dc3458](https://github.com/facebook/react-native/commit/e767dc3458c6665e9f63cf0723f12c9beab6724a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Modal` and `Libraries/Network` ([28945c68da](https://github.com/facebook/react-native/commit/28945c68da056ab2ac01de7e542a845b2bca6096) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/PermissionsAndroid` and `Libraries/PushNotificationIOS` ([e74246bd66](https://github.com/facebook/react-native/commit/e74246bd66fd434cefc8a5a0cc2b3ae7ea725816) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/ReactNative` ([c93bd436a5](https://github.com/facebook/react-native/commit/c93bd436a57c760461a269aced681854e5dd3f13) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/StyleSheet` ([4f20362b07](https://github.com/facebook/react-native/commit/4f20362b07c0b3daa14094a4b5d0dc41e2c956ca) by [@j-piasecki](https://github.com/j-piasecki))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([156ee5bee7](https://github.com/facebook/react-native/commit/156ee5bee7d2588399f2b8c19fa01ce40b8335d8) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Text`, `Libraries/Share` and `Libraries/Settings` ([1be7e1a95f](https://github.com/facebook/react-native/commit/1be7e1a95fed16c46767a7907ac864d5170ba540) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/BackHandler`, `Utilities/DevLoadingView.js` and `Utilities/HMRClient*.js` ([827a847791](https://github.com/facebook/react-native/commit/827a8477912f56e3d0d2b50007a4c06a6468a0bc) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/differ/...` ([2b30aa5cc8](https://github.com/facebook/react-native/commit/2b30aa5cc8fef42cf8bc110b8d48a201a3dc855a) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities/Platform` ([d98116aa44](https://github.com/facebook/react-native/commit/d98116aa44e4b90ccb19fd895433918396b0b932) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/Utilities` ([52ffda7e55](https://github.com/facebook/react-native/commit/52ffda7e55cf8330905d57869c0bb3b5793c0e58) by [@iwoplaza](https://github.com/iwoplaza))
- `Libraries/WebSocket` ([7df73eebdc](https://github.com/facebook/react-native/commit/7df73eebdc9716819d59a27e4bc783cb853c9775) by [@iwoplaza](https://github.com/iwoplaza))
- `react-native/virtualized-lists` ([1cf4c84ba0](https://github.com/facebook/react-native/commit/1cf4c84ba0f6f630d55ba0bebde122d742c419e8) by [@j-piasecki](https://github.com/j-piasecki))
- `StyleSheet/` ([e4d969a4ab](https://github.com/facebook/react-native/commit/e4d969a4ab71693f38837271356361a3d9df8c5d) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/binaryToBase64`, `Utilities/DevSettings`, `Utilities/PolyfillFunctions` and `Utilities/RCTLog` ([152587cda0](https://github.com/facebook/react-native/commit/152587cda06ec3bb2274ec0182114c85c41507d3) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/deepFreezeAndThrowOnMutationInDev`, `Utilities/defineLazyObjectProperty`, `Utilities/DeviceInfo` and `Utilities/FeatureDetection` ([028c0b36f6](https://github.com/facebook/react-native/commit/028c0b36f637b31d013bab88e0c834ea8174b4e1) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/dismissKeyboard.js`, `Utilities/GlobalPerformanceLogger.js` and `Utilities/SceneTracker.js` ([fc6ca26d3f](https://github.com/facebook/react-native/commit/fc6ca26d3f97e5a839313803635b38eb468b10b9) by [@iwoplaza](https://github.com/iwoplaza))
- `Utilities/infoLog`, `Utilities/logError`, `Utilities/mapWithSeparator` and `Utilities/warnOnce` ([7aef81b984](https://github.com/facebook/react-native/commit/7aef81b9840074e85ef3a2e81d808009868cbbbf) by [@iwoplaza](https://github.com/iwoplaza))
([48d900b703](https://github.com/facebook/react-native/commit/48d900b703aa125f2bc6e7ab5a24de45572bc66b) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:**`Libraries/Core/ExceptionsManager` now exports a default `ExceptionsManager` object, and `SyntheticError` as a secondary export. ([e5818d92a8](https://github.com/facebook/react-native/commit/e5818d92a867dbfa5f60d176b847b1f2131cb6da) by [@iwoplaza](https://github.com/iwoplaza))
- **APIs:** Move `Libraries/Inspector/` modules to `src/private/` ([0bde08fe67](https://github.com/facebook/react-native/commit/0bde08fe67c57740118b2bda49fb1f6b427a118b) by [@huntie](https://github.com/huntie))
- **APIs:** Move `XHRInterceptor` API to `src/private/` ([389779c348](https://github.com/facebook/react-native/commit/389779c3482fac98f6ab9ad50ac194cabfe38a98) by [@huntie](https://github.com/huntie))
- **APIs:** Removed `Libraries/Animated/AnimatedWeb.js` file. ([ecae8a2908](https://github.com/facebook/react-native/commit/ecae8a29089130e0d30ef91c69077a17e9d2b67d) by [@iwoplaza](https://github.com/iwoplaza))
- **DevX:** Remove deprecated `unstable_enableLogBox` function. LogBox is enabled by default. ([7368265107](https://github.com/facebook/react-native/commit/7368265107ba31fbfc35bb481ab7fb5626bfe072) by [@huntie](https://github.com/huntie))
- **DevX:** Remove deprecated `YellowBox` and `console.ignoredYellowBox` APIs. Use `LogBox`. ([45a2d9c5a8](https://github.com/facebook/react-native/commit/45a2d9c5a80f93de907a73ee2d61518c4b528d9a) by [@huntie](https://github.com/huntie))
- **DevX:** Remove legacy Libraries/JSInspector modules ([9ba4dd81db](https://github.com/facebook/react-native/commit/9ba4dd81db08c401ef04fa60800585bf39c6dab3) by [@huntie](https://github.com/huntie))
- **DevX:** Remove some web debugging remnants ([9aae84a688](https://github.com/facebook/react-native/commit/9aae84a688b5af87faf4b68676b6357de26f797f) by [@NickGerleman](https://github.com/NickGerleman))
- **Libs:** Remove incorrect hwb() syntax support from normalize-color ([676359efd9](https://github.com/facebook/react-native/commit/676359efd9e478d69ad430cff213acc87b273580) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in box shadows ([8e2de303e3](https://github.com/facebook/react-native/commit/8e2de303e329e29728843dce4ff81177efca0a7a) by [@NickGerleman](https://github.com/NickGerleman))
- **StyleSheet:** Disallow invalid unitless lengths in filters ([b34e63539d](https://github.com/facebook/react-native/commit/b34e63539dc49b0b6586441f4df4d7d28fd47237) by [@NickGerleman](https://github.com/NickGerleman))
#### Android specific
- **APIs:** Make `ResponseUtil` internal ([360cbf7433](https://github.com/facebook/react-native/commit/360cbf7433f885522e2393802af5caf2b96d4595) by [@mateoguzmana](https://github.com/mateoguzmana))
- **APIs:** Removed `RuntimeConfig` class for Hermes which was unused. ([08ddc11269](https://github.com/facebook/react-native/commit/08ddc11269808da0adabb4139718d73310f2f2b7) by [@cortinico](https://github.com/cortinico))
- **APIs:** Reduce visibility of `FabricUIManager.setBinding()` method, unused outside of react native ([2a9a13d567](https://github.com/facebook/react-native/commit/2a9a13d567bb63dabcd698a2ad737ef3b5513a1f) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Remove `TLSSocketFactory` class ([e065411c91](https://github.com/facebook/react-native/commit/e065411c91f2592e172b1fa5e3c1348c04d513e6) by [@mateoguzmana](https://github.com/mateoguzmana))
- **API:**`RuntimeExecutor` and `RuntimeScheduler` constructors are now private, `MapBufferSoLoader` was removed as no longer required. ([6c8ace9b05](https://github.com/facebook/react-native/commit/6c8ace9b05898fd3bfd3673af1f99680d0c1ebb1) by [@javache](https://github.com/javache))
- **API:** Remove `DevSupportManagerFactory.launchJSDevtools` API ([514ec4192f](https://github.com/facebook/react-native/commit/514ec4192fbaa6922dac20a72c8902b921c5a97e) by [@huntie](https://github.com/huntie))
- **API:** Stable API - Make `AnimatedNodeWithUpdateableConfig` internal as it was not used in OSS ([54e0b69e7e](https://github.com/facebook/react-native/commit/54e0b69e7e325b667ef4b69eab0bfa123ce8e428) by [@cortinico](https://github.com/cortinico))
### Changed
- **Animated:** Introduced a feature flag to test an optimization in `Animated` to reduce memory usage. ([fb8a6a5bb0](https://github.com/facebook/react-native/commit/fb8a6a5bb08892d9d74c607ec99f4afc9c967b04) by [@yungsters](https://github.com/yungsters))
- **Animated:** The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects. ([e0c0476553](https://github.com/facebook/react-native/commit/e0c0476553912a864b1bf19a98678432afa57659) by [@yungsters](https://github.com/yungsters))
- **Animated:** When an Animated component is updated or unmounted, `AnimatedNode` instances will now detach in a microtask instead of synchronously in the commit phase of React. This will cause the completion callback of finished animations to execute after the commit phase instead of during it. ([50b75a74d1](https://github.com/facebook/react-native/commit/50b75a74d1d8f8f0237d044f6bf72d49ca9e5cf4) by [@yungsters](https://github.com/yungsters))
- **Codegen:** Replace jscodeshift with @babel/core ([8f19201](https://github.com/facebook/react-native/commit/8f19201c5edd7fd18ab1ada8d4df2a8c31be8d4d) by [@kitten](https://github.com/kitten))
- **Deps:** Bump Node 18 -> 20 to build React Native in OSS ([1fd3806ee9](https://github.com/facebook/react-native/commit/1fd3806ee9a8d463da9a2c29c6a8597da53a61e8) by [@cortinico](https://github.com/cortinico))
- **Deps:** Upgrade React DevTools to 6.1.0. ([07860545f5](https://github.com/facebook/react-native/commit/07860545f5994b1e1f395bec60012433d9abf2fe) by [@hoxyq](https://github.com/hoxyq))
- **Deps:** Upgrade React DevTools to 6.1.1. ([5c88633035](https://github.com/facebook/react-native/commit/5c886330359c04b953521a08e31eacd5aa399a9b) by [@hoxyq](https://github.com/hoxyq))
- **DevX:**`Debugger.scriptParsed` now includes the field `sourceMapURL` as a (rewritten) remote url as opposed to base64 data url ([ff2e40371e](https://github.com/facebook/react-native/commit/ff2e40371ec13d2fef54098c5391ca20292c572f) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** Removed a long-running loop causing the app to lag while attempting a connection to Metro ([9b977def6c](https://github.com/facebook/react-native/commit/9b977def6c228b3fdadc870ac0c34a422933560b) by [@EdmondChuiHW](https://github.com/Edmond
ChuiHW))
- **FeatureFlags:** Re-enable `enableFixForViewCommandRace` feature flag ([ae59702f8e](https://github.com/facebook/react-native/commit/ae59702f8ee89e7bddec971e0a041744cb91e65c) by [@okwasniewski](https://github.com/okwasniewski))
- **Flow:** Improved eventInitDict type in WebSocketEvent class ([fa2fac1372](https://github.com/facebook/react-native/commit/fa2fac137287781d5b582507251af0352e654cec) by [@coado](https://github.com/coado))
- **Flow:** Improved Props type in UnimplementedView ([b200c7cb2f](https://github.com/facebook/react-native/commit/b200c7cb2f714e162cfc1d45b59fca4a9253233a) by [@coado](https://github.com/coado))
- **Flow:** Improved types for exported Types and Properties in LayoutAnimation ([3c02738ec4](https://github.com/facebook/react-native/commit/3c02738ec4c36d8414493ef8f0016a809d849d33) by [@coado](https://github.com/coado))
- **Flow:** Improved types in AnimatedWeb ([647ca90a30](https://github.com/facebook/react-native/commit/647ca90a3007f4c8d1f93ee9c262022e04e76ff8) by [@coado](https://github.com/coado))
- **Flow:** Improved types in ScrollView ([1be2ba4597](https://github.com/facebook/react-native/commit/1be2ba4597fbe835ec461caa9dd838e4186b49eb) by [@coado](https://github.com/coado))
- **Flow:** Improved types in StatusBar by adding StackProps ([48cafc0b69](https://github.com/facebook/react-native/commit/48cafc0b6971f7e1ddf3b6b37a66fdf0b3f08a88) by [@coado](https://github.com/coado))
- **Flow:** Improved types in TextAncestor ([df9d43f02b](https://github.com/facebook/react-native/commit/df9d43f02b3605e40f068bf5ba424e978af17a8f) by [@coado](https://github.com/coado))
- **Flow:** Improved types in WebSockertInterceptor callbacks ([d2adb976ab](https://github.com/facebook/react-native/commit/d2adb976abebcb0f38750903d98fbb5a3f50924b) by [@coado](https://github.com/coado))
- **Flow:** Refactored `Libraries/Components/StaticRenderer` syntax ([0e6cb590ec](https://github.com/facebook/react-native/commit/0e6cb590eca4f31c466f82c278f1f38f6273ed62) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in CodegenTypes with Object type ([812c3b33cd](https://github.com/facebook/react-native/commit/812c3b33cde53b47bcc43f2dd70cc780da5a4ae0) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in InteractionManager to Function type ([cd7a30ce48](https://github.com/facebook/react-native/commit/cd7a30ce4842ed58775512d244b6a9ed18956d4d) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in NativeModules with any type ([286a360d9b](https://github.com/facebook/react-native/commit/286a360d9b13d37f43fde74b66318aa73a7bc1f7) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe in RCTDeviceEventEmitter with any ([8df6cfa56b](https://github.com/facebook/react-native/commit/8df6cfa56be1a9b38fba30cc074f8147ebc05928) by [@coado](https://github.com/coado))
- **Flow:** Replaced $FlowFixMe with PressEvent in ScrollViewNativeComponentType ([8befab1760](https://github.com/facebook/react-native/commit/8befab17604c7758358bc834beb5f9c02026e9ac) by [@coado](https://github.com/coado))
- **Metro:** Update Metro to ^0.82.0 ([8421b8a872](https://github.com/facebook/react-native/commit/8421b8a8723633da9806e2db37a43add5de8761c) by [@robhogan](https://github.com/robhogan))
- **TypeScript:** Improve TypeScript types for `global` objects ([094c5be42e](https://github.com/facebook/react-native/commit/094c5be42eace6eb83fabc1f46336745c6879401) by [@coado](https://github.com/coado))
- **TypeScript:** Increase minimum typescript version in index.d.ts ([721f85adf7](https://github.com/facebook/react-native/commit/721f85adf7336cb07dafbfd98f9612f2e2b43268) by [@coado](https://github.com/coado))
- **TypeScript:** Move view flattening props to cross platform type interface ([ecad90ad8b](https://github.com/facebook/react-native/commit/ecad90ad8b68c623d028938cf84d1dbccc45e45f) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Deps:** Bump AGP to 8.8.2 ([2062defb2d](https://github.com/facebook/react-native/commit/2062defb2d9ce218056f072fb7f1b00375336bcf) by [@cortinico](https://github.com/cortinico))
- **Deps:** Gradle to 8.13 ([b95424d159](https://github.com/facebook/react-native/commit/b95424d1596a5b562b4fc5a0da38b7d9efab2f19) by [@cortinico](https://github.com/cortinico))
- **Deps:** Update androidx app compat to 1.7.0 ([b0fd9c1556](https://github.com/facebook/react-native/commit/b0fd9c155697ebc105cee99ce79b84ca43e491a5) by [@janicduplessis](https://github.com/janicduplessis))
- **Gradle:** Better compatibility with Kotlin 2.1.x ([a0528d834c](https://github.com/facebook/react-native/commit/a0528d834c644766a78cff8b092ca1c5447e20b5) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Add option to disable bundle compression to improve startup time ([778382ad3d](https://github.com/facebook/react-native/commit/778382ad3d8f5ecc4535ed44b2cd508475a97beb) by [@mrousavy](https://github.com/mrousavy))
- **Initialization:** Allow passing custom JSRuntimeFactory to DefaultReactHost ([cdc166709d](https://github.com/facebook/react-native/commit/cdc166709d247dbcff6b390d1f51840c9f330a69) by [@Kudo](https://github.com/Kudo))
- **JSC:** Add a build time JSC lean core warning ([90e27c2b4f](https://github.com/facebook/react-native/commit/90e27c2b4f6c831922e61b370342ced328cb705d) by [@Kudo](https://github.com/Kudo))
- **JSC:** Exclude `jsctooling` when `useThirdPartyJSC` gradle property is true ([66032f22b8](https://github.com/facebook/react-native/commit/66032f22b8cab9fb7ad4c26d508e2d9bba3ae308) by [@Kudo](https://github.com/Kudo))
- **Runtime:** Feature flags for recycling View, Text components separately ([ca5ce205f7](https://github.com/facebook/react-native/commit/ca5ce205f71f1af9cd42d4677c2b5a8dee684abb) by Thomas Nardone)
- **Runtime:** Introduces BuildConfig.UNSTABLE_ENABLE_MINIFY_LEGACY_ARCHITECTURE to determine if the new architecture is fully enabled into an Android app ([b45a3e5cd8](https://github.com/facebook/react-native/commit/b45a3e5cd81997e11b763073daf0a7f5b78188f8) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **CocoaPods:** Fix Gemfile versions ([2527d29a96](https://github.com/facebook/react-native/commit/2527d29a96216fbaafd4f98fd7a931b9330e0570) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Generate the ReactCodegen.podspec as part of codegen instead of as part of pod install. ([dab9b3b440](https://github.com/facebook/react-native/commit/dab9b3b44015acd1d2e462d3d0dc2597a99b16a9) by [@cipolleschi](https://github.com/cipolleschi))
- **Cocoapods:** Ignore deprecation warning when calling pod install through core-cli-utils ([4141560afc](https://github.com/facebook/react-native/commit/4141560afc06a38bc23cdcaa6a31e6f41e6e5408) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Invoke Codegen as part of the Core-cli-utils package ([cc1e8d1523](https://github.com/facebook/react-native/commit/cc1e8d1523bee3880f0a038c550b8e2131d5a535) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Stop running codegen when running pod install ([f15094ef88](https://github.com/facebook/react-native/commit/f15094ef880218a0517863e6cf7d11247be66bfb) by [@cipolleschi](https://github.com/cipolleschi))
- **JSC:** Decouple JSC when `USE_THIRD_PARTY_JSC=1` ([176bed79b4](https://github.com/facebook/react-native/commit/176bed79b4c69455f16527512feb87c67e6f89de) by [@Kudo](https://github.com/Kudo))
- **NativeModules:** Properly handle `null` values coming from NativeModules. ([d4236791e2](https://github.com/facebook/react-native/commit/d4236791e238a614d2fadf5c5659874d983ab029) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Moved workaround for multiline text measurement with `maximumNumberOfLines` earlier in the pipeline ([167a1a30da](https://github.com/facebook/react-native/commit/167a1a30daab588982638dc878b434688653df47) by [@j-piasecki](https://github.com/j-piasecki))
### Deprecated
- **DevX:** Deprecated usage of `HERMES_ENABLE_DEBUGGER` build-time flag for enabling React Native debugger in favour of `REACT_NATIVE_DEBUGGER_ENABLED` and `REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY`. ([5fcb69e8b7](https://github.com/facebook/react-native/commit/5fcb69e8b7756434ee4bcd9e3d19cc3c719920c7) by [@hoxyq](https://github.com/hoxyq))
#### iOS specific
- **CocoaPods:** Deprecate calling `pod install` directly ([e3def00d7a](https://github.com/facebook/react-native/commit/e3def00d7a9567f5879a6cd0dfed161bc1aaa176) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Deprecate RCTAppDelegate ([74de9526ab](https://github.com/facebook/react-native/commit/74de9526ab6c1fb1f627f340653cb78d898ca698) by [@okwasniewski](https://github.com/okwasniewski))
#### Android specific
- **Layout:**`ViewManagerPropertyUpdater.updateProps` is deprecated, use the related ViewManager APIs instead ([a18bc58645](https://github.com/facebook/react-native/commit/a18bc5864508e9073fa3190d786a68761fb45073) by [@javache](https://github.com/javache))
- **Layout:** Deprecated ViewManagerDelegate#setProperty and ViewManagerDelegate#receiveCommand ([5a290c4cab](https://github.com/facebook/react-native/commit/5a290c4cab6f58744a9252687feefd8b6a8d3305) by [@javache](https://github.com/javache))
### Fixed
- **C++:** Add default case to `displayModeToInt()` function ([8c06f57860](https://github.com/facebook/react-native/commit/8c06f57860278cd4ff4a03bf182d22a27fcd0779) by [@Yajur-Grover](https://github.com/Yajur-Grover))
- **C++:** Add explicit casts for pointerIds for PointerEvents in NativeDOM ([94ea10c693](https://github.com/facebook/react-native/commit/94ea10c6939f915251520b49aeb131917364c078) by [@jonthysell](https://github.com/jonthysell))
- **Codegen:** Fix codegen to avoid the creation of `<appName>,` folders ([9498b71438](https://github.com/facebook/react-native/commit/9498b714381d060109fa6a9673db264bc6659f64) by [@cipolleschi](https://github.com/cipolleschi))
- **DevX:** Always patch React DevTools first so StrictMode dim chars are excluded from logs/logbox. ([e015d1b19a](https://github.com/facebook/react-native/commit/e015d1b19a2d6894badbe5525c7e53f2c2e21742) by [@rickhanlonii](https://github.com/rickhanlonii))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **DevX:** FindNodeAtPoint now considers overflow area of the parent node ([d8bc7c68c0](https://github.com/facebook/react-native/commit/d8bc7c68c0a6ea2dee73edc3270dbdcb3b132af9) by [@hoxyq](https://github.com/hoxyq))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([7926d656b3](https://github.com/facebook/react-native/commit/7926d656b30667a026a5bc85da61696e915893bf) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([a672a4d007](https://github.com/facebook/react-native/commit/a672a4d0073a282ba9de1ca24a563833530f0d60) by [@tido64](https://github.com/tido64))
- **JS:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([cdaa1aa9aa](https://github.com/facebook/react-native/commit/cdaa1aa9aa330bc6c58d902a89f515d30288698f) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Codegen:** Improve input files for codegen gradle task ([e9e0d8c2f7](https://github.com/facebook/react-native/commit/e9e0d8c2f79e4077445c28e459ba0e5981da478b) by [@janicduplessis](https://github.com/janicduplessis))
- **Image:** Fix Image defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@mateoguzmana](https://github.com/mateoguzmana))
- **JS:** GetAndroidResourceFolderName() should return raw folder for svg file ([3a4798cc30](https://github.com/facebook/react-native/commit/3a4798cc30a53ba5ca428845d56fbeca43ef4524) by [@sunnylqm](https://github.com/sunnylqm))
- **Layout:** Elevation prop on android has incorrect border-radius ([f7d78f81cc](https://github.com/facebook/react-native/commit/f7d78f81cc971be2dcf5476c790556df4220b2bc) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Fix inset boxShadow when blur < spread ([a3b29e1441](https://github.com/facebook/react-native/commit/a3b29e1441f86fab624f21d977681f39f9acf549) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix issue where boxShadow crashes with small blur radius ([103f8b3885](https://github.com/facebook/react-native/commit/103f8b38856cad04e93d5b404024c28adbf52cee) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fixed anti-aliasing not showing on older Android versions ([6c6e0a9085](https://github.com/facebook/react-native/commit/6c6e0a90855ac070742ce1923204115cbf2528f8) by [@jorge-cab](https://github.com/jorge-cab))
- **Layout:** Make `setLayoutAnimationEnabledExperimental` a no-op in Bridgeless ([44da5d2ee0](https://github.com/facebook/react-native/commit/44da5d2ee07d06a0e11b626e2641e255f0ffde9f) by [@arushikesarwani94](https://github.com/arushikesarwani94))
- **Libs:** Fix react-native/popup-menu-android not building for 3rd party developers ([e96396bd18](https://github.com/facebook/react-native/commit/e96396bd184471ff8d7a69b4775d851076231b47) by [@cortinico](https://github.com/cortinico))
- **Modal:** Fixed crash with Modal when trying to call syncSystemBarsVisibility() ([141fb23bba](https://github.com/facebook/react-native/commit/141fb23bba7120e515902f7bdebd87297d7aca92) by [@alanleedev](https://github.com/alanleedev))
- **Modal:** Sync Modal system bars visibility with current activity ([7016225062](https://github.com/facebook/react-native/commit/701622506248022c3a2fcea1c0066bba6e80232a) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Runtime:** Marked acquireWakeLockNow as static ([2a58201322](https://github.com/facebook/react-native/commit/2a582013228d7b729141c781ac98034f8a70578b) by [@mstrokin](https://github.com/mstrokin))
- **Runtime:** Make DefaultReactNativeHost.clear() also invalidate DefaultReactHost ([07769d4d7e](https://github.com/facebook/react-native/commit/07769d4d7eb1d3000210c7a8dafd9a5411694444) by [@WoLewicki](https://github.com/WoLewicki))
- **Runtime:** Pass the bundle URL protocol when setting up HMR client on Android ([ba894c908a](https://github.com/facebook/react-native/commit/ba894c908a02a84596525872b6232accc1acfaea) by [@byCedric](https://github.com/byCedric))
- **ScrollView:** Scroll view throttle no longer impacts events other than `onScroll` ([bc810e5115](https://github.com/facebook/react-native/commit/bc810e5115256e4fb5330b21c3a5d9ee3dd9a00c) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Text:** Allow text links to be navigable via keyboard by default ([98b0991128](https://github.com/facebook/react-native/commit/98b0991128c902bbe273f519ac79ac0676cef1c0) by [@joevilches](https://github.com/joevilches))
- **Text:** Fix text link accessibility on state update removal ([c9e6567881](https://github.com/facebook/react-native/commit/c9e6567881b2a596677b1b14d1c1d2537fec507d) by [@joevilches](https://github.com/joevilches))
- **TextInput:** Avoid `ConcurrentModificationException` when iterating over `mListeners``TextWatcher` array ([243aecc095](https://github.com/facebook/react-native/commit/243aecc095c20f8295fdefa8fc3e3ac8a7691043) by [@kirillzyusko](https://github.com/kirillzyusko))
- **TextInput:** TextInputs can now receive focus via external keyboard ([3420eb87b0](https://github.com/facebook/react-native/commit/3420eb87b01f42092c1691a1f6544f20d244cc60) by [@joevilches](https://github.com/joevilches))
#### iOS specific
- **C++:** Update deprecated enums in RCTTextPrimitivesConversions.h ([4121d24454](https://github.com/facebook/react-native/commit/4121d24454433ab007b664076ee00a951494fb4d) by [@joannaquu](https://github.com/joannaquu))
- **CocoaPods:**`JSRuntimeFactoryCAPI.h` build error for `use_frameworks` build ([7786805337](https://github.com/facebook/react-native/commit/7786805337526fa6e8ed758407b78884a37b89ef) by [@Kudo](https://github.com/Kudo))
- **CocoaPods:** Make sure 3p libraries depends on React-renderercss to work with use_frameworks ([cc12caa0a9](https://github.com/facebook/react-native/commit/cc12caa0a9dcb08d11fe18c9b34290352ca1909e) by [@cipolleschi](https://github.com/cipolleschi))
- **CocoaPods:** Compatibility with Ruby 3.4.0 ([b1735bc593](https://github.com/facebook/react-native/commit/b1735bc5936ebe352b4ab27604a3ae85980121f1) by [@okwasniewski](https://github.com/okwasniewski))
- **CocoaPods:** Fix wrong cocoapods script on new_architecture.rb ([541e655832](https://github.com/facebook/react-native/commit/541e655832acaed7836c23326cfc62fd0ba5521f) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Codegen:** Enable use of multiple `RCTAppDependencyProvider` instances ([0cc1ac18cf](https://github.com/facebook/react-native/commit/0cc1ac18cf7f2a99500ef6f315c4dccda7736ea0) by [@vonovak](https://github.com/vonovak))
- **DeviceInfo:** Data race related to read/write of RCTDeviceInfo._invalidated. ([2a18d83521](https://github.com/facebook/react-native/commit/2a18d83521b30642a7e403fd55a5afd4ef2d8cb4) by [@hakonk](https://github.com/hakonk))
- **DevX:** Issue where performance monitor would be hidden under newly presented views. ([e7556e921c](https://github.com/facebook/react-native/commit/e7556e921c07692012a4295dd7d84fe23f5838a5) by [@chrsmys](https://github.com/chrsmys))
- **DevX:** Remove private symbols for non-simulator and non-catalyst builds. ([9350d6f2f5](https://github.com/facebook/react-native/commit/9350d6f2f5473cddc6ea4c13602c9f80c9c40916) by [@EvanBacon](https://github.com/EvanBacon))
- **Infra:** Workaround for a iOS build app running on Apple Silicon Mac(in Xcode Destination: "Mac(Designed for iPad)") TextInput crash due to serialization attempt of WeakEventEmitter ([0511e2e49a](https://github.com/facebook/react-native/commit/0511e2e49a51ab32aa6f40df7c6b3dde92b09031) by [@iwater](https://github.com/iwater))
- **Initialization** Make React Native work without AppDelegate window property ([ae7bbe06c9](https://github.com/facebook/react-native/commit/ae7bbe06c9a4e47e1aa6cfa5cca7f6aa5a8ff83b) by [@okwasniewski](https://github.com/okwasniewski))
- **JSC:** Return nullptr when USE_THIRD_PARTY_JSC is set to true ([515ff1e626](https://github.com/facebook/react-native/commit/515ff1e626110116f272428d1d182eedcff2deab) by [@okwasniewski](https://github.com/okwasniewski))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([acaf94dc21](https://github.com/facebook/react-native/commit/acaf94dc214867633a50b113d9925335a0d59099) by [@joevilches](https://github.com/joevilches))
- **Layout:** Fix cases where background color, filter, and background image were sized incorrectly if there was a scaling transform ([f835b824f4](https://github.com/facebook/react-native/commit/f835b824f43ae54ee6d4e4b72101638bbd5f365d) by [@joevilches](https://github.com/joevilches))
- **Layout:** Improve detached keyboard detection, support Stage Manager on iOS ([c499ae1192](https://github.com/facebook/react-native/commit/c499ae1192ec178e4d20f8ed4ae03ff3e077bf65) by [@mhoran](https://github.com/mhoran))
- **Layout:** Layout direction changes are now honored on bundle reload. ([36f29beac4](https://github.com/facebook/react-native/commit/36f29beac47259768612bf56e5d9acfa4b94ab1a) by [@chrsmys](https://github.com/chrsmys))
- **Layout:** Suppressed iOS 13 deprecation warnings in RCTStatusBarManager ([fffd6d75b4](https://github.com/facebook/react-native/commit/fffd6d75b48ae1f6c78dbc0f7e9b6fe509df3394) by Ingrid Wang)
- **Native Module:** Add guard for custom module provider lookup in TMManager ([d0a101fbea](https://github.com/facebook/react-native/commit/d0a101fbeaec0bdace3a680078e0acc8635b5c3e) by [@shwanton](https://github.com/shwanton))
- **PullToRefresh:** Fix new arch recycled RefreshControl was missing its title ([e3d607fc2e](https://github.com/facebook/react-native/commit/e3d607fc2ea18c7ad9474d72cf18b1328d6647f7) by [@High5Apps](https://github.com/High5Apps))
- **Runtime:** Convert to JSException only NSException from sync methods ([9805a4f](https://github.com/facebook/react-native/commit/9805a4f89a8b23b5aa7201ed1013e5da5932e084) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Handle null params in the Interop TM layer ([6314925](https://github.com/facebook/react-native/commit/63149256c0e19ecbd008d1bf8f0ff1e79bb63cf2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Call RCTInitializeUIKitProxies before bridge create ([a51fa6c002](https://github.com/facebook/react-native/commit/a51fa6c0028a5bc9afb89656f1aeb41847b7fe8e) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Fixed: extraModulesForBridge callback not called when New Architecture enabled ([c0a5c2c3cb](https://github.com/facebook/react-native/commit/c0a5c2c3cb883dc68e98d2720b194df17d0b9ee7) by Bruno Aybar)
- **Runtime:** Enable back the opt-out from the New Architecture ([9abdd619da](https://github.com/facebook/react-native/commit/9abdd619da110dbe227c387179a449623395c7b2) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Add missing loadFromSource method in the DefaultRNFactoryDelegate ([7739615e0d](https://github.com/facebook/react-native/commit/7739615e0d614a93f297b70ef0947dddf3d1ba6e) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** App crash caused by the `[RCTFileRequestHanlder invalidate]` method ([789ed7d5ad](https://github.com/facebook/react-native/commit/789ed7d5ad75ad4c20ecd1eb19d1fc18275fc500) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Bridge: Fixes HostTarget use after free when deallocated bridge ([3e2e8ec757](https://github.com/facebook/react-native/commit/3e2e8ec7579fa72af09f016753c167952dffaf43) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Text:** Fixed onPress for Text with nested View. ([6b2c40c64f](https://github.com/facebook/react-native/commit/6b2c40c64f8278785d7e37f908918e0344ba278f) by [@coado](https://github.com/coado))
- **TextInput:** Fix selection makes TextInput clear its content when using children ([e3b176a598](https://github.com/facebook/react-native/commit/e3b176a598bd47338b52522f05893f781e3a7744) by Olivier Bouillet)
- **TextInput:** Fixed TextInput's `onContentSizeChange` event being dispatched multiple times with the same size ([2bb65717b7](https://github.com/facebook/react-native/commit/2bb65717b7b86d19e4d35707003df7d5be31c2fb) by [@j-piasecki](https://github.com/j-piasecki))
- **TextInput:** Implement `dataDetectorTypes` in the same way as the old architecture ([2ae45ec3ce](https://github.com/facebook/react-native/commit/2ae45ec3ce50cb9d95782173f6dfca74e8110848) by [@VidocqH](https://github.com/VidocqH))
### Removed
- **C++:** Removed `RawProps::operator=` ([e4d1cf8ce9](https://github.com/facebook/react-native/commit/e4d1cf8ce994d39ed67a660888cbeef2fba83b36) by [@javache](https://github.com/javache))
- **JS**: Removed context from addEventListener arguments in Linking ([1536a7f196](https://github.com/facebook/react-native/commit/1536a7f1960f21e56d2e4730a5ca8524b49530df) by [@coado](https://github.com/coado))
#### iOS specific
- **JSC:** Clean up RCTBridgeDelegate to remove shouldBridgeUseCustomJSC method ([c8f1506f13](https://github.com/facebook/react-native/commit/c8f1506f13310ffafe370273805684e696d72d50) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Layout:** Remove no longer needed UISceneDelegate ([a033cf9d5e](https://github.com/facebook/react-native/commit/a033cf9d5e8ffbda8b6f86cf3ce152b4ccb73187) by [@okwasniewski](https://github.com/okwasniewski))
## v0.78.2
### Changed
- **Deps:** Metro minimum to 0.81.3, fix "_interopRequireDefault is not a function" ([23c9dbc563](https://github.com/facebook/react-native/commit/23c9dbc563637a6b8c22c1b9d86fa03b65bde520) by [@robhogan](https://github.com/robhogan))
### Fixed
#### Android specific
- **Runtime:** Fixes issue with z-indexed sibling removal ([34ae9facd5](https://github.com/facebook/react-native/commit/34ae9facd52b5da28b5ced22110532bbcdad2cec) by [@rozele](https://github.com/rozele))
#### iOS specific
- **RCTNetworking:** app crash caused by the `[RCTFileRequestHanlder invalidate]` method ([5861f7eea7](https://github.com/facebook/react-native/commit/5861f7eea79767f14a06719937cbdabed39be9c9) by [@zhouzh1](https://github.com/zhouzh1))
- **Runtime:** Implement the `loadSourceForBridge:onProgress:onComplete` in the `RCTDefaultReactNativeFactoryDelegate`. ([8b33668c43](https://github.com/facebook/react-native/commit/8b33668c4338d31c27e6bd90b2a0e6fc0a077588) by [@cipolleschi](https://github.com/cipolleschi))
- **Text:** Fix selection makes TextInput clear its content when using children ([301532b51fe33cd08152c7dde2b15d57105332dd](https://github.com/facebook/react-native/commit/301532b51fe33cd08152c7dde2b15d57105332dd) by [freeboub](https://github.com/freeboub))
- **TurboModules:** Make sure the TM infra does not crash on NSException when triggered by async method ([ae1841ac964](https://github.com/facebook/react-native/commit/ae1841ac9645c10d66aeef784579b94fa0169e03) by [@cipolleschi](https://github.com/cipolleschi))
## v0.78.1
### Fixed
- **Deps:** community-cli-plugin: resolve cli-server-api via peer dependency on cli ([9ffbeadf8a](https://github.com/facebook/react-native/commit/9ffbeadf8a1ecfef1c0ac08bc39157ac6e17796e) by [@robhogan](https://github.com/robhogan))
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain ([9e47ed9a20](https://github.com/facebook/react-native/commit/9e47ed9a205184abf1d7eb422fb22ef27f18cae5) by [@vzaidman](https://github.com/vzaidman))
- **style:** Fix elevation with border-radius set (#48982) ([68dc582305](https://github.com/facebook/react-native/commit/68dc582305e2568245380ddca2ceaee3b5ec752f) by [@polovi](https://github.com/polovi))
#### iOS specific
- **Initialization:** Call `extraModulesForBridge` callback in the New Architecture. ([97adbd897f](https://github.com/facebook/react-native/commit/97adbd897f88d108f0be21a5895dadc74189b6fc) by [@Bruno125](https://github.com/Bruno125))
- **Initialization:** Added custom load js block in bridge mode ([bdc83cb129](https://github.com/facebook/react-native/commit/bdc83cb129757d6adc373c11535d78055727e3fa) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([282cdc9fb4](https://github.com/facebook/react-native/commit/282cdc9fb4a1ceac17b63584f9988d3192235885) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.78.0
### Breaking
- **Codegen:** Separate component array types and command array types ([825492b199](https://github.com/facebook/react-native/commit/825492b1999b62de708e6f40d5d5de8d3d7cb8a9) by [@elicwhite](https://github.com/elicwhite))
- **DevTools:** The `FuseboxClient.setClientMetadata` CDP method is removed. Instead, use `ReactNativeApplication.enable`. ([1a9780f0e3](https://github.com/facebook/react-native/commit/1a9780f0e3714ac18ffae34cb67376c711b0e031) by [@huntie](https://github.com/huntie))
#### Android specific
- **APIs:** Changed visibility of `FrescoBasedReactTextInlineImageViewManager` to internal ([d5f33c19cb](https://github.com/facebook/react-native/commit/d5f33c19cb33e2f2c7d2470cc90872c1f065f20d) by [@alanleedev](https://github.com/alanleedev))
- **APIs:** Migrating pointerEvents API breaks compatibility for kotlin usages of this api as a val ([45e4a3afce](https://github.com/facebook/react-native/commit/45e4a3afceb4be3047cd01a60ec2c9f806ed30fe) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Convert `RootView` to Kotlin ([21c9491926](https://github.com/facebook/react-native/commit/21c94919260a68409f82081740169d0409e78933) by [@fabriziocucci](https://github.com/fabriziocucci))
- **APIs:** Delete unused abstract class `GuardedResultAsyncTask` ([67bff8734f](https://github.com/facebook/react-native/commit/67bff8734f4b92fe399910eecad5b67511a749c1) by [@mdvacca](https://github.com/mdvacca))
- **APIs**: Delete deprecated class `FabricViewStateManager` ([b25b65ba19](https://github.com/facebook/react-native/commit/b25b65ba19f3c674fd2efe5c01123ccc0ae55cbf) by [@mdvacca](https://github.com/mdvacca))
- **APIs:** Removed `ComponentNameResolver` from public API ([a4849cb3d6](https://github.com/facebook/react-native/commit/a4849cb3d6f4245d15eb3812e417a9f4248bb3a1) by [@mdvacca](https://github.com/mdvacca))
#### iOS specific
- **Image:** Change Image load event size info from logical size to pixel ([09995fc874](https://github.com/facebook/react-native/commit/09995fc8741cfdc6095d09627262b4f6fbbaafc2) by [@zhongwuzw](https://github.com/zhongwuzw))
### Added
- **C++:** Added `RawValue(Runtime*, jsi::Value&)` constructor to make a `RawValue` from a `jsi::Value`. ([03d2186ace](https://github.com/facebook/react-native/commit/03d2186ace2cb17c676b7763d5a545759a658b77) by [@hannojg](https://github.com/hannojg))
- **Codegen:** Include cxx modules in codegen schema ([cf5ab03d43](https://github.com/facebook/react-native/commit/cf5ab03d4324b7e3fce38f9eacc96da82b11b68a) by [@elicwhite](https://github.com/elicwhite))
- **Deps:** Add `jest-diff v29.7.0` to devDependencies ([b27bd00a38](https://github.com/facebook/react-native/commit/b27bd00a389295250ec003357df713ebf306374b) by [@andrewdacenko](https://github.com/andrewdacenko))
- **Logging:** Add support for the second parameter of `console.table` to specify a list of columns to print in the table. ([fd0894b1c7](https://github.com/facebook/react-native/commit/fd0894b1c7fcb20dd213ec1e93aafef25935d709) by [@rubennorte](https://github.com/rubennorte))
- **Logging:** Add "jsEngine: hermes" to JS runtime Error prototype ([85bdd75828](https://github.com/facebook/react-native/commit/85bdd75828f85230aaa90ed510666457c46f996c) by Maddie Lord)
- **Metro:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([86db4fa90b](https://github.com/facebook/react-native/commit/86db4fa90b90919867a9b66f6caa28f77fba3a37) by [@huntie](https://github.com/huntie))
- **Text:** Added `pointerEvents` to `TextProps` type. ([3efbe33ce0](https://github.com/facebook/react-native/commit/3efbe33ce03f846932406742528652eb695b957d) by [@hyochan](https://github.com/hyochan))
#### Android specific
- **ActivityIndicator:** setting `resource-id` from the `testID` prop ([87b1bad45e](https://github.com/facebook/react-native/commit/87b1bad45e4eb730ea07686a2b2558253c60d3b7) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Codegen:** Fixing schema types for component command params of Arrays ([25c673e357](https://github.com/facebook/react-native/commit/25c673e35784d8d8c49555af104b9b4d8d37973d) by [@elicwhite](https://github.com/elicwhite))
- **Gradle:** Make the addition of JitPack repository configurable ([a98528e609](https://github.com/facebook/react-native/commit/a98528e609ff0ace4b7bc82f3aa273b7e3fa6443) by [@cortinico](https://github.com/cortinico))
- **Logging:** SoftException categories ([c832f94cf7](https://github.com/facebook/react-native/commit/c832f94cf713d0cb7616ef095f38583979e1cf43) by Thomas Nardone)
- **Logging:** Add logging in ReactInstanceManager.onHostPause when activity is incorrectly null ([c2fd35a442](https://github.com/facebook/react-native/commit/c2fd35a4429c752dc2d10a789e4c5f48d22b1eeb) by Maddie Lord)
- **Runtime:** Added `getState` method for `StateWrapperImpl` ([ed36e896ac](https://github.com/facebook/react-native/commit/ed36e896ac34fcbefece87456dbdfdff30d22ad5) by [@hannojg](https://github.com/hannojg))
#### iOS specific
- **Codegen:** Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries. ([98b8f17811](https://github.com/facebook/react-native/commit/98b8f178110472e5fed97de80766c03b0b5e988c) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Implement ReactNativeFactory ([081be01a5d](https://github.com/facebook/react-native/commit/081be01a5dd24d0a398c6aa8297575502a17d5ec) by [@okwasniewski](https://github.com/okwasniewski))
- **Text:** Support system font families (system-ui, ui-sans-serif, ui-serif, ui-monospace, and ui-rounded) on iOS ([1763321c89](https://github.com/facebook/react-native/commit/1763321c8960d30ddc4d3464a0fffdecdd44617a) by [@cxa](https://github.com/cxa))
- **TextInput:** Integrate a new property - `disableKeyboardShortcuts`. It can disable the keyboard shortcuts on iPads. ([0154372b93](https://github.com/facebook/react-native/commit/0154372b93eb1b02f0c62f2a75c95f4fc6a9f3e8) by [@rezkiy37](https://github.com/rezkiy37))
### Changed
- **Deps:** Bump Hermes ([0c8e15e8bb](https://github.com/facebook/react-native/commit/0c8e15e8bb16ec279290d2390caf75e83d52f518) by [@cipolleschi](https://github.com/cipolleschi))
- **Flow:** Improved types in `BoxInspector` and refactored a code ([f832c450a5](https://github.com/facebook/react-native/commit/f832c450a52c4c9d61c1d6b609fcad1332613556) by [@coado](https://github.com/coado))
- **Flow:** Improved types in StyleInspector and refactored a code ([49e5c58c59](https://github.com/facebook/react-native/commit/49e5c58c595265c9fffc84741aab6363d291f1f5) by [@coado](https://github.com/coado))
- **Flow:** Improved types in ElementBox and refactored a code ([2959d49e8d](https://github.com/facebook/react-native/commit/2959d49e8d09663f9ac437ffcb66d1c99162c6d0) by [@coado](https://github.com/coado))
- **Flow:** Improve types on BorderBox ([48a7840919](https://github.com/facebook/react-native/commit/48a784091989c695e3432cb8ba657139eb9f5e99) by [@coado](https://github.com/coado))
- **Flow:** Improve types on DrawerLayoutAndroid ([b5155fba89](https://github.com/facebook/react-native/commit/b5155fba895411e290faeeea06180fce24079f78) by [@huntie](https://github.com/huntie))
- **Logging:** Improved formatting of values logged via `console.table` (including Markdown format). ([7154c62afb](https://github.com/facebook/react-native/commit/7154c62afb5371f3f861663826792e41229c344a) by [@rubennorte](https://github.com/rubennorte))
- **Runtime:** Mark `intersectionRect` required in `NativeIntersectionObserverEntry` to reflect native logic. ([8681fc2ab2](https://github.com/facebook/react-native/commit/8681fc2ab20aa1e5937a0bf3fc58ed03c3e0ee23) by [@lunaleaps](https://github.com/lunaleaps))
- **Runtime:** ([9aa21b5e87](https://github.com/facebook/react-native/commit/9aa21b5e8765f14a9806eac435636b87f62178cc) by [@lunaleaps](https://github.com/lunaleaps))
- **TypeScript:** Upgrading `typescript-config` module version to `esnext` ([5370347f54](https://github.com/facebook/react-native/commit/5370347f54719f318a4e032aba6cbf2269e7c3d7) by [@mateoguzmana](https://github.com/mateoguzmana))
- **VirtualizedList:** Fix item disappearing with scroll in VirtualizedList ([df7b6ae092](https://github.com/facebook/react-native/commit/df7b6ae092d03385ebd05efd0f068c59e727f723) by [@Tom910](https://github.com/Tom910))
- **Yoga:** Update YGNodeStyleGetGap to return YGValue ([331d99a941](https://github.com/facebook/react-native/commit/331d99a94154678848628122e8fe3373ee67fb9b) by [@heoblitz](https://github.com/heoblitz))
#### Android specific
- **APIs:** Introduce new public API `ViewManagerInterface` ([40a0cdbc99](https://github.com/facebook/react-native/commit/40a0cdbc99746f18ca15c48f3d8f03cdad1635af) by [@mdvacca](https://github.com/mdvacca))
- **Deps:** Bumped Android Gradle Plugin (AGP) to 8.8.0 ([4c7c836ebf](https://github.com/facebook/react-native/commit/4c7c836ebf956c13fa327170adaec43a076226e7) by [@cortinico](https://github.com/cortinico))
- **Deps:** Bump Gradle to 8.12 ([5e6478954c](https://github.com/facebook/react-native/commit/5e6478954c77f64a9086757ed4a879e83a1ab404) by [@cortinico](https://github.com/cortinico))
- **Deps:** Update Fresco to 3.6.0 ([819b5c2c8d](https://github.com/facebook/react-native/commit/819b5c2c8dfad620152b159838575b6c03e18ffe) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Deps:** Migrate jsc-android to mavenCentral ([e42a3a6b84](https://github.com/facebook/react-native/commit/e42a3a6b842d71fc25419c02f6015863fa019f05) by [@Kudo](https://github.com/Kudo))
- **Image:** Replaced custom XML decoder with Fresco's built-in decoder ([6feb90bb29](https://github.com/facebook/react-native/commit/6feb90bb290ab460df8df2f6f01531a77aac9008) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Kotlin:** Migrate `ComponentNameResolver` to kotlin ([385b9f4265](https://github.com/facebook/react-native/commit/385b9f4265316a1e1cf8627ea7ed3bed790cc8c5) by [@mdvacca](https://github.com/mdvacca))
- **Kotlin:** Migrate `ReactSwitchManager` to Kotlin ([b886bc4db9](https://github.com/facebook/react-native/commit/b886bc4db970d8c70de1596dc3f88bdc398de482) by [@krozniata](https://github.com/krozniata))
#### iOS specific
- **Accessibility:** Reduce memory allocations when computing `accessibilityLabel` ([74bdab8bd8](https://github.com/facebook/react-native/commit/74bdab8bd8be2413734004145507c0688232053e) by [@sparga](https://github.com/sparga))
- **CocoaPods:** Properly inherit OTHER_CPLUSPLUSLAGS ([fa03840e68](https://github.com/facebook/react-native/commit/fa03840e688067bf16a7fb60c00efdc9a1813f92) by [@WoLewicki](https://github.com/WoLewicki))
- **CocoaPods:** Pin 'concurrent-ruby' to a working version ([198adb47af](https://github.com/facebook/react-native/commit/198adb47af3676c85b35adb308c110c1d87120c8) by [@cipolleschi](https://github.com/cipolleschi))
### Removed
#### Android specific
- **APIs:** Made `ReactCookieJarContainer` internal. ([18ebea533d](https://github.com/facebook/react-native/commit/18ebea533d348329926bd7782bb55469aa228a4a) by [@javache](https://github.com/javache))
- **Config:** Remove as_const option (on by default) in fbsource ([e5a526ff44](https://github.com/facebook/react-native/commit/e5a526ff44c25afd935d117d6d4d342f210553a6) by [@panagosg7](https://github.com/panagosg7))
- **Flow:** Remove comment syntax from ReactNativeTypes ([a80baac58e](https://github.com/facebook/react-native/commit/a80baac58e9f2fc62829ab76b929f5c8b21c05a5) by [@hoxyq](https://github.com/hoxyq))
- **Metro:** Removed `JSCHeapCapture` module, deprecated PackagerCommandListener#onCaptureHeapCommand ([e06fa5d102](https://github.com/facebook/react-native/commit/e06fa5d1026843ec4a2ba3dd209652dc5290c0ba) by [@javache](https://github.com/javache))
### Fixed
- **Animations:** Removed unnecessary state updates in React to reflect the current state of looping animations. ([6059660c60](https://github.com/facebook/react-native/commit/6059660c607f5b6edba08a12906f0f9d6cb15d34) by [@rubennorte](https://github.com/rubennorte))
- **Animations:** Animation.stop() executes when `animatedShouldUseSingleOp` is enabled. ([746d584a23](https://github.com/facebook/react-native/commit/746d584a23f303493faa4f9d857ec542257a92ae) by [@javache](https://github.com/javache))
- **Animations:** Fix buttons becoming unresponsive when transform is animated ([2204ec94d4](https://github.com/facebook/react-native/commit/2204ec94d4b67a9ba559db3f54a5a1ef91e0f233) by [@sammy-SC](https://github.com/sammy-SC))
- **C++:**`JSBigFileString` fails for non-zero offset arguments ([7d0338cb0b](https://github.com/facebook/react-native/commit/7d0338cb0b24926aff648a4c8ba5d77b052010cc) by [@jwajgelt](https://github.com/jwajgelt))
- **Config:** Disable `react-in-jsx-scope` rule in eslint config ([ea56c432b7](https://github.com/facebook/react-native/commit/ea56c432b7a577d3805d1a7b4b46596799dd892e) by [@matinzd](https://github.com/matinzd))
- **Deps:** Fix peer dependencies on React types to React 19 ([4368368ef5](https://github.com/facebook/react-native/commit/4368368ef5c3f3d08a66ee6c13222f6d81a2d2df) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Add missing `invariant` dependency ([ee8088b615](https://github.com/facebook/react-native/commit/ee8088b6157837c239db47ac5bd3a8603ceefc3c) by [@tido64](https://github.com/tido64))
- **Fantom:** Fix a bug when fantom tests could not be run in parallel, e.g. in a stress-test. ([8696b79f73](https://github.com/facebook/react-native/commit/8696b79f73fec18a9e3785b9a2c150afc9965d76) by [@mijay](https://github.com/mijay))
- **Logging:** Modified `console.table` to avoid mutating the received argument. ([caa77fbe2b](https://github.com/facebook/react-native/commit/caa77fbe2b03e6969ae9b542d011f926a0ede3c7) by [@rubennorte](https://github.com/rubennorte))
- **Text:** Fixed `adjustsFontSizeToFit` not working for text with a single character ([47822e9048](https://github.com/facebook/react-native/commit/47822e90480d61e197a3f223e088ee88a0f38ad7) by [@j-piasecki](https://github.com/j-piasecki))
- **Text:** Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture ([ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32](https://github.com/facebook/react-native/commit/ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32) by [@RickardZrinski](https://github.com/RickardZrinski))
#### Android specific
- **APIs** Re-introduce the deprecated constructor on ReactModuleInfo ([734730df75](https://github.com/facebook/react-native/commit/734730df75b3bdddeb5dbe65f4151cc92b988303) by [@cortinico](https://github.com/cortinico))
- **Dialog:**`FLAG_SECURE` not respected in Modal dialog ([7e029b0dcf](https://github.com/facebook/react-native/commit/7e029b0dcf6d1a6455a8a6343457b70e353d0ff6) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Events:** Fix crash for `setEventEmitterCallback` NoSuchMethodError on API lvl 26 ([7dcbc799eb](https://github.com/facebook/react-native/commit/7dcbc799eb2fb5792512b71320eafed08deec9ea) by [@cortinico](https://github.com/cortinico))
- **Gradle:** Fixed build issue when including mapbuffer jni headers in library code ([ecf17666ad](https://github.com/facebook/react-native/commit/ecf17666ad84e15d31944962e2d0e846a5670977) by [@hannojg](https://github.com/hannojg))
- **InteropLayer:** Fix execution of early InteropEvents ([4ed2b35bf6](https://github.com/facebook/react-native/commit/4ed2b35bf61426c81c9f8b30a142d77b44988fdb) by [@mdvacca](https://github.com/mdvacca))
- **JSC:** Fix JSC Debug instacrashing ([b10491a3c4](https://github.com/facebook/react-native/commit/b10491a3c457c802608758ca1fe659a72c18576b) by [@cortinico](https://github.com/cortinico))
- **JSC:**Fix JSC by avoiding use of unavailable `str.replaceAll()` ([b5b9e032c2](https://github.com/facebook/react-native/commit/b5b9e032c2b57aa44afb7141a879d83c8b889feb) by [@robhogan](https://github.com/robhogan))
- **Modal:** Setting `resource-id` from `testID` prop ([52b6592559](https://github.com/facebook/react-native/commit/52b65925595882d9b6c7f354a5ce3bfe3823738e) by [@mateoguzmana](https://github.com/mateoguzmana))
- **Networking:** ReactOkHttpNetworkFetcher – cache control headers getting overwritten by the rest of the headers ([81cb166d10](https://github.com/facebook/react-native/commit/81cb166d103f7caaa5135b5a1c66d4e978f3619f) by [@mateoguzmana](https://github.com/mateoguzmana))
- **DevTools:** Pass the bundle URL protocol when setting up HMR client on Android ([32fe244744](https://github.com/facebook/react-native/commit/32fe24474495f09f985a2c92e11103dd386f5fe3) by [@byCedric](https://github.com/byCedric))
- **Runtime:** Fix BackHandle callback undefined cause crash issue ([44705fe11b](https://github.com/facebook/react-native/commit/44705fe11bd9bb12c8f71d1e50a7b48e0af6a38d) by [@BleemIs42](https://github.com/BleemIs42))
- **Runtime:** Support Long values in WritableMap and WritableArray ([e7f943de2f](https://github.com/facebook/react-native/commit/e7f943de2fd71d2259ab53e7817d2dcf96559f7e) by [@WoLewicki](https://github.com/WoLewicki))
- **Runtime:**`SetColorScheme` should be called on the UI thread ([2aa79979d3](https://github.com/facebook/react-native/commit/2aa79979d3e4a54008f24c81b6c04553c98ff6b6) by lihaitao)
- **Style:** Fix background getting clipped when border-radius is set ([6d235853fb](https://github.com/facebook/react-native/commit/6d235853fb9e9ad4050ba5611d74921fa1b9c72d) by [@jorge-cab](https://github.com/jorge-cab))
- **Testing:** Handling `testID` correctly for horizontal scroll view ([81c74cd35f](https://github.com/facebook/react-native/commit/81c74cd35f9e40c8ad4663fc932d0dddeaa4bc19) by [@mateoguzmana](https://github.com/mateoguzmana))
- **TextInput:** Fix incorrect height of single line TextInputs without definite size ([9b646c8b7b](https://github.com/facebook/react-native/commit/9b646c8b7b9a23645b1563883768a9274897a1cd) by [@NickGerleman](https://github.com/NickGerleman))
- **Ccache:** Fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts ([d31ac832c5](https://github.com/facebook/react-native/commit/d31ac832c5b866653f7179fd517427f7be11ad45) by [@ste7en](https://github.com/ste7en))
- **CocoaPods:** Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning ([2f2281718a](https://github.com/facebook/react-native/commit/2f2281718a2ef905ffd15adf3b47a1b6b6fb8d95) by [@noway](https://github.com/noway))
- **Image:** Load images even when the extension is implicit ([b9f418e9bc](https://github.com/facebook/react-native/commit/b9f418e9bc35372438a34934254db985b7ad1840) by [@cipolleschi](https://github.com/cipolleschi))
- **Initialization:** Allow multiple RN instances to run at the same time ([444c7d4eff](https://github.com/facebook/react-native/commit/444c7d4eff3d4fbe25452c94cba7ffacb3c366cc) by [@cipolleschi](https://github.com/cipolleschi))
- **InteropLayer:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation ([3bd3f101b9](https://github.com/facebook/react-native/commit/3bd3f101b9dcff8551a2f8259ddeed9843fd69b8) by [@cipolleschi](https://github.com/cipolleschi))
- **InteropLayer:** Properly handle `null` value in TurboModule Interop layer ([ebfd7057af](https://github.com/facebook/react-native/commit/ebfd7057af049ebfbc593448918c70db37e39d48) by [@cipolleschi](https://github.com/cipolleschi))
- **JSC:** Fix Direct Debugging with JSC ([b04d17afca](https://github.com/facebook/react-native/commit/b04d17afcac82af1a47fd462a04fe4088d19b468) by [@Saadnajmi](https://github.com/Saadnajmi))
- **Keyboard:** Enable/disable keyboard shortcuts only on iOS ([8b0af4542e](https://github.com/facebook/react-native/commit/8b0af4542e6fd5628fefdc8e1699326c2225c3f0) by [@okwasniewski](https://github.com/okwasniewski))
- **RefreshControl:** Fix app becoming unresponsive when `RefreshControl` is used inside of <Modal /> ([6cb2684b43](https://github.com/facebook/react-native/commit/6cb2684b4343bd8698b9770c0f6ef8812683c783) by [@sammy-SC](https://github.com/sammy-SC))
- **DevTools:** Restore "Paused in debugger" overlay icon ([f30c46efbd](https://github.com/facebook/react-native/commit/f30c46efbd964d367f678181589865a3faa931cd) by [@robhogan](https://github.com/robhogan))
- **Runtime:** Emit `didUpdateDimensions` correctly ([920867d949](https://github.com/facebook/react-native/commit/920867d9494cbfcc9cb0e23607cb339ec1b89ca9) by TobiasH)
- **Runtime:** Fix `applicationDidEnterBackground` not being called ([adaceba546](https://github.com/facebook/react-native/commit/adaceba5462b4ad8676745f34e0be2bf5bb25166) by [@alextoudic](https://github.com/alextoudic))
- **Runtime:** Fixed problem with accessory view & 3rd party libs ([5fc582783d](https://github.com/facebook/react-native/commit/5fc582783d7f70ca9521e317c93624a8845bfff2) by [@kirillzyusko](https://github.com/kirillzyusko))
- **Style:** Dashed & dotted borders now work with overflow: hidden ([1b88c5b429](https://github.com/facebook/react-native/commit/1b88c5b429888e109b7acae4808b4b6f8b3f920f) by [@joevilches](https://github.com/joevilches))
- **Style:** Fixed `centerContent` losing taps and causing jitter ([fe7e97a2fd](https://github.com/facebook/react-native/commit/fe7e97a2fd272db0d9d9aa7d0561337a7c8e2c30) by [@gaearon](https://github.com/gaearon))
- **Xcode:** Properly escape paths in Xcode build script used when bundling an app. ([2fee13094b](https://github.com/facebook/react-native/commit/2fee13094b3d384c071978776fd8b7cff0b6530f) by [@kraenhansen](https://github.com/kraenhansen))
## v0.77.2
### Added
#### iOS specific
- **Codegen:** Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries. ([98b8f17811](https://github.com/facebook/react-native/commit/98b8f178110472e5fed97de80766c03b0b5e988c) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **DevTools:** Fix disconnections of DevTools when the network is under significant strain. ([b0974135bf](https://github.com/facebook/react-native/commit/b0974135bf1c0946d4a85bdc1fd423ff7dc612c5) by [@vzaidman](https://github.com/vzaidman))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([1f002f9999](https://github.com/facebook/react-native/commit/1f002f9999fb2a225f8e2cb3844badc97313b45f) by [@robhogan](https://github.com/robhogan))
- **Metro:** Bump minimum Metro to 0.81.3, fix "_interopRequireDefault is not a function" with enablePackageExports ([b335436113](https://github.com/facebook/react-native/commit/b335436113aa11cc4f17eb696368e05708374c33) by [@robhogan](https://github.com/robhogan))
#### Android specific
- **Fabric:** Avoid NPE when touch event is triggered before SurfaceManager is initiated ([b8095f4692](https://github.com/facebook/react-native/commit/b8095f4692610c7f4631b851dc7d8dc9b149a277) by [@CHOIMINSEOK](https://github.com/CHOIMINSEOK))
- **Image:** Fix defaultSource runtime error ([1c51b77868](https://github.com/facebook/react-native/commit/1c51b7786860fe364a115f7a4ed29228157f0f5c) by [@fbp93](https://github.com/fbp93))
#### iOS specific
- **Interop Layer:** Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules ([619d5dfbb2](https://github.com/facebook/react-native/commit/619d5dfbb280892fcc2a9f78d630eb88fb32960f) by [@cipolleschi](https://github.com/cipolleschi))
- **TextInput:** Fix crashes when any text is entered while running as iOS app on apple silicon mac ([8d7aca30e7](https://github.com/facebook/react-native/commit/8d7aca30e7fb50c9c069931a7ed67d8d4a745a2a) by [@zhongwuzw](https://github.com/zhongwuzw))
## v0.77.1
### Fixed
- **Dev-Middleware:** Add missing `invariant` dependency ([877e82c1a9](https://github.com/facebook/react-native/commit/877e82c1a97d6c667024a437d993e84af3b820a6) by [@tido64](https://github.com/tido64))
- **style:** Respect `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in New Architecture ([8baa858412](https://github.com/facebook/react-native/commit/8baa85841209679936938e7759c5be149304843c) by [RickardZrinski](https://github.com/RickardZrinski))
#### Android specific
- **layout:** Fix elevation prop on android has incorrect border-radius ([55d5c44976](https://github.com/facebook/react-native/commit/55d5c4497621a8dfd6545899754451fcf68dce70) by [@NickGerleman](https://github.com/NickGerleman))
- **Fabric:** Fix execution of early InteropEvents ([d8af0ae3f2](https://github.com/facebook/react-native/commit/d8af0ae3f22c906a9584e1f5d1aaf2dba3cc3fea) by [mdvacca](https://github.com/mdvacca))
#### iOS specific
- **Image:** Load images even when the extension is implicit ([bc35afefd5](https://github.com/facebook/react-native/commit/bc35afefd57a7d0516796dee209881120b82c0b1) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. ([83b986d370](https://github.com/facebook/react-native/commit/83b986d370139266bbbad3e2c356b871c56ae17c) by [@cipolleschi](https://github.com/cipolleschi))
- **Interop Layer:** Properly handle `null` values coming from NativeModules. ([475f797a51](https://github.com/facebook/react-native/commit/475f797a51237e63e4d2bb4e5718e6aa73157767) by [sammy-SC](https://github.com/sammy-SC))
### Added
- **DevX:** Add opt in for legacy Metro log streaming via `--client-logs` flag ([969eb3f007](https://github.com/facebook/react-native/commit/969eb3f0070dc9df2e89ea52a6eb2c68b05aa2d7) by [huntie](https://github.com/huntie))
## v0.77.0
### Breaking
@@ -169,7 +585,6 @@
#### Android specific
- **Accessibility:** Added `isHighTextContrastEnabled()` to `AccessibilityInfo` to read `ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED` setting value ([d4ea147b41](https://github.com/facebook/react-native/commit/d4ea147b41e4d22253f80be8b74731dcf0439302) by Ariel Lin)
- **APIs:** Marked ReactPackage#getModule as stable. ([8fba7ebb5e](https://github.com/facebook/react-native/commit/8fba7ebb5e874d001dc5c16eb4229054a2ef4812) by [@javache](https://github.com/javache))
- **C++:** Add cmake arguments to support 16KB page size for native libraries ([65cdd5b82c](https://github.com/facebook/react-native/commit/65cdd5b82ce7652630b1920fa3a48c8f256c7983) by [@alanleedev](https://github.com/alanleedev))
@@ -252,6 +667,7 @@
- **deps:** Bump Kotlin 1.9.x to 2.0.x ([972c2c864c](https://github.com/facebook/react-native/commit/972c2c864c0b563163a36080a13908d1c0a3fb87) by [@cortinico](https://github.com/cortinico))
- **deps:** Bump Android Gradle Plugin (AGP) to 8.7.0 ([cbc0978bb6](https://github.com/facebook/react-native/commit/cbc0978bb65dcfd2a18a54201c845785a626b1b3) by [@cortinico](https://github.com/cortinico))
- **deps:** Gradle to 8.10.1 ([90f89a830a](https://github.com/facebook/react-native/commit/90f89a830acced9e6b8e80ef58aefd7e2c9666a8) by [@cortinico](https://github.com/cortinico))
- **deps:** Gradle to 8.11.1 ([490db92562](https://github.com/facebook/react-native/commit/490db92562df3baf6dc38737778179065f378715) by [@cortinico](https://github.com/cortinico))
- **Kotlin:** Migrated systeminfo module code from Java to Kotlin ([8dc2c90ce5](https://github.com/facebook/react-native/commit/8dc2c90ce5f4b30f4729560aed2412e6d29f39fa) by [@oddlyspaced](https://github.com/oddlyspaced))
- **Kotlin:** Migrate ReactFeatureFlags to Kotlin ([4076dbfc86](https://github.com/facebook/react-native/commit/4076dbfc8651fcd193b886bf63b23728fad466d7) by [@mdvacca](https://github.com/mdvacca))
- **Kotlin:** Migrate MainReactPackage to Kotlin (and make it final) ([7bbac8ee27](https://github.com/facebook/react-native/commit/7bbac8ee27daf092b580b57c2c7ee46d2723cd09) by [@cortinico](https://github.com/cortinico))
@@ -302,6 +718,8 @@
- **Animated:** Correctly pass down isLooping in parallel animation ([4014aa4528](https://github.com/facebook/react-native/commit/4014aa4528d43e905246850c83007a635938d7cb) by [@zeyap](https://github.com/zeyap))
- **Animated:** Improved types for AnimatedProps ([390925ea39](https://github.com/facebook/react-native/commit/390925ea39eb469768f21cf7069b8f75ccdec09d) by [@javache](https://github.com/javache))
- **Animated:** Order of operations related to platformConfig propagation in NativeAnimated ([a64183b0c6](https://github.com/facebook/react-native/commit/a64183b0c6a56e9d482c7b8b0f80965493ed87af) by [@rozele](https://github.com/rozele))
- **Animated:** Replace Object.hasOwn usages to fix Animated on JSC ([e996b3f346](https://github.com/facebook/react-native/commit/e996b3f346462a394012a722ce19990cdf9c3d9a) by [@robhogan](https://github.com/robhogan))
- **Animated:** Fix buttons becoming unresponsive when transform is animated (Revert #48669) ([c799aa07e2](https://github.com/facebook/react-native/commit/c799aa07e2148a2ca38939cb72468c949ed0c95f) by [@sammy-SC](https://github.com/sammy-SC))
- **Appearance:** Fixed jest error from Appearance.js ([ce838a4bcf](https://github.com/facebook/react-native/commit/ce838a4bcfb1c08728b637a9addd24cc6e3477e0) by [@Kudo](https://github.com/Kudo))
- **Appearance:** Fix `Appearance.setColorScheme(null)` not resetting color scheme value ([7d63235086](https://github.com/facebook/react-native/commit/7d63235086352d8c424d634c7039551f0a5025dc) by [@sangonz193](https://github.com/sangonz193))
- **C++:** Fix C++ bridging template compatibility with MSVC ([e6848ba5ba](https://github.com/facebook/react-native/commit/e6848ba5ba997d102cbaf6181c7c8c73e25a0827) by [@acoates-ms](https://github.com/acoates-ms))
@@ -311,21 +729,26 @@
- **Codegen:** Make Codegen work with local modules ([7b6e8e7765](https://github.com/facebook/react-native/commit/7b6e8e776574e683821133f0c814969d74c4de61) by [@cipolleschi](https://github.com/cipolleschi))
- **Codegen:** Upgrade Codegen dependency `jscodeshift@17.0.0` to resolve outdated dependencies ([39c98fb8f8](https://github.com/facebook/react-native/commit/39c98fb8f8af98aa40dc89a1580d6c1901fa86cf) by [@byCedric](https://github.com/byCedric))
- **Codegen:** Fix source mapping for codegenNativeCommands ([8fba154b66](https://github.com/facebook/react-native/commit/8fba154b6655b5d87609d7c9f136997141ea5e99) by [@vzaidman](https://github.com/vzaidman))
- **Codegen:** Skip hidden folders when looking for third party components. ([8ab524312a](https://github.com/facebook/react-native/commit/8ab524312ab3bf1192b94ae6e30d296a85baa944) by [@cipolleschi](https://github.com/cipolleschi))
- **Dev-Middleware:** Rewrite URLs in the inspector proxy to cover all configurations, not just Android emulators. ([74995bc90a](https://github.com/facebook/react-native/commit/74995bc90aa039b880e4875ad356d3bce324d902) by [@robhogan](https://github.com/robhogan))
- **Dev-Middleware:** Fix URL rewriting where device and debugger reach the server on different ports/protocols. ([5da7ebf99a](https://github.com/facebook/react-native/commit/5da7ebf99ae317c104d8e4bfbf36d3d89f66b5c9) by [@robhogan](https://github.com/robhogan))
- **Dev-Middleware:** Regex-escape IP addresses in urlRegex replacements ([aae3e03e57](https://github.com/facebook/react-native/commit/aae3e03e57096c3dc51589a3de240d49a8b9fadf) by [@robhogan](https://github.com/robhogan))
- **Dev-middleware:** Remove URL.canParse, restore compat with Node < 18.17 ([99767d43b0](https://github.com/facebook/react-native/commit/99767d43b04e41c83e3bcbfebe267d6fdc284549) by [@robhogan](https://github.com/robhogan))
- **Error Handling:** Improved error message when no view config is found. ([bca232ad90](https://github.com/facebook/react-native/commit/bca232ad90692da7a87be5e37ee2680380f94bef) by [@javache](https://github.com/javache))
- **FlatList:** Fixed accuracy of FlatList estimations to determine what elements are visible in the rendering window. ([40aaeb7181](https://github.com/facebook/react-native/commit/40aaeb71814a1987482d97fd3170af0add55bc6a) by [@rubennorte](https://github.com/rubennorte))
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([f791fb9e66](https://github.com/facebook/react-native/commit/f791fb9e660fe15bccf55029045c48f4bbcbc5cb) by [@foyarash](https://github.com/foyarash))
- **graphics:** Linear gradient start and end point algorithm. ([221d1eceda](https://github.com/facebook/react-native/commit/221d1eceda0e5ab870e96dcdd26e22ab17a3870c) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
- **Hermes:** Hermes: revert Intl removal ([4cffff35e0](https://github.com/facebook/react-native/commit/4cffff35e030f256c32bf69c5971dfee4e60723f) by [@robhogan](https://github.com/robhogan))
- **Image:** Passed height and width as native props to support cases where source is an array. ([45b177f50d](https://github.com/facebook/react-native/commit/45b177f50de624eefcb66bb2d8bc1ffb00855863) by [@shubhamguptadream11](https://github.com/shubhamguptadream11))
- **infra:** When using Babel with plain JavaScript files, support for additional user syntax plugins should be fixed (now uses Babel's parser instead of hermes-parser). There is no change for JS files annotated with `flow`, where extended JS syntax remains - unsupported. ([3de9892353](https://github.com/facebook/react-native/commit/3de989235365504468d2b6c0bb194e944bf1ce8e) by [@huntie](https://github.com/huntie))
- **infra:** Fix npm react-native start when cli-server-api isn't installed ([e0be2efe4e](https://github.com/facebook/react-native/commit/e0be2efe4e80edf99f96a2ae6a25856f6df5e0ca) by [@blakef](https://github.com/blakef))
- **infra:** Fix "punycode is deprecated" warning by replacing `node-fetch` with native `fetch` ([881d8a720f](https://github.com/facebook/react-native/commit/881d8a720fb24241d7b2127273ca6116833bf176) by [@jbroma](https://github.com/jbroma))
- **JS:** Do not discard props in the patch when they are not null while using `useNativeProps` ([4c3112c8d8](https://github.com/facebook/react-native/commit/4c3112c8d8685d6c34be9acf07b18871b3cee5b2) by [@cipolleschi](https://github.com/cipolleschi))
- **KeyboardAvoidingView:** Accessing KeyboardAvoidingEvent event in onLayout handler ([68db74205a](https://github.com/facebook/react-native/commit/68db74205afdd190304eb73ef71710781fa580b9) by [@mhoran](https://github.com/mhoran))
- **KeyboardAvoidingview:** Fix KeyboardAvoidingView not aware of the keyboard closing it is unmounted ([08bd8ac47d](https://github.com/facebook/react-native/commit/08bd8ac47da60121225e7b281bbf566e2c5a291e) by [@QichenZhu](https://github.com/QichenZhu))
- **layout:** Plumbing to get boxSizing prop to Yoga round 2 ([3ca796edc3](https://github.com/facebook/react-native/commit/3ca796edc327c5287533dcc8f4394033d5398c2d) by [@joevilches](https://github.com/joevilches))
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([e7db7a7266](https://github.com/facebook/react-native/commit/e7db7a72661bd49948c13eb46d0f72fbe9e00bf3) by [@NickGerleman
](https://github.com/NickGerleman))
- **Modal:** Rename overlayColor prop in Modal to backdropColor ([7aeff18970](https://github.com/facebook/react-native/commit/7aeff18970a2b47cbb3fffc1408e4bb21eec6fed) by [@alanleedev](https://github.com/alanleedev))
- **Native Modules:** TurboModule::get is now a final method, override `create` to customize property lookup ([5b5e150eaf](https://github.com/facebook/react-native/commit/5b5e150eaff015540720225b9e61acb306e1d107) by [@javache](https://github.com/javache))
- **PointerEvents:** Fixed issues with W3C PointerEvents testsx ([1dcaf823f5](https://github.com/facebook/react-native/commit/1dcaf823f5e7d9b114dd803ce3181aa0b8f827ad) by [@rozele](https://github.com/rozele))
@@ -348,11 +771,16 @@ github.com/robhogan))
#### Android specific
- **C++:** Fixes C++ TurboModules: Prioritise OnLoad.cpp, falling back to default-app-setup ([5a64bde701](https://github.com/facebook/react-native/commit/5a64bde701e28615a79ad52d0631de62ce6cab92) by [@timbocole](https://github.com/timbocole))
- **Codegen:** Fix IOException in `BuildCodegenCLITask` ([9147b0753a](https://github.com/facebook/react-native/commit/9147b0753a6c3afb2480b079f91614cd7189a28a) by [@vonovak](https://github.com/vonovak))
- **Dialog:** Fixed styling on alert dialog titles to wrap two lines and retain bold appearance ([c54b23ff9e](https://github.com/facebook/react-native/commit/c54b23ff9ed7a6bfbb52c081c5afe4b3911d0dd2) by [@Abbondanzo](https://github.com/Abbondanzo))
- **graphics:** Missing isInvertColorsEnabled implementation for Android ([cc1d2853fb](https://github.com/facebook/react-native/commit/cc1d2853fb2b64adfb884cb30c8d22ce0260be15) by [@oddlyspaced](https://github.com/oddlyspaced))
- **Headless Tasks:** Fix crash on HeadlessJsTaskService on old architecture ([4560fc0497](https://github.com/facebook/react-native/commit/4560fc049748a345d5945bc08d43f4b61ca51ff3) by [@cortinico](https://github.com/cortinico))
- **Image:** Apps will no longer fatally crash when trying to draw large images ([483b928224](https://github.com/facebook/react-native/commit/483b92822496fa2e6339f75049a33be1e9567f52) by [@Abbondanzo](https://github.com/Abbondanzo))
- **Image:** Avoid blocking the main thread when decompressing drawable resources ([420229d669](https://github.com/facebook/react-native/commit/420229d66946320f06485c5a3d3c167eae1a407e) by [@Abbondanzo](https://github.com/Abbondanzo))
- **JSC:** Fixes RNTester JSC Debug instacrashing ([17a5d2be5a](https://github.com/facebook/react-native/commit/17a5d2be5a96703ed1c76d89990a8f1e37abd4d4) by [@cortinico](https://github.com/cortinico))
- **layout:** Reenable `setAndroidLayoutDirection` by default ([6cf0cfb5a4](https://github.com/facebook/react-native/commit/6cf0cfb5a47a437b8a17b50b4c70460be15ee1cd) by [@NickGerleman](https://github.com/NickGerleman))
- **Layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([e3970a4bb3](https://github.com/facebook/react-native/commit/e3970a4bb3f39ec5652277d78d8c58c89e87dc30) by [@tdn20](https://github.com/tdn20))
- **Layoutanimations:** LayoutAnimations work on full new architecture ([43af902693](https://github.com/facebook/react-native/commit/43af902693f0befde802a7f684e26b19ec7126c8) by [@javache](https://github.com/javache))
- **Modal:** Fix issues with Modals and lifecycle events in multi-surface apps ([1ffef5669c](https://github.com/facebook/react-native/commit/1ffef5669c21f4b2c5fec6bc58a85f95518cf10e) by [@rozele](https://github.com/rozele))
- **Modal:** Fix crash for Modal not attached to window manager ([eaa780de1c](https://github.com/facebook/react-native/commit/eaa780de1c799bf35fded2914d27b1953b093340) by [@cipolleschi](https://github.com/cipolleschi))
@@ -373,6 +801,7 @@ github.com/robhogan))
- **runtime:** ARG_DISABLE_HOST_LIFECYCLE_EVENTS in ReactFragment to allow unmounting a surface without destroying ReactHost. ([40c875deca](https://github.com/facebook/react-native/commit/40c875decabaa56d6dd45ce03b22e8b3931781ac) by [@vincenzovitale](https://github.com/vincenzovitale))
- **runtime:** Use appropriate Nullable attribute for ReactRootView field in ReactDelegate ([cbddcfc691](https://github.com/facebook/react-native/commit/cbddcfc6911101608df36f2a8d047768296c63b2) by [@rozele](https://github.com/rozele))
- **runtime:** Hover events were dispatched incorrectly when multiple ReactRoots were layered. ([533ef2ca37](https://github.com/facebook/react-native/commit/533ef2ca37d3b19fc909315f183e3f30dbf4b93d) by [@javache](https://github.com/javache))
- **runtime:** Handle removal of in-transition views. ([f402ed17fa](https://github.com/facebook/react-native/commit/f402ed17fa6d75aea24e2ad99a8b8d8ad20840e3) by [@kkafar](https://github.com/kkafar))
- **ScrollView** Dispatch onMomentumScrollEnd after programmatic scrolling ([c69e330324](https://github.com/facebook/react-native/commit/c69e330324724a1e363f4786b2b03ee7ff4b35c5) by [@Biki-das](https://github.com/Biki-das))
- **ScrollView:** Fix RTL ScrollView position when content smaller than container ([0df59d4f03](https://github.com/facebook/react-native/commit/0df59d4f03f79c0fcb9ede2d21bf4d49c97c21ef) by [@NickGerleman](https://github.com/NickGerleman))
@@ -403,6 +832,7 @@ github.com/robhogan))
- **AppClips:** Fix launching App Clips with nullish URLs. ([043e2fe14a](https://github.com/facebook/react-native/commit/043e2fe14a6f13885a552211f17d61292001fa76) by [@EvanBacon](https://github.com/EvanBacon))
- **Cocoapods:** Typo in spm.rb ([5e18f7f788](https://github.com/facebook/react-native/commit/5e18f7f788ccbea60e96b8e7deab29d423ccf1a6) by [@okwasniewski](https://github.com/okwasniewski))
- **infra:** Fallback to old resolve mechanism when node require fails to resolve react native path ([3cbaddbc16](https://github.com/facebook/react-native/commit/3cbaddbc164b9dc326b2a7ddc0b35ce885bc7d9d) by [@okwasniewski](https://github.com/okwasniewski))
- **infra:** Enable hermes debugger by configuration type instead of configuration name ([eda4f185b3](https://github.com/facebook/react-native/commit/eda4f185b381f7569a1029b7697f9a1c8bc6d108) by [@benhandanyan](https://github.com/benhandanyan))
- **ObjC:** Fix numerous class interfaces having incorrect designated initializer patterns ([b98846c2e3](https://github.com/facebook/react-native/commit/b98846c2e37c3ec895536ab942978d7701f51a5e) by Nolan O'Brien)
- **PrivacyInfo:** Don't reference PrivacyInfo.xcprivacy twice for new projects ([cadd41b1a2](https://github.com/facebook/react-native/commit/cadd41b1a2e16b1c77a8d3022f4ccbdbd5ea295f) by [@okwasniewski](https://github.com/okwasniewski))
- **ReactNativeDevTools:** "Reconnect DevTools" button not working sometimes ([8507204b53](https://github.com/facebook/react-native/commit/8507204b533cf87d1e4345a9c062cd10cf0022c1) by [@EdmondChuiHW](https://github.com/EdmondChuiHW))
@@ -418,6 +848,92 @@ github.com/robhogan))
- **runtime:** Fixed crash on promise rejection handler in iOS 18. ([26d8d490e4](https://github.com/facebook/react-native/commit/26d8d490e47bd3fa46dc4a3b8e66e9ec35c15cf7) by David Rickard)
- **runtime:** Cast the UIScene to UIWindowScene only if the scene respond to the selector ([fdee0ebbcb](https://github.com/facebook/react-native/commit/fdee0ebbcb88f40c23b92b07792fbb9d1041c546) by [@cipolleschi](https://github.com/cipolleschi))
- **runtime:** Fixes the exported synchronous method not being called on the method queue when it's the main queue ([8bfd7e1039](https://github.com/facebook/react-native/commit/8bfd7e10393e649554c7246df430019c4f78d5e0) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixes numeric TextInput not triggering `onSubmitEditing` ([0bcb0c2b2f](https://github.com/facebook/react-native/commit/0bcb0c2b2f460ed1a9d525d1a5b343f4b71f9347) by [@zhongwuzw](https://github.com/zhongwuzw))
- **TextInput:** Fixed problem with third party libraries overwriting `inputAccessoryView` ([d34032b6c0](https://github.com/facebook/react-native/commit/d34032b6c0bb3564a7b77ef270cc3289d99365f2) by [@kirillzyusko](https://github.com/kirillzyusko))
- **TextInput:** Workaround for Mac Catalyst TextInput crash due to serialization attempt of WeakEventEmitter ([e04738b7ec](https://github.com/facebook/react-native/commit/e04738b7ecec9e7da3aab49bb24a6336b9496b94) by [@rozele](https://github.com/rozele))
- **TextInput:** Fix `maxLength` not working in old arch ([4b3ef3b00c](https://github.com/facebook/react-native/commit/4b3ef3b00ce0026c0d1e1f2a5546fcec249255d8) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.76.9
### Changed
- **Deps:** Bump folly to 2024.10.18. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Bump fmt to 11.0.2. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Add dependency to fast_float v6.1.4, as it is required by folly. This allow to use Xcode 16.3 with React Native ([73b41b5808](https://github.com/facebook/react-native/commit/73b41b5808e37d8d40d9c504ce5299ba2c315efd) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
#### Android specific
- **Deps:** Move CMakeLists for fast_float to third-party folder ([71abbab169](https://github.com/facebook/react-native/commit/71abbab169960e7bd48f18ad72eafe042836ec7f) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Fix Folly CMakeLists ([21919be5ee](https://github.com/facebook/react-native/commit/21919be5ee646c0c6b6235298b66371d44cf153e) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **Runtime:** Fixed crash caused by the request operation canceling ([2bddb0012e](https://github.com/facebook/react-native/commit/2bddb0012e2e6b87d2c4ddb8ff788fc16f211f12) by [@zhouzh1](https://github.com/zhouzh1))
## v0.76.8
### Fixed
- **FormData:** Remove non compliant `filename*` attribute in a FormData `content-disposition` header ([9e846b4d11](https://github.com/facebook/react-native/commit/9e846b4d11a287977c05a77169d8775ab14474ca) by [@foyarash](https://github.com/foyarash))
- **DevX:** Disconnections of DevTools when the network is under significant strain. ([08c04147ba](https://github.com/facebook/react-native/commit/08c04147ba7664ad82dcb59184293bec8c0e728f) by [@vzaidman](https://github.com/vzaidman))
- **JS:** Fix `react-native-community/cli` not being found in pnpm setups ([9ba96ad79d6](https://github.com/facebook/react-native/commit/9ba96ad79d62a77dbf12b0012eaa4f61e4749ec0) by [@tido64](https://github.com/tido64))
- **JS:** Fix `react-native-community/cli-platform-*` packages not being found in monorepos ([ffe7bd1471](https://github.com/facebook/react-native/commit/ffe7bd147179d976b165f869cd8ae28d5de87286) by [@tido64](https://github.com/tido64))
#### Android specific
- **popup-menu-android:** Fix react-native/popup-menu-android not building for 3rd party developers ([ac637ff44](https://github.com/facebook/react-native/commit/ac637ff448e7d4f9bb4c16297fbd27ed94ab9803) by [@cortinico](https://github.com/cortinico))
- **DevTools:** Pass the bundle URL protocol when setting up HMR client on Android ([68055f2d8a](https://github.com/facebook/react-native/commit/68055f2d8a1f475a79651cdae81e6af1a32ddf6f) by [@byCedric](https://github.com/byCedric))
- **CLI:** Fix registering of `start` and `bundle` commands with community CLI and isolated node_modules. ([b9c4095e40](https://github.com/facebook/react-native/commit/b9c4095e40faed0f3ea06f1981b9a53c54a08291) by [@robhogan](https://github.com/robhogan))
#### iOS specific
- **layout:** Layout direction changes are now honored on bundle reload. ([23b888ff2d](https://github.com/facebook/react-native/commit/23b888ff2d5b877a88e3432e4a4af2836f0b8dca) by [@chrsmys](https://github.com/chrsmys))
- **TextInput:** Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac ([e2b081e66f](https://github.com/facebook/react-native/commit/e2b081e66f277948fcb8bc546c8184c8eaff4d17) by [@zhongwuzw](https://github.com/zhongwuzw))
- **Runtime:** Convert to JSException only NSException from sync methods ([8eec35f134](https://github.com/facebook/react-native/commit/8eec35f134f353e99fa27935110cd33d4bd9c213) by [@cipolleschi](https://github.com/cipolleschi))
## v0.76.7
### Changed
#### iOS specific
- **Deps:** Pin 'concurrent-ruby' to a working version ([198adb47af](https://github.com/facebook/react-native/commit/198adb47af3676c85b35adb308c110c1d87120c8) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **Text** Fix `maxFontSizeMultiplier` prop on `Text` and `TextInput` components in Fabric / New Architecture ([ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32](https://github.com/facebook/react-native/commit/ea49d4d1b01107a5ecbbbd4904f1d935e51d6b32) by [@RickardZrinski](https://github.com/RickardZrinski))
- **Appearance:** Fix `Appearance.setColorScheme(null)` not resetting color scheme value ([7d63235086](https://github.com/facebook/react-native/commit/7d63235086352d8c424d634c7039551f0a5025dc) by [@sangonz193](https://github.com/sangonz193))
#### Android specific
- **Deps:** Add missing `invariant` dependency ([ee8088b615](https://github.com/facebook/react-native/commit/ee8088b6157837c239db47ac5bd3a8603ceefc3c) by [@tido64](https://github.com/tido64))
- **Turbomodule** Fix execution of early InteropEvents ([4ed2b35bf6](https://github.com/facebook/react-native/commit/4ed2b35bf61426c81c9f8b30a142d77b44988fdb) by [@mdvacca](https://github.com/mdvacca))
- **Deps:** Bump Kotlin to 1.9.25 to mitigate #49115 ([f8857ba3b5](https://github.com/facebook/react-native/commit/f8857ba3b51f26871d0a0b82b9581a0c35b6273d) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- **runtime:**`RCTSurfaceHostingProxyRootView` no longer has different behavior (whether it calls `start` on the provided *surface*) depending on which initializer is used. Call `start` yourself on the *surface* instead. ([13b93cfdda](https://github.com/facebook/react-native/commit/13b93cfddaa559697968ac1c19e55f7aaa053070) by Nolan O'Brien)
- Be less strict with method parsing of TurboModule Interop Layer
- **Turbomodule:** Avoid crashing the app when the InteropLayer can't find some methods in the native implementation. ([3bd3f101b9](https://github.com/facebook/react-native/commit/3bd3f101b9dcff8551a2f8259ddeed9843fd69b8) by [@cipolleschi](https://github.com/cipolleschi))
- **Runtime:** Fix applicationDidEnterBackground not being called ([adaceba546](https://github.com/facebook/react-native/commit/adaceba5462b4ad8676745f34e0be2bf5bb25166) by [@alextoudic](https://github.com/alextoudic))
## v0.76.6
### Fixed
- **layout:** Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints ([f7a5db3c06](https://github.com/facebook/react-native/commit/f7a5db3c063b952321826ea431d3d238ef0de65d) by [@NickGerleman](https://github.com/NickGerleman))
#### Android specific
- **layout:** Restore layout/invalidate during ReactViewClippingManager.removeViewAt() ([0683206927](https://github.com/facebook/react-native/commit/068320692748f0c46867625786a780366fdbb1d6) by Thomas Nardone)
- **Native Modules:** Prioritise local OnLoad.cpp, falling back to default-app-setup ([8b1f049879](https://github.com/facebook/react-native/commit/8b1f04987936ab2bc7dcf62adc92bf394d35f77b) by [@timbocole](https://github.com/timbocole))
- **runtime:** Remove feature flag for allowRecursiveCommitsWithSynchronousMountOnAndroid ([fb7f87ecb2](https://github.com/facebook/react-native/commit/fb7f87ecb27f9006e2018b9622d329feb1ba23a4) by [@cipolleschi](https://github.com/cipolleschi))
#### iOS specific
- **TextInput:** Fixing TextInput `maxLength` not working in old arch ([9ecf290d27](https://github.com/facebook/react-native/commit/9ecf290d270598e45832a75f657d73cf20088a37) by [@mateoguzmana](https://github.com/mateoguzmana))
## v0.76.5
@@ -808,6 +1324,40 @@ created on the mqt_native thread. ([c4a6bbc8fd](https://github.com/facebook/reac
- **infra:** Update ws from 7.5.1 to 7.5.10 (CVE-2024-37890) ([13f1b9e10f](https://github.com/facebook/react-native/commit/13f1b9e10f6045421808714f7e62aa17bfb3e891) by [@GijsWeterings](https://github.com/GijsWeterings))
- **infra:** Update ws from 6.2.2 to 6.2.3 (CVE-2024-37890) ([80cfacef78](https://github.com/facebook/react-native/commit/80cfacef78f34d3786d955084a8bf4d42ea37f1b) by [@GijsWeterings](https://github.com/GijsWeterings))
## v0.75.5
### Added
- **Hermes:** Implement more missing methods on WithRuntimeDecorator ([80f67ca03c](https://github.com/facebook/react-native/commit/80f67ca03c99c688e2a3127e9b3dddd02625848e) by [@neildhar](https://github.com/neildhar))
### Changed
#### Android specific
- **Deps:** Bump Kotlin to 1.9.25 to mitigate [#49115](https://github.com/facebook/react-native/issues/49115) ([25e76a2717](https://github.com/facebook/react-native/commit/25e76a271781b3ffe8002108d8b12aa3d47442b5) by [@riteshshukla04](https://github.com/riteshshukla04))
#### iOS specific
- **Deps:** Pin Xcodeproj to < 1.26.0 ([2922af2e7e](https://github.com/facebook/react-native/commit/2922af2e7e8527a93c7956b10ddb314f25c334fa) by [@cipolleschi](https://github.com/cipolleschi))
- **Deps:** Pin concurrent-ruby to <= 1.3.4 ([794bf34e60](https://github.com/facebook/react-native/commit/794bf34e60cea8146aebad1fefe051d4140fc28b) by [@cipolleschi](https://github.com/cipolleschi))
### Fixed
- **FormData:** fix: FormData filename in content-disposition ([78ef1e2bc2](https://github.com/facebook/react-native/commit/78ef1e2bc2ed30321745e2505713915b9015d920) by [@foyarash](https://github.com/@foyarash))
#### Android specific
- **TextInput:** Set TextInput selection correctly when attached to window in Android ([1656394bae](https://github.com/facebook/react-native/commit/1656394bae16cc54fb38687d38bcbf85138c98a2) by [@QichenZhu](https://github.com/QichenZhu))
- **Hermes** Exclude dSYM from the archive ([fdb2631b5e](https://github.com/facebook/react-native/commit/fdb2631b5ea27765663046b94f84956d30ebaaeb) by [@cipolleschi](https://github.com/cipolleschi))
- **Image** Fix images not displayed when extension is implicit ([b6ed0d351e](https://github.com/facebook/react-native/commit/b6ed0d351e246c431bdc88a6c3d154ba35220c25) by [@cipolleschi](https://github.com/cipolleschi))
- **Xcode:** Fix the generation of .xcode.env.local ([dbffbf72d7](https://github.com/facebook/react-native/commit/dbffbf72d7287e021e965b6639e455e8555bbf2e) by [@cipolleschi](https://github.com/cipolleschi))
## v0.75.4
### Fixed
@@ -1210,6 +1760,21 @@ created on the mqt_native thread. ([c4a6bbc8fd](https://github.com/facebook/reac
- **turbomodule:** Fixed race condition in native module invalidation. ([b7812a8b6c](https://github.com/facebook/react-native/commit/b7812a8b6c3afbeacaad94779cd010bcc5440785) by [@dmytrorykun](https://github.com/dmytrorykun))
- **xcode:** Do not use temporary node when creating the .xcode.env.local ([8408b8bc96](https://github.com/facebook/react-native/commit/8408b8bc96db15e265ca65fce7875ee65dcfdcec) by [@cipolleschi](https://github.com/cipolleschi))
## v0.74.7
### Fixed
#### Android specific
- Fix #41226 by suppressing path adjustment when not actually drawing a border ([8501b6396b](https://github.com/facebook/react-native/commit/8501b6396b0a4fd7a9bd2add2b3c8b9c755c27ae) by [@knappam](https://github.com/knappam))
- RGNP - Remove unnecessary dependency on `gradle-tooling-api-builders` - serviceOf failure ([b6bdecd309](https://github.com/facebook/react-native/commit/b6bdecd309bf74cfa80b71204d5266667cb3f843) by [@cortinico](https://github.com/cortinico))
#### iOS specific
- Fix iOS crash occurring when navigating to a new app screen with a displaying modal ([52888c0c1e](https://github.com/facebook/react-native/commit/52888c0c1e722a799f233c2f502e01b9dd4a7174) by Zhi Zhou)
- Fix ruby for CI ([1c80702e95](https://github.com/facebook/react-native/commit/1c80702e95a6bcf422f5448b4578d71e8e78071b) by [@cipolleschi](https://github.com/cipolleschi))
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.