react-native 0.72.0-rc.3 → 0.72.0-rc.5
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/RCTAppDelegate.h +5 -0
- package/Libraries/AppDelegate/RCTAppDelegate.mm +30 -9
- package/Libraries/AppDelegate/RCTAppSetupUtils.h +8 -2
- package/Libraries/AppDelegate/RCTAppSetupUtils.mm +25 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +16 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +121 -86
- package/Libraries/Components/TextInput/TextInput.flow.js +121 -135
- package/Libraries/Components/TextInput/TextInput.js +121 -135
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +0 -2
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -13
- package/React/Base/RCTJavaScriptLoader.mm +11 -1
- package/React/Base/RCTRuntimeExecutorFromBridge.h +19 -0
- package/React/Base/RCTRuntimeExecutorFromBridge.mm +56 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CxxBridge/RCTCxxBridge.mm +9 -4
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +0 -3
- package/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +1 -37
- package/React/React-RCTFabric.podspec +14 -1
- package/React-Core.podspec +6 -4
- package/ReactAndroid/build.gradle +4 -1
- package/ReactAndroid/cmake-utils/ReactNative-application.cmake +14 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +9 -0
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +0 -1
- package/ReactCommon/React-Fabric.podspec +13 -23
- package/ReactCommon/ReactCommon.podspec +0 -4
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/debug/React-debug.podspec +36 -0
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +5 -0
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +66 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.cpp +2 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerBinding.h +2 -1
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.cpp +1 -0
- package/ReactCommon/react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h +2 -1
- package/ReactCommon/react/renderer/runtimescheduler/primitives.h +3 -15
- package/ReactCommon/react/renderer/scheduler/SchedulerToolbox.h +1 -1
- package/ReactCommon/react/utils/React-utils.podspec +57 -0
- package/package.json +9 -9
- package/scripts/cocoapods/__tests__/codegen_utils-test.rb +7 -2
- package/scripts/cocoapods/__tests__/new_architecture-test.rb +9 -3
- package/scripts/cocoapods/codegen_utils.rb +6 -0
- package/scripts/cocoapods/new_architecture.rb +13 -0
- package/scripts/react-native-xcode.sh +1 -1
- package/scripts/react_native_pods.rb +3 -0
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/android/app/build.gradle +0 -7
- package/template/ios/Podfile +1 -1
- package/template/package.json +5 -5
- package/types/experimental.d.ts +101 -0
|
@@ -1360,6 +1360,15 @@ public class ReactInstanceManager {
|
|
|
1360
1360
|
|
|
1361
1361
|
reactContext.initializeWithInstance(catalystInstance);
|
|
1362
1362
|
|
|
1363
|
+
if (ReactFeatureFlags.unstable_useRuntimeSchedulerAlways) {
|
|
1364
|
+
// On Old Architecture, we need to initialize the Native Runtime Scheduler so that
|
|
1365
|
+
// the `nativeRuntimeScheduler` object is registered on JS.
|
|
1366
|
+
// On New Architecture, this is normally triggered by instantiate a TurboModuleManager.
|
|
1367
|
+
// Here we invoke getRuntimeScheduler() to trigger the creation of it regardless of the
|
|
1368
|
+
// architecture so it will always be there.
|
|
1369
|
+
catalystInstance.getRuntimeScheduler();
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1363
1372
|
if (ReactFeatureFlags.useTurboModules && mTMMDelegateBuilder != null) {
|
|
1364
1373
|
TurboModuleManagerDelegate tmmDelegate =
|
|
1365
1374
|
mTMMDelegateBuilder
|
|
@@ -42,6 +42,13 @@ public class ReactFeatureFlags {
|
|
|
42
42
|
*/
|
|
43
43
|
public static volatile boolean unstable_useFabricInterop = false;
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Should this application always use the Native RuntimeScheduler? If yes, we'll be instantiating
|
|
47
|
+
* it over all the architectures (both Old and New). This is intentionally set to true as we want
|
|
48
|
+
* to use it more as a kill-switch to turn off this feature to potentially debug issues.
|
|
49
|
+
*/
|
|
50
|
+
public static volatile boolean unstable_useRuntimeSchedulerAlways = true;
|
|
51
|
+
|
|
45
52
|
/**
|
|
46
53
|
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable
|
|
47
54
|
* the following flags: `useTurboModules` & `enableFabricRenderer`.
|
|
@@ -47,6 +47,19 @@ Pod::Spec.new do |s|
|
|
|
47
47
|
s.dependency "RCTTypeSafety", version
|
|
48
48
|
s.dependency "ReactCommon/turbomodule/core", version
|
|
49
49
|
s.dependency "React-jsi", version
|
|
50
|
+
s.dependency "React-logger"
|
|
51
|
+
s.dependency "glog"
|
|
52
|
+
s.dependency "DoubleConversion"
|
|
53
|
+
s.dependency "React-Core"
|
|
54
|
+
s.dependency "React-debug"
|
|
55
|
+
s.dependency "React-utils"
|
|
56
|
+
s.dependency "React-runtimescheduler"
|
|
57
|
+
|
|
58
|
+
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
59
|
+
s.dependency "hermes-engine"
|
|
60
|
+
else
|
|
61
|
+
s.dependency "React-jsi"
|
|
62
|
+
end
|
|
50
63
|
|
|
51
64
|
s.subspec "animations" do |ss|
|
|
52
65
|
ss.dependency folly_dep_name, folly_version
|
|
@@ -232,14 +245,6 @@ Pod::Spec.new do |s|
|
|
|
232
245
|
end
|
|
233
246
|
end
|
|
234
247
|
|
|
235
|
-
s.subspec "debug_core" do |ss|
|
|
236
|
-
ss.dependency folly_dep_name, folly_version
|
|
237
|
-
ss.compiler_flags = folly_compiler_flags
|
|
238
|
-
ss.source_files = "react/debug/**/*.{m,mm,cpp,h}"
|
|
239
|
-
ss.exclude_files = "react/debug/tests"
|
|
240
|
-
ss.header_dir = "react/debug"
|
|
241
|
-
end
|
|
242
|
-
|
|
243
248
|
s.subspec "debug_renderer" do |ss|
|
|
244
249
|
ss.dependency folly_dep_name, folly_version
|
|
245
250
|
ss.compiler_flags = folly_compiler_flags
|
|
@@ -323,19 +328,4 @@ Pod::Spec.new do |s|
|
|
|
323
328
|
ss.header_dir = "react/renderer/leakchecker"
|
|
324
329
|
ss.pod_target_xcconfig = { "GCC_WARN_PEDANTIC" => "YES" }
|
|
325
330
|
end
|
|
326
|
-
|
|
327
|
-
s.subspec "runtimescheduler" do |ss|
|
|
328
|
-
ss.dependency folly_dep_name, folly_version
|
|
329
|
-
ss.compiler_flags = folly_compiler_flags
|
|
330
|
-
ss.source_files = "react/renderer/runtimescheduler/**/*.{cpp,h}"
|
|
331
|
-
ss.exclude_files = "react/renderer/runtimescheduler/tests"
|
|
332
|
-
ss.header_dir = "react/renderer/runtimescheduler"
|
|
333
|
-
ss.pod_target_xcconfig = { "GCC_WARN_PEDANTIC" => "YES" }
|
|
334
|
-
end
|
|
335
|
-
|
|
336
|
-
s.subspec "utils" do |ss|
|
|
337
|
-
ss.source_files = "react/utils/*.{m,mm,cpp,h}"
|
|
338
|
-
ss.header_dir = "react/utils"
|
|
339
|
-
end
|
|
340
|
-
|
|
341
331
|
end
|
|
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.source_files = "*.{cpp,h}"
|
|
34
34
|
s.exclude_files = "SampleCxxModule.*"
|
|
35
35
|
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
|
36
|
-
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"",
|
|
36
|
+
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-runtimeexecutor/React_runtimeexecutor.framework/Headers\"",
|
|
37
37
|
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
|
|
38
38
|
s.header_dir = "cxxreact"
|
|
39
39
|
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json")))
|
|
9
|
+
version = package['version']
|
|
10
|
+
|
|
11
|
+
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
12
|
+
if version == '1000.0.0'
|
|
13
|
+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
|
+
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
15
|
+
else
|
|
16
|
+
source[:tag] = "v#{version}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
Pod::Spec.new do |s|
|
|
20
|
+
s.name = "React-debug"
|
|
21
|
+
s.version = version
|
|
22
|
+
s.summary = "-" # TODO
|
|
23
|
+
s.homepage = "https://reactnative.dev/"
|
|
24
|
+
s.license = package["license"]
|
|
25
|
+
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
26
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
27
|
+
s.source = source
|
|
28
|
+
s.source_files = "**/*.{cpp,h}"
|
|
29
|
+
s.header_dir = "react/debug"
|
|
30
|
+
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
|
|
31
|
+
|
|
32
|
+
if ENV['USE_FRAMEWORKS']
|
|
33
|
+
s.module_name = "React_debug"
|
|
34
|
+
s.header_mappings_dir = "../.."
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -48,6 +48,8 @@ Pod::Spec.new do |s|
|
|
|
48
48
|
"\"$(PODS_ROOT)/DoubleConversion\"",
|
|
49
49
|
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\"",
|
|
50
50
|
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\"",
|
|
51
|
+
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"",
|
|
52
|
+
"\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\"",
|
|
51
53
|
]
|
|
52
54
|
end
|
|
53
55
|
|
|
@@ -61,4 +63,7 @@ Pod::Spec.new do |s|
|
|
|
61
63
|
s.dependency "React-Fabric"
|
|
62
64
|
s.dependency "React-Core/Default"
|
|
63
65
|
s.dependency "React-RCTImage"
|
|
66
|
+
s.dependency "React-debug"
|
|
67
|
+
s.dependency "React-utils"
|
|
68
|
+
s.dependency "glog"
|
|
64
69
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "..", "package.json")))
|
|
9
|
+
version = package['version']
|
|
10
|
+
|
|
11
|
+
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
12
|
+
if version == '1000.0.0'
|
|
13
|
+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
|
+
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
15
|
+
else
|
|
16
|
+
source[:tag] = "v#{version}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
20
|
+
folly_version = '2021.07.22.00'
|
|
21
|
+
|
|
22
|
+
header_search_paths = [
|
|
23
|
+
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
if ENV['USE_FRAMEWORKS']
|
|
27
|
+
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" #this is needed to allow the RuntimeScheduler access its own files
|
|
28
|
+
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
Pod::Spec.new do |s|
|
|
32
|
+
s.name = "React-runtimescheduler"
|
|
33
|
+
s.version = version
|
|
34
|
+
s.summary = "-" # TODO
|
|
35
|
+
s.homepage = "https://reactnative.dev/"
|
|
36
|
+
s.license = package["license"]
|
|
37
|
+
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
38
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
39
|
+
s.source = source
|
|
40
|
+
s.source_files = "**/*.{cpp,h}"
|
|
41
|
+
s.compiler_flags = folly_compiler_flags
|
|
42
|
+
s.header_dir = "react/renderer/runtimescheduler"
|
|
43
|
+
s.exclude_files = "tests"
|
|
44
|
+
s.pod_target_xcconfig = {
|
|
45
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
46
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
|
|
47
|
+
|
|
48
|
+
if ENV['USE_FRAMEWORKS']
|
|
49
|
+
s.module_name = "React_runtimescheduler"
|
|
50
|
+
s.header_mappings_dir = "../../.."
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
s.dependency "React-jsi"
|
|
54
|
+
s.dependency "React-runtimeexecutor"
|
|
55
|
+
s.dependency "React-callinvoker"
|
|
56
|
+
s.dependency "React-debug"
|
|
57
|
+
s.dependency "glog"
|
|
58
|
+
s.dependency "RCT-Folly", folly_version
|
|
59
|
+
|
|
60
|
+
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
61
|
+
s.dependency "hermes-engine"
|
|
62
|
+
else
|
|
63
|
+
s.dependency "React-jsi"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "RuntimeSchedulerBinding.h"
|
|
9
9
|
#include <ReactCommon/SchedulerPriority.h>
|
|
10
|
+
#include "RuntimeScheduler.h"
|
|
10
11
|
#include "SchedulerPriorityUtils.h"
|
|
11
12
|
#include "primitives.h"
|
|
12
13
|
|
|
@@ -78,7 +79,7 @@ jsi::Value RuntimeSchedulerBinding::get(
|
|
|
78
79
|
jsi::Runtime &runtime,
|
|
79
80
|
jsi::Value const &,
|
|
80
81
|
jsi::Value const *arguments,
|
|
81
|
-
size_t) noexcept -> jsi::Value {
|
|
82
|
+
size_t count) noexcept -> jsi::Value {
|
|
82
83
|
SchedulerPriority priority = fromRawValue(arguments[0].getNumber());
|
|
83
84
|
auto callback = arguments[1].getObject(runtime).getFunction(runtime);
|
|
84
85
|
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <jsi/jsi.h>
|
|
11
|
-
#include <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
12
11
|
|
|
13
12
|
namespace facebook {
|
|
14
13
|
namespace react {
|
|
15
14
|
|
|
15
|
+
class RuntimeScheduler;
|
|
16
|
+
|
|
16
17
|
/*
|
|
17
18
|
* Exposes RuntimeScheduler to JavaScript realm.
|
|
18
19
|
*/
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <ReactCommon/CallInvoker.h>
|
|
11
|
-
#include <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
12
11
|
|
|
13
12
|
namespace facebook {
|
|
14
13
|
namespace react {
|
|
15
14
|
|
|
15
|
+
class RuntimeScheduler;
|
|
16
|
+
|
|
16
17
|
/*
|
|
17
18
|
* Exposes RuntimeScheduler to native modules. All calls invoked on JavaScript
|
|
18
19
|
* queue from native modules will be funneled through RuntimeScheduler.
|
|
@@ -7,9 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#include <folly/dynamic.h>
|
|
11
10
|
#include <jsi/jsi.h>
|
|
12
|
-
#include <react/renderer/core/CoreFeatures.h>
|
|
13
11
|
#include <react/renderer/runtimescheduler/Task.h>
|
|
14
12
|
|
|
15
13
|
namespace facebook {
|
|
@@ -24,14 +22,8 @@ struct TaskWrapper : public jsi::HostObject {
|
|
|
24
22
|
inline static jsi::Value valueFromTask(
|
|
25
23
|
jsi::Runtime &runtime,
|
|
26
24
|
std::shared_ptr<Task> task) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
obj.setNativeState(runtime, std::move(task));
|
|
30
|
-
return obj;
|
|
31
|
-
} else {
|
|
32
|
-
return jsi::Object::createFromHostObject(
|
|
33
|
-
runtime, std::make_shared<TaskWrapper>(task));
|
|
34
|
-
}
|
|
25
|
+
return jsi::Object::createFromHostObject(
|
|
26
|
+
runtime, std::make_shared<TaskWrapper>(task));
|
|
35
27
|
}
|
|
36
28
|
|
|
37
29
|
inline static std::shared_ptr<Task> taskFromValue(
|
|
@@ -41,11 +33,7 @@ inline static std::shared_ptr<Task> taskFromValue(
|
|
|
41
33
|
return nullptr;
|
|
42
34
|
}
|
|
43
35
|
|
|
44
|
-
|
|
45
|
-
return value.getObject(runtime).getNativeState<Task>(runtime);
|
|
46
|
-
} else {
|
|
47
|
-
return value.getObject(runtime).getHostObject<TaskWrapper>(runtime)->task;
|
|
48
|
-
}
|
|
36
|
+
return value.getObject(runtime).getHostObject<TaskWrapper>(runtime)->task;
|
|
49
37
|
}
|
|
50
38
|
|
|
51
39
|
} // namespace react
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#include <react/renderer/componentregistry/ComponentDescriptorFactory.h>
|
|
14
14
|
#include <react/renderer/core/EventBeat.h>
|
|
15
15
|
#include <react/renderer/leakchecker/LeakChecker.h>
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
#include <react/renderer/uimanager/UIManagerCommitHook.h>
|
|
18
18
|
#include <react/renderer/uimanager/primitives.h>
|
|
19
19
|
#include <react/utils/ContextContainer.h>
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "package.json")))
|
|
9
|
+
version = package['version']
|
|
10
|
+
|
|
11
|
+
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
12
|
+
if version == '1000.0.0'
|
|
13
|
+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
14
|
+
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
15
|
+
else
|
|
16
|
+
source[:tag] = "v#{version}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
20
|
+
folly_version = '2021.07.22.00'
|
|
21
|
+
|
|
22
|
+
header_search_paths = [
|
|
23
|
+
"\"$(PODS_ROOT)/RCT-Folly\"",
|
|
24
|
+
"\"$(PODS_TARGET_SRCROOT)\"",
|
|
25
|
+
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
if ENV["USE_FRAMEWORKS"]
|
|
29
|
+
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Pod::Spec.new do |s|
|
|
33
|
+
s.name = "React-utils"
|
|
34
|
+
s.version = version
|
|
35
|
+
s.summary = "-" # TODO
|
|
36
|
+
s.homepage = "https://reactnative.dev/"
|
|
37
|
+
s.license = package["license"]
|
|
38
|
+
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
39
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
40
|
+
s.source = source
|
|
41
|
+
s.source_files = "**/*.{cpp,h,mm}"
|
|
42
|
+
s.compiler_flags = folly_compiler_flags
|
|
43
|
+
s.header_dir = "react/utils"
|
|
44
|
+
s.exclude_files = "tests"
|
|
45
|
+
s.pod_target_xcconfig = {
|
|
46
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
47
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' ')}
|
|
48
|
+
|
|
49
|
+
if ENV['USE_FRAMEWORKS']
|
|
50
|
+
s.module_name = "React_utils"
|
|
51
|
+
s.header_mappings_dir = "../.."
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
s.dependency "RCT-Folly", folly_version
|
|
55
|
+
s.dependency "React-debug"
|
|
56
|
+
s.dependency "glog"
|
|
57
|
+
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.72.0-rc.
|
|
3
|
+
"version": "0.72.0-rc.5",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -79,15 +79,15 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@jest/create-cache-key-function": "^29.2.1",
|
|
82
|
-
"@react-native-community/cli": "11.
|
|
83
|
-
"@react-native-community/cli-platform-android": "11.
|
|
84
|
-
"@react-native-community/cli-platform-ios": "11.
|
|
82
|
+
"@react-native-community/cli": "11.3.1",
|
|
83
|
+
"@react-native-community/cli-platform-android": "11.3.1",
|
|
84
|
+
"@react-native-community/cli-platform-ios": "11.3.1",
|
|
85
85
|
"@react-native/assets-registry": "^0.72.0",
|
|
86
|
-
"@react-native/codegen": "^0.72.
|
|
87
|
-
"@react-native/gradle-plugin": "^0.72.
|
|
86
|
+
"@react-native/codegen": "^0.72.5",
|
|
87
|
+
"@react-native/gradle-plugin": "^0.72.10",
|
|
88
88
|
"@react-native/js-polyfills": "^0.72.1",
|
|
89
89
|
"@react-native/normalize-colors": "^0.72.0",
|
|
90
|
-
"@react-native/virtualized-lists": "^0.72.
|
|
90
|
+
"@react-native/virtualized-lists": "^0.72.5",
|
|
91
91
|
"abort-controller": "^3.0.0",
|
|
92
92
|
"anser": "^1.4.9",
|
|
93
93
|
"base64-js": "^1.1.2",
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
"jest-environment-node": "^29.2.1",
|
|
99
99
|
"jsc-android": "^250231.0.0",
|
|
100
100
|
"memoize-one": "^5.0.0",
|
|
101
|
-
"metro-runtime": "0.76.
|
|
102
|
-
"metro-source-map": "0.76.
|
|
101
|
+
"metro-runtime": "0.76.5",
|
|
102
|
+
"metro-source-map": "0.76.5",
|
|
103
103
|
"mkdirp": "^0.5.1",
|
|
104
104
|
"nullthrows": "^1.1.1",
|
|
105
105
|
"pretty-format": "^26.5.2",
|
|
@@ -550,6 +550,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
550
550
|
].join(' ')
|
|
551
551
|
},
|
|
552
552
|
'dependencies': {
|
|
553
|
+
"DoubleConversion": [],
|
|
553
554
|
"FBReactNativeSpec": [],
|
|
554
555
|
"RCT-Folly": [],
|
|
555
556
|
"RCTRequired": [],
|
|
@@ -561,6 +562,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
561
562
|
"ReactCommon/turbomodule/bridging": [],
|
|
562
563
|
"ReactCommon/turbomodule/core": [],
|
|
563
564
|
"hermes-engine": [],
|
|
565
|
+
"glog": [],
|
|
564
566
|
'React-NativeModulesApple': [],
|
|
565
567
|
}
|
|
566
568
|
}
|
|
@@ -573,7 +575,8 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
573
575
|
'React-graphics': [],
|
|
574
576
|
'React-rncore': [],
|
|
575
577
|
'React-Fabric': [],
|
|
576
|
-
|
|
578
|
+
'React-utils': [],
|
|
579
|
+
'React-debug': [],
|
|
577
580
|
})
|
|
578
581
|
|
|
579
582
|
specs[:'script_phases'] = script_phases
|
|
@@ -585,11 +588,13 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
|
|
585
588
|
specs = get_podspec_no_fabric_no_script()
|
|
586
589
|
|
|
587
590
|
specs["pod_target_xcconfig"]["FRAMEWORK_SEARCH_PATHS"].concat([])
|
|
588
|
-
specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\"")
|
|
591
|
+
specs["pod_target_xcconfig"]["HEADER_SEARCH_PATHS"].concat(" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-Fabric/React_Fabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\" \"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"")
|
|
589
592
|
|
|
590
593
|
specs[:dependencies].merge!({
|
|
591
594
|
'React-graphics': [],
|
|
592
595
|
'React-Fabric': [],
|
|
596
|
+
'React-utils': [],
|
|
597
|
+
'React-debug': [],
|
|
593
598
|
})
|
|
594
599
|
|
|
595
600
|
return specs
|
|
@@ -129,7 +129,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
|
|
129
129
|
|
|
130
130
|
# Assert
|
|
131
131
|
assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
|
|
132
|
-
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"")
|
|
132
|
+
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
|
|
133
133
|
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
|
|
134
134
|
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1")
|
|
135
135
|
assert_equal(
|
|
@@ -143,7 +143,13 @@ class NewArchitectureTests < Test::Unit::TestCase
|
|
|
143
143
|
{ :dependency_name => "RCTTypeSafety" },
|
|
144
144
|
{ :dependency_name => "ReactCommon/turbomodule/bridging" },
|
|
145
145
|
{ :dependency_name => "ReactCommon/turbomodule/core" },
|
|
146
|
-
{ :dependency_name => "React-NativeModulesApple" }
|
|
146
|
+
{ :dependency_name => "React-NativeModulesApple" },
|
|
147
|
+
{ :dependency_name => "Yoga" },
|
|
148
|
+
{ :dependency_name => "React-Fabric" },
|
|
149
|
+
{ :dependency_name => "React-graphics" },
|
|
150
|
+
{ :dependency_name => "React-utils" },
|
|
151
|
+
{ :dependency_name => "React-debug" },
|
|
152
|
+
{ :dependency_name => "hermes-engine" }
|
|
147
153
|
])
|
|
148
154
|
end
|
|
149
155
|
|
|
@@ -161,7 +167,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
|
|
161
167
|
|
|
162
168
|
# Assert
|
|
163
169
|
assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
|
|
164
|
-
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\"")
|
|
170
|
+
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\"")
|
|
165
171
|
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++17")
|
|
166
172
|
assert_equal(
|
|
167
173
|
spec.dependencies,
|
|
@@ -97,6 +97,8 @@ class CodegenUtils
|
|
|
97
97
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
|
|
98
98
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\"",
|
|
99
99
|
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-RCTFabric/RCTFabric.framework/Headers\"",
|
|
100
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-debug/React_debug.framework/Headers\"",
|
|
101
|
+
"\"$(PODS_CONFIGURATION_BUILD_DIR)/React-utils/React_utils.framework/Headers\"",
|
|
100
102
|
])
|
|
101
103
|
end
|
|
102
104
|
|
|
@@ -128,6 +130,8 @@ class CodegenUtils
|
|
|
128
130
|
"ReactCommon/turbomodule/bridging": [],
|
|
129
131
|
"ReactCommon/turbomodule/core": [],
|
|
130
132
|
"React-NativeModulesApple": [],
|
|
133
|
+
"glog": [],
|
|
134
|
+
"DoubleConversion": [],
|
|
131
135
|
}
|
|
132
136
|
}
|
|
133
137
|
|
|
@@ -135,6 +139,8 @@ class CodegenUtils
|
|
|
135
139
|
spec[:'dependencies'].merge!({
|
|
136
140
|
'React-graphics': [],
|
|
137
141
|
'React-Fabric': [],
|
|
142
|
+
'React-debug': [],
|
|
143
|
+
'React-utils': [],
|
|
138
144
|
});
|
|
139
145
|
end
|
|
140
146
|
|
|
@@ -96,6 +96,8 @@ class NewArchitectureHelper
|
|
|
96
96
|
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\""
|
|
97
97
|
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\""
|
|
98
98
|
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\""
|
|
99
|
+
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\""
|
|
100
|
+
header_search_paths << "\"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\""
|
|
99
101
|
end
|
|
100
102
|
header_search_paths_string = header_search_paths.join(" ")
|
|
101
103
|
spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}"
|
|
@@ -118,6 +120,17 @@ class NewArchitectureHelper
|
|
|
118
120
|
spec.dependency "ReactCommon/turbomodule/bridging"
|
|
119
121
|
spec.dependency "ReactCommon/turbomodule/core"
|
|
120
122
|
spec.dependency "React-NativeModulesApple"
|
|
123
|
+
spec.dependency "Yoga"
|
|
124
|
+
spec.dependency "React-Fabric"
|
|
125
|
+
spec.dependency "React-graphics"
|
|
126
|
+
spec.dependency "React-utils"
|
|
127
|
+
spec.dependency "React-debug"
|
|
128
|
+
|
|
129
|
+
if ENV["USE_HERMES"] == nil || ENV["USE_HERMES"] == "1"
|
|
130
|
+
spec.dependency "hermes-engine"
|
|
131
|
+
else
|
|
132
|
+
spec.dependency "React-jsi"
|
|
133
|
+
end
|
|
121
134
|
end
|
|
122
135
|
|
|
123
136
|
spec.pod_target_xcconfig = current_config
|
|
@@ -176,7 +176,7 @@ else
|
|
|
176
176
|
if [[ $EMIT_SOURCEMAP == true ]]; then
|
|
177
177
|
EXTRA_COMPILER_ARGS="$EXTRA_COMPILER_ARGS -output-source-map"
|
|
178
178
|
fi
|
|
179
|
-
"$HERMES_CLI_PATH" -emit-binary $EXTRA_COMPILER_ARGS -out "$DEST/main.jsbundle" "$BUNDLE_FILE"
|
|
179
|
+
"$HERMES_CLI_PATH" -emit-binary -max-diagnostic-width=80 "$EXTRA_COMPILER_ARGS" -out "$DEST/main.jsbundle" "$BUNDLE_FILE"
|
|
180
180
|
if [[ $EMIT_SOURCEMAP == true ]]; then
|
|
181
181
|
HBC_SOURCEMAP_FILE="$DEST/main.jsbundle.map"
|
|
182
182
|
"$NODE_BINARY" "$COMPOSE_SOURCEMAP_PATH" "$PACKAGER_SOURCEMAP_FILE" "$HBC_SOURCEMAP_FILE" -o "$SOURCEMAP_FILE"
|
|
@@ -117,6 +117,8 @@ def use_react_native! (
|
|
|
117
117
|
pod 'React-Core/RCTWebSocket', :path => "#{prefix}/"
|
|
118
118
|
pod 'React-rncore', :path => "#{prefix}/ReactCommon"
|
|
119
119
|
pod 'React-cxxreact', :path => "#{prefix}/ReactCommon/cxxreact"
|
|
120
|
+
pod 'React-debug', :path => "#{prefix}/ReactCommon/react/debug"
|
|
121
|
+
pod 'React-utils', :path => "#{prefix}/ReactCommon/react/utils"
|
|
120
122
|
|
|
121
123
|
if hermes_enabled
|
|
122
124
|
setup_hermes!(:react_native_path => prefix, :fabric_enabled => fabric_enabled)
|
|
@@ -129,6 +131,7 @@ def use_react_native! (
|
|
|
129
131
|
|
|
130
132
|
pod 'React-callinvoker', :path => "#{prefix}/ReactCommon/callinvoker"
|
|
131
133
|
pod 'React-runtimeexecutor', :path => "#{prefix}/ReactCommon/runtimeexecutor"
|
|
134
|
+
pod 'React-runtimescheduler', :path => "#{prefix}/ReactCommon/react/renderer/runtimescheduler"
|
|
132
135
|
pod 'React-perflogger', :path => "#{prefix}/ReactCommon/reactperflogger"
|
|
133
136
|
pod 'React-logger', :path => "#{prefix}/ReactCommon/logger"
|
|
134
137
|
pod 'ReactCommon/turbomodule/core', :path => "#{prefix}/ReactCommon", :modular_headers => true
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +1,3 @@
|
|
|
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
1
|
apply plugin: "com.android.application"
|
|
9
2
|
apply plugin: "com.facebook.react"
|
|
10
3
|
|