Summary:
It looks like objects properties aren't guaranteed to have a stable order. Sort them, before we serializae and print them to the screen in the interop test. This should reduce interop test flakyness.
Changelog: [Internal]
Reviewed By: makovkastar
Differential Revision: D50148860
fbshipit-source-id: a6ed1433d4dd35cafa5c9f7d09c4cca194c31d81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40792
Similarly to D49792717, simplify the careful logic we have with CallbackWrapper and RCTBlockGuard and instead rely on bridging's `AsyncCallback` so safely handle jsi::Function for us.
Changelog: [Internal]
Reviewed By: RSNara
Differential Revision: D49862756
fbshipit-source-id: 289f2d5ef622f47eb3fccf0cc7a52cc13a83b028
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39952
AsyncCallback and SyncCallbacks are better primitives for jsi::Function handling. The code is simpler and requires less manual argument passing. See in D49684248 how the API was extended to support more use-cases.
Changelog: [General] Deprecated RAIICallbackWrapperDestroyer. Use AsyncCallback instead for safe jsi::Function memory ownership.
Reviewed By: RSNara
Differential Revision: D49792717
fbshipit-source-id: 9f2f3b00c71ad1b86427dee3749c6d98ef0f5678
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40794
I accidentally stumbled upon the `UIManager` object on JS side and realised it was being exported as `any`. So I've extracted the interface `UIManagerJSInterface` and applied where it seems to make sense, although, after chatting with javache it could be useful to further narrow down the interface given what's currently implemented by the `BridgelessUIManager`.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D50137691
fbshipit-source-id: ccc746fa1dfbb3290e0b73dfa14c65833b238e07
Summary:
Currently, the template has a `buildToolsVersion = '34.0.0'` specified in the top level .gradle file but it's not currently using it.
This is causing the build to fallback to the default version provided by AGP which is 33.x
This is also causing the CI to download buildtools 34.0.0 as they're not in the container (causing network flakyness).
I'm also bumping the docker container to v12 as we bumped NDK 26 which is missing in the v11 container.
## Changelog:
[INTERNAL] [FIXED] - Make sure template is consuming the right buildToolsVersion
Pull Request resolved: https://github.com/facebook/react-native/pull/39956
Test Plan: CI should be green
Reviewed By: christophpurrer
Differential Revision: D50019777
Pulled By: cortinico
fbshipit-source-id: a2ab7a7bd7c55624d5c050b45e69086c5f25ba6a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40767
Fix the following issue:
```Invariant Violation: TurboModuleRegistry.getEnforcing(...):
'ExceptionsManager' could not be found. Verify that a module by this name is registered in the native
binary.Bridgeless mode: true. TurboModule interop: true. Modules loaded: {"NativeModules":[],"TurboModules":
["PlatformConstants","AppState","SourceCode","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","LogBox","Networking","Appearance","DevLoadingView","DeviceInfo","DeviceEventManager",
"SoundManager","ImageLoader","DialogManagerAndroid","NativeAnimatedModule","I18nManager","AccessibilityInfo","StatusBarManager","StatusBarManager","IntentAndroid","ToastAndroid","ShareModule","Vibration"],
"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","HeadlessJsTaskSupport","FrameRateLogger","KeyboardObserver",
"AccessibilityManager","ModalManager","LinkingManager","ActionSheetManager","ExceptionsManager"]}
```
Changelog:
[Android][Changed] - Add Add ExceptionsManagerModule to CoreReactPackage
Reviewed By: cortinico
Differential Revision: D50017783
fbshipit-source-id: 8642bb23bdae50a1e702f5e0586b0ede80007bb1
Summary:
Currently, when we build the app in production mode the `DevtoolsOverlay` & `TraceUpdateOverlay` are bundle
## Changelog:
[GENERAL][REMOVED]: removed `DevtoolsOverlay` & `TraceUpdateOverlay` from production bundle
<!-- 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/40749
Test Plan:
1. Build the app in production mode
2. Check that both `DevtoolsOverlay` & `TraceUpdateOverlay` are included in the bundle
Reviewed By: robhogan, NickGerleman
Differential Revision: D50121208
Pulled By: hoxyq
fbshipit-source-id: 3e1fb506c679ec79b116dea9772d372cd2ea9ca9
Summary:
Commit 8b88883071 broke the Cache for RNTester because the cached version of the pods does not know about the exitence of SocketRocket 6.1.0
Bumping the keys should force a redownload of the cocoapods specs repo
## Changelog:
[Internal] - Bump RNTester cache keys
Pull Request resolved: https://github.com/facebook/react-native/pull/40789
Test Plan: CircleCI is green
Reviewed By: GijsWeterings
Differential Revision: D50169281
Pulled By: cipolleschi
fbshipit-source-id: 83e251495bfa43d62384470efe97c5505d76684f
Summary:
The SocketRocket version was upgraded to 0.6.1 on the 0.72-stable branch but for some reason it was not updated in main, causing a downgrade when running `pod install` with 0.73.0 RC1
Original commit bumping SocketRocket -> https://github.com/facebook/react-native/commit/8ce471e2fa802cc50ff2d6ab346627cb5f6d79b4
## Changelog:
[IOS] [CHANGED] - Bump SocketRocket to 0.6.1
Pull Request resolved: https://github.com/facebook/react-native/pull/40774
Test Plan: Run rntester locally
Reviewed By: cipolleschi
Differential Revision: D50137261
Pulled By: arushikesarwani94
fbshipit-source-id: dfc2760f5d5611881126ad114d8f6ada23630a29
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39988
Changelog: [Internal]
in this pr, we integrate the sync void configuration with our feature flag infra
Reviewed By: luluwu2032
Differential Revision: D50030743
fbshipit-source-id: 03505e5e1f74aa90dc16f33fa4e93f9de9660dae
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39989
Changelog: [Internal]
we need some configuration path to turn on the sync void method execution behavior, doing that here
Reviewed By: luluwu2032
Differential Revision: D50028200
fbshipit-source-id: a2501b622685e4bafa5e2a5031275cc8bc5050b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39970
Changelog: [Internal]
in this diff, i add the logic that makes void return values run synchronously
Reviewed By: javache
Differential Revision: D49613770
fbshipit-source-id: ef840fb3ee130430505d000a7cf74e094f9d1405
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40777
In this diff I'm removing the deprecation of NativeModule.onCatalystInstanceDestroy() method, changing it to DeprecatedInNewArchitecture
changelog: [Android][Breaking] Mark NativeModule.onCatalystInstanceDestroy() method as deprecated in new architecture
Reviewed By: christophpurrer
Differential Revision: D50141027
fbshipit-source-id: a4c4911bdadc27f981f3af0522317e6dd08d9344
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40775
In this diff I'm introducing the BaseReactPackage class to the public API of React Native Android. the goal is for this class to replace TurboReactPackage, which will be Deprecated in the New Architecture
changelog: [internal] internal
Reviewed By: christophpurrer
Differential Revision: D50128456
fbshipit-source-id: a65e1eb0d81b94e442799226784f73f489eabb73
Summary:
X-link: https://github.com/facebook/hermes/pull/1151
Pull Request resolved: https://github.com/facebook/react-native/pull/40746
This feature was missing in JSC's JSI implementation, which is preventing from rolling out NativeState-based features in React Native.
Changelog: [General][Added] JSC support for the NativeState API in JSI
Reviewed By: neildhar
Differential Revision: D49229022
fbshipit-source-id: 1787c1d1b4803212d84da8f55b7d5a460a9d33c2
Summary:
Very simple change, there's a typo in the word "perspective" whilst naming the possible transform property types.
## Changelog:
[INTERNAL] [FIXED] - Fix typo in PerspectiveTransform type
Pull Request resolved: https://github.com/facebook/react-native/pull/40771
Test Plan: -
Reviewed By: javache
Differential Revision: D50133297
Pulled By: arushikesarwani94
fbshipit-source-id: bd742b1bccc5d015e5e8095b1d2b83765fee3d6b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40751
In D48379915 I fixed inverted `contentOffset` in `onScroll` events on iOS. I thought I tested on Paper, but I think this was during a period where the Paper route in Catalyst was actually launching Fabric (oops).
In Paper, at least under `forceRTL` and English, `[UIApplication sharedApplication].userInterfaceLayoutDirection` is not set to RTL. We instead have a per-view `reactLayoutDirection` we should be reading.
This sort of thing isn't currently set on Fabric, which checks application-level RTL. This seems... not right with being able to set `direction` in a subtree context, but Android does the same thing, and that would take some greater changes.
Changelog:
[iOS][Fixed] - Fix iOS Paper Scroll Event RTL check
Reviewed By: luluwu2032
Differential Revision: D50098310
fbshipit-source-id: e321fca7b2f7983e903e23237bc2d604c72f98a3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39646
We can dramatically simplify this code and remove quirks/hacks, now that we can assume layout events are always fired top down.
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D49628669
fbshipit-source-id: 7de5bbc4597eba1c59aaa7672c70e76d2786c7ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40748
The ordering of `onLayout` events is non-deterministic on iOS Paper, due to nodes being added to an `NSHashTable` before iteration, instead of an ordered collection.
We don't do any lookups on the collection, so I think this was chosen over `NSMutableArray` for the sake of `[NSHashTable weakObjectsHashTable]`, to avoid retain/release. Using a collection which does retain/release seems to cause a crash due to double release or similar, so those semantics seem intentional (though I'm not super familiar with the model here).
We can replicate the memory semantics with ordering by using `NSPointerArray` (which is unfortunately not parameterized). This change does that, so we get consistently top-down layout events (matching Fabric, and Android Paper as of D49627996). This lets us use multiple layout events to calculate right/bottom edge insets deterministically.
Changelog:
[iOS][Changed] - Deterministic onLayout event ordering for iOS Paper
Reviewed By: luluwu2032
Differential Revision: D50093411
fbshipit-source-id: f6a9d5c973b97aede879baa8b952cc1be2447f28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40768
The task referenced is 4 years old and it doesn't seem to be relevant anymore given that:
* `addRootView` has been marked as deprecated
* there is an explicit check in `addRootView` mentioning:
> Do not call addRootView in Fabric; it is unsupported. Call startSurface instead
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D50122192
fbshipit-source-id: fe02d481b47663f5bdf4fb7527e480117f00be47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40766
This changeset allows users to opt into the new debugger frontend experience by passing `--experimental-debugger` to `react-native start`. **We are defaulting this option to `true`** for now, but will continue to evaluate this feature before 0.73 ships. It restores Flipper (via `flipper://`) as the default handling for `/open-debugger` (matching 0.72 behaviour) when this flag is not enabled.
Detailed changes:
- Replaces `enableCustomDebuggerFrontend` experiment in `dev-middleware` with `enableNewDebugger`. The latter now hard-swaps between the Flipper and new launch flows.
- Removes now-unused switching of `devtoolsFrontendUrl`.
- Implements `deprecated_openFlipperMiddleware` (matching previous RN CLI implementation).
- Disables "`j` to debug" key handler by default.
- Marks "`j` to debug" and `/open-debugger` console logs as experimental.
Changelog:
[Changed][General] Gate new debugger frontend behind `--experimental-debugger` flag, restore Flipper as base launch flow
Reviewed By: motiz88
Differential Revision: D50084590
fbshipit-source-id: 5234634f20110cb7933b1787bd2c86f645411fff
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40728
Just improving type safety of a bunch of modules in the `Image` directory.
Changelog: [internal]
Reviewed By: NickGerleman
Differential Revision: D50080136
fbshipit-source-id: cbfb89aa01cad3882aa08a8ba637e561017d5db6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40730
This way of injecting the decorator is safer and more convenient to have the proper types inferred by Flow in the injected function.
Changelog: [internal]
Reviewed By: NickGerleman
Differential Revision: D50011840
fbshipit-source-id: 760812fc407d3e39fc7601d17488e3f2032a7065
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40729
This improves the type definition of the `Image` modules (the common module interface, the platform-specific implementations and the shared types module). It makes them `flow strict-local` and explicitly defines the type signature of some functions typed as `any` before.
Changelog: [internal]
Reviewed By: sullenor
Differential Revision: D50014569
fbshipit-source-id: f1eced43edf84c84bbcb10a3a2d2de27e3d5e374
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40731
The type definitions for `Image` are unnecessarily complicated, and got even more complicated after the changes for the new multiplatform support in Flow.
We had a `Image.js.flow` and a `Image.flow.js` files (which was confusing) and duplicated type definitions in `Image.js.flow`, `Image.android.js` and `Image.ios.js` because all type definitions in the shared module signature must be defined in the platform-specific modules as well.
This moves all type helpers to a new `ImageTypes.js.flow` file, simplifies the common `Image` module interface (to only define the default export type that the platform-specific module must define) and simplifies the Android and iOS specific versions.
As an added benefit, this also improves Flow type coverage by removing a bunch of FlowFixMe comments.
Changelog: [internal]
Reviewed By: mdvacca
Differential Revision: D50011839
fbshipit-source-id: 9da1c0467630bebf73855f5f9f771a2325adbced
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40744
The Podfile.lock was not aligned properly with the versions of the Pods on main.
## Changelog:
[Internal] - Align the Podfile.lock with the status of podspecs on main
Reviewed By: luluwu2032
Differential Revision: D50084954
fbshipit-source-id: 1cfad35262b2b57ad9ac33f494c7a2f0b723368f
Summary:
Both `hermes` and `JSC` supports `Object.{values & entries}`, so this polyfills aren't used any more.
## Changelog:
[GENERAL][REMOVED]: removed `Object.{values & entries}` from polyfills
<!-- 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/40747
Test Plan:
1. We can confirm with `hermes` tests: https://github.com/facebook/hermes/blob/main/test/hermes/object-functions.js#L256
2. Remove this polyfills and check that the code runs as expected.
3. You can also run: `console.log(Object.entries.toString());` and verify that this is `[native code]`
Reviewed By: christophpurrer
Differential Revision: D50100639
Pulled By: robhogan
fbshipit-source-id: b1cea88bd984e99f304a3a063e985eecff8831dd
Summary:
All "https://react.dev/link" links give a 404 and are deprecated. I replaced all URLs with new ones or, if this was not possible, replaced them with a link to legacy documentation.
## Changelog:
[INTERNAL] [FIXED] - Fixed links to React documentation
Pull Request resolved: https://github.com/facebook/react-native/pull/40095
Test Plan: All of the old links didn't work. I tried to match the content of the errors to the new documentation as best as possible. Current links have been tested and direct you to the most relevant article section.
Reviewed By: christophpurrer
Differential Revision: D50094451
Pulled By: arushikesarwani94
fbshipit-source-id: 79fd9e729495cadfb067d94fb58acb30ca308347
Summary:
This pull request addresses two key issues. Firstly, it adds a missing docstring to the `dismissActionSheet` function within the `ActionSheetIOS` object. Secondly, it introduces TypeScript typings for the `dismissActionSheet` function.
## Changelog:
[iOS] [Added] - Add missing docstring to the `dismissActionSheet` function in `ActionSheetIOS`.
[iOS] [Added] - Add TypeScript typings for the `dismissActionSheet` function in `ActionSheetIOS`.
Pull Request resolved: https://github.com/facebook/react-native/pull/40012
Test Plan:
To ensure the code is solid, I followed these steps:
1. Ran Flow to verify that there were no errors.
2. Added a TypeScript test related to the `dismissActionSheet` function to ensure it's typed as expected.
Reviewed By: NickGerleman
Differential Revision: D50097458
Pulled By: arushikesarwani94
fbshipit-source-id: 63348239dfe19e3a07f94e5a7b59ae43a47c1975
Summary:
When we download the `hermes` repo, we also include its tests, so `jest` try to run them.
## Changelog:
[INTERNAL][FIXED]: don't run `hermes` specific tests.
<!-- 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/40734
Test Plan:
1. Build the project
2. yarn test
3. See the failing tests running from the `sdks` directory.
Reviewed By: arushikesarwani94
Differential Revision: D50087482
Pulled By: robhogan
fbshipit-source-id: 012672d69c98d8b8e60012d83470cda45edc2fc6