Compare commits

...
Author SHA1 Message Date
Distiller 7ba400c35e [0.73.0-rc.4] Bump version numbers 2023-11-06 22:35:02 +00:00
Luna Wei 7366fc64d8 bumped packages versions
#publish-packages-to-npm
2023-11-06 14:21:06 -08:00
Luna Wei 40c149b0c4 Update missing rnc/cli related packages to 12.0.0 and update lockfile 2023-11-03 10:38:27 -07:00
Riccardo Cipolleschi 641a11fe21 [RN][CI]Update node installation on debian (0.73) (#41275) 2023-11-03 09:32:40 -07:00
Gabriel Donadel 84144272ba Fix ios pod post_install logic for detecting if fabric is enabled (#41284)
Summary:
There is a problem in the way that we check if Fabric is enabled inside `react_native_post_install`.

https://github.com/facebook/react-native/blob/899e7cdb55197fc17a96a93af4f8bcc7519553c2/packages/react-native/scripts/react_native_pods.rb#L239

We're determining if fabric is enabled by checking if the `React-Fabric pod `is present, but since we always call `setup_fabric!(:react_native_path => prefix)`  (https://github.com/facebook/react-native/pull/39057) inside `use_react_native` the `React-Fabric` pod is always present causing the `-DRN_FABRIC_ENABLED` flag to always be added to `project.pbxproj` even if the new arch is disabled.

[IOS] [FIXED] - Fix ios pod post_install logic for detecting if fabric is enabled

Pull Request resolved: https://github.com/facebook/react-native/pull/41284

Test Plan: Run `use_react_native!(fabric => false)` should not add the `-DRN_FABRIC_ENABLED` flag to `project.pbxproj`

Reviewed By: fkgozali

Differential Revision: D50896487

Pulled By: cipolleschi

fbshipit-source-id: 78154407ce52b09fd3a317b7dc64bd4bba56363e
2023-11-02 15:32:13 -07:00
Luna Wei 9b97cd95cf Update podfile.lock and yarn.lock 2023-11-02 15:28:41 -07:00
Riccardo Cipolleschi cddd0e17d1 Make the interop-layer work with components with custom name (#41207)
Summary:
This should fix
https://github.com/facebook/react-native/issues/37905#issuecomment-1774851214

When working on react-native-fast-image, we realized that the interop layer does not work for components where the exported name is different from the iOS class.

To fix this, we can use the Bridge to retrieve the actual view manager, given the component name.

This solution should be much more robust than making assumptions on the ViewManager name, given the ComponentName.

On top of that, we realized tha the interop layer was not calling `didSetProps` after setting the props, so we are invoking that.

bypass-github-export-checks

[iOS][Fixed] - Add support for Components with custom names in the interop layer.

Pull Request resolved: https://github.com/facebook/react-native/pull/41207

Test Plan: Tested locally on an app created in 0.72 and 0.73 in Bridge and Bridgeless mode.

Reviewed By: cortinico

Differential Revision: D50698172

Pulled By: cipolleschi

fbshipit-source-id: 49aee905418515b0204febbbe6a67c0114f37029
2023-11-02 14:55:24 -07:00
Luna Wei 126db5eb65 Bump CLI to 12.0.0 2023-11-02 14:46:36 -07:00
Rob Hogan 31ce64073f Bump dependency on deprecated-react-native-prop-types (#40869)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40869

Bumps DRNPT to v5 - the significant change is that this one depends on `react-native/normalize-color: ^0.73.0`, instead of `*`, so is protected from future breaking changes to that package.

NOTE: We can't safely include `react-native/normalize-color: ^0.74.0` in the dependency range of DRNPT because `0.74.0` isn't a semver-compliant release (0.74 isn't cut yet), so this will pull 0.73.2 from NPM, which is fine.  We may need to publish DRNPT@6 if 0.74 final turns out to contain breaking changes (eg, a Node 20 bump).

Changelog:
[General][Fixed] Update `deprecated-react-native-prop-types` to remove fragile transitive `*` dependencies.

Reviewed By: huntie

Differential Revision: D50228564

fbshipit-source-id: 01aafafad40d9a93d00de2b5f45d2796620b9b5d
2023-11-02 12:01:08 -07:00
Gabriel Donadel Dall'Agnol 7aa46a169e Fix createAnimatedStyle when providing undefined transform style (#41176)
Summary:
https://github.com/facebook/react-native/pull/35198 introduced a regression where if an `{transform: undefined}` style is provided to an Animated View a `Cannot read property 'map' of undefined` type error is thrown

<img src="https://github.com/facebook/react-native/assets/11707729/bb87781e-1ba7-40ec-879d-a57cef3e10d9" height="200" />

## Changelog:

[GENERAL] [FIXED] - Fix `createAnimatedStyle` when providing an undefined transform style

Pull Request resolved: https://github.com/facebook/react-native/pull/41176

Test Plan:
<details>
  <summary>Render an `Animated.View` passing `style={{transform: undefined}}`</summary>

E.g.

```
const UndefinedTransform = () => {
  return (
    <View>
      <Animated.View style={{transform: undefined}} />
    </View>
  );
};
```
</details>

### RNTester
1. Open the RNTester app and navigate to the Animated page
2. Navigate to the Transform Styles page
3. App should not throw any errors

<table>
    <tr><th>Before</th><th>After</th></tr>
    <tr>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/92ba9c3b-60b0-4805-8080-0e7fb7c00345"/></td>
        <td><video src="https://github.com/facebook/react-native/assets/11707729/80e2bba8-6ff6-4cf5-bcb8-26de0b869036"/></td>
    </tr>
</table>

Reviewed By: fabriziocucci

Differential Revision: D50638415

Pulled By: javache

fbshipit-source-id: 0ee949f019a77b8bef557888694e0e8404810105
2023-11-02 11:59:41 -07:00
Nick Gerleman 29f8f1e196 Bail on hiPri render on missing layout data before checking priority (#41270)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41270

`scheduleCellsToRenderUpdate()` is called in response to new measurements, or component changes. It has logic to decide whether to immediately calculate new state, or to defer it until a later batched period.

It will not immediately update state if we don't yet have measurements for cells, but this condition is after another which calculates priority, relying on these measurements. These are garbage if we don't yet have measurements, and trigger an invariant violation in horizontal RTL.

This switches around the conditions, to avoid offset resolution if we don't yet have valid measurements.

I suspect some "hiPri" renders where cells shift are bugged right now when we update state in response to content size change, before we have new corresponding cell layouts.

Changelog:
[General][Fixed] - Bail on hiPri render on missing layout data before checking priority

Reviewed By: yungsters

Differential Revision: D50791506

fbshipit-source-id: 8dbffc37edd2a42f7842c0090d344dcd6f3e3c6d
2023-11-02 11:58:46 -07:00
tarunrajput 832b423a65 fix: textTransform not working in new arch (#41223)
Summary:
Fixes: https://github.com/facebook/react-native/issues/39524

## 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] [FIXED] - Fix textTransform not working in new architecture

Pull Request resolved: https://github.com/facebook/react-native/pull/41223

Test Plan:
**Before:**
<img width="307" alt="image" src="https://github.com/facebook/react-native/assets/34857453/d44e6030-0a49-42c9-be44-cf7541583af0">

**After:**
<img width="307" alt="image" src="https://github.com/facebook/react-native/assets/34857453/fb717cec-72d3-41d7-8c48-4ec9a9ecb16b">

Reviewed By: javache

Differential Revision: D50773216

Pulled By: NickGerleman

fbshipit-source-id: 769bf67f2661ff4ff7b88121493bdd27564458d3
2023-11-02 11:57:57 -07:00
David Vacca f4cf8abc09 Back out "Add support for legacy UIManager in UIManagerHelper"
Summary:
Original commit changeset: 93eba1eb3106

Original Phabricator Diff: D50694805

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D50853438

fbshipit-source-id: 687cb100dfea28f3ea63812e1dd5b21e4c8ceb0e
2023-11-02 11:55:00 -07:00
Nicola Corti c8ad23ae1a [0.73] Collection of Android picks for RC4 (#41221)
Co-authored-by: Lulu Wu <luluwu@meta.com>
Co-authored-by: Gabriel Donadel <donadeldev@gmail.com>
fix `java.lang.NoSuchMethodError` for Bridgeless (#41081)
resolved: https://github.com/facebook/react-native/pull/41081
resolved: https://github.com/facebook/react-native/pull/40999
resolved: https://github.com/facebook/react-native/pull/41165
Fix RNTester not showing Redbox when Metro is not connected (#41191)
resolved: https://github.com/facebook/react-native/pull/41191
resolved: https://github.com/facebook/react-native/pull/41190
resolved: https://github.com/facebook/react-native/pull/41085
resolved: https://github.com/facebook/react-native/pull/41206
2023-11-02 09:23:15 -07:00
Riccardo Cipolleschi 2664b8b117 cipolleschi/fix test script (#41267) 2023-11-02 09:22:38 -07:00
Rob Hogan aed4aed9d5 Update Metro to ^0.80.0, don't pin to exact version
cherry-pick 7853b06929
2023-10-31 11:12:31 +00:00
Riccardo Cipolleschi abfdf2c7fe [LOCAL] Update Podfile.lock 2023-10-24 15:16:06 +01:00
Riccardo Cipolleschi 4ddf7cb025 [LOCAL] Run prettier 2023-10-24 15:14:33 +01:00
Riccardo Cipolleschi f068f4a903 [LOCAL] Fix e2e script for 0.73 2023-10-24 14:50:22 +01:00
Moti Zilberman d64c72f629 Remove deprecated jsinspector files (#41159)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41159

Changelog: [Internal]

Cleanup from D48966244. The deprecated `jsinspector` files are no longer used by any code in either fbsource or `react-native`.

Reviewed By: hoxyq

Differential Revision: D50530796

fbshipit-source-id: b539b097cb6caf6c50a482fa93bf5d7886e76e52
2023-10-23 16:32:31 +01:00
Distiller 6d41c72a90 [0.73.0-rc.3] Bump version numbers 2023-10-23 14:23:48 +00:00
Riccardo Cipolleschi 764ae1a03a Make the Fabric Interop layer work in Bridgeless (#40732)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40732

This change allows the Fabric Interop Layer to work in bridgeless mode.

Given that the legacy components requires a Bridge to send events and use commands, this change simulates a bridge when it doesn't exists (i.e.: we are in bridgeless mode).

In order to make it work, we had to simulate a few elements from the Bridge and the UIManager.

## Changelog:
[iOS][Fixed] - Make the Fabric interop layer works in bridgeless mode.

## Facebook:
As an alternative approach, we could have created a `protocol RCTBridging`, have the `RCTBridge` conform to that protocol, and create a new type for it.
Practically this would have been much more cumbersome:
1. The [RCTBridge](https://www.internalfb.com/code/fbsource/[916531b9bf7a9943036807f7563c925b4c3e0101]/xplat/js/react-native-github/packages/react-native/React/Base/RCTBridge.h?lines=87-238) interface is quite big. All the props and method should be part of the protocol.
2. Extensions declared on RCTBridge would not have worked. For example, [`RCTBridge (RCTUIManager)`](https://www.internalfb.com/code/fbsource/[916531b9bf7a9943036807f7563c925b4c3e0101]/xplat/js/react-native-github/packages/react-native/React/Modules/RCTUIManager.h?lines=170-174).
3. It would require a major overhaul of the APIs, returning `id<RCTBridging>` in place of **every** function that takes/return an instance of `RCTBridge *`.

Clearly, not a feasible way to go.

Reviewed By: RSNara

Differential Revision: D50079929

fbshipit-source-id: 77d4370e9043c8e06b676bff3987511c042b0f9c
2023-10-23 09:55:17 +01:00
Riccardo Cipolleschi cb658983c4 Fix Glog for earlier versions of Xcode (#41058)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41058

Glog has a piece of code which looks like this:
```
namespace google {

// They need the definitions of integer types.
#include "glog/log_severity.h"
#include "glog/vlog_is_on.h"
```

This fragment is:
- Always valid when the pod does not define a module
- Valid for Xcode >= 14.3, when the pod do define a module
- Invalid for Xcode < 14.3, when the pod do define a module

Modules are required to support Swift, so, in the long run, we want to have `DEFINES_MODULE` set to `YES` for `Glog`.

This is a temporary workaround to keep supporting older versions of Xcode while Apple keeps allowing to use Xcode 14.1 to submit apps to the store.
Historically, Apple pushes the minimum version of Xcode every April, so we expect to be able to remove this workaround in April 2024.

## Changelog:
[Internal] - Make Glog work with older versions of Xcode

Reviewed By: cortinico

Differential Revision: D50410487

fbshipit-source-id: 96145cdf9ba1bc75622403d3c06454d6d4bfd967
2023-10-23 09:55:08 +01:00
Riccardo Cipolleschi 50a8bd8146 Make hermes build fetching more flavour resilient (#41055)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41055

This should fix the issue highlighted in [this comment](https://github.com/reactwg/react-native-releases/discussions/64#discussioncomment-7271155).
Basically, before the fix, we were not supporting flavours correctly, as we assumed that only Debug and Release were available.

With this change, we infer whether we have to fetch Hermes for Debug or Release based on the actual flags that are passed. In this way, the users can customize their app's flavors more freely.

## Changelog:
[Internal] - Support multiple flavors when downloading Hermes

Reviewed By: huntie

Differential Revision: D50408381

fbshipit-source-id: 6990218b286b4dd823323bc63de90279efc9e74e
2023-10-23 09:54:41 +01:00
Alex Hunt a98a781988 Bump package versions
#publish-packages-to-npm
2023-10-19 15:41:54 +01:00
Nicola Corti d6b73c6726 Make IntArray events work on Bridgeless for RN-Tester (#41047)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41047

Array events are currently broken in the sample for RN Tester. This is because the event name is not registered correctly.

I'm updating the event registration to be correct.

Changelog:
[Internal] [Changed] - Make IntArray events work on Bridgeless for RN-Tester

Reviewed By: cipolleschi

Differential Revision: D50266485

fbshipit-source-id: 13bbce91a41281383d4857048e573b6d9cc5387b
2023-10-19 14:29:31 +01:00
Nicola Corti d1e2137425 Make events work for Fabric Interop on Bridgeless (#40941)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40941

Events are currently not working for Fabric Interop on Bridgeless. That's because the `BridgelessReactContext` is not checking for interop modules on `getJsModule` calls, so the `InteropEventEmitter` is never returned.

This extends `BridgelessReactContext` so that  `InteropEventEmitter` is returned if the Interop Layer is turned on.

Changelog:
[Internal] [Changed] - Make events work for Fabric Interop on Bridgeless

Reviewed By: cipolleschi

Differential Revision: D50266484

fbshipit-source-id: 0188d71bdc7acc8c188d886d45f0258914ad7af7
2023-10-19 14:29:31 +01:00
Nicola Corti a5df17661d Simplify new app template for bridgeless (#40929)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40929

This diff reduces the footprint that bridgeless is imposing on the new app template. Specifically:
- I've created a `.toReactHost` method that converts a DefaultReactNativeHost to a DefaultReactHost
- I've updated RN Tester to use the same setup as the New App template which reduces code duplication.

I also had to remove a couple of `UnstableReactNativeAPI` as those were bleeding in the new app template.
I don't think we should ask users to opt-in in `UnstableReactNativeAPI` in the New App template itself as
this means that all the apps will get this opt-in.
Instead we should keep it only for specific APIs that we want the users to opt into.

Changelog:
[Internal] [Changed] - Simplify new app template for bridgeless

Reviewed By: cipolleschi, luluwu2032

Differential Revision: D50227693

fbshipit-source-id: e86c54d5156cc27f1f898b43ca89c57d5cf148b8
2023-10-19 14:29:31 +01:00
Nicola Corti 8cae2e75e7 Fix broken Fabric Interop example (#40942)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40942

The Fabric Interop example for Android is broken. This is due to the Kotlin conversion which moved the `Color.colorToHSV(color, hsv)` statement *after* the HSV array is read so the array is always [0,0,0].

I'm fixing it here.

Changelog:
[Internal] [Changed] - Fix broken Fabric Interop example

Reviewed By: cipolleschi

Differential Revision: D50264766

fbshipit-source-id: 27ae5289408c7c23c667d6d7112437fa7ebe36d5
2023-10-19 14:29:31 +01:00
Nicola Corti dbef1d90d1 Make sure onIntArrayChanged is invoked on RN Tester (#40940)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40940

Currently the `onIntArrayChanged` event is invoked
 only once inside RN Tester. I'm changing the logic to make sure it fires whenever we click "Set Opacity"

Changelog:
[Internal] [Changed] - Make sure onIntArrayChanged is invoked on RN Tester

Reviewed By: mdvacca, dmytrorykun

Differential Revision: D50264765

fbshipit-source-id: 93a60fd1b657c3d8b8182cab6bb7cd4368ac9a42
2023-10-19 14:29:31 +01:00
Lulu Wu 34052725e1 Add ExceptionsManagerModule for RNTester (#40767)
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
2023-10-19 14:29:31 +01:00
Christoph Purrer c72867d0ad Add rn-tester Android BUCK configuration (#39987)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39987

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D49983211

fbshipit-source-id: c362d5b93e159bfb5ca17bea0ec0484adcdb4dca
2023-10-19 14:29:31 +01:00
David Vacca 91a25629bd Move ReactHost to com.facebook.react (#39769)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39769

Move ReactHost to com.facebook.react

bypass-github-export-checks

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D49834870

fbshipit-source-id: 2cfdd34297399115457424f0ba1279fd477da4a1
2023-10-19 14:29:31 +01:00
Lulu Wu efcc3cf4fd Fix new arch example not render in RNTester (#39810)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39810

Two issues will be fixed:
- Bridgeless has lazy view manager loading by default so the React Package that provides view managers must implement ViewManagerOnDemandReactPackage, we might could refactor the design of package classes later
- ThemedReactContext should **NOT** be used directly to call function ```getJSModule```, since it doesn't overrides ```getJSModule``` for Bridgeless, we can use it's internal variable ```meactApplicationContext``` which should be an instance of BridgelessReactContext

Reviewed By: cortinico

Differential Revision: D49912656

fbshipit-source-id: a0bdd717612398e8d7a6f36d36dba241a3b06bd7
2023-10-19 14:29:31 +01:00
Nicola Corti bb4801ca0c Do not guard initializeFlipper for bridgeless for RN Tester
Summary:
We don't need this if-than-else because the initializeFlipper already checks if we're on bridgeless or not

Changelog:
[Internal] [Changed] - Do not guard initializeFlipper for bridgeless for RN Tester

Reviewed By: NickGerleman

Differential Revision: D49881903

fbshipit-source-id: e6bfc941b43382580bd418a5f27ad9426d300c69
2023-10-19 14:29:31 +01:00
Oleksii 3700d6a8da rewrite RNTesterApplication to kotlin (#39557)
Summary:
Rewrite `RNTesterApplication` to Kotlin as per [Help us Kotlin-ify React Native tests - Round 2](https://github.com/facebook/react-native/issues/38825)

## Changelog:

[ANDROID] [CHANGED] - Rewrite RNTesterApplication to Kotlin, add AnnotationTarget property.

Pull Request resolved: https://github.com/facebook/react-native/pull/39557

Test Plan:
`yarn && yarn android` 

The only thing I'm kinda unsure of is whether `AnnotationTarget.PROPERTY` should be added, but it didn't let me annotate `reactHostInterface` without that and didn't compile.
<img width="637" alt="image" src="https://github.com/facebook/react-native/assets/33528752/8bc84870-f3f2-4a46-b076-6ee7e38bd735">

 cortinico mdvacca

Reviewed By: cortinico

Differential Revision: D49598401

Pulled By: mdvacca

fbshipit-source-id: 105ae0c13c93dae0eeb2b6fa9040f03f42d2736a
2023-10-19 14:29:31 +01:00
Nicola Corti f47635374d Revert "Add ExceptionsManagerModule for RNTester (#40767)"
This reverts commit 034d815cfd.
2023-10-19 14:29:31 +01:00
Riccardo Cipolleschi 3542e9083a Bump RNTester Cocoapods cache keys after SocketRocket 6.1.0 bump (#40789)
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

# Conflicts:
#	packages/rn-tester/Podfile.lock
2023-10-18 14:54:21 +01:00
Gabriel Donadel 93edc9a31a Bump SocketRocket to 0.6.1 (#40774)
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

# Conflicts:
#	packages/react-native/React-Core.podspec
#	packages/react-native/React/CoreModules/React-CoreModules.podspec
#	packages/rn-tester/Podfile.lock
2023-10-18 14:53:32 +01:00
Riccardo Cipolleschi 1e72390fbb Align all the pods to 13.4 (#41050)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41050

This change aligns all the podspecs to 13.4, including 3rd party libraries. This should fix https://github.com/facebook/react-native/issues/39826

## Changelog
[iOS][Changed] - Align all pods to 13.4

Reviewed By: huntie

Differential Revision: D50405114

fbshipit-source-id: 2d1b50ed8433e8cdc2214eb17e15be6ea81107a1

# Conflicts:
#	packages/react-native/scripts/cocoapods/utils.rb
2023-10-18 13:28:52 +01:00
Oscar Franco c4c8b4b95a Symbolicate unhandled promise rejections (#40914)
Summary:
For a very long time when a promise rejects without an attached catch we get this warning screen without a correct stack trace, only some internal calls to the RN internals.

<img src="https://github.com/facebook/react-native/assets/1634213/75aa7615-ee3e-4229-80d6-1744130de6e5" width="200" />

I created [an issue for discussion](https://github.com/react-native-community/discussions-and-proposals/discussions/718) in the react-native-community repo and we figured out it was only a matter of symbolication. While it cannot be done on release without external packages and source maps, at least while developing we can provide a symbolicated stack-trace so developers can better debug the source of rejected promise.

I got the stack trace symbolicated and the correct code frame. I'm missing some help trying to display it in the warning view but at the very least I can now correctly show the line of the error and log the codeframe to the console.
## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Show correct stack frame on unhandled promise rejections on development mode.

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/40914

Test Plan:
I simply created a throwing function on a dummy app, and checked the output of the console and the warning view:

```ts
import React from 'react';
import {SafeAreaView, Text} from 'react-native';

async function throwme() {
  throw new Error('UNHANDLED');
}

function App(): JSX.Element {
  throwme();

  return (
    <SafeAreaView>
      <Text>Throw test</Text>
    </SafeAreaView>
  );
}

export default App;
```

Here is the output

<img src="https://github.com/facebook/react-native/assets/1634213/2c100e4d-618e-4143-8d64-4095e8370f4f" width="200" />

Edit: I got the warning window working properly:

<img src="https://github.com/facebook/react-native/assets/1634213/f02a2568-da3e-4daa-8132-e05cbe591737" width="200" />

Reviewed By: yungsters

Differential Revision: D50324344

Pulled By: javache

fbshipit-source-id: 66850312d444cf1ae5333b493222ae0868d47056
2023-10-18 11:26:46 +01:00
Riccardo Cipolleschi ba5895e190 Fix unstable RCTAppDelegate podspec (#41009)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41009

This change should fix [#39971](https://github.com/facebook/react-native/issues/39971), computing the relative path from the App path to the pod installation root and using that instead of the absolute path to the `react-native.config.js` file

## Changelog
[Internal] - Stabilize RCTAppDelegate podspec

Reviewed By: cortinico

Differential Revision: D50323710

fbshipit-source-id: e29e62228d08c752e822d7a9ab5b1a2b5dcd6eb4
2023-10-18 11:25:35 +01:00
Saad Najmi efcb84126e Rename RCTRootViewFrameDidChangeNotification as it's not trac… (#39835)
Summary:
…king root view frame changes

Looking through where this was introduced (https://github.com/facebook/react-native/pull/37649), it seems the notification went from tracking root view size changes to window size changes. However, it was not renamed. I was using it for root view changes in RN-macOS, which.. I guess I'll refactor. Meanwhile, let's update the name?

## Changelog:

[IOS] [CHANGED] - Rename `RCTRootViewFrameDidChangeNotification` as it's not tracking root view frame changes

Pull Request resolved: https://github.com/facebook/react-native/pull/39835

Test Plan: CI should pass

Reviewed By: cipolleschi

Differential Revision: D50173742

Pulled By: javache

fbshipit-source-id: 4651696174c439800984a5e6cf642200bb9c4f3c
2023-10-18 11:24:27 +01:00
DeokHyeon Wi becb369601 update: fresco 3.0.0 -> 3.1.0 (#41024)
Summary:
- ref: https://github.com/reactwg/react-native-releases/discussions/64#discussioncomment-7270126

With react-native@0.73.0-rc.2 and fresco@3.0.0, `dlopen failed: library "libnative-imagetranscoder.so"` error made crash in android. so, I patched fresco version to 3.1.0, so that resolves the crash error according to https://github.com/facebook/fresco/issues/2722#issuecomment-1749333089 this comment.

## 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] [FIXED] - b1fccb05cc bumped fresco version to 3.1.0.

Pull Request resolved: https://github.com/facebook/react-native/pull/41024

Test Plan: after bumping fresco version, error not occurs.

Reviewed By: cipolleschi

Differential Revision: D50359564

Pulled By: cortinico

fbshipit-source-id: d24caecc057bad4d9c94e378422ab18c106a7ee6

# Conflicts:
#	packages/react-native/gradle/libs.versions.toml
2023-10-18 11:23:03 +01:00
Nicola Corti 20d1466be8 Fix compilation warnings introduced by Gradle 8.4 (#39959)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39959

We're still accessing project.buildDir which will be removed in Gradle 9.0
I'm cleaning it up here.

Changelog:
[Internal] [Changed] - Fix compilation warnings introduced by Gradle 8.4

Reviewed By: yungsters

Differential Revision: D50016573

fbshipit-source-id: de7a725f61b503f08991ebf85b9a002cefab221a
2023-10-18 11:19:48 +01:00
Lulu Wu 034d815cfd Add ExceptionsManagerModule for RNTester (#40767)
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

# Conflicts:
#	packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterApplication.kt
2023-10-18 11:19:29 +01:00
Samuel Susla 7193bd720b Re-introduce FabricViewStateManager interface (#40998)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40998

changelog: [Android] Add back interface FabricViewStateManager to unblock 0.73

I incorrectly deleted FabricViewStateManager in D47993140. This is a breaking change even for old architecture. Let's add it back and mark it as deprected so we can remove it later on.
This interface is not used in react-native anymore.

We are removing FabricViewStateManager because it simply wraps StateWrapper and provides no additional anymore.

Reviewed By: cortinico

Differential Revision: D50318633

fbshipit-source-id: aeb1c66c35018e336339616b564dee6f3156b54b
2023-10-18 11:15:43 +01:00
Nicola Corti 2d163cf496 Fix instacrash on bridgeless due to calling showMessage on null instance (#39834)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39834

Bridgeless is instacrashing on fast-refresh. This fixes it.

Changelog:
[Android] [Fixed] - Fix instacrash on bridgeless due to calling showMessage on null instance

Reviewed By: cipolleschi

Differential Revision: D49929822

fbshipit-source-id: a2ce65797abd34d6a3e2b7f2c50d38a62ea8bdea
2023-10-18 10:51:59 +01:00
UNIDY2002 0344de246d Configure Java toolchains only when executing App configuration (#40757)
Summary:
Fix https://github.com/facebook/react-native/issues/40560

## Changelog:

[ANDROID] [FIXED] - Ensure that `configureJavaToolChains` is only executed once during configuration

Pull Request resolved: https://github.com/facebook/react-native/pull/40757

Test Plan:
- Create a fresh `react-native@0.73.0-rc.1` project
- Install `react-native-webview`
- Apply [this patch](https://github.com/react-native-webview/react-native-webview/pull/3175/files) for `react-native-webview` (caused by another issue https://github.com/facebook/react-native/issues/40559)
- Edit `android/gradle.properties` and set `newArchEnabled` to true
- Build application
- (Expected) Application fail to build
- Apply this PR
- (Expected) Application build successfully

**Additional explanation:**

According to the implementation of `configureJavaToolChains`, all the subprojects (both the app and the libraries) will have their toolchains setup in one execution of the method. Therefore, it is okay for the method to be invoked only when configuring the plugin for the app.

On the other hand, invoking the method for more than one time will cause the issue stated in https://github.com/facebook/react-native/issues/40560.

Reviewed By: cipolleschi

Differential Revision: D50361871

Pulled By: cortinico

fbshipit-source-id: bd5e18df97988122788d0482dba954e517a0cb5c
2023-10-18 10:51:43 +01:00
Nicola Corti db45da7101 Make sure buildConfig is turned on for all the 3rd party libraries (#40939)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40939

Currently some libs on RN 0.73 are broken as the default for Build Config generation changed
from true to false since AGP 8.x. This reverts the behavior to the old flag.

Closes #40791
Closes #40559

Changelog:
[Internal] [Changed] - Make sure buildConfig is turned on for all the 3rd party libraries

Reviewed By: mdvacca

Differential Revision: D50270382

fbshipit-source-id: 02dcb031c577f65be2f41d9da0334c1b3d89e4c5
2023-10-18 10:51:27 +01:00
116-7 6bc0444acc Refactors InspectorProxy to compare pathname portion of url passed in… (#41005)
Summary:
… request to local pathname comparator variables to fix issue with other rightward elements of url such as query or fragment entering the comparison and causing 404 errors for key debugging routes.

A change in Chromium appended the query "?for_tabs" to the /json/list request made by Chrome DevTools to find remote debugger targets.

The current comparison in InspectorProxy.js compares the entire node IncomingMessage url field to the local pathname constants. The issue arises as url can also contain the query and fragment portions so the original comparison of "/json/list" === "/json/list" which resolved as true would become "/json/list?for_tabs" === "/json/list" and evaluate to false ultimately resulting in a 404 for the request.

In summary, all these changes/issues caused remote debugging of Hermes code in React Native apps to become unavailable, greatly impacting developer experience.

## Changelog:

[GENERAL] [FIXED] JS Debugging: Fix inspector-proxy to allow for DevTools requests with query strings

Pull Request resolved: https://github.com/facebook/react-native/pull/41005

Reviewed By: NickGerleman

Differential Revision: D50342265

Pulled By: robhogan

fbshipit-source-id: a65f2908f0bea9fc15e1e3e4e6d31a3b9598e81f
2023-10-18 10:37:28 +01:00
Alex Hunt bf0cdfcdd4 Add "Hermes only" to open debugger key prompt
Summary: Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D50327180

fbshipit-source-id: 6ee08fadd313828ddbc7702d5b3b1174a91b1ac1
2023-10-18 10:37:01 +01:00
Riccardo Cipolleschi 9b9c07eaf0 Run all the tests when not on a PR
Summary:
## Changelog:
[Internal] - Run all the tests in CI when not on a PR

Reviewed By: cortinico

Differential Revision: D50220596

fbshipit-source-id: be1a30d713e9d427858cf22bd3ca9549ad513057
2023-10-13 09:47:06 +01:00
Blake Friedman 8d2f41dbbf make runtime reference thread safe on tickleJs call
Summary:
The reference to runtime assumes the queue will ensure references to runtime are valid when invoked. This
isn't the case if you create a breakpoint, Hermes hit that breakpoint and your refresh the app. This consistently
will crash the app.

The fix is to not assument this, similar to ReactCommon/react/runtime/hermes/HermesInstance.cpp

Reviewed By: javache

Differential Revision: D50225678

fbshipit-source-id: b45cae1f5f687bc8c699fd74b187376a547012c5
2023-10-13 09:43:59 +01:00
Alex Hunt 9f6575b6d4 Disable --experimental-debugger by default (#40795)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40795

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D50178494

fbshipit-source-id: b833b6accadd2902d97a45e030cd48d1b62ac438
2023-10-12 13:50:37 +01:00
Nick Gerleman a09999911a Fix iOS Paper Scroll Event RTL check (#40751)
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
2023-10-11 11:39:37 +01:00
Nick Gerleman 59855fc412 Remove code to support bottom-up layout events in horizontal RTL (#39646)
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
2023-10-11 11:39:32 +01:00
Nick Gerleman 31680559b4 Deterministic onLayout event ordering for iOS Paper (#40748)
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
2023-10-11 11:39:25 +01:00
Nick Gerleman 21e2445d06 Top-down onLayout events (#39644)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39644

This makes Android Paper/Classic renderer fire `onLayout` events top down, like in Fabric/new Architecture. This gives a much more sane model for using layout events to calculate bottom/right-edge insets.

I was under the impression that Paper in general was bottom-up, but it turns out that is only true for Android and Windows (iOS seems totally deterministic).

This is a behavior change, but to my knowledge was never hit during the Fabric migration, and any JS code already written for both Android and iOS cannot make assumptions here anyways.

Changelog:
[General][Changed] - Make layout events top-down on Android classic renderer

Reviewed By: mdvacca

Differential Revision: D49627996

fbshipit-source-id: 29964b421dd420681d45348c7db16f211a6c087f
2023-10-11 11:39:20 +01:00
Dmitry Rykun 4a4fb12a47 Store hermes stable artifacts inside Pods directory (#40733)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40733

Node package managers may purge or recreate `node_modules/react-native` when adding/removenf project dependencies. Storing hermes iOS artifacts inside `node_modules/react-native/sdks` is not reliable.
This diff moves those artifacts to `Pods/hermes-engine-artifacts`.
Should fix https://github.com/facebook/react-native/issues/39903
Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D50081559

fbshipit-source-id: a130898e12fb6275cadaef7617bf4b6a09e6487e
2023-10-11 11:39:10 +01:00
Nicola Corti c05b3d385e [0.73] Make sure template is consuming the right buildToolsVersion (#39957) 2023-10-11 11:37:38 +01:00
Alex Hunt 5310a50a66 Add --experimental-debugger-frontend flag, restore 0.72 flow as base (#40766)
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
2023-10-10 18:41:40 +01:00
Distiller e22a8d1ac5 [0.73.0-rc.2] Bump version numbers 2023-10-10 08:36:24 +00:00
Luna Wei d5ff7e7e74 Update .gitignore for sdks/downloads 2023-10-06 10:22:38 -07:00
Luna Wei b4bc816fcd Update pod for CI 2023-10-06 10:22:03 -07:00
Luna Wei a52faa6fab fix missing sed import 2023-10-06 09:30:04 -07:00
Luna Wei 8e5439f1a7 Set hermes for Android template project in testing
Summary:
Changelog: [Internal] - Set the hermes value as specified by the test-e2e-local script flag. Right now, the script incorrectly ignores the flag

By default, the template project has `hermesEnabled=true`

Reviewed By: cipolleschi

Differential Revision: D49831355

fbshipit-source-id: 7fb8613fa86f2c6140b7d25b16aeb583e6e26c12
2023-10-06 09:25:13 -07:00
Saad Najmi 3ba5e4f89c [iOS] Deprecate RCTGetMultiplierForContentSizeCategory (#39785) 2023-10-05 21:35:01 -07:00
Nishan ee6ff7a53e fix: view flips on RTL with new transform origin changes in Paper arch. (#39803)
Summary:
Fixes - https://github.com/facebook/react-native/pull/38626#issuecomment-1745528706. Explained the issue [here](https://github.com/facebook/react-native/pull/38626#issuecomment-1747212113).

## Changelog:

[IOS] [FIXED] - View flips horizontally in paper arch on RTL

Pull Request resolved: https://github.com/facebook/react-native/pull/39803

Test Plan: Run RNTester in Paper mode on iOS

Reviewed By: NickGerleman

Differential Revision: D49952227

Pulled By: lunaleaps

fbshipit-source-id: 7240552e499765859dceea0a0406561cc3a3148f
2023-10-05 21:34:28 -07:00
Riccardo Cipolleschi 7f72275567 Fix Gemfile, setting Active support to < 7.1.0 (#39828)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39828

Active Suppert released a new Gem which is incompatible with Cocoapods 1.13.0, the latest release, as they removed a method used by cocoapods.

This fix ensures that we install compatible versions of the Gem.

## Changelog:
[iOS][Fixed] - Set the max version of Active support to 7.0.8

Reviewed By: hoxyq

Differential Revision: D49949782

fbshipit-source-id: 278097502d3a416567cc8c0b90090fee4fb21503
2023-10-05 21:34:09 -07:00
Dmitry Rykun d247b61f78 Default to native view configs in bridged mode and to static view configs in bridgeless mode (#39704)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39704

Default to native view configs in bridged mode and to static view configs in bridgeless mode.
Remove `setRuntimeConfigProvider` calls from RNTester and from the Template.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49687252

fbshipit-source-id: 140e1c510ba3fbc153978b59c8bb4b4e35bc7571
2023-10-05 21:34:01 -07:00
Riccardo Cipolleschi 7a4a0c4984 Remove unneeded write to .version file (#39807)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39807

We used to need this file so that we could read the react native version when [creating Hermes artifacts](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R1507). Originally, that change was introduced [here](https://github.com/facebook/react-native/commit/e4b5d3eec9bae44c46795c4be097b31cb48593ae#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47)

Despite the fact that that approach was wrong, as we already have the right version in the package.json which is guaranteed to be present, a lot has changed since then and we don't need that file anymore.

## Changelog:
[Internal] - Remove lines that write a .version file while releasing on npm

Reviewed By: lunaleaps

Differential Revision: D49909718

fbshipit-source-id: bd23d6d73001d0b58bf6b0321ed6d4ceb3523e7a
2023-10-05 21:33:18 -07:00
Nicola Corti 82a52a1939 Fix broken Loading/Refreshing indicator on Android
Summary:
The Loading.../Refreshing... indicator is currently broken on Android.
The reason is related to D42599220
We used to have a Toast shown to users on Android as a fallback, but as the
DevLoadingView is not always loaded as a module in the core package, this ends up in the banner never beign shown to the user (on RN Tester or template apps).

Changelog:
[Android] [Fixed] - Fix broken Loading/Refreshing indicator on Android

Reviewed By: cipolleschi

Differential Revision: D49876757

fbshipit-source-id: 400e002327ebca908e3e7a7f81c5066888ac4e9b
2023-10-05 21:32:51 -07:00
Distiller e8f41ce48b [0.73.0-rc.1] Bump version numbers 2023-10-04 08:37:43 +00:00
Riccardo Cipolleschi 032706790a Make jobs required for hermes to run on tagged builds (#39800) 2023-10-04 10:22:14 +02:00
Thibault Malbranche 8eec395268 Revert "[0.73.0-rc.1] Bump version numbers"
This reverts commit 725b1c9a7e.
2023-10-04 10:20:44 +02:00
Distiller 725b1c9a7e [0.73.0-rc.1] Bump version numbers 2023-10-03 20:23:12 +00:00
Alex Hunt 50f242e4d7 Bump package versions
#publish-packages-to-npm
2023-10-03 15:11:53 -04:00
Alex Hunt e5bf39cf85 Fix start command exit behaviour
This is an eager cherry pick of #39788 for `0.73-stable`.
2023-10-03 15:04:22 -04:00
Alex Hunt 047f645079 Fix typings for ReactNativeVersionCheck
Applies correct fix for `_formatVersion` misalignment — based on #36657.
2023-10-03 14:36:08 -04:00
Alex Hunt dd30cd30c9 Revert "Fix typings for ReactNativeVersion.js"
This reverts commit b6c0703ebb.
2023-10-03 14:36:08 -04:00
Distiller f133dd2efb [0.73.0-rc.0] Bump version numbers 2023-10-03 16:13:06 +00:00
Riccardo Cipolleschi 8263b9d237 [RN][CI] Make the Choose CI Job run also on tags (#39774) 2023-10-03 11:58:36 -04:00
Alex Hunt 0c040314b5 Revert "[0.73.0-rc.0] Bump version numbers"
This reverts commit 6b9cf50b30.
2023-10-03 11:57:38 -04:00
Alex Hunt b6c0703ebb Fix typings for ReactNativeVersion.js
This is an eager cherry pick of #39784 for `0.73-stable`.
2023-10-03 11:56:51 -04:00
Distiller 6b9cf50b30 [0.73.0-rc.0] Bump version numbers 2023-10-02 21:39:05 +00:00
Alex Hunt aa58c4c4b7 Bump package versions (dependant packages)
#publish-packages-to-npm
2023-10-02 16:57:25 -04:00
Alex Hunt 3793a64808 Bump package versions
#publish-packages-to-npm
2023-10-02 16:50:40 -04:00
David Vacca e6b24a3146 Mark initHybrid as @JvmStatic (#39755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39755

The goal of this diff is to fix:
```
JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static or non-static method
"Lcom/facebook/react/jscexecutor/JSCExecutor;.initHybrid(Lcom/facebook/react/bridge/ReadableNativeMap;)Lcom/facebook/jni/HybridData;"

```

changelog: [internal] internal

Reviewed By: luluwu2032

Differential Revision: D49831595

fbshipit-source-id: 9ce22cdccdd02af74edb27be2df72a469d3166c9
2023-10-02 16:31:16 -04:00
Alex Hunt c116c1c268 Sync debugger-frontend
Summary:
Sync latest `debugger-frontend` artifacts, based on https://github.com/motiz88/rn-chrome-devtools-frontend/pull/12.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D49502838

fbshipit-source-id: 25805066670ac35ec976dc820a73a722ee182dd2
2023-10-02 13:40:29 -04:00
Riccardo Cipolleschi 67ebc7c7d5 Update Xcode 15 patches to be more robust (#39710)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39710

Last week Apple released Xcode 15, which required us to ship a workaround for the new linker.
Unfortunately, the previous fix was not good enough and there were some edge cases that were not covered.
For example, in some occasions the flags are read as an array and the `-Wl` and the `-ld_classic` flags were separated and not properly removed when moving from Xcode 15 to Xcpde 14.3.1.

This change fixes those edge cases, with a more robust solution where:
- We convert the flags to a string.
- We trim the string and the values properly.
- We add the flags when running `pod install` with Xcode 15 as the default iOS toolchain.
- We remove the flags when running `pod install` with Xcode <15 as the default iOS toolchain.

## Changelog:
[Internal] - Make the Xcode 15 workaround more robust.

Reviewed By: dmytrorykun

Differential Revision: D49748844

fbshipit-source-id: 34976d148f123c5aacba6487a500874bb938fe99
2023-10-02 10:59:36 -04:00
Alex Hunt 49bd0ed303 Bump package versions
#publish-packages-to-npm
2023-09-27 15:22:42 -04:00
Alex Hunt 608b4bac44 Bump CLI to 12.0.0-alpha.17 2023-09-27 15:21:37 -04:00
Dmitry Rykun ea09bcd8cb Export Commands and Constants only if native view config interop is enabled (#39696)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39696

`Commands` and `Constants` should be set in native only if component data is instantiated via native view config interop layer.
Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D49684166

fbshipit-source-id: ceaa29c2ed3336aa6e21a116a3f5f94e03c225c1
2023-09-27 13:41:12 -04:00
Ramanpreet Nara 562109fdd3 Enable TurboModule interop in Bridgeless Mode (#39687)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39687

Bridgeless mode is releasing in 0.73.

Bridgeless mode isn't stable inside RNTester (in 0.73) without the TurboModule interop layer: T164853040.

**Changes:** Enable the TurboModule interop layer in RNTester (Bridgeless Mode).

**Urgency:** This will unblock the 0.73.

Changelog: [General][Added] - Enable TurboModule interop in Bridgeless mode

Reviewed By: fkgozali, dmytrorykun, luluwu2032

Differential Revision: D49653919

fbshipit-source-id: a4a09a99544c2ef8713484dbeab5cb04f29256cc
2023-09-27 13:39:15 -04:00
Arushi Kesarwani a57a8b7782 Reduce visibility of functions in ReactHostImpl (#39640)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39640

changelog: [internal] internal

Reducing visibility from public to package only for `ReactHostImpl.getDefaultHardwareBackBtnHandler()` since it's only used within package

Reviewed By: mdvacca

Differential Revision: D49612859

fbshipit-source-id: 3c40888da732f33dc046d9363b08119e707f4ea4
2023-09-27 13:03:16 -04:00
Luna Wei 69e0c2d916 bumped packages versions
#publish-packages-to-npm
2023-09-27 12:36:19 -04:00
Alex Hunt 04d80478c8 Bump CLI to 12.0.0-alpha.16 2023-09-27 12:19:06 -04:00
Alex Hunt 73cd7c0e6b [Hotfix] Remove node engines constraint for normalize-color (#39698) 2023-09-27 12:18:28 -04:00
Lulu Wu 4c1418a216 Enable Template with Bridgeless (#39661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39661

Changelog:
[Android][Changed] - Enable Template with Bridgeless

Reviewed By: cortinico

Differential Revision: D49464580

fbshipit-source-id: 26dd8e2a0b9a66421d58f147eed4d2fd28817dc7
2023-09-26 13:40:32 -04:00
Dmitry Rykun 9f5c77dab7 Enable native view configs in bridgeless mode in OSS (#39476)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39476

This diff enables native view config interop layer in bridgeless mode by default for OSS.
It also removes redundant `enableNativeViewConfigsInBridgelessMode` JS feature flag.
Changelog: [General][Added] - Native view config interop layer enabled in bridgeless mode.

Reviewed By: luluwu2032

Differential Revision: D49318325

fbshipit-source-id: ea2e38b2ea10637b578d98e38d97eed923498fb3
2023-09-26 13:15:39 -04:00
Luna Wei b07859ab1f Bump react-native-babel-preset to 0.73.18 #publish-packages-to-npm 2023-09-26 12:16:15 -04:00
Alex Hunt 90b8518073 bumped packages versions
#publish-packages-to-npm
2023-09-26 10:27:39 -04:00
Alex Hunt d54e20b5f6 Set Hermes release version 2023-09-26 10:24:51 -04:00
163 changed files with 2063 additions and 2008 deletions
+16 -4
View File
@@ -35,7 +35,16 @@ jobs:
command: |
apt update
apt install -y wget git curl jq
curl -sL https://deb.nodesource.com/setup_18.x | bash -
apt-get update
apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update
apt install -y nodejs
npm install --global yarn
- checkout
@@ -69,9 +78,9 @@ jobs:
command: |
if [[ -z "$CIRCLE_PULL_REQUEST" ]]; then
echo "Not in a PR. Can't filter properly outside a PR. Please open a PR so that we can run the proper CI tests."
echo "Skipping!"
echo "For safety, we run all the tests!"
mkdir -p /tmp/circleci/
echo '{}' > /tmp/circleci/pipeline_config.json
echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json
else
PR_NUMBER="${CIRCLE_PULL_REQUEST##*/}"
node ./scripts/circleci/pipeline_selection.js filter-jobs
@@ -91,4 +100,7 @@ jobs:
workflows:
always-run:
jobs:
- choose_ci_jobs
- choose_ci_jobs:
filters:
tags:
only: /.*/
+11 -2
View File
@@ -621,7 +621,7 @@ jobs:
- run:
name: Install Node JS
# Note: Version set separately for non-Windows builds, see above.
command: choco install nodejs-lts
command: choco install nodejs --version=18.18.0 --allow-downgrade
# Setup Dependencies
- run:
@@ -681,7 +681,16 @@ jobs:
apt update
apt install -y wget git curl jq
curl -sL https://deb.nodesource.com/setup_18.x | bash -
apt-get update
apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
NODE_MAJOR=18
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update
apt install -y nodejs
npm install --global yarn
- checkout
+2 -2
View File
@@ -91,8 +91,8 @@ references:
hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v1-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
# Cocoapods - RNTester
pods_cache_key: &pods_cache_key v10-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
cocoapods_cache_key: &cocoapods_cache_key v8-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v6-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
cocoapods_cache_key: &cocoapods_cache_key v9-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v7-podfilelock-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
# Cocoapods - Template
template_cocoapods_cache_key: &template_cocoapods_cache_key v4-cocoapods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile.lock" }}-{{ checksum "/tmp/iOSTemplateProject/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "packages/rn-tester/Podfile.lock }}
+2
View File
@@ -43,6 +43,7 @@ workflows:
requires:
- prepare_hermes_workspace
- build_apple_slices_hermes:
filters: *only_release_tags
requires:
- build_hermesc_apple
matrix:
@@ -54,6 +55,7 @@ workflows:
requires:
- prepare_hermes_workspace
- build_hermes_macos:
filters: *only_release_tags
requires:
- build_apple_slices_hermes
matrix:
-1
View File
@@ -21,7 +21,6 @@ DerivedData
*.xcuserstate
project.xcworkspace
**/.xcode.env.local
/poackages/react-native/sdks/downloads/
# Gradle
/build/
+1 -1
View File
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.12'
gem 'activesupport', '>= 6.1.7.3'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
+29
View File
@@ -0,0 +1,29 @@
/**
* 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.
*
* @flow strict
* @format
* @oncall react_native
*/
declare module 'open' {
import type {ChildProcess} from 'child_process';
declare export type Options = $ReadOnly<{
wait?: boolean,
background?: boolean,
newInstance?: boolean,
allowNonzeroExitCode?: boolean,
...
}>;
declare type open = (
target: string,
options?: Options,
) => Promise<ChildProcess>;
declare module.exports: open;
}
+4 -4
View File
@@ -55,8 +55,8 @@
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "^0.73.11",
"@react-native/metro-config": "^0.73.0",
"@react-native/metro-babel-transformer": "^0.73.12",
"@react-native/metro-config": "^0.73.2",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.57.1",
@@ -91,8 +91,8 @@
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "0.79.1",
"metro-memory-fs": "0.79.1",
"metro-babel-register": "^0.80.0",
"metro-memory-fs": "^0.80.0",
"micromatch": "^4.0.4",
"mkdirp": "^0.5.1",
"mock-fs": "^5.1.4",
+7 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.73.0",
"version": "0.73.1",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
@@ -9,7 +9,12 @@
"directory": "packages/assets"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/assets#readme",
"keywords": ["assets", "registry", "react-native", "support"],
"keywords": [
"assets",
"registry",
"react-native",
"support"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
+9 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.73.0",
"version": "0.73.1",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -9,7 +9,14 @@
"directory": "packages/babel-plugin-codegen"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/babel-plugin-codegen#readme",
"keywords": ["babel", "plugin", "codegen", "react-native", "native-modules", "view-manager"],
"keywords": [
"babel",
"plugin",
"codegen",
"react-native",
"native-modules",
"view-manager"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.73.1",
"version": "0.73.8",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,20 +22,20 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "^0.73.0",
"@react-native-community/cli-server-api": "12.0.0-alpha.15",
"@react-native-community/cli-tools": "12.0.0-alpha.15",
"@react-native/metro-babel-transformer": "^0.73.11",
"@react-native/dev-middleware": "^0.73.4",
"@react-native-community/cli-server-api": "12.0.0",
"@react-native-community/cli-tools": "12.0.0",
"@react-native/metro-babel-transformer": "^0.73.12",
"chalk": "^4.0.0",
"execa": "^5.1.1",
"metro": "0.79.1",
"metro-config": "0.79.1",
"metro-core": "0.79.1",
"metro": "^0.80.0",
"metro-config": "^0.80.0",
"metro-core": "^0.80.0",
"node-fetch": "^2.2.0",
"readline": "^1.3.0"
},
"devDependencies": {
"metro-resolver": "0.79.1"
"metro-resolver": "^0.80.0"
},
"engines": {
"node": ">=18"
@@ -15,7 +15,6 @@ import {logger} from '@react-native-community/cli-tools';
import chalk from 'chalk';
import execa from 'execa';
import fetch from 'node-fetch';
import readline from 'readline';
import {KeyPressHandler} from '../../utils/KeyPressHandler';
const CTRL_C = '\u0003';
@@ -23,27 +22,23 @@ const CTRL_D = '\u0004';
export default function attachKeyHandlers({
cliConfig,
serverInstance,
devServerUrl,
messageSocket,
experimentalDebuggerFrontend,
}: {
cliConfig: Config,
devServerUrl: string,
serverInstance: http$Server | https$Server,
messageSocket: $ReadOnly<{
broadcast: (type: string, params?: Record<string, mixed> | null) => void,
...
}>,
experimentalDebuggerFrontend: boolean,
}) {
if (process.stdin.isTTY !== true) {
logger.debug('Interactive mode is not supported in this environment');
return;
}
readline.emitKeypressEvents(process.stdin);
// $FlowIgnore[prop-missing]
process.stdin.setRawMode(true);
const execaOptions = {
env: {FORCE_COLOR: chalk.supportsColor ? 'true' : 'false'},
};
@@ -83,30 +78,35 @@ export default function attachKeyHandlers({
).stdout?.pipe(process.stdout);
break;
case 'j':
if (!experimentalDebuggerFrontend) {
return;
}
await fetch(devServerUrl + '/open-debugger', {method: 'POST'});
break;
case CTRL_C:
case CTRL_D:
logger.info('Stopping server');
listener?.({pause: true});
serverInstance.close(() => {
process.emit('SIGINT');
process.exit();
});
keyPressHandler.stopInterceptingKeyStrokes();
process.emit('SIGINT');
process.exit();
}
};
const keyPressHandler = new KeyPressHandler(onPress);
const listener = keyPressHandler.createInteractionListener();
keyPressHandler.createInteractionListener();
keyPressHandler.startInterceptingKeyStrokes();
logger.log(
`
${chalk.bold('i')} - run on iOS
${chalk.bold('a')} - run on Android
${chalk.bold('d')} - open Dev Menu
${chalk.bold('j')} - open debugger
${chalk.bold('r')} - reload app
`,
[
'',
`${chalk.bold('i')} - run on iOS`,
`${chalk.bold('a')} - run on Android`,
`${chalk.bold('d')} - open Dev Menu`,
...(experimentalDebuggerFrontend
? [`${chalk.bold('j')} - open debugger (experimental, Hermes only)`]
: []),
`${chalk.bold('r')} - reload app`,
'',
].join('\n'),
);
}
@@ -95,6 +95,13 @@ const startCommand: Command = {
name: '--no-interactive',
description: 'Disables interactive mode',
},
{
name: '--experimental-debugger',
description:
"[Experimental] Enable the new debugger experience and 'j' to " +
'debug. This enables the new frontend experience only: connection ' +
'reliability and some basic features are unstable in this release.',
},
],
};
@@ -33,6 +33,7 @@ export type StartCommandArgs = {
assetPlugins?: string[],
cert?: string,
customLogReporterPath?: string,
experimentalDebugger: boolean,
host?: string,
https?: boolean,
maxWorkers?: number,
@@ -118,7 +119,7 @@ async function runServer(
logger,
unstable_experiments: {
// NOTE: Only affects the /open-debugger endpoint
enableCustomDebuggerFrontend: true,
enableNewDebugger: args.experimentalDebugger,
},
});
@@ -137,8 +138,8 @@ async function runServer(
attachKeyHandlers({
cliConfig: ctx,
devServerUrl,
serverInstance,
messageSocket: messageSocketEndpoint,
experimentalDebuggerFrontend: args.experimentalDebugger,
});
}
},
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<8a0bac4cfdcc3cd44a4f7136f2611ebb>>
Git revision: 0ffb687b8e049769d2e7162ba8d7205c90e4110c
@generated SignedSource<<7fdc9e65be03ba4c6654f14c6f23d645>>
Git revision: 18f202a1ae468a01afb44ffd2f71d28023126989
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/motiz88/rn-chrome-devtools-frontend
@@ -13,6 +13,7 @@ style.setProperty('--image-file-chromeLeft', 'url(\"' + new URL('./chromeLeft.av
style.setProperty('--image-file-chromeMiddle', 'url(\"' + new URL('./chromeMiddle.avif', import.meta.url).toString() + '\")');
style.setProperty('--image-file-chromeRight', 'url(\"' + new URL('./chromeRight.avif', import.meta.url).toString() + '\")');
style.setProperty('--image-file-cssoverview_icons_2x', 'url(\"' + new URL('./cssoverview_icons_2x.avif', import.meta.url).toString() + '\")');
style.setProperty('--image-file-favicon', 'url(\"' + new URL('./favicon.ico', import.meta.url).toString() + '\")');
style.setProperty('--image-file-navigationControls_2x', 'url(\"' + new URL('./navigationControls_2x.png', import.meta.url).toString() + '\")');
style.setProperty('--image-file-navigationControls', 'url(\"' + new URL('./navigationControls.png', import.meta.url).toString() + '\")');
style.setProperty('--image-file-nodeIcon', 'url(\"' + new URL('./nodeIcon.avif', import.meta.url).toString() + '\")');
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/devtools_app/devtools_app.js"></script>
<body class="undocked" id="-blink-dev-tools">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/inspector/inspector.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/js_app/js_app.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/ndb_app/ndb_app.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/node_app/node_app.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -1 +1 @@
import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"closeable",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ViewManager.registerViewExtension({location:"panel",id:"timeline",title:r(o.performance),commandPrompt:r(o.showPerformance),order:66,hasToolbar:!1,isPreviewFeature:!0,loadView:async()=>(await c()).TimelinePanel.TimelinePanel.instance({forceNew:null,isNode:!0})}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});
import*as e from"../../core/i18n/i18n.js";import*as t from"../../core/root/root.js";import*as i from"../../ui/legacy/legacy.js";const o={profiler:"Profiler",showProfiler:"Show Profiler",performance:"Performance",showPerformance:"Show Performance",startStopRecording:"Start/stop recording",showRecentTimelineSessions:"Show recent timeline sessions",record:"Record",stop:"Stop",startProfilingAndReloadPage:"Start profiling and reload page"},n=e.i18n.registerUIStrings("panels/js_profiler/js_profiler-meta.ts",o),r=e.i18n.getLazilyComputedLocalizedString.bind(void 0,n);let a,l;async function s(){return l||(l=await import("../profiler/profiler.js")),l}async function c(){return a||(a=await import("../timeline/timeline.js")),a}function g(e){return void 0===a?[]:e(a)}i.ViewManager.registerViewExtension({location:"panel",id:"js_profiler",title:r(o.profiler),commandPrompt:r(o.showProfiler),order:65,persistence:"permanent",experiment:t.Runtime.ExperimentName.JS_PROFILER_TEMP_ENABLE,loadView:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance()}),i.ActionRegistration.registerActionExtension({actionId:"profiler.js-toggle-recording",category:i.ActionRegistration.ActionCategory.JAVASCRIPT_PROFILER,title:r(o.startStopRecording),iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes(){return e=e=>[e.ProfilesPanel.JSProfilerPanel],void 0===l?[]:e(l);var e},loadActionDelegate:async()=>(await s()).ProfilesPanel.JSProfilerPanel.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.show-history",loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.showRecentTimelineSessions),contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),bindings:[{platform:"windows,linux",shortcut:"Ctrl+H"},{platform:"mac",shortcut:"Meta+Y"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.toggle-recording",category:i.ActionRegistration.ActionCategory.PERFORMANCE,iconClass:"record-start",toggleable:!0,toggledIconClass:"record-stop",toggleWithRedColor:!0,contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),options:[{value:!0,title:r(o.record)},{value:!1,title:r(o.stop)}],bindings:[{platform:"windows,linux",shortcut:"Ctrl+E"},{platform:"mac",shortcut:"Meta+E"}]}),i.ActionRegistration.registerActionExtension({actionId:"timeline.record-reload",iconClass:"refresh",contextTypes:()=>g((e=>[e.TimelinePanel.TimelinePanel])),category:i.ActionRegistration.ActionCategory.PERFORMANCE,title:r(o.startProfilingAndReloadPage),loadActionDelegate:async()=>(await c()).TimelinePanel.ActionDelegate.instance(),bindings:[{platform:"windows,linux",shortcut:"Ctrl+Shift+E"},{platform:"mac",shortcut:"Meta+Shift+E"}]});
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import*as e from"../../ui/legacy/legacy.js";import*as t from"../../core/i18n/i18n.js";import*as n from"../../ui/lit-html/lit-html.js";const i=new CSSStyleSheet;i.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const o={debuggerBrandName:"React Native JS Inspector",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:r,html:l}=n,s=t.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",o),c=t.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:t}=e;return a&&!t||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([i]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();r(l` <div class="rn-welcome-panel"> <div class="rn-welcome-header"> <img class="rn-welcome-icon" src="${e}" role="presentation"> <div class="rn-welcome-title"> ${c(o.debuggerBrandName)} </div> </div> <div class="rn-welcome-tagline"> ${c(o.welcomeMessage)} </div> <div class="rn-welcome-links"> <x-link class="devtools-link" href="https://reactnative.dev/docs/next/debugging"> ${c(o.docsLabel)} </x-link> <x-link class="devtools-link" href="https://reactnative.dev/blog/tags/debugging"> ${c(o.whatsNewLabel)} </x-link> </div> </div> `,this.contentElement,{host:this})}}var g=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{g as RNWelcome};
import*as e from"../../ui/legacy/legacy.js";import*as r from"../../core/i18n/i18n.js";import*as t from"../../ui/lit-html/lit-html.js";const o=new CSSStyleSheet;o.replaceSync('.rn-welcome-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:16px;text-align:center;background-color:var(--color-background-elevation-0)}.rn-welcome-header{display:flex;align-items:center;margin-bottom:16px}.rn-welcome-icon{width:30px;height:30px;border-radius:4px;margin-right:12px}.rn-welcome-title{font-size:20px;color:var(--color-text-primary)}.rn-welcome-title-accessory{margin-left:12px;padding:4px 8px;border-radius:4px;background-color:var(--color-purple-bright);font-size:12px;color:var(--color-on-primary)}.rn-welcome-tagline{margin-bottom:24px;font-size:1rem;line-height:1.3;color:var(--color-text-secondary)}.rn-welcome-links{display:flex;align-items:center}.rn-welcome-links > .devtools-link{position:relative;margin:0 16px;font-size:14px}.rn-welcome-links > .devtools-link:not(:last-child)::after{content:"";position:absolute;right:-16px;height:16px;border-right:1px solid var(--color-details-hairline)}\n/*# sourceURL=rnWelcome.css */\n');const n={debuggerBrandName:"React Native JS Inspector",techPreviewLabel:"Technology Preview",welcomeMessage:"Welcome to debugging in React Native",docsLabel:"Debugging docs",whatsNewLabel:"What's new"},{render:i,html:l}=t,s=r.i18n.registerUIStrings("panels/rn_welcome/RNWelcome.ts",n),c=r.i18n.getLocalizedString.bind(void 0,s);let a;class d extends e.Widget.VBox{static instance(e={forceNew:null}){const{forceNew:r}=e;return a&&!r||(a=new d),a}constructor(){super(!0,!0)}wasShown(){super.wasShown(),this.registerCSSFiles([o]),this.render(),e.InspectorView.InspectorView.instance().showDrawer(!0)}render(){const e=new URL("../../Images/react_native/welcomeIcon.png",import.meta.url).toString();i(l` <div class="rn-welcome-panel"> <div class="rn-welcome-header"> <img class="rn-welcome-icon" src="${e}" role="presentation"> <div class="rn-welcome-title"> ${c(n.debuggerBrandName)} </div> <div class="rn-welcome-title-accessory"> ${c(n.techPreviewLabel)} </div> </div> <div class="rn-welcome-tagline"> ${c(n.welcomeMessage)} </div> <div class="rn-welcome-links"> <x-link class="devtools-link" href="https://reactnative.dev/docs/debugging"> ${c(n.docsLabel)} </x-link> <x-link class="devtools-link" href="https://reactnative.dev/blog"> ${c(n.whatsNewLabel)} </x-link> </div> </div> `,this.contentElement,{host:this})}}var m=Object.freeze({__proto__:null,RNWelcomeImpl:d});export{m as RNWelcome};
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/rn_inspector/rn_inspector.js"></script>
<body class="undocked" id="-blink-dev-tools">
@@ -6,7 +6,7 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>DevTools</title>
<title>DevTools (React Native)</title>
<style>
@media (prefers-color-scheme: dark) {
body {
@@ -16,5 +16,6 @@
</style>
<meta http-equiv="Content-Security-Policy" content="object-src 'none'; script-src 'self' 'unsafe-eval' https://chrome-devtools-frontend.appspot.com">
<meta name="referrer" content="no-referrer">
<link rel="icon" href="./Images/favicon.ico">
<script type="module" src="./entrypoints/worker_app/worker_app.js"></script>
<body class="undocked" id="-blink-dev-tools">
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.73.0",
"version": "0.73.2",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+3 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.73.1",
"version": "0.73.4",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,12 +23,13 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "^0.73.0",
"@react-native/debugger-frontend": "^0.73.2",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^1.0.0",
"connect": "^3.6.5",
"debug": "^2.2.0",
"node-fetch": "^2.2.0",
"open": "^7.0.3",
"serve-static": "^1.13.1",
"temp-dir": "^2.0.0"
},
@@ -20,6 +20,7 @@ import connect from 'connect';
import path from 'path';
// $FlowFixMe[untyped-import] TODO: type serve-static
import serveStaticMiddleware from 'serve-static';
import deprecated_openFlipperMiddleware from './middleware/deprecated_openFlipperMiddleware';
import openDebuggerMiddleware from './middleware/openDebuggerMiddleware';
import InspectorProxy from './inspector-proxy/InspectorProxy';
import DefaultBrowserLauncher from './utils/DefaultBrowserLauncher';
@@ -86,14 +87,18 @@ export default function createDevMiddleware({
const middleware = connect()
.use(
'/open-debugger',
openDebuggerMiddleware({
serverBaseUrl,
inspectorProxy,
browserLauncher: unstable_browserLauncher,
eventReporter: unstable_eventReporter,
experiments,
logger,
}),
experiments.enableNewDebugger
? openDebuggerMiddleware({
serverBaseUrl,
inspectorProxy,
browserLauncher: unstable_browserLauncher,
eventReporter: unstable_eventReporter,
experiments,
logger,
})
: deprecated_openFlipperMiddleware({
logger,
}),
)
.use(
'/debugger-frontend',
@@ -111,7 +116,7 @@ export default function createDevMiddleware({
function getExperiments(config: ExperimentsConfig): Experiments {
return {
enableCustomDebuggerFrontend: config.enableCustomDebuggerFrontend ?? false,
enableNewDebugger: config.enableNewDebugger ?? false,
enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false,
};
}
@@ -94,12 +94,13 @@ export default class InspectorProxy implements InspectorProxyQueries {
response: ServerResponse,
next: (?Error) => mixed,
) {
const pathname = url.parse(request.url).pathname;
if (
request.url === PAGES_LIST_JSON_URL ||
request.url === PAGES_LIST_JSON_URL_2
pathname === PAGES_LIST_JSON_URL ||
pathname === PAGES_LIST_JSON_URL_2
) {
this._sendJsonResponse(response, this.getPageDescriptions());
} else if (request.url === PAGES_LIST_JSON_VERSION_URL) {
} else if (pathname === PAGES_LIST_JSON_VERSION_URL) {
this._sendJsonResponse(response, {
Browser: 'Mobile JavaScript',
'Protocol-Version': '1.1',
@@ -0,0 +1,60 @@
/**
* 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.
*
* @flow strict-local
* @format
* @oncall react_native
*/
import type {NextHandleFunction} from 'connect';
import type {IncomingMessage, ServerResponse} from 'http';
import type {Logger} from '../types/Logger';
import open from 'open';
const FLIPPER_SELF_CONNECT_URL =
'flipper://null/Hermesdebuggerrn?device=React%20Native';
type Options = $ReadOnly<{
logger?: Logger,
}>;
/**
* Open the legacy Flipper debugger (Hermes).
*
* @deprecated This replicates the pre-0.73 workflow of opening Flipper via the
* `flipper://` URL scheme, failing if Flipper is not installed locally. This
* flow will be removed in a future version.
*/
export default function deprecated_openFlipperMiddleware({
logger,
}: Options): NextHandleFunction {
return async (
req: IncomingMessage,
res: ServerResponse,
next: (err?: Error) => void,
) => {
if (req.method === 'POST') {
logger?.info('Launching JS debugger...');
try {
logger?.warn(
'Attempting to debug JS in Flipper (deprecated). This requires ' +
'Flipper to be installed on your system to handle the ' +
"'flipper://' URL scheme.",
);
await open(FLIPPER_SELF_CONNECT_URL);
res.end();
} catch (e) {
logger?.error(
'Error launching Flipper: ' + e.message ?? 'Unknown error',
);
res.writeHead(500);
res.end();
}
}
};
}
@@ -72,7 +72,7 @@ export default function openDebuggerMiddleware({
if (typeof appId === 'string') {
logger?.info(
(launchType === 'launch' ? 'Launching' : 'Redirecting to') +
' JS debugger...',
' JS debugger (experimental)...',
);
target = targets.find(_target => _target.description === appId);
} else {
@@ -108,7 +108,6 @@ export default function openDebuggerMiddleware({
getDevToolsFrontendUrl(
target.webSocketDebuggerUrl,
serverBaseUrl,
experiments,
),
),
);
@@ -120,7 +119,6 @@ export default function openDebuggerMiddleware({
target.webSocketDebuggerUrl,
// Use a relative URL.
'',
experiments,
),
});
res.end();
@@ -10,10 +10,11 @@
export type Experiments = $ReadOnly<{
/**
* Enables the use of the custom debugger frontend (@react-native/debugger-frontend)
* in the /open-debugger endpoint.
* Enables the new JS debugger launch flow and custom debugger frontend
* (@react-native/debugger-frontend). When disabled, /open-debugger will
* trigger the legacy Flipper connection flow.
*/
enableCustomDebuggerFrontend: boolean,
enableNewDebugger: boolean,
/**
* Enables the handling of GET requests in the /open-debugger endpoint,
@@ -9,40 +9,18 @@
* @oncall react_native
*/
import type {Experiments} from '../types/Experiments';
/**
* The Chrome DevTools frontend revision to use. This should be set to the
* latest version known to be compatible with Hermes.
*
* Revision should be the full identifier from:
* https://chromium.googlesource.com/chromium/src.git
*/
const DEVTOOLS_FRONTEND_REV = 'd9568d04d7dd79269c5a655d7ada69650c5a8336'; // Chrome 100.0.4896.75
/**
* Construct the URL to Chrome DevTools connected to a given debugger target.
* Get the DevTools frontend URL to debug a given React Native CDP target.
*/
export default function getDevToolsFrontendUrl(
webSocketDebuggerUrl: string,
devServerUrl: string,
experiments: Experiments,
): string {
const scheme = new URL(webSocketDebuggerUrl).protocol.slice(0, -1);
const webSocketUrlWithoutProtocol = webSocketDebuggerUrl.replace(
/^wss?:\/\//,
'',
const appUrl = `${devServerUrl}/debugger-frontend/rn_inspector.html`;
const webSocketUrlWithoutProtocol = encodeURIComponent(
webSocketDebuggerUrl.replace(/^wss?:\/\//, ''),
);
if (experiments.enableCustomDebuggerFrontend) {
const urlBase = `${devServerUrl}/debugger-frontend/rn_inspector.html`;
return `${urlBase}?${scheme}=${encodeURIComponent(
webSocketUrlWithoutProtocol,
)}&sources.hide_add_folder=true`;
}
const urlBase = `https://chrome-devtools-frontend.appspot.com/serve_rev/@${DEVTOOLS_FRONTEND_REV}/devtools_app.html`;
return `${urlBase}?panel=console&${scheme}=${encodeURIComponent(
webSocketUrlWithoutProtocol,
)}`;
return `${appUrl}?${scheme}=${webSocketUrlWithoutProtocol}&sources.hide_add_folder=true`;
}
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.73.0",
"version": "0.73.1",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@react-native/eslint-plugin": "^0.73.0",
"@react-native/eslint-plugin": "^0.73.1",
"@typescript-eslint/eslint-plugin": "^5.57.1",
"@typescript-eslint/parser": "^5.57.1",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.73.0",
"version": "0.73.1",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
@@ -9,7 +9,12 @@
"directory": "packages/eslint-plugin-react-native"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-plugin-react-native#readme",
"keywords": ["eslint", "rules", "eslint-config", "react-native"],
"keywords": [
"eslint",
"rules",
"eslint-config",
"react-native"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
+9 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.73.0",
"version": "0.73.1",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -9,7 +9,14 @@
"directory": "packages/eslint-plugin-specs"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/eslint-plugin-specs#readme",
"keywords": ["eslint", "rules", "react-native", "native-modules", "components", "specs"],
"keywords": [
"eslint",
"rules",
"react-native",
"native-modules",
"components",
"specs"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
+10 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.73.0",
"version": "0.73.2",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -9,16 +9,20 @@
"directory": "packages/metro-config"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/metro-config#readme",
"keywords": ["metro", "config", "react-native"],
"keywords": [
"metro",
"config",
"react-native"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
},
"exports": "./index.js",
"dependencies": {
"@react-native/metro-babel-transformer": "^0.73.11",
"@react-native/js-polyfills": "^0.73.0",
"metro-config": "0.79.1",
"metro-runtime": "0.79.1"
"@react-native/metro-babel-transformer": "^0.73.12",
"@react-native/js-polyfills": "^0.73.1",
"metro-config": "^0.80.0",
"metro-runtime": "^0.80.0"
}
}
+8 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.73.0",
"version": "0.73.2",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
@@ -9,9 +9,11 @@
"directory": "packages/normalize-color"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/normalize-color#readme",
"keywords": ["color", "normalization", "normalize-colors", "react-native"],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
}
"keywords": [
"color",
"normalization",
"normalize-colors",
"react-native"
],
"bugs": "https://github.com/facebook/react-native/issues"
}
+8 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.73.0",
"version": "0.73.1",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -9,7 +9,13 @@
"directory": "packages/polyfills"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/polyfills#readme",
"keywords": ["polyfill", "polyfills", "js", "js-polyfills", "react-native"],
"keywords": [
"polyfill",
"polyfills",
"js",
"js-polyfills",
"react-native"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.73.16",
"version": "0.73.18",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.73.11",
"version": "0.73.12",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.73.0",
"version": "0.73.1",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -66,6 +66,7 @@ tasks.withType<KotlinCompile>().configureEach {
apiVersion = "1.5"
// See comment above on JDK 11 support
jvmTarget = "11"
allWarningsAsErrors = true
}
}
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.73.0",
"version": "0.73.3",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -9,7 +9,11 @@
"directory": "packages/react-native-gradle-plugin"
},
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-gradle-plugin#readme",
"keywords": ["gradle", "plugin", "react-native"],
"keywords": [
"gradle",
"plugin",
"react-native"
],
"bugs": "https://github.com/facebook/react-native/issues",
"engines": {
"node": ">=18"
@@ -12,8 +12,10 @@ import com.android.build.gradle.internal.tasks.factory.dependsOn
import com.facebook.react.internal.PrivateReactExtension
import com.facebook.react.tasks.GenerateCodegenArtifactsTask
import com.facebook.react.tasks.GenerateCodegenSchemaTask
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFields
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForApp
import com.facebook.react.utils.AgpConfiguratorUtils.configureBuildConfigFieldsForLibraries
import com.facebook.react.utils.AgpConfiguratorUtils.configureDevPorts
import com.facebook.react.utils.AgpConfiguratorUtils.configureNamespaceForLibraries
import com.facebook.react.utils.BackwardCompatUtils.configureBackwardCompatibilityReactMap
import com.facebook.react.utils.DependencyUtils.configureDependencies
import com.facebook.react.utils.DependencyUtils.configureRepositories
@@ -64,9 +66,10 @@ class ReactPlugin : Plugin<Project> {
}
configureReactNativeNdk(project, extension)
configureBuildConfigFields(project, extension)
configureBuildConfigFieldsForApp(project, extension)
configureDevPorts(project)
configureBackwardCompatibilityReactMap(project)
configureJavaToolChains(project)
project.extensions.getByType(AndroidComponentsExtension::class.java).apply {
onVariants(selector().all()) { variant ->
@@ -77,12 +80,11 @@ class ReactPlugin : Plugin<Project> {
}
// Library Only Configuration
configureBuildConfigFieldsForLibraries(project)
configureNamespaceForLibraries(project)
project.pluginManager.withPlugin("com.android.library") {
configureCodegen(project, extension, rootExtension, isLibrary = true)
}
// Library and App Configurations
configureJavaToolChains(project)
}
private fun checkJvmVersion(project: Project) {
@@ -23,6 +23,7 @@ internal fun Project.configureReactTasks(variant: Variant, config: ReactExtensio
val targetName = variant.name.capitalizeCompat()
val targetPath = variant.name
val buildDir = this.layout.buildDirectory.get().asFile
// Resources: generated/assets/react/<variant>/index.android.bundle
val resourcesDir = File(buildDir, "generated/res/react/$targetPath")
// Bundle: generated/assets/react/<variant>/index.android.bundle
@@ -8,17 +8,22 @@
package com.facebook.react.utils
import com.android.build.api.variant.AndroidComponentsExtension
import com.android.build.gradle.LibraryExtension
import com.facebook.react.ReactExtension
import com.facebook.react.utils.ProjectUtils.isHermesEnabled
import com.facebook.react.utils.ProjectUtils.isNewArchEnabled
import java.io.File
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.plugins.AppliedPlugin
import org.w3c.dom.Element
@Suppress("UnstableApiUsage")
internal object AgpConfiguratorUtils {
fun configureBuildConfigFields(project: Project, extension: ReactExtension) {
fun configureBuildConfigFieldsForApp(project: Project, extension: ReactExtension) {
val action =
Action<AppliedPlugin> {
project.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext ->
@@ -35,6 +40,16 @@ internal object AgpConfiguratorUtils {
project.pluginManager.withPlugin("com.android.library", action)
}
fun configureBuildConfigFieldsForLibraries(appProject: Project) {
appProject.rootProject.allprojects { subproject ->
subproject.pluginManager.withPlugin("com.android.library") {
subproject.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext ->
ext.buildFeatures.buildConfig = true
}
}
}
}
fun configureDevPorts(project: Project) {
val devServerPort =
project.properties["reactNativeDevServerPort"]?.toString() ?: DEFAULT_DEV_SERVER_PORT
@@ -53,6 +68,43 @@ internal object AgpConfiguratorUtils {
project.pluginManager.withPlugin("com.android.application", action)
project.pluginManager.withPlugin("com.android.library", action)
}
fun configureNamespaceForLibraries(appProject: Project) {
appProject.rootProject.allprojects { subproject ->
subproject.pluginManager.withPlugin("com.android.library") {
subproject.extensions.getByType(AndroidComponentsExtension::class.java).finalizeDsl { ext ->
if (ext.namespace == null) {
val android = subproject.extensions.getByType(LibraryExtension::class.java)
val manifestFile = android.sourceSets.getByName("main").manifest.srcFile
manifestFile
.takeIf { it.exists() }
?.let { file ->
getPackageNameFromManifest(file)?.let { packageName ->
ext.namespace = packageName
}
}
}
}
}
}
}
}
const val DEFAULT_DEV_SERVER_PORT = "8081"
fun getPackageNameFromManifest(manifest: File): String? {
val factory: DocumentBuilderFactory = DocumentBuilderFactory.newInstance()
val builder: DocumentBuilder = factory.newDocumentBuilder()
try {
val xmlDocument = builder.parse(manifest)
val manifestElement = xmlDocument.getElementsByTagName("manifest").item(0) as? Element
val packageName = manifestElement?.getAttribute("package")
return if (packageName.isNullOrEmpty()) null else packageName
} catch (e: Exception) {
return null
}
}
@@ -0,0 +1,65 @@
/*
* 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.
*/
package com.facebook.react.utils
import java.io.File
import org.junit.Assert.*
import org.junit.Rule
import org.junit.Test
import org.junit.rules.TemporaryFolder
class AgpConfiguratorUtilsTest {
@get:Rule val tempFolder = TemporaryFolder()
@Test
fun getPackageNameFromManifest_withEmptyFile_returnsNull() {
val mainFolder = tempFolder.newFolder("awesome-module/src/main/")
val manifest = File(mainFolder, "AndroidManifest.xml").apply { writeText("") }
val actual = getPackageNameFromManifest(manifest)
assertNull(actual)
}
@Test
fun getPackageNameFromManifest_withMissingPackage_returnsNull() {
val mainFolder = tempFolder.newFolder("awesome-module/src/main/")
val manifest =
File(mainFolder, "AndroidManifest.xml").apply {
writeText(
// language=xml
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
"""
.trimIndent())
}
val actual = getPackageNameFromManifest(manifest)
assertNull(actual)
}
@Test
fun getPackageNameFromManifest_withPackage_returnsPackage() {
val mainFolder = tempFolder.newFolder("awesome-module/src/main/")
val manifest =
File(mainFolder, "AndroidManifest.xml").apply {
writeText(
// language=xml
"""
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.facebook.react" >
</manifest>
"""
.trimIndent())
}
val actual = getPackageNameFromManifest(manifest)
assertNotNull(actual)
assertEquals("com.facebook.react", actual)
}
}
@@ -30,7 +30,7 @@ function createAnimatedStyle(
const animatedStyles: any = {};
for (const key in style) {
const value = style[key];
if (key === 'transform') {
if (value != null && key === 'transform') {
animatedStyles[key] =
ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform()
? new AnimatedObject(value)
@@ -87,6 +87,13 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
if (enableBridgeless) {
#if RCT_NEW_ARCH_ENABLED
// Enable native view config interop only if both bridgeless mode and Fabric is enabled.
RCTSetUseNativeViewConfigsInBridgelessMode([self fabricEnabled]);
// Enable TurboModule interop by default in Bridgeless mode
RCTEnableTurboModuleInterop(YES);
RCTEnableTurboModuleInteropBridgeProxy(YES);
[self createReactHost];
[self unstable_registerLegacyComponents];
[RCTComponentViewFactory currentComponentViewFactory].thirdPartyFabricComponentsProvider = self;
@@ -185,7 +192,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
interfaceOrientation:(UIInterfaceOrientation)previousInterfaceOrientation
traitCollection:(UITraitCollection *)previousTraitCollection API_AVAILABLE(ios(13.0))
{
[[NSNotificationCenter defaultCenter] postNotificationName:RCTRootViewFrameDidChangeNotification object:self];
[[NSNotificationCenter defaultCenter] postNotificationName:RCTWindowFrameDidChangeNotification object:self];
}
#pragma mark - RCTCxxBridgeDelegate
@@ -117,15 +117,19 @@ Pod::Spec.new do |s|
s.dependency "React-debug"
s.dependency "React-rendererdebug"
rel_path_from_pods_root_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(Pod::Config.instance.installation_root)
rel_path_from_pods_to_app = Pathname.new(ENV['APP_PATH']).relative_path_from(File.join(Pod::Config.instance.installation_root, 'Pods'))
s.script_phases = {
:name => "Generate Legacy Components Interop",
:script => "
WITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"
source $WITH_ENVIRONMENT
${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{ENV['APP_PATH']} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate
${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{rel_path_from_pods_to_app} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate
",
:execution_position => :before_compile,
:input_files => ["#{ENV['APP_PATH']}/react-native.config.js"],
:input_files => ["#{rel_path_from_pods_root_to_app}/react-native.config.js"],
:output_files => ["${REACT_NATIVE_PATH}/Libraries/AppDelegate/RCTLegacyInteropComponents.mm"],
}
end
+3 -3
View File
@@ -10,8 +10,8 @@
*/
exports.version = {
major: 1000,
minor: 0,
major: 0,
minor: 73,
patch: 0,
prerelease: null,
prerelease: 'rc.4',
};
@@ -40,7 +40,9 @@ exports.checkVersions = function checkVersions(): void {
};
function _formatVersion(
version: (typeof Platform)['constants']['reactNativeVersion'],
version:
| (typeof Platform)['constants']['reactNativeVersion']
| {major: number, minor: number, patch: number, prerelease: ?string},
): string {
return (
`${version.major}.${version.minor}.${version.patch}` +
+2 -1
View File
@@ -30,6 +30,7 @@ export type LogData = $ReadOnly<{|
message: Message,
category: Category,
componentStack: ComponentStack,
stack?: string,
|}>;
export type Observer = (
@@ -198,7 +199,7 @@ export function addLog(log: LogData): void {
// otherwise spammy logs would pause rendering.
setImmediate(() => {
try {
const stack = parseErrorStack(errorForStackTrace?.stack);
const stack = parseErrorStack(log.stack ?? errorForStackTrace?.stack);
appendNewLog(
new LogBoxLog({
@@ -55,14 +55,20 @@ export function get<Config>(
): HostComponent<Config> {
ReactNativeViewConfigRegistry.register(name, () => {
const {native, strict, verify} = getRuntimeConfig?.(name) ?? {
native: true,
native: !global.RN$Bridgeless,
strict: false,
verify: false,
};
const viewConfig = native
? getNativeComponentAttributes(name)
: createViewConfig(viewConfigProvider());
let viewConfig;
if (native) {
viewConfig = getNativeComponentAttributes(name);
} else {
viewConfig = createViewConfig(viewConfigProvider());
if (viewConfig == null) {
viewConfig = getNativeComponentAttributes(name);
}
}
if (verify) {
const nativeViewConfig = native
@@ -13,7 +13,6 @@
import type {RootTag} from '../Types/RootTagTypes';
import {unstable_hasComponent} from '../NativeComponent/NativeComponentRegistryUnstable';
import ReactNativeFeatureFlags from './ReactNativeFeatureFlags';
let cachedConstants = null;
@@ -22,6 +21,10 @@ const errorMessageForMethod = (methodName: string): string =>
methodName +
"' is not available in the new React Native architecture.";
function nativeViewConfigsInBridgelessModeEnabled(): boolean {
return global.RN$LegacyInterop_UIManager_getConstants !== undefined;
}
function getCachedConstants(): Object {
if (!cachedConstants) {
cachedConstants = global.RN$LegacyInterop_UIManager_getConstants();
@@ -31,7 +34,7 @@ function getCachedConstants(): Object {
const UIManagerJS: {[string]: $FlowFixMe} = {
getViewManagerConfig: (viewManagerName: string): mixed => {
if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) {
if (nativeViewConfigsInBridgelessModeEnabled()) {
return getCachedConstants()[viewManagerName];
} else {
console.error(
@@ -46,7 +49,7 @@ const UIManagerJS: {[string]: $FlowFixMe} = {
return unstable_hasComponent(viewManagerName);
},
getConstants: (): Object => {
if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) {
if (nativeViewConfigsInBridgelessModeEnabled()) {
return getCachedConstants();
} else {
console.error(errorMessageForMethod('getConstants'));
@@ -179,7 +182,7 @@ const UIManagerJS: {[string]: $FlowFixMe} = {
console.error(errorMessageForMethod('dismissPopupMenu')),
};
if (ReactNativeFeatureFlags.enableNativeViewConfigsInBridgelessMode()) {
if (nativeViewConfigsInBridgelessModeEnabled()) {
Object.keys(getCachedConstants()).forEach(viewConfigName => {
UIManagerJS[viewConfigName] = getCachedConstants()[viewConfigName];
});
@@ -54,10 +54,6 @@ export type FeatureFlags = {|
* Enables use of setNativeProps in JS driven animations.
*/
shouldUseSetNativePropsInFabric: () => boolean,
/**
* Enables native view configs in brdgeless mode.
*/
enableNativeViewConfigsInBridgelessMode: () => boolean,
/**
* Enables a hotfix for forcing materialization of views with elevation set.
*/
@@ -74,7 +70,6 @@ const ReactNativeFeatureFlags: FeatureFlags = {
enableAccessToHostTreeInFabric: () => false,
shouldUseAnimatedObjectForTransform: () => false,
shouldUseSetNativePropsInFabric: () => false,
enableNativeViewConfigsInBridgelessMode: () => false,
shouldForceUnflattenForElevation: () => false,
};
@@ -10,6 +10,8 @@
import typeof {enable} from 'promise/setimmediate/rejection-tracking';
import LogBox from './LogBox/LogBox';
let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
allRejections: true,
onUnhandled: (id, rejection = {}) => {
@@ -34,17 +36,29 @@ let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
}
}
const warning =
`Possible Unhandled Promise Rejection (id: ${id}):\n` +
`${message ?? ''}\n` +
(stack == null ? '' : stack);
console.warn(warning);
const warning = `Possible unhandled promise rejection (id: ${id}):\n${
message ?? ''
}`;
if (__DEV__) {
LogBox.addLog({
level: 'warn',
message: {
content: warning,
substitutions: [],
},
componentStack: [],
stack,
category: 'possible_unhandled_promise_rejection',
});
} else {
console.warn(warning);
}
},
onHandled: id => {
const warning =
`Promise Rejection Handled (id: ${id})\n` +
`Promise rejection handled (id: ${id})\n` +
'This means you can ignore any previous messages of the form ' +
`"Possible Unhandled Promise Rejection (id: ${id}):"`;
`"Possible unhandled promise rejection (id: ${id}):"`;
console.warn(warning);
},
};
+1 -1
View File
@@ -18,7 +18,7 @@ end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2022.05.16.00'
socket_rocket_version = '0.6.0'
socket_rocket_version = '0.6.1'
boost_compiler_flags = '-Wno-documentation'
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
@@ -351,6 +351,11 @@ using namespace facebook;
return (RCTUIManager *)_uiManagerProxy;
}
- (RCTBridgeProxy *)object
{
return self;
}
/**
* NSProxy setup
*/
@@ -387,12 +392,14 @@ using namespace facebook;
@implementation RCTUIManagerProxy {
RCTViewRegistry *_viewRegistry;
NSMutableDictionary<NSNumber *, UIView *> *_legacyViewRegistry;
}
- (instancetype)initWithViewRegistry:(RCTViewRegistry *)viewRegistry
{
self = [super self];
if (self) {
_viewRegistry = viewRegistry;
_legacyViewRegistry = [NSMutableDictionary new];
}
return self;
}
@@ -404,20 +411,21 @@ using namespace facebook;
{
[self logWarning:@"Please migrate to RCTViewRegistry: @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED."
cmd:_cmd];
return [_viewRegistry viewForReactTag:reactTag];
return [_viewRegistry viewForReactTag:reactTag] ? [_viewRegistry viewForReactTag:reactTag]
: [_legacyViewRegistry objectForKey:reactTag];
}
- (void)addUIBlock:(RCTViewManagerUIBlock)block
{
[self
logWarning:
@"This method isn't implemented faithfully: the viewRegistry passed to RCTViewManagerUIBlock is nil. Please migrate to RCTViewRegistry: @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED."
@"This method isn't implemented faithfully. Please migrate to RCTViewRegistry if possible: @synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED."
cmd:_cmd];
__weak __typeof(self) weakSelf = self;
RCTExecuteOnMainQueue(^{
__typeof(self) strongSelf = weakSelf;
if (strongSelf) {
block((RCTUIManager *)strongSelf, nil);
block((RCTUIManager *)strongSelf, strongSelf->_legacyViewRegistry);
}
});
}
@@ -12,7 +12,7 @@ RCT_EXTERN NSString *const RCTPlatformName;
RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotification;
RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey;
RCT_EXTERN NSString *const RCTRootViewFrameDidChangeNotification;
RCT_EXTERN NSString *const RCTWindowFrameDidChangeNotification;
/**
* This notification fires when the bridge initializes.
@@ -12,7 +12,7 @@ NSString *const RCTPlatformName = @"ios";
NSString *const RCTUserInterfaceStyleDidChangeNotification = @"RCTUserInterfaceStyleDidChangeNotification";
NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey = @"traitCollection";
NSString *const RCTRootViewFrameDidChangeNotification = @"RCTRootViewFrameDidChangeNotification";
NSString *const RCTWindowFrameDidChangeNotification = @"RCTWindowFrameDidChangeNotification";
NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification";
NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification";
@@ -21,10 +21,10 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(73),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
RCTVersionPrerelease: @"rc.4",
};
});
return __rnVersion;
@@ -27,6 +27,6 @@
*/
@property (nonatomic, assign) YGDirection baseDirection;
- (void)layoutWithAffectedShadowViews:(NSHashTable<RCTShadowView *> *)affectedShadowViews;
- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews;
@end
@@ -41,7 +41,7 @@
}
}
- (void)layoutWithAffectedShadowViews:(NSHashTable<RCTShadowView *> *)affectedShadowViews
- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews
{
NSHashTable<NSString *> *other = [NSHashTable new];
@@ -73,7 +73,7 @@ RCT_EXPORT_MODULE()
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interfaceFrameDidChange)
name:RCTRootViewFrameDidChangeNotification
name:RCTWindowFrameDidChangeNotification
object:nil];
}
@@ -18,7 +18,7 @@ end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2022.05.16.00'
socket_rocket_version = '0.6.0'
socket_rocket_version = '0.6.1'
header_search_paths = [
"\"$(PODS_TARGET_SRCROOT)/React/CoreModules\"",
@@ -9,6 +9,7 @@
#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTBridgeProxy.h>
#import <React/RCTInvalidating.h>
#import <React/RCTRootView.h>
#import <React/RCTViewManager.h>
@@ -173,6 +174,12 @@ RCT_EXTERN NSString *const RCTUIManagerWillUpdateViewsDueToContentSizeMultiplier
@end
@interface RCTBridgeProxy (RCTUIManager)
@property (nonatomic, readonly) RCTUIManager *uiManager;
@end
RCT_EXTERN NSMutableDictionary<NSString *, id> *RCTModuleConstantsForDestructuredComponent(
NSMutableDictionary<NSString *, NSDictionary *> *directEvents,
NSMutableDictionary<NSString *, NSDictionary *> *bubblingEvents,
@@ -534,7 +534,7 @@ static NSDictionary *deviceOrientationEventBody(UIDeviceOrientation orientation)
{
RCTAssertUIManagerQueue();
NSHashTable<RCTShadowView *> *affectedShadowViews = [NSHashTable weakObjectsHashTable];
NSPointerArray *affectedShadowViews = [NSPointerArray weakObjectsPointerArray];
[rootShadowView layoutWithAffectedShadowViews:affectedShadowViews];
if (!affectedShadowViews.count) {
@@ -1489,9 +1489,10 @@ NSMutableDictionary<NSString *, id> *RCTModuleConstantsForDestructuredComponent(
// lazifyViewManagerConfig function in JS. This fuction uses NativeModules global object that is not available in the
// New Architecture. To make native view configs work in the New Architecture we will populate these properties in
// native.
moduleConstants[@"Commands"] = viewConfig[@"Commands"];
moduleConstants[@"Constants"] = viewConfig[@"Constants"];
if (RCTGetUseNativeViewConfigsInBridgelessMode()) {
moduleConstants[@"Commands"] = viewConfig[@"Commands"];
moduleConstants[@"Constants"] = viewConfig[@"Constants"];
}
// Add direct events
for (NSString *eventName in viewConfig[@"directEvents"]) {
if (!directEvents[eventName]) {
@@ -25,7 +25,7 @@ extern __attribute__((visibility("default"))) RCTDimensions RCTGetDimensions(CGF
// Get font size multiplier for font base size (Large) by content size category
extern __attribute__((visibility("default"))) CGFloat RCTGetMultiplierForContentSizeCategory(
UIContentSizeCategory category);
UIContentSizeCategory category) __deprecated;
#ifdef __cplusplus
}
@@ -71,7 +71,7 @@ static SEL selectorForType(NSString *type)
object:nil
userInfo:@{@"module" : _bridgelessViewManager}];
}
return _manager ?: _bridgelessViewManager;
return _manager ? _manager : _bridgelessViewManager;
}
RCT_NOT_IMPLEMENTED(-(instancetype)init)
@@ -480,11 +480,6 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
}
}
NSDictionary<NSString *, NSNumber *> *commands = [self commandsForViewMangerClass:managerClass
methods:methods
methodCount:count];
free(methods);
#if RCT_DEBUG
for (NSString *event in bubblingEvents) {
if ([directEvents containsObject:event]) {
@@ -499,15 +494,22 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
Class superClass = [managerClass superclass];
return @{
NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithDictionary:@{
@"propTypes" : propTypes,
@"directEvents" : directEvents,
@"bubblingEvents" : bubblingEvents,
@"capturingEvents" : capturingEvents,
@"baseModuleName" : superClass == [NSObject class] ? (id)kCFNull : RCTViewManagerModuleNameForClass(superClass),
@"Commands" : commands,
@"Constants" : [self constantsForViewMangerClass:managerClass],
};
}];
if (RCTGetUseNativeViewConfigsInBridgelessMode()) {
result[@"Commands"] = [self commandsForViewMangerClass:managerClass methods:methods methodCount:count];
result[@"Constants"] = [self constantsForViewMangerClass:managerClass];
}
free(methods);
return result;
}
- (NSDictionary<NSString *, id> *)viewConfig
@@ -31,7 +31,7 @@ typedef struct CG_BOXABLE RCTLayoutMetrics RCTLayoutMetrics;
struct RCTLayoutContext {
CGPoint absolutePosition;
__unsafe_unretained NSHashTable<RCTShadowView *> *_Nonnull affectedShadowViews;
__unsafe_unretained NSPointerArray *_Nonnull affectedShadowViews;
__unsafe_unretained NSHashTable<NSString *> *_Nonnull other;
};
typedef struct CG_BOXABLE RCTLayoutContext RCTLayoutContext;
@@ -29,6 +29,6 @@
*/
@property (nonatomic, assign) YGDirection baseDirection;
- (void)layoutWithAffectedShadowViews:(NSHashTable<RCTShadowView *> *)affectedShadowViews;
- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews;
@end
@@ -23,7 +23,7 @@
return self;
}
- (void)layoutWithAffectedShadowViews:(NSHashTable<RCTShadowView *> *)affectedShadowViews
- (void)layoutWithAffectedShadowViews:(NSPointerArray *)affectedShadowViews
{
NSHashTable<NSString *> *other = [NSHashTable new];
@@ -304,7 +304,7 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
{
if (!RCTLayoutMetricsEqualToLayoutMetrics(self.layoutMetrics, layoutMetrics)) {
self.layoutMetrics = layoutMetrics;
[layoutContext.affectedShadowViews addObject:self];
[layoutContext.affectedShadowViews addPointer:((__bridge void *)self)];
}
}
@@ -1058,7 +1058,7 @@ RCT_SET_AND_PRESERVE_OFFSET(setScrollIndicatorInsets, scrollIndicatorInsets, UIE
}
CGPoint offset = scrollView.contentOffset;
if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) {
if ([self reactLayoutDirection] == UIUserInterfaceLayoutDirectionRightToLeft) {
offset.x = scrollView.contentSize.width - scrollView.frame.size.width - offset.x;
}
@@ -204,7 +204,10 @@
self.center = position;
self.bounds = bounds;
updateTransform(self);
id transformOrigin = objc_getAssociatedObject(self, @selector(reactTransformOrigin));
if (transformOrigin) {
updateTransform(self);
}
}
#pragma mark - Transforms
@@ -242,31 +245,35 @@
static void updateTransform(UIView *view)
{
CGSize size = view.bounds.size;
RCTTransformOrigin transformOrigin = view.reactTransformOrigin;
CATransform3D transform;
id rawTansformOrigin = objc_getAssociatedObject(view, @selector(reactTransformOrigin));
if (rawTansformOrigin) {
CGSize size = view.bounds.size;
CGFloat anchorPointX = 0;
CGFloat anchorPointY = 0;
CGFloat anchorPointZ = 0;
RCTTransformOrigin transformOrigin;
[rawTansformOrigin getValue:&transformOrigin];
if (transformOrigin.x.unit == YGUnitPoint) {
anchorPointX = transformOrigin.x.value - size.width * 0.5;
} else if (transformOrigin.x.unit == YGUnitPercent) {
anchorPointX = (transformOrigin.x.value * 0.01 - 0.5) * size.width;
}
CGFloat anchorPointX = 0;
CGFloat anchorPointY = 0;
CGFloat anchorPointZ = 0;
if (transformOrigin.x.unit == YGUnitPoint) {
anchorPointX = transformOrigin.x.value - size.width * 0.5;
} else if (transformOrigin.x.unit == YGUnitPercent) {
anchorPointX = (transformOrigin.x.value * 0.01 - 0.5) * size.width;
if (transformOrigin.y.unit == YGUnitPoint) {
anchorPointY = transformOrigin.y.value - size.height * 0.5;
} else if (transformOrigin.y.unit == YGUnitPercent) {
anchorPointY = (transformOrigin.y.value * 0.01 - 0.5) * size.height;
}
anchorPointZ = transformOrigin.z;
transform = CATransform3DConcat(
view.reactTransform, CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ));
transform =
CATransform3DConcat(CATransform3DMakeTranslation(-anchorPointX, -anchorPointY, -anchorPointZ), transform);
} else {
transform = view.reactTransform;
}
if (transformOrigin.y.unit == YGUnitPoint) {
anchorPointY = transformOrigin.y.value - size.height * 0.5;
} else if (transformOrigin.y.unit == YGUnitPercent) {
anchorPointY = (transformOrigin.y.value * 0.01 - 0.5) * size.height;
}
anchorPointZ = transformOrigin.z;
CATransform3D transform = CATransform3DMakeTranslation(anchorPointX, anchorPointY, anchorPointZ);
transform = CATransform3DConcat(view.reactTransform, transform);
transform = CATransform3DTranslate(transform, -anchorPointX, -anchorPointY, -anchorPointZ);
view.layer.transform = transform;
// Enable edge antialiasing in rotation, skew, or perspective transforms
view.layer.allowsEdgeAntialiasing = transform.m12 != 0.0f || transform.m21 != 0.0f || transform.m34 != 0.0f;
@@ -21,6 +21,7 @@ import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPl
import com.facebook.react.ReactInstanceEventListener
import com.facebook.react.ReactInstanceManager
import com.facebook.react.bridge.ReactContext
import com.facebook.react.config.ReactFeatureFlags
import com.facebook.react.modules.network.NetworkingModule
/**
@@ -30,6 +31,9 @@ import com.facebook.react.modules.network.NetworkingModule
object ReactNativeFlipper {
@JvmStatic
fun initializeFlipper(context: Context, reactInstanceManager: ReactInstanceManager) {
if (ReactFeatureFlags.enableBridgelessArchitecture) {
return
}
if (FlipperUtils.shouldEnableFlipper(context)) {
val client = AndroidFlipperClient.getInstance(context)
client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()))
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.73.0-rc.4
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -19,7 +19,6 @@ import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.Callback;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.interfaces.ReactHost;
import com.facebook.react.modules.core.PermissionListener;
/**
@@ -8,7 +8,6 @@
package com.facebook.react
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.interfaces.ReactHost
@OptIn(UnstableReactNativeAPI::class)
/** Interface that represents an instance of a React Native application */
@@ -16,7 +16,6 @@ import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.devsupport.DoubleTapReloadRecognizer;
import com.facebook.react.interfaces.ReactHost;
import com.facebook.react.interfaces.fabric.ReactSurface;
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.interfaces
package com.facebook.react
import android.app.Activity
import android.content.Context
@@ -13,8 +13,8 @@ import android.os.Bundle
import com.facebook.react.bridge.ReactContext
import com.facebook.react.bridge.queue.ReactQueueConfiguration
import com.facebook.react.common.LifecycleState
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.devsupport.interfaces.DevSupportManager
import com.facebook.react.interfaces.TaskInterface
import com.facebook.react.interfaces.fabric.ReactSurface
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler
@@ -25,7 +25,6 @@ import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler
*
* The implementation of this interface should be Thread Safe
*/
@UnstableReactNativeAPI
interface ReactHost {
/** The current [LifecycleState] for React Host */
@@ -71,7 +71,7 @@ public class ReactContext extends ContextWrapper {
private @Nullable JSExceptionHandler mExceptionHandlerWrapper;
private @Nullable WeakReference<Activity> mCurrentActivity;
private @Nullable InteropModuleRegistry mInteropModuleRegistry;
protected @Nullable InteropModuleRegistry mInteropModuleRegistry;
private boolean mIsInitialized = false;
public ReactContext(Context base) {
@@ -8,7 +8,7 @@
package com.facebook.react.common.annotations
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
@RequiresOptIn(
level = RequiresOptIn.Level.ERROR,
message = "This API is experimental and is likely to change or to be removed in the future")
@@ -34,6 +34,8 @@ object DefaultNewArchitectureEntryPoint {
ReactFeatureFlags.enableFabricRenderer = fabricEnabled
ReactFeatureFlags.unstable_useFabricInterop = fabricEnabled
ReactFeatureFlags.enableBridgelessArchitecture = bridgelessEnabled
ReactFeatureFlags.useNativeViewConfigsInBridgelessMode = fabricEnabled && bridgelessEnabled
ReactFeatureFlags.unstable_useTurboModuleInterop = bridgelessEnabled
this.privateFabricEnabled = fabricEnabled
this.privateTurboModulesEnabled = turboModulesEnabled
@@ -8,20 +8,41 @@
package com.facebook.react.defaults
import android.content.Context
import com.facebook.react.JSEngineResolutionAlgorithm
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.JSBundleLoader
import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.fabric.ComponentFactory
import com.facebook.react.interfaces.ReactHost
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler
import com.facebook.react.runtime.JSCInstance
import com.facebook.react.runtime.ReactHostImpl
import com.facebook.react.runtime.hermes.HermesInstance
@UnstableReactNativeAPI
/**
* A utility class that allows you to simplify the setup of a [ReactHost] for new apps in Open
* Source.
*
* [ReactHost] is an interface responsible of handling the lifecycle of a React Native app when
* running in bridgeless mode.
*/
object DefaultReactHost {
private var reactHost: ReactHost? = null
/**
* Util function to create a default [ReactHost] to be used in your application. This method is
* used by the New App template.
*
* @param context the Android [Context] to use for creating the [ReactHost]
* @param packageList the list of [ReactPackage]s to use for creating the [ReactHost]
* @param jsMainModulePath the path to your app's main module on Metro. Usually `index` or
* `index.<platform>`
* @param jsBundleAssetPath the path to the JS bundle relative to the assets directory. Will be
* composed in a `asset://...` URL
* @param isHermesEnabled whether to use Hermes as the JS engine, default to true.
*/
@OptIn(UnstableReactNativeAPI::class)
@JvmStatic
fun getDefaultReactHost(
context: Context,
@@ -47,13 +68,42 @@ object DefaultReactHost {
// TODO: T164788699 find alternative of accessing ReactHostImpl for initialising reactHost
reactHost =
ReactHostImpl(
context,
defaultReactHostDelegate,
componentFactory,
true,
reactJsExceptionHandler,
true)
context,
defaultReactHostDelegate,
componentFactory,
true,
reactJsExceptionHandler,
true)
.apply {
jsEngineResolutionAlgorithm =
if (isHermesEnabled) {
JSEngineResolutionAlgorithm.HERMES
} else {
JSEngineResolutionAlgorithm.JSC
}
}
}
return reactHost as ReactHost
}
/**
* Util function to create a default [ReactHost] to be used in your application. This method is
* used by the New App template.
*
* This method takes in input a [ReactNativeHost] (bridge-mode) and uses its configuration to
* create an equivalent [ReactHost] (bridgeless-mode).
*
* @param context the Android [Context] to use for creating the [ReactHost]
* @param reactNativeHost the [ReactNativeHost] to use for creating the [ReactHost]
*/
@JvmStatic
fun getDefaultReactHost(
context: Context,
reactNativeHost: ReactNativeHost,
): ReactHost {
require(reactNativeHost is DefaultReactNativeHost) {
"You can call getDefaultReactHost only with instances of DefaultReactNativeHost"
}
return reactNativeHost.toReactHost(context)
}
}
@@ -8,7 +8,9 @@
package com.facebook.react.defaults
import android.app.Application
import android.content.Context
import com.facebook.react.JSEngineResolutionAlgorithm
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackageTurboModuleManagerDelegate
import com.facebook.react.bridge.JSIModulePackage
@@ -68,4 +70,18 @@ protected constructor(
*/
protected open val isHermesEnabled: Boolean?
get() = null
/**
* Converts this [ReactNativeHost] (bridge-mode) to a [ReactHost] (bridgeless-mode).
*
* @param context the Android [Context] to use for creating the [ReactHost]
*/
fun toReactHost(context: Context): ReactHost =
DefaultReactHost.getDefaultReactHost(
context,
packages,
jsMainModuleName,
bundleAssetName ?: "index",
isHermesEnabled ?: true,
)
}
@@ -86,9 +86,6 @@ public final class BridgeDevSupportManager extends DevSupportManagerBase {
surfaceDelegateFactory,
devLoadingViewManager);
mReactInstanceManagerHelper = reactInstanceManagerHelper;
mDevLoadingViewManager = devLoadingViewManager;
if (getDevSettings().isStartSamplingProfilerOnInit()) {
// Only start the profiler. If its already running, there is an error
if (!mIsSamplingProfilerEnabled) {
@@ -112,14 +109,6 @@ public final class BridgeDevSupportManager extends DevSupportManagerBase {
});
}
public DevLoadingViewManager getDevLoadingViewManager() {
return mDevLoadingViewManager;
}
public ReactInstanceDevHelper getReactInstanceManagerHelper() {
return mReactInstanceManagerHelper;
}
@Override
protected String getUniqueTag() {
return "Bridge";
@@ -695,7 +695,11 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
return mDevServerHelper;
}
protected ReactInstanceDevHelper getReactInstanceDevHelper() {
public DevLoadingViewManager getDevLoadingViewManager() {
return mDevLoadingViewManager;
}
public ReactInstanceDevHelper getReactInstanceDevHelper() {
return mReactInstanceDevHelper;
}
@@ -31,6 +31,6 @@ class JSCExecutor internal constructor(jscConfig: ReadableNativeMap) :
SoLoader.loadLibrary("jscexecutor")
}
private external fun initHybrid(jscConfig: ReadableNativeMap): HybridData?
@JvmStatic private external fun initHybrid(jscConfig: ReadableNativeMap): HybridData?
}
}
@@ -13,8 +13,7 @@ import com.facebook.react.bridge.JSExceptionHandler;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.devsupport.BridgeDevSupportManager;
import com.facebook.react.devsupport.DefaultDevLoadingViewImplementation;
import com.facebook.react.devsupport.DevSupportManagerBase;
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager;
import com.facebook.react.module.annotations.ReactModule;
@@ -28,14 +27,9 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
public DevLoadingModule(ReactApplicationContext reactContext) {
super(reactContext);
mJSExceptionHandler = reactContext.getJSExceptionHandler();
if (mJSExceptionHandler != null && mJSExceptionHandler instanceof BridgeDevSupportManager) {
if (mJSExceptionHandler != null && mJSExceptionHandler instanceof DevSupportManagerBase) {
mDevLoadingViewManager =
((BridgeDevSupportManager) mJSExceptionHandler).getDevLoadingViewManager();
mDevLoadingViewManager =
mDevLoadingViewManager != null
? mDevLoadingViewManager
: new DefaultDevLoadingViewImplementation(
((BridgeDevSupportManager) mJSExceptionHandler).getReactInstanceManagerHelper());
((DevSupportManagerBase) mJSExceptionHandler).getDevLoadingViewManager();
}
}
@@ -46,7 +40,9 @@ public class DevLoadingModule extends NativeDevLoadingViewSpec {
new Runnable() {
@Override
public void run() {
mDevLoadingViewManager.showMessage(message);
if (mDevLoadingViewManager != null) {
mDevLoadingViewManager.showMessage(message);
}
}
});
}

Some files were not shown because too many files have changed in this diff Show More