react-native 0.74.0-rc.5 → 0.74.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactNative/AppContainer-dev.js +21 -2
- package/React/Base/RCTBridge+Inspector.h +30 -0
- package/React/Base/RCTBridge+Private.h +0 -20
- package/React/Base/RCTBridge.mm +1 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevSettings.mm +1 -0
- package/React/CxxBridge/RCTCxxBridge.mm +1 -0
- package/ReactAndroid/api/ReactAndroid.api +9 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/DebugCorePackage.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.java +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.java +4 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +0 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +1 -0
- package/package.json +20 -11
- package/scripts/xcode/ccache-clang++.sh +14 -0
- package/scripts/xcode/ccache-clang.sh +14 -0
- package/scripts/xcode/ccache.conf +11 -0
- package/sdks/hermes-engine/utils/build-apple-framework.sh +2 -0
- package/sdks/hermes-engine/utils/build-ios-framework.sh +2 -0
- package/sdks/hermes-engine/utils/build-mac-framework.sh +2 -0
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +5 -5
|
@@ -20,7 +20,6 @@ import View from '../Components/View/View';
|
|
|
20
20
|
import DebuggingOverlay from '../Debugging/DebuggingOverlay';
|
|
21
21
|
import useSubscribeToDebuggingOverlayRegistry from '../Debugging/useSubscribeToDebuggingOverlayRegistry';
|
|
22
22
|
import RCTDeviceEventEmitter from '../EventEmitter/RCTDeviceEventEmitter';
|
|
23
|
-
import ReactDevToolsOverlay from '../Inspector/ReactDevToolsOverlay';
|
|
24
23
|
import LogBoxNotificationContainer from '../LogBox/LogBoxNotificationContainer';
|
|
25
24
|
import StyleSheet from '../StyleSheet/StyleSheet';
|
|
26
25
|
import {RootTagContext, createRootTag} from './RootTag';
|
|
@@ -64,6 +63,26 @@ const InspectorDeferred = ({
|
|
|
64
63
|
);
|
|
65
64
|
};
|
|
66
65
|
|
|
66
|
+
type ReactDevToolsOverlayDeferredProps = {
|
|
67
|
+
inspectedViewRef: InspectedViewRef,
|
|
68
|
+
reactDevToolsAgent: ReactDevToolsAgent,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const ReactDevToolsOverlayDeferred = ({
|
|
72
|
+
inspectedViewRef,
|
|
73
|
+
reactDevToolsAgent,
|
|
74
|
+
}: ReactDevToolsOverlayDeferredProps) => {
|
|
75
|
+
const ReactDevToolsOverlay =
|
|
76
|
+
require('../Inspector/ReactDevToolsOverlay').default;
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<ReactDevToolsOverlay
|
|
80
|
+
inspectedViewRef={inspectedViewRef}
|
|
81
|
+
reactDevToolsAgent={reactDevToolsAgent}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
67
86
|
const AppContainer = ({
|
|
68
87
|
children,
|
|
69
88
|
fabric,
|
|
@@ -155,7 +174,7 @@ const AppContainer = ({
|
|
|
155
174
|
<DebuggingOverlay ref={debuggingOverlayRef} />
|
|
156
175
|
|
|
157
176
|
{reactDevToolsAgent != null && (
|
|
158
|
-
<
|
|
177
|
+
<ReactDevToolsOverlayDeferred
|
|
159
178
|
inspectedViewRef={innerViewRef}
|
|
160
179
|
reactDevToolsAgent={reactDevToolsAgent}
|
|
161
180
|
/>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <React/RCTBridge.h>
|
|
9
|
+
|
|
10
|
+
#ifdef __cplusplus
|
|
11
|
+
#import <jsinspector-modern/ReactCdp.h>
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
@interface RCTBridge (Inspector)
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The HostTarget for this bridge, if one has been created. Exposed for RCTCxxBridge only.
|
|
18
|
+
*/
|
|
19
|
+
@property (nonatomic, assign, readonly)
|
|
20
|
+
#ifdef __cplusplus
|
|
21
|
+
facebook::react::jsinspector_modern::PageTarget *
|
|
22
|
+
#else
|
|
23
|
+
// The inspector infrastructure cannot be used in C or Swift code.
|
|
24
|
+
void *
|
|
25
|
+
#endif
|
|
26
|
+
inspectorTarget;
|
|
27
|
+
|
|
28
|
+
@property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
|
|
29
|
+
|
|
30
|
+
@end
|
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
#import <React/RCTBridge.h>
|
|
9
|
-
#ifdef __cplusplus
|
|
10
|
-
#import <jsinspector-modern/ReactCdp.h>
|
|
11
|
-
#endif
|
|
12
9
|
|
|
13
10
|
@class RCTModuleRegistry;
|
|
14
11
|
@class RCTModuleData;
|
|
@@ -73,17 +70,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
|
|
|
73
70
|
*/
|
|
74
71
|
@property (nonatomic, strong, readonly) RCTModuleRegistry *moduleRegistry;
|
|
75
72
|
|
|
76
|
-
/**
|
|
77
|
-
* The page target for this bridge, if one has been created. Exposed for RCTCxxBridge only.
|
|
78
|
-
*/
|
|
79
|
-
@property (nonatomic, assign, readonly)
|
|
80
|
-
#ifdef __cplusplus
|
|
81
|
-
facebook::react::jsinspector_modern::PageTarget *
|
|
82
|
-
#else
|
|
83
|
-
// The inspector infrastructure cannot be used in C code.
|
|
84
|
-
void *
|
|
85
|
-
#endif
|
|
86
|
-
inspectorTarget;
|
|
87
73
|
@end
|
|
88
74
|
|
|
89
75
|
@interface RCTBridge (RCTCxxBridge)
|
|
@@ -155,12 +141,6 @@ RCT_EXTERN void RCTRegisterModule(Class);
|
|
|
155
141
|
|
|
156
142
|
@end
|
|
157
143
|
|
|
158
|
-
@interface RCTBridge (Inspector)
|
|
159
|
-
|
|
160
|
-
@property (nonatomic, readonly, getter=isInspectable) BOOL inspectable;
|
|
161
|
-
|
|
162
|
-
@end
|
|
163
|
-
|
|
164
144
|
@interface RCTCxxBridge : RCTBridge
|
|
165
145
|
|
|
166
146
|
// TODO(cjhopman): this seems unsafe unless we require that it is only called on the main js queue.
|
package/React/Base/RCTBridge.mm
CHANGED
package/React/Base/RCTVersion.m
CHANGED
|
@@ -29,6 +29,15 @@ public class com/facebook/react/CoreModulesPackage$$ReactModuleInfoProvider : co
|
|
|
29
29
|
public fun getReactModuleInfos ()Ljava/util/Map;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
public class com/facebook/react/DebugCorePackage : com/facebook/react/TurboReactPackage, com/facebook/react/ViewManagerOnDemandReactPackage {
|
|
33
|
+
public fun <init> ()V
|
|
34
|
+
public fun createViewManager (Lcom/facebook/react/bridge/ReactApplicationContext;Ljava/lang/String;)Lcom/facebook/react/uimanager/ViewManager;
|
|
35
|
+
public fun getModule (Ljava/lang/String;Lcom/facebook/react/bridge/ReactApplicationContext;)Lcom/facebook/react/bridge/NativeModule;
|
|
36
|
+
public fun getReactModuleInfoProvider ()Lcom/facebook/react/module/model/ReactModuleInfoProvider;
|
|
37
|
+
public fun getViewManagerNames (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/Collection;
|
|
38
|
+
public fun getViewManagers (Lcom/facebook/react/bridge/ReactApplicationContext;)Ljava/util/List;
|
|
39
|
+
}
|
|
40
|
+
|
|
32
41
|
public class com/facebook/react/DebugCorePackage$$ReactModuleInfoProvider : com/facebook/react/module/model/ReactModuleInfoProvider {
|
|
33
42
|
public fun <init> ()V
|
|
34
43
|
public fun getReactModuleInfos ()Ljava/util/Map;
|
|
@@ -36,7 +36,7 @@ import javax.inject.Provider;
|
|
|
36
36
|
JSCHeapCapture.class,
|
|
37
37
|
})
|
|
38
38
|
/* package */
|
|
39
|
-
class DebugCorePackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
|
|
39
|
+
public class DebugCorePackage extends TurboReactPackage implements ViewManagerOnDemandReactPackage {
|
|
40
40
|
private @Nullable Map<String, ModuleSpec> mViewManagers;
|
|
41
41
|
|
|
42
42
|
public DebugCorePackage() {}
|
|
@@ -16,6 +16,7 @@ import androidx.annotation.NonNull;
|
|
|
16
16
|
import androidx.annotation.Nullable;
|
|
17
17
|
import com.facebook.infer.annotation.Assertions;
|
|
18
18
|
import com.facebook.react.config.ReactFeatureFlags;
|
|
19
|
+
import com.facebook.react.devsupport.DisabledDevSupportManager;
|
|
19
20
|
import com.facebook.react.devsupport.DoubleTapReloadRecognizer;
|
|
20
21
|
import com.facebook.react.devsupport.interfaces.DevSupportManager;
|
|
21
22
|
import com.facebook.react.interfaces.fabric.ReactSurface;
|
|
@@ -232,7 +233,15 @@ public class ReactDelegate {
|
|
|
232
233
|
public void reload() {
|
|
233
234
|
DevSupportManager devSupportManager = getDevSupportManager();
|
|
234
235
|
if (devSupportManager != null) {
|
|
235
|
-
|
|
236
|
+
// With Bridgeless enabled, reload in RELEASE mode
|
|
237
|
+
if (devSupportManager instanceof DisabledDevSupportManager
|
|
238
|
+
&& ReactFeatureFlags.enableBridgelessArchitecture
|
|
239
|
+
&& mReactHost != null) {
|
|
240
|
+
// Do not reload the bundle from JS as there is no bundler running in release mode.
|
|
241
|
+
mReactHost.reload("ReactDelegate.reload()");
|
|
242
|
+
} else {
|
|
243
|
+
devSupportManager.handleReloadJS();
|
|
244
|
+
}
|
|
236
245
|
}
|
|
237
246
|
}
|
|
238
247
|
|
|
@@ -15,6 +15,7 @@ import com.facebook.infer.annotation.ThreadConfined;
|
|
|
15
15
|
import com.facebook.infer.annotation.ThreadSafe;
|
|
16
16
|
import com.facebook.jni.HybridData;
|
|
17
17
|
import com.facebook.proguard.annotations.DoNotStrip;
|
|
18
|
+
import com.facebook.react.DebugCorePackage;
|
|
18
19
|
import com.facebook.react.ReactPackage;
|
|
19
20
|
import com.facebook.react.ViewManagerOnDemandReactPackage;
|
|
20
21
|
import com.facebook.react.bridge.Arguments;
|
|
@@ -195,6 +196,9 @@ final class ReactInstance {
|
|
|
195
196
|
new CoreReactPackage(
|
|
196
197
|
bridgelessReactContext.getDevSupportManager(),
|
|
197
198
|
bridgelessReactContext.getDefaultHardwareBackBtnHandler()));
|
|
199
|
+
if (useDevSupport) {
|
|
200
|
+
mReactPackages.add(new DebugCorePackage());
|
|
201
|
+
}
|
|
198
202
|
mReactPackages.addAll(mDelegate.getReactPackages());
|
|
199
203
|
|
|
200
204
|
TurboModuleManagerDelegate turboModuleManagerDelegate =
|
|
@@ -168,7 +168,6 @@ std::unique_ptr<JSRuntime> HermesInstance::createJSRuntime(
|
|
|
168
168
|
.withAllocInYoung(false)
|
|
169
169
|
.withRevertToYGAtTTI(true)
|
|
170
170
|
.build())
|
|
171
|
-
.withES6Proxy(false)
|
|
172
171
|
.withEnableSampleProfiling(true)
|
|
173
172
|
.withMicrotaskQueue(ReactNativeFeatureFlags::enableMicrotasks())
|
|
174
173
|
.withVMExperimentFlags(vmExperimentFlags);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.74.0-rc.
|
|
3
|
+
"version": "0.74.0-rc.6",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -64,6 +64,9 @@
|
|
|
64
64
|
"scripts/hermes/hermes-utils.js",
|
|
65
65
|
"scripts/hermes/prepare-hermes-for-build.js",
|
|
66
66
|
"scripts/ios-configure-glog.sh",
|
|
67
|
+
"scripts/xcode/ccache-clang++.sh",
|
|
68
|
+
"scripts/xcode/ccache-clang.sh",
|
|
69
|
+
"scripts/xcode/ccache.conf",
|
|
67
70
|
"scripts/xcode/with-environment.sh",
|
|
68
71
|
"scripts/native_modules.rb",
|
|
69
72
|
"scripts/node-binary.sh",
|
|
@@ -94,20 +97,26 @@
|
|
|
94
97
|
"featureflags-update": "node ./scripts/featureflags/index.js"
|
|
95
98
|
},
|
|
96
99
|
"peerDependencies": {
|
|
100
|
+
"@types/react": "^18.2.6",
|
|
97
101
|
"react": "18.2.0"
|
|
98
102
|
},
|
|
103
|
+
"peerDependenciesMeta": {
|
|
104
|
+
"@types/react": {
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
99
108
|
"dependencies": {
|
|
100
109
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
101
|
-
"@react-native-community/cli": "13.6.
|
|
102
|
-
"@react-native-community/cli-platform-android": "13.6.
|
|
103
|
-
"@react-native-community/cli-platform-ios": "13.6.
|
|
104
|
-
"@react-native/assets-registry": "0.74.
|
|
105
|
-
"@react-native/codegen": "0.74.
|
|
106
|
-
"@react-native/community-cli-plugin": "0.74.
|
|
107
|
-
"@react-native/gradle-plugin": "0.74.
|
|
108
|
-
"@react-native/js-polyfills": "0.74.
|
|
109
|
-
"@react-native/normalize-colors": "0.74.
|
|
110
|
-
"@react-native/virtualized-lists": "0.74.
|
|
110
|
+
"@react-native-community/cli": "13.6.4",
|
|
111
|
+
"@react-native-community/cli-platform-android": "13.6.4",
|
|
112
|
+
"@react-native-community/cli-platform-ios": "13.6.4",
|
|
113
|
+
"@react-native/assets-registry": "0.74.77",
|
|
114
|
+
"@react-native/codegen": "0.74.77",
|
|
115
|
+
"@react-native/community-cli-plugin": "0.74.77",
|
|
116
|
+
"@react-native/gradle-plugin": "0.74.77",
|
|
117
|
+
"@react-native/js-polyfills": "0.74.77",
|
|
118
|
+
"@react-native/normalize-colors": "0.74.77",
|
|
119
|
+
"@react-native/virtualized-lists": "0.74.77",
|
|
111
120
|
"abort-controller": "^3.0.0",
|
|
112
121
|
"anser": "^1.4.9",
|
|
113
122
|
"ansi-regex": "^5.0.0",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
#
|
|
4
|
+
# This source code is licensed under the MIT license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
# Get the absolute path of this script
|
|
8
|
+
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
|
9
|
+
|
|
10
|
+
REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
|
|
11
|
+
# Provide our config file if none is already provided
|
|
12
|
+
export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
|
|
13
|
+
|
|
14
|
+
exec ccache clang++ "$@"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
#
|
|
4
|
+
# This source code is licensed under the MIT license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
# Get the absolute path of this script
|
|
8
|
+
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
|
|
9
|
+
|
|
10
|
+
REACT_NATIVE_CCACHE_CONFIGPATH=$SCRIPT_DIR/ccache.conf
|
|
11
|
+
# Provide our config file if none is already provided
|
|
12
|
+
export CCACHE_CONFIGPATH="${CCACHE_CONFIGPATH:-$REACT_NATIVE_CCACHE_CONFIGPATH}"
|
|
13
|
+
|
|
14
|
+
exec ccache clang "$@"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
#
|
|
3
|
+
# This source code is licensed under the MIT license found in the
|
|
4
|
+
# LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
6
|
+
# See https://ccache.dev/manual/4.3.html#_configuration_options for details and available options
|
|
7
|
+
|
|
8
|
+
sloppiness = clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
|
|
9
|
+
file_clone = true
|
|
10
|
+
depend_mode = true
|
|
11
|
+
inode_cache = true
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
# Defines functions for building various Hermes frameworks.
|
|
8
8
|
# See build-ios-framework.sh and build-mac-framework.sh for usage examples.
|
|
9
9
|
|
|
10
|
+
set -x -e
|
|
11
|
+
|
|
10
12
|
CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
11
13
|
|
|
12
14
|
IMPORT_HERMESC_PATH=${HERMES_OVERRIDE_HERMESC_PATH:-$PWD/build_host_hermesc/ImportHermesc.cmake}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
# This source code is licensed under the MIT license found in the
|
|
5
5
|
# LICENSE file in the root directory of this source tree.
|
|
6
6
|
|
|
7
|
+
set -x -e
|
|
8
|
+
|
|
7
9
|
# Given a specific target, retrieve the right architecture for it
|
|
8
10
|
# $1 the target you want to build. Allowed values: iphoneos, iphonesimulator, catalyst
|
|
9
11
|
function get_architecture {
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
# This source code is licensed under the MIT license found in the
|
|
5
5
|
# LICENSE file in the root directory of this source tree.
|
|
6
6
|
|
|
7
|
+
set -x -e
|
|
8
|
+
|
|
7
9
|
# shellcheck source=xplat/js/react-native-github/sdks/hermes-engine/utils/build-apple-framework.sh
|
|
8
10
|
CURR_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
9
11
|
. "${CURR_SCRIPT_DIR}/build-apple-framework.sh"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/template/package.json
CHANGED
|
@@ -11,16 +11,16 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"react": "18.2.0",
|
|
14
|
-
"react-native": "0.74.0-rc.
|
|
14
|
+
"react-native": "0.74.0-rc.6"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@babel/core": "^7.20.0",
|
|
18
18
|
"@babel/preset-env": "^7.20.0",
|
|
19
19
|
"@babel/runtime": "^7.20.0",
|
|
20
|
-
"@react-native/babel-preset": "0.74.
|
|
21
|
-
"@react-native/eslint-config": "0.74.
|
|
22
|
-
"@react-native/metro-config": "0.74.
|
|
23
|
-
"@react-native/typescript-config": "0.74.
|
|
20
|
+
"@react-native/babel-preset": "0.74.77",
|
|
21
|
+
"@react-native/eslint-config": "0.74.77",
|
|
22
|
+
"@react-native/metro-config": "0.74.77",
|
|
23
|
+
"@react-native/typescript-config": "0.74.77",
|
|
24
24
|
"@types/react": "^18.2.6",
|
|
25
25
|
"@types/react-test-renderer": "^18.0.0",
|
|
26
26
|
"babel-jest": "^29.6.3",
|