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/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/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:
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/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/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/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