react-native-macos 0.76.8 → 0.76.9
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/AppDelegate/RCTAppSetupUtils.mm +1 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -0
- package/Libraries/Blob/React-RCTBlob.podspec +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +16 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +2 -0
- package/Libraries/Components/TextInput/TextInput.js +4 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Network/FormData.js +11 -3
- package/Libraries/Network/RCTDataRequestHandler.mm +17 -3
- package/Libraries/Network/RCTFileRequestHandler.mm +17 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/React-CoreModules.podspec +9 -10
- package/React/CxxModule/RCTCxxMethod.mm +10 -2
- package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +1 -5
- package/React/Fabric/Surface/RCTFabricSurface.mm +1 -0
- package/React/React-RCTFabric.podspec +1 -0
- package/React/third-party.xcconfig +1 -1
- package/React-Core.podspec +2 -1
- package/ReactAndroid/api/ReactAndroid.api +1 -1
- package/ReactAndroid/build.gradle.kts +24 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/HMRClient.java +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +13 -8
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +1 -0
- package/ReactAndroid/src/main/jni/third-party/fast_float/CMakeLists.txt +13 -0
- package/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt +5 -6
- package/ReactCommon/React-Fabric.podspec +2 -1
- package/ReactCommon/React-FabricComponents.podspec +3 -1
- package/ReactCommon/React-FabricImage.podspec +7 -5
- package/ReactCommon/ReactCommon.podspec +9 -8
- package/ReactCommon/cxxreact/CxxNativeModule.cpp +6 -3
- package/ReactCommon/cxxreact/React-cxxreact.podspec +11 -10
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/React-hermes.podspec +7 -6
- package/ReactCommon/jsi/React-jsi.podspec +4 -3
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +7 -6
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +4 -4
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +24 -13
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +3 -1
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +4 -2
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +4 -2
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -0
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.h +24 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +1 -41
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +4 -5
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -0
- package/cli.js +11 -2
- package/gradle/libs.versions.toml +3 -2
- package/package.json +7 -7
- package/react-native.config.js +24 -23
- package/scripts/cocoapods/codegen_utils.rb +1 -2
- package/scripts/cocoapods/helpers.rb +13 -1
- package/scripts/cocoapods/new_architecture.rb +1 -0
- package/scripts/cocoapods/utils.rb +2 -0
- package/scripts/react_native_pods.rb +14 -0
- package/third-party-podspecs/RCT-Folly.podspec +16 -7
- package/third-party-podspecs/fast_float.podspec +29 -0
- package/third-party-podspecs/fmt.podspec +2 -2
|
@@ -30,6 +30,7 @@ header_search_path = [
|
|
|
30
30
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
31
31
|
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
32
32
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
33
|
+
"\"$(PODS_ROOT)/fast_float/include\"",
|
|
33
34
|
"\"$(PODS_ROOT)/fmt/include\"",
|
|
34
35
|
]
|
|
35
36
|
|
|
@@ -65,16 +66,17 @@ Pod::Spec.new do |s|
|
|
|
65
66
|
s.module_name = 'React_FabricImage'
|
|
66
67
|
end
|
|
67
68
|
|
|
68
|
-
s.dependency folly_dep_name
|
|
69
|
+
s.dependency folly_dep_name
|
|
69
70
|
|
|
70
|
-
s.dependency "React-jsiexecutor"
|
|
71
|
-
s.dependency "RCTRequired"
|
|
72
|
-
s.dependency "RCTTypeSafety"
|
|
71
|
+
s.dependency "React-jsiexecutor"
|
|
72
|
+
s.dependency "RCTRequired"
|
|
73
|
+
s.dependency "RCTTypeSafety"
|
|
73
74
|
s.dependency "React-jsi"
|
|
74
75
|
s.dependency "React-logger"
|
|
75
76
|
s.dependency "glog"
|
|
76
77
|
s.dependency "DoubleConversion"
|
|
77
|
-
s.dependency "
|
|
78
|
+
s.dependency "fast_float"
|
|
79
|
+
s.dependency "fmt"
|
|
78
80
|
s.dependency "React-ImageManager"
|
|
79
81
|
s.dependency "React-utils"
|
|
80
82
|
s.dependency "Yoga"
|
|
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
|
|
34
34
|
s.source = source
|
|
35
35
|
s.header_dir = "ReactCommon" # Use global header_dir for all subspecs for use_frameworks! compatibility
|
|
36
36
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
37
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
37
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
38
38
|
"USE_HEADERMAP" => "YES",
|
|
39
39
|
"DEFINES_MODULE" => "YES",
|
|
40
40
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
@@ -46,14 +46,15 @@ Pod::Spec.new do |s|
|
|
|
46
46
|
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
|
47
47
|
# Note: Update this only when ready to minimize breaking changes.
|
|
48
48
|
s.subspec "turbomodule" do |ss|
|
|
49
|
-
ss.dependency "React-callinvoker"
|
|
50
|
-
ss.dependency "React-perflogger"
|
|
51
|
-
ss.dependency "React-cxxreact"
|
|
52
|
-
ss.dependency "React-jsi"
|
|
53
|
-
ss.dependency "RCT-Folly"
|
|
54
|
-
ss.dependency "React-logger"
|
|
49
|
+
ss.dependency "React-callinvoker"
|
|
50
|
+
ss.dependency "React-perflogger"
|
|
51
|
+
ss.dependency "React-cxxreact"
|
|
52
|
+
ss.dependency "React-jsi"
|
|
53
|
+
ss.dependency "RCT-Folly"
|
|
54
|
+
ss.dependency "React-logger"
|
|
55
55
|
ss.dependency "DoubleConversion"
|
|
56
|
-
ss.dependency "
|
|
56
|
+
ss.dependency "fast_float"
|
|
57
|
+
ss.dependency "fmt"
|
|
57
58
|
ss.dependency "glog"
|
|
58
59
|
if using_hermes
|
|
59
60
|
ss.dependency "hermes-engine"
|
|
@@ -47,9 +47,12 @@ namespace {
|
|
|
47
47
|
CxxModule::Callback convertCallback(
|
|
48
48
|
std::function<void(folly::dynamic)> callback) {
|
|
49
49
|
return [callback = std::move(callback)](std::vector<folly::dynamic> args) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
// after unpinning folly, can use folly::dynamic::array_range
|
|
51
|
+
folly::dynamic obj = folly::dynamic::array;
|
|
52
|
+
for (auto& arg : args) {
|
|
53
|
+
obj.push_back(std::move(arg));
|
|
54
|
+
}
|
|
55
|
+
callback(std::move(obj));
|
|
53
56
|
};
|
|
54
57
|
}
|
|
55
58
|
|
|
@@ -35,24 +35,25 @@ Pod::Spec.new do |s|
|
|
|
35
35
|
s.exclude_files = "SampleCxxModule.*"
|
|
36
36
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
37
37
|
s.pod_target_xcconfig = {
|
|
38
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\"",
|
|
38
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\"",
|
|
39
39
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
|
|
40
40
|
}
|
|
41
41
|
s.header_dir = "cxxreact"
|
|
42
42
|
|
|
43
43
|
s.dependency "boost"
|
|
44
44
|
s.dependency "DoubleConversion"
|
|
45
|
-
s.dependency "
|
|
46
|
-
s.dependency "
|
|
45
|
+
s.dependency "fast_float"
|
|
46
|
+
s.dependency "fmt"
|
|
47
|
+
s.dependency "RCT-Folly"
|
|
47
48
|
s.dependency "glog"
|
|
48
49
|
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
49
|
-
s.dependency "React-callinvoker"
|
|
50
|
-
s.dependency "React-runtimeexecutor"
|
|
51
|
-
s.dependency "React-perflogger"
|
|
52
|
-
s.dependency "React-jsi"
|
|
53
|
-
s.dependency "React-logger"
|
|
54
|
-
s.dependency "React-debug"
|
|
55
|
-
s.dependency "React-timing"
|
|
50
|
+
s.dependency "React-callinvoker"
|
|
51
|
+
s.dependency "React-runtimeexecutor"
|
|
52
|
+
s.dependency "React-perflogger"
|
|
53
|
+
s.dependency "React-jsi"
|
|
54
|
+
s.dependency "React-logger"
|
|
55
|
+
s.dependency "React-debug"
|
|
56
|
+
s.dependency "React-timing"
|
|
56
57
|
|
|
57
58
|
s.resource_bundles = {'React-cxxreact_privacy' => 'PrivacyInfo.xcprivacy'}
|
|
58
59
|
|
|
@@ -36,17 +36,18 @@ Pod::Spec.new do |s|
|
|
|
36
36
|
s.public_header_files = "executor/HermesExecutorFactory.h"
|
|
37
37
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
38
38
|
s.pod_target_xcconfig = {
|
|
39
|
-
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
39
|
+
"HEADER_SEARCH_PATHS" => "\"${PODS_ROOT}/hermes-engine/destroot/include\" \"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\"",
|
|
40
40
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard()
|
|
41
41
|
}
|
|
42
42
|
s.header_dir = "reacthermes"
|
|
43
|
-
s.dependency "React-cxxreact"
|
|
44
|
-
s.dependency "React-jsiexecutor"
|
|
43
|
+
s.dependency "React-cxxreact"
|
|
44
|
+
s.dependency "React-jsiexecutor"
|
|
45
45
|
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
46
|
-
s.dependency "React-perflogger"
|
|
47
|
-
s.dependency "RCT-Folly"
|
|
46
|
+
s.dependency "React-perflogger"
|
|
47
|
+
s.dependency "RCT-Folly"
|
|
48
48
|
s.dependency "DoubleConversion"
|
|
49
|
-
s.dependency "
|
|
49
|
+
s.dependency "fast_float"
|
|
50
|
+
s.dependency "fmt"
|
|
50
51
|
s.dependency "glog"
|
|
51
52
|
s.dependency "hermes-engine"
|
|
52
53
|
s.dependency "React-jsi"
|
|
@@ -37,13 +37,14 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
|
|
38
38
|
s.header_dir = "jsi"
|
|
39
39
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
40
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
40
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\"",
|
|
41
41
|
"DEFINES_MODULE" => "YES" }
|
|
42
42
|
|
|
43
43
|
s.dependency "boost"
|
|
44
44
|
s.dependency "DoubleConversion"
|
|
45
|
-
s.dependency "
|
|
46
|
-
s.dependency "
|
|
45
|
+
s.dependency "fast_float"
|
|
46
|
+
s.dependency "fmt"
|
|
47
|
+
s.dependency "RCT-Folly"
|
|
47
48
|
s.dependency "glog"
|
|
48
49
|
|
|
49
50
|
s.source_files = "**/*.{cpp,h}"
|
|
@@ -32,16 +32,17 @@ Pod::Spec.new do |s|
|
|
|
32
32
|
s.source = source
|
|
33
33
|
s.source_files = "jsireact/*.{cpp,h}"
|
|
34
34
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
35
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
35
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\"",
|
|
36
36
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
|
|
37
37
|
s.header_dir = "jsireact"
|
|
38
38
|
|
|
39
|
-
s.dependency "React-cxxreact"
|
|
40
|
-
s.dependency "React-jsi"
|
|
41
|
-
s.dependency "React-perflogger"
|
|
42
|
-
s.dependency "RCT-Folly"
|
|
39
|
+
s.dependency "React-cxxreact"
|
|
40
|
+
s.dependency "React-jsi"
|
|
41
|
+
s.dependency "React-perflogger"
|
|
42
|
+
s.dependency "RCT-Folly"
|
|
43
43
|
s.dependency "DoubleConversion"
|
|
44
|
-
s.dependency "
|
|
44
|
+
s.dependency "fast_float"
|
|
45
|
+
s.dependency "fmt"
|
|
45
46
|
s.dependency "glog"
|
|
46
47
|
add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')
|
|
47
48
|
|
|
@@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|
|
37
37
|
s.header_dir = 'jsinspector-modern'
|
|
38
38
|
s.compiler_flags = folly_compiler_flags
|
|
39
39
|
s.pod_target_xcconfig = {
|
|
40
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
|
40
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\"",
|
|
41
41
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
42
42
|
"DEFINES_MODULE" => "YES"
|
|
43
43
|
}.merge!(use_frameworks ? {
|
|
@@ -49,12 +49,12 @@ Pod::Spec.new do |s|
|
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
s.dependency "glog"
|
|
52
|
-
s.dependency "RCT-Folly"
|
|
52
|
+
s.dependency "RCT-Folly"
|
|
53
53
|
s.dependency "React-featureflags"
|
|
54
54
|
s.dependency "DoubleConversion"
|
|
55
|
-
s.dependency "React-runtimeexecutor"
|
|
55
|
+
s.dependency "React-runtimeexecutor"
|
|
56
56
|
s.dependency "React-jsi"
|
|
57
|
-
s.dependency "React-perflogger"
|
|
57
|
+
s.dependency "React-perflogger"
|
|
58
58
|
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
59
59
|
s.dependency "hermes-engine"
|
|
60
60
|
end
|
|
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
|
|
|
34
34
|
s.platforms = min_supported_versions
|
|
35
35
|
s.source = source
|
|
36
36
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
37
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
37
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
38
38
|
"USE_HEADERMAP" => "YES",
|
|
39
39
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
40
40
|
"GCC_WARN_PEDANTIC" => "YES" }
|
|
@@ -57,7 +57,7 @@ static jsi::Value convertNSNumberToJSINumber(jsi::Runtime &runtime, NSNumber *va
|
|
|
57
57
|
|
|
58
58
|
static jsi::String convertNSStringToJSIString(jsi::Runtime &runtime, NSString *value)
|
|
59
59
|
{
|
|
60
|
-
return jsi::String::createFromUtf8(runtime, [value UTF8String]
|
|
60
|
+
return jsi::String::createFromUtf8(runtime, [value UTF8String] ? [value UTF8String] : "");
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
static jsi::Object convertNSDictionaryToJSIObject(jsi::Runtime &runtime, NSDictionary *value)
|
|
@@ -195,7 +195,11 @@ static jsi::Value createJSRuntimeError(jsi::Runtime &runtime, const std::string
|
|
|
195
195
|
/**
|
|
196
196
|
* Creates JSError with current JS runtime and NSException stack trace.
|
|
197
197
|
*/
|
|
198
|
-
static jsi::JSError convertNSExceptionToJSError(
|
|
198
|
+
static jsi::JSError convertNSExceptionToJSError(
|
|
199
|
+
jsi::Runtime &runtime,
|
|
200
|
+
NSException *exception,
|
|
201
|
+
const std::string &moduleName,
|
|
202
|
+
const std::string &methodName)
|
|
199
203
|
{
|
|
200
204
|
std::string reason = [exception.reason UTF8String];
|
|
201
205
|
|
|
@@ -206,7 +210,8 @@ static jsi::JSError convertNSExceptionToJSError(jsi::Runtime &runtime, NSExcepti
|
|
|
206
210
|
cause.setProperty(
|
|
207
211
|
runtime, "stackReturnAddresses", convertNSArrayToJSIArray(runtime, exception.callStackReturnAddresses));
|
|
208
212
|
|
|
209
|
-
|
|
213
|
+
std::string message = moduleName + "." + methodName + " raised an exception: " + reason;
|
|
214
|
+
jsi::Value error = createJSRuntimeError(runtime, message);
|
|
210
215
|
error.asObject(runtime).setProperty(runtime, "cause", std::move(cause));
|
|
211
216
|
return {runtime, std::move(error)};
|
|
212
217
|
}
|
|
@@ -338,28 +343,34 @@ id ObjCTurboModule::performMethodInvocation(
|
|
|
338
343
|
}
|
|
339
344
|
|
|
340
345
|
if (isSync) {
|
|
341
|
-
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName,
|
|
346
|
+
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName);
|
|
342
347
|
} else {
|
|
343
|
-
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName,
|
|
348
|
+
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter);
|
|
344
349
|
}
|
|
345
350
|
|
|
346
351
|
@try {
|
|
347
352
|
[inv invokeWithTarget:strongModule];
|
|
348
353
|
} @catch (NSException *exception) {
|
|
349
|
-
|
|
354
|
+
if (isSync) {
|
|
355
|
+
// We can only convert NSException to JSError in sync method calls.
|
|
356
|
+
// See https://github.com/reactwg/react-native-new-architecture/discussions/276#discussioncomment-12567155
|
|
357
|
+
throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
|
|
358
|
+
} else {
|
|
359
|
+
@throw exception;
|
|
360
|
+
}
|
|
350
361
|
} @finally {
|
|
351
362
|
[retainedObjectsForInvocation removeAllObjects];
|
|
352
363
|
}
|
|
353
364
|
|
|
354
365
|
if (!isSync) {
|
|
355
|
-
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName,
|
|
366
|
+
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter);
|
|
356
367
|
return;
|
|
357
368
|
}
|
|
358
369
|
|
|
359
370
|
void *rawResult;
|
|
360
371
|
[inv getReturnValue:&rawResult];
|
|
361
372
|
result = (__bridge id)rawResult;
|
|
362
|
-
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName,
|
|
373
|
+
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName);
|
|
363
374
|
};
|
|
364
375
|
|
|
365
376
|
if (isSync) {
|
|
@@ -401,23 +412,23 @@ void ObjCTurboModule::performVoidMethodInvocation(
|
|
|
401
412
|
}
|
|
402
413
|
|
|
403
414
|
if (shouldVoidMethodsExecuteSync_) {
|
|
404
|
-
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName,
|
|
415
|
+
TurboModulePerfLogger::syncMethodCallExecutionStart(moduleName, methodName);
|
|
405
416
|
} else {
|
|
406
|
-
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName,
|
|
417
|
+
TurboModulePerfLogger::asyncMethodCallExecutionStart(moduleName, methodName, asyncCallCounter);
|
|
407
418
|
}
|
|
408
419
|
|
|
409
420
|
@try {
|
|
410
421
|
[inv invokeWithTarget:strongModule];
|
|
411
422
|
} @catch (NSException *exception) {
|
|
412
|
-
throw convertNSExceptionToJSError(runtime, exception);
|
|
423
|
+
throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
|
|
413
424
|
} @finally {
|
|
414
425
|
[retainedObjectsForInvocation removeAllObjects];
|
|
415
426
|
}
|
|
416
427
|
|
|
417
428
|
if (shouldVoidMethodsExecuteSync_) {
|
|
418
|
-
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName,
|
|
429
|
+
TurboModulePerfLogger::syncMethodCallExecutionEnd(moduleName, methodName);
|
|
419
430
|
} else {
|
|
420
|
-
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName,
|
|
431
|
+
TurboModulePerfLogger::asyncMethodCallExecutionEnd(moduleName, methodName, asyncCallCounter);
|
|
421
432
|
}
|
|
422
433
|
|
|
423
434
|
return;
|
|
@@ -27,6 +27,7 @@ header_search_paths = [
|
|
|
27
27
|
"\"$(PODS_ROOT)/boost\"",
|
|
28
28
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
29
29
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
30
|
+
"\"$(PODS_ROOT)/fast_float/include\"",
|
|
30
31
|
"\"$(PODS_ROOT)/fmt/include\"",
|
|
31
32
|
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
|
32
33
|
]
|
|
@@ -66,7 +67,8 @@ Pod::Spec.new do |s|
|
|
|
66
67
|
|
|
67
68
|
s.dependency "RCT-Folly"
|
|
68
69
|
s.dependency "DoubleConversion"
|
|
69
|
-
s.dependency "
|
|
70
|
+
s.dependency "fast_float"
|
|
71
|
+
s.dependency "fmt"
|
|
70
72
|
s.dependency "React-Core"
|
|
71
73
|
s.dependency "React-cxxreact"
|
|
72
74
|
s.dependency "React-jsi"
|
|
@@ -24,6 +24,7 @@ header_search_paths = [
|
|
|
24
24
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
25
25
|
"\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\"",
|
|
26
26
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
27
|
+
"\"$(PODS_ROOT)/fast_float/include\"",
|
|
27
28
|
"\"$(PODS_ROOT)/fmt/include\""
|
|
28
29
|
]
|
|
29
30
|
|
|
@@ -55,8 +56,9 @@ Pod::Spec.new do |s|
|
|
|
55
56
|
s.header_mappings_dir = "../../.."
|
|
56
57
|
end
|
|
57
58
|
|
|
58
|
-
s.dependency "RCT-Folly"
|
|
59
|
+
s.dependency "RCT-Folly"
|
|
59
60
|
s.dependency "DoubleConversion"
|
|
60
|
-
s.dependency "
|
|
61
|
+
s.dependency "fast_float"
|
|
62
|
+
s.dependency "fmt"
|
|
61
63
|
add_dependency(s, "React-debug")
|
|
62
64
|
end
|
|
@@ -29,6 +29,7 @@ Pod::Spec.new do |s|
|
|
|
29
29
|
"\"$(PODS_TARGET_SRCROOT)/../../../\"",
|
|
30
30
|
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
31
31
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
32
|
+
"\"$(PODS_ROOT)/fast_float/include\"",
|
|
32
33
|
"\"$(PODS_ROOT)/fmt/include\""
|
|
33
34
|
]
|
|
34
35
|
|
|
@@ -65,11 +66,12 @@ Pod::Spec.new do |s|
|
|
|
65
66
|
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard() }
|
|
66
67
|
|
|
67
68
|
s.dependency "glog"
|
|
68
|
-
s.dependency "RCT-Folly/Fabric"
|
|
69
|
+
s.dependency "RCT-Folly/Fabric"
|
|
69
70
|
s.dependency "React-jsi"
|
|
70
71
|
s.dependency "React-jsiexecutor"
|
|
71
72
|
s.dependency "React-utils"
|
|
72
73
|
s.dependency "React-Core" # [macOS] Needed for RCTUIKit
|
|
73
74
|
s.dependency "DoubleConversion"
|
|
74
|
-
s.dependency "
|
|
75
|
+
s.dependency "fast_float"
|
|
76
|
+
s.dependency "fmt"
|
|
75
77
|
end
|
|
@@ -52,8 +52,29 @@ BOOL RCTIsAttributedStringEffectivelySame(
|
|
|
52
52
|
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes,
|
|
53
53
|
const facebook::react::TextAttributes &baseTextAttributes);
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
static inline NSData *RCTWrapEventEmitter(const facebook::react::SharedEventEmitter &eventEmitter)
|
|
56
|
+
{
|
|
57
|
+
auto eventEmitterPtr = new std::weak_ptr<const facebook::react::EventEmitter>(eventEmitter);
|
|
58
|
+
return [[NSData alloc] initWithBytesNoCopy:eventEmitterPtr
|
|
59
|
+
length:sizeof(eventEmitterPtr)
|
|
60
|
+
deallocator:^(void *ptrToDelete, NSUInteger) {
|
|
61
|
+
delete (std::weak_ptr<facebook::react::EventEmitter> *)ptrToDelete;
|
|
62
|
+
}];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static inline facebook::react::SharedEventEmitter RCTUnwrapEventEmitter(NSData *data)
|
|
66
|
+
{
|
|
67
|
+
if (data.length == 0) {
|
|
68
|
+
return nullptr;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
auto weakPtr = dynamic_cast<std::weak_ptr<const facebook::react::EventEmitter> *>(
|
|
72
|
+
(std::weak_ptr<const facebook::react::EventEmitter> *)data.bytes);
|
|
73
|
+
if (weakPtr) {
|
|
74
|
+
return weakPtr->lock();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return nullptr;
|
|
78
|
+
}
|
|
58
79
|
|
|
59
80
|
NS_ASSUME_NONNULL_END
|
|
@@ -16,45 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
using namespace facebook::react;
|
|
18
18
|
|
|
19
|
-
@implementation RCTWeakEventEmitterWrapper {
|
|
20
|
-
std::weak_ptr<const EventEmitter> _weakEventEmitter;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
- (void)setEventEmitter:(SharedEventEmitter)eventEmitter
|
|
24
|
-
{
|
|
25
|
-
_weakEventEmitter = eventEmitter;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
- (SharedEventEmitter)eventEmitter
|
|
29
|
-
{
|
|
30
|
-
return _weakEventEmitter.lock();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
- (void)dealloc
|
|
34
|
-
{
|
|
35
|
-
_weakEventEmitter.reset();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
- (BOOL)isEqual:(id)object
|
|
39
|
-
{
|
|
40
|
-
// We consider the underlying EventEmitter as the identity
|
|
41
|
-
if (![object isKindOfClass:[self class]]) {
|
|
42
|
-
return NO;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
auto thisEventEmitter = [self eventEmitter];
|
|
46
|
-
auto otherEventEmitter = [((RCTWeakEventEmitterWrapper *)object) eventEmitter];
|
|
47
|
-
return thisEventEmitter == otherEventEmitter;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
- (NSUInteger)hash
|
|
51
|
-
{
|
|
52
|
-
// We consider the underlying EventEmitter as the identity
|
|
53
|
-
return (NSUInteger)_weakEventEmitter.lock().get();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@end
|
|
57
|
-
|
|
58
19
|
inline static UIFontWeight RCTUIFontWeightFromInteger(NSInteger fontWeight)
|
|
59
20
|
{
|
|
60
21
|
assert(fontWeight > 50);
|
|
@@ -413,8 +374,7 @@ static NSMutableAttributedString *RCTNSAttributedStringFragmentWithAttributesFro
|
|
|
413
374
|
|
|
414
375
|
#if !TARGET_OS_MACCATALYST
|
|
415
376
|
if (fragment.parentShadowView.componentHandle) {
|
|
416
|
-
|
|
417
|
-
eventEmitterWrapper.eventEmitter = fragment.parentShadowView.eventEmitter;
|
|
377
|
+
auto eventEmitterWrapper = RCTWrapEventEmitter(fragment.parentShadowView.eventEmitter);
|
|
418
378
|
|
|
419
379
|
NSDictionary<NSAttributedStringKey, id> *additionalTextAttributes =
|
|
420
380
|
@{RCTAttributedStringEventEmitterKey : eventEmitterWrapper};
|
|
@@ -291,11 +291,10 @@ static NSLineBreakMode RCTNSLineBreakModeFromEllipsizeMode(EllipsizeMode ellipsi
|
|
|
291
291
|
// after (fraction == 1.0) the last character, then the attribute is valid.
|
|
292
292
|
if (textStorage.length > 0 && (fraction > 0 || characterIndex > 0) &&
|
|
293
293
|
(fraction < 1 || characterIndex < textStorage.length - 1)) {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
return eventEmitterWrapper.eventEmitter;
|
|
294
|
+
NSData *eventEmitterWrapper = (NSData *)[textStorage attribute:RCTAttributedStringEventEmitterKey
|
|
295
|
+
atIndex:characterIndex
|
|
296
|
+
effectiveRange:NULL];
|
|
297
|
+
return RCTUnwrapEventEmitter(eventEmitterWrapper);
|
|
299
298
|
}
|
|
300
299
|
|
|
301
300
|
return nil;
|
package/cli.js
CHANGED
|
@@ -23,6 +23,15 @@ const deprecated = () => {
|
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
function findCommunityCli(startDir = process.cwd()) {
|
|
27
|
+
// With isolated node_modules (eg pnpm), we won't be able to find
|
|
28
|
+
// `@react-native-community/cli` starting from the `react-native` directory.
|
|
29
|
+
// Instead, we should use the project root, which we assume to be the cwd.
|
|
30
|
+
const options = {paths: [startDir]};
|
|
31
|
+
const rncli = require.resolve('@react-native-community/cli', options);
|
|
32
|
+
return require(rncli);
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
function isMissingCliDependency(error) {
|
|
27
36
|
return (
|
|
28
37
|
error.code === 'MODULE_NOT_FOUND' &&
|
|
@@ -217,7 +226,7 @@ async function main() {
|
|
|
217
226
|
}
|
|
218
227
|
|
|
219
228
|
try {
|
|
220
|
-
return
|
|
229
|
+
return findCommunityCli().run(name);
|
|
221
230
|
} catch (e) {
|
|
222
231
|
if (isMissingCliDependency(e)) {
|
|
223
232
|
warnWithExplicitDependency();
|
|
@@ -231,7 +240,7 @@ if (require.main === module) {
|
|
|
231
240
|
main();
|
|
232
241
|
} else {
|
|
233
242
|
try {
|
|
234
|
-
cli =
|
|
243
|
+
cli = findCommunityCli();
|
|
235
244
|
} catch (e) {
|
|
236
245
|
// We silence @react-native-community/cli missing as it is no
|
|
237
246
|
// longer a dependency
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-macos",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.9",
|
|
4
4
|
"description": "React Native for macOS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -112,12 +112,12 @@
|
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"@jest/create-cache-key-function": "^29.6.3",
|
|
114
114
|
"@react-native-mac/virtualized-lists": "0.76.7",
|
|
115
|
-
"@react-native/assets-registry": "0.76.
|
|
116
|
-
"@react-native/codegen": "0.76.
|
|
117
|
-
"@react-native/community-cli-plugin": "0.76.
|
|
118
|
-
"@react-native/gradle-plugin": "0.76.
|
|
119
|
-
"@react-native/js-polyfills": "0.76.
|
|
120
|
-
"@react-native/normalize-colors": "0.76.
|
|
115
|
+
"@react-native/assets-registry": "0.76.9",
|
|
116
|
+
"@react-native/codegen": "0.76.9",
|
|
117
|
+
"@react-native/community-cli-plugin": "0.76.9",
|
|
118
|
+
"@react-native/gradle-plugin": "0.76.9",
|
|
119
|
+
"@react-native/js-polyfills": "0.76.9",
|
|
120
|
+
"@react-native/normalize-colors": "0.76.9",
|
|
121
121
|
"abort-controller": "^3.0.0",
|
|
122
122
|
"anser": "^1.4.9",
|
|
123
123
|
"ansi-regex": "^5.0.0",
|