react-native 0.82.0-rc.0 → 0.82.0-rc.1
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/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +1 -0
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -5
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.mm +6 -1
- package/ReactAndroid/build.gradle.kts +7 -0
- package/ReactAndroid/gradle.properties +3 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +28 -7
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +2 -0
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +4 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/executor/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +8 -5
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.h +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.h +2 -2
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -0
- package/ReactCommon/react/runtime/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +7 -3
- package/flow/bom.js.flow +157 -0
- package/package.json +8 -8
- package/scripts/cocoapods/autolinking.rb +6 -0
- package/scripts/cocoapods/codegen_utils.rb +1 -1
- package/scripts/cocoapods/jsengine.rb +2 -1
- package/scripts/cocoapods/utils.rb +8 -2
- package/scripts/codegen/generate-artifacts-executor/index.js +5 -1
- package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
- package/scripts/replace-rncore-version.js +4 -2
- package/sdks/hermes-engine/hermes-engine.podspec +30 -12
- package/sdks/hermes-engine/hermes-utils.rb +41 -10
- package/sdks/hermes-engine/utils/build-apple-framework.sh +7 -1
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -1
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +1 -1
- package/sdks/hermes-engine/utils/replace_hermes_version.js +4 -2
- 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/settings.gradle.kts +9 -0
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/webapis/performance/EventTiming.js +34 -15
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +23 -6
- package/src/private/webapis/performance/PerformanceEntry.js +21 -8
- package/src/private/webapis/performance/PerformanceObserver.js +30 -1
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +33 -28
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/third-party-podspecs/replace_dependencies_version.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.82.0-rc.
|
|
3
|
+
"version": "0.82.0-rc.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -162,13 +162,13 @@
|
|
|
162
162
|
},
|
|
163
163
|
"dependencies": {
|
|
164
164
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
165
|
-
"@react-native/assets-registry": "0.82.0-rc.
|
|
166
|
-
"@react-native/codegen": "0.82.0-rc.
|
|
167
|
-
"@react-native/community-cli-plugin": "0.82.0-rc.
|
|
168
|
-
"@react-native/gradle-plugin": "0.82.0-rc.
|
|
169
|
-
"@react-native/js-polyfills": "0.82.0-rc.
|
|
170
|
-
"@react-native/normalize-colors": "0.82.0-rc.
|
|
171
|
-
"@react-native/virtualized-lists": "0.82.0-rc.
|
|
165
|
+
"@react-native/assets-registry": "0.82.0-rc.1",
|
|
166
|
+
"@react-native/codegen": "0.82.0-rc.1",
|
|
167
|
+
"@react-native/community-cli-plugin": "0.82.0-rc.1",
|
|
168
|
+
"@react-native/gradle-plugin": "0.82.0-rc.1",
|
|
169
|
+
"@react-native/js-polyfills": "0.82.0-rc.1",
|
|
170
|
+
"@react-native/normalize-colors": "0.82.0-rc.1",
|
|
171
|
+
"@react-native/virtualized-lists": "0.82.0-rc.1",
|
|
172
172
|
"abort-controller": "^3.0.0",
|
|
173
173
|
"anser": "^1.4.9",
|
|
174
174
|
"ansi-regex": "^5.0.0",
|
|
@@ -40,6 +40,12 @@ def list_native_modules!(config_command)
|
|
|
40
40
|
packages = config["dependencies"]
|
|
41
41
|
ios_project_root = Pathname.new(config["project"]["ios"]["sourceDir"])
|
|
42
42
|
react_native_path = Pathname.new(config["reactNativePath"])
|
|
43
|
+
codegen_output_path = ios_project_root.join("build/generated/autolinking/autolinking.json")
|
|
44
|
+
|
|
45
|
+
# Write autolinking react-native-config output to codegen folder
|
|
46
|
+
FileUtils.mkdir_p(File.dirname(codegen_output_path))
|
|
47
|
+
File.write(codegen_output_path, json)
|
|
48
|
+
|
|
43
49
|
found_pods = []
|
|
44
50
|
|
|
45
51
|
packages.each do |package_name, package|
|
|
@@ -87,7 +87,7 @@ class CodegenUtils
|
|
|
87
87
|
codegen_path = file_manager.join(ios_folder, codegen_dir)
|
|
88
88
|
return if !dir_manager.exist?(codegen_path)
|
|
89
89
|
|
|
90
|
-
FileUtils.rm_rf(
|
|
90
|
+
FileUtils.rm_rf("#{codegen_path}")
|
|
91
91
|
base_provider_path = file_manager.join(rn_path, 'React', 'Fabric', 'RCTThirdPartyFabricComponentsProvider')
|
|
92
92
|
FileUtils.rm_rf("#{base_provider_path}.h")
|
|
93
93
|
FileUtils.rm_rf("#{base_provider_path}.mm")
|
|
@@ -13,7 +13,8 @@ def setup_hermes!(react_native_path: "../node_modules/react-native")
|
|
|
13
13
|
react_native_dir = Pod::Config.instance.installation_root.join(react_native_path)
|
|
14
14
|
# This `:tag => hermestag` below is only to tell CocoaPods to update hermes-engine when React Native version changes.
|
|
15
15
|
# We have custom logic to compute the source for hermes-engine. See sdks/hermes-engine/*
|
|
16
|
-
|
|
16
|
+
hermestag_file_name = ENV['RCT_HERMES_V1_ENABLED'] == "1" ? ".hermesv1version" : ".hermesversion"
|
|
17
|
+
hermestag_file = File.join(react_native_dir, "sdks", hermestag_file_name)
|
|
17
18
|
hermestag = File.exist?(hermestag_file) ? File.read(hermestag_file).strip : ''
|
|
18
19
|
pod 'hermes-engine', :podspec => "#{react_native_path}/sdks/hermes-engine/hermes-engine.podspec", :tag => hermestag
|
|
19
20
|
pod 'React-hermes', :path => "#{react_native_path}/ReactCommon/hermes"
|
|
@@ -45,9 +45,15 @@ class ReactNativePodsUtils
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
def self.set_gcc_preprocessor_definition_for_React_hermes(installer)
|
|
48
|
-
|
|
48
|
+
if ENV['RCT_HERMES_V1_ENABLED'] == "1"
|
|
49
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1 HERMES_V1_ENABLED=1", "React-hermes", :debug)
|
|
50
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1 HERMES_V1_ENABLED=1", "React-RuntimeHermes", :debug)
|
|
51
|
+
else
|
|
52
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-hermes", :debug)
|
|
53
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes", :debug)
|
|
54
|
+
end
|
|
55
|
+
|
|
49
56
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "hermes-engine", :debug)
|
|
50
|
-
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "HERMES_ENABLE_DEBUGGER=1", "React-RuntimeHermes", :debug)
|
|
51
57
|
end
|
|
52
58
|
|
|
53
59
|
def self.set_gcc_preprocessor_definition_for_debugger(installer)
|
|
@@ -86,10 +86,14 @@ function execute(
|
|
|
86
86
|
buildCodegenIfNeeded();
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
const reactNativeConfig = readReactNativeConfig(
|
|
89
|
+
const reactNativeConfig = readReactNativeConfig(
|
|
90
|
+
projectRoot,
|
|
91
|
+
baseOutputPath,
|
|
92
|
+
);
|
|
90
93
|
const codegenEnabledLibraries = findCodegenEnabledLibraries(
|
|
91
94
|
pkgJson,
|
|
92
95
|
projectRoot,
|
|
96
|
+
baseOutputPath,
|
|
93
97
|
reactNativeConfig,
|
|
94
98
|
);
|
|
95
99
|
|
|
@@ -97,15 +97,40 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
function
|
|
101
|
-
|
|
100
|
+
function readGeneratedAutolinkingOutput(
|
|
101
|
+
baseOutputPath /*: string */,
|
|
102
|
+
) /*: $FlowFixMe */ {
|
|
103
|
+
// NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
|
|
104
|
+
const autolinkingGeneratedPath = path.resolve(
|
|
105
|
+
baseOutputPath,
|
|
106
|
+
'build/generated/autolinking/autolinking.json',
|
|
107
|
+
);
|
|
108
|
+
if (fs.existsSync(autolinkingGeneratedPath)) {
|
|
109
|
+
// $FlowFixMe[unsupported-syntax]
|
|
110
|
+
return require(autolinkingGeneratedPath);
|
|
111
|
+
} else {
|
|
112
|
+
codegenLog(
|
|
113
|
+
`Could not find generated autolinking output at: ${autolinkingGeneratedPath}`,
|
|
114
|
+
);
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
102
118
|
|
|
103
|
-
|
|
119
|
+
function readReactNativeConfig(
|
|
120
|
+
projectRoot /*: string */,
|
|
121
|
+
baseOutputPath /*: string */,
|
|
122
|
+
) /*: $FlowFixMe */ {
|
|
123
|
+
const autolinkingOutput = readGeneratedAutolinkingOutput(baseOutputPath);
|
|
124
|
+
const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
|
|
125
|
+
if (autolinkingOutput) {
|
|
126
|
+
return autolinkingOutput;
|
|
127
|
+
} else if (fs.existsSync(rnConfigFilePath)) {
|
|
128
|
+
// $FlowFixMe[unsupported-syntax]
|
|
129
|
+
return require(rnConfigFilePath);
|
|
130
|
+
} else {
|
|
131
|
+
codegenLog(`Could not find React Native config at: ${rnConfigFilePath}`);
|
|
104
132
|
return {};
|
|
105
133
|
}
|
|
106
|
-
|
|
107
|
-
// $FlowFixMe[unsupported-syntax]
|
|
108
|
-
return require(rnConfigFilePath);
|
|
109
134
|
}
|
|
110
135
|
|
|
111
136
|
/**
|
|
@@ -114,17 +139,23 @@ function readReactNativeConfig(projectRoot /*: string */) /*: $FlowFixMe */ {
|
|
|
114
139
|
function findCodegenEnabledLibraries(
|
|
115
140
|
pkgJson /*: $FlowFixMe */,
|
|
116
141
|
projectRoot /*: string */,
|
|
142
|
+
baseOutputPath /*: string */,
|
|
117
143
|
reactNativeConfig /*: $FlowFixMe */,
|
|
118
144
|
) /*: Array<$FlowFixMe> */ {
|
|
119
145
|
const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
|
|
120
146
|
if (pkgJsonIncludesGeneratedCode(pkgJson)) {
|
|
121
147
|
return projectLibraries;
|
|
122
148
|
} else {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
149
|
+
const libraries = [...projectLibraries];
|
|
150
|
+
// If we ran autolinking, we shouldn't try to run our own "autolinking-like"
|
|
151
|
+
// library discovery
|
|
152
|
+
if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
|
|
153
|
+
libraries.push(...findExternalLibraries(pkgJson, projectRoot));
|
|
154
|
+
}
|
|
155
|
+
libraries.push(
|
|
126
156
|
...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
|
|
127
|
-
|
|
157
|
+
);
|
|
158
|
+
return libraries;
|
|
128
159
|
}
|
|
129
160
|
}
|
|
130
161
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const {
|
|
13
|
+
const {spawnSync} = require('child_process');
|
|
14
14
|
const fs = require('fs');
|
|
15
15
|
const yargs = require('yargs');
|
|
16
16
|
|
|
@@ -67,7 +67,9 @@ function replaceRNCoreConfiguration(
|
|
|
67
67
|
fs.mkdirSync(finalLocation, {recursive: true});
|
|
68
68
|
|
|
69
69
|
console.log('Extracting the tarball', tarballURLPath);
|
|
70
|
-
|
|
70
|
+
spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
|
|
71
|
+
stdio: 'inherit',
|
|
72
|
+
});
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
function updateLastBuildConfiguration(configuration /*: string */) {
|
|
@@ -20,6 +20,7 @@ end
|
|
|
20
20
|
|
|
21
21
|
# package.json
|
|
22
22
|
package = JSON.parse(File.read(File.join(react_native_path, "package.json")))
|
|
23
|
+
# TODO: T231755000 use the Hermes V1 version instead of React Native version
|
|
23
24
|
version = package['version']
|
|
24
25
|
|
|
25
26
|
source_type = hermes_source_type(version, react_native_path)
|
|
@@ -62,6 +63,21 @@ Pod::Spec.new do |spec|
|
|
|
62
63
|
ss.osx.vendored_frameworks = "destroot/Library/Frameworks/macosx/hermesvm.framework"
|
|
63
64
|
end
|
|
64
65
|
|
|
66
|
+
# When using the local prebuilt tarball, it should include hermesc compatible with the used VM.
|
|
67
|
+
# In other cases, when using Hermes V1, the prebuilt versioned binaries can be used.
|
|
68
|
+
# TODO: T236142916 hermesc should be consumed from NPM even when not using Hermes V1
|
|
69
|
+
if source_type != HermesEngineSourceType::LOCAL_PREBUILT_TARBALL && ENV['RCT_HERMES_V1_ENABLED'] == "1"
|
|
70
|
+
hermes_compiler_path = File.dirname(Pod::Executable.execute_command('node', ['-p',
|
|
71
|
+
'require.resolve(
|
|
72
|
+
"hermes-compiler",
|
|
73
|
+
{paths: [process.argv[1]]}
|
|
74
|
+
)', __dir__]).strip
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
spec.user_target_xcconfig = {
|
|
78
|
+
'HERMES_CLI_PATH' => "#{hermes_compiler_path}/osx-bin/hermesc"
|
|
79
|
+
}
|
|
80
|
+
end
|
|
65
81
|
|
|
66
82
|
# Right now, even reinstalling pods with the PRODUCTION flag turned on, does not change the version of hermes that is downloaded
|
|
67
83
|
# To remove the PRODUCTION flag, we want to download the right version of hermes on the flight
|
|
@@ -100,24 +116,26 @@ Pod::Spec.new do |spec|
|
|
|
100
116
|
ss.header_dir = 'hermes/cdp'
|
|
101
117
|
end
|
|
102
118
|
|
|
103
|
-
spec.subspec 'inspector' do |ss|
|
|
104
|
-
ss.source_files = ''
|
|
105
|
-
ss.public_header_files = 'API/hermes/inspector/*.h'
|
|
106
|
-
ss.header_dir = 'hermes/inspector'
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
spec.subspec 'inspector_chrome' do |ss|
|
|
110
|
-
ss.source_files = ''
|
|
111
|
-
ss.public_header_files = 'API/hermes/inspector/chrome/*.h'
|
|
112
|
-
ss.header_dir = 'hermes/inspector/chrome'
|
|
113
|
-
end
|
|
114
|
-
|
|
115
119
|
spec.subspec 'Public' do |ss|
|
|
116
120
|
ss.source_files = ''
|
|
117
121
|
ss.public_header_files = 'public/hermes/Public/*.h'
|
|
118
122
|
ss.header_dir = 'hermes/Public'
|
|
119
123
|
end
|
|
120
124
|
|
|
125
|
+
if ENV['RCT_HERMES_V1_ENABLED'] != "1"
|
|
126
|
+
spec.subspec 'inspector' do |ss|
|
|
127
|
+
ss.source_files = ''
|
|
128
|
+
ss.public_header_files = 'API/hermes/inspector/*.h'
|
|
129
|
+
ss.header_dir = 'hermes/inspector'
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
spec.subspec 'inspector_chrome' do |ss|
|
|
133
|
+
ss.source_files = ''
|
|
134
|
+
ss.public_header_files = 'API/hermes/inspector/chrome/*.h'
|
|
135
|
+
ss.header_dir = 'hermes/inspector/chrome'
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
121
139
|
hermesc_path = "${PODS_ROOT}/hermes-engine/build_host_hermesc"
|
|
122
140
|
|
|
123
141
|
if ENV.has_key?('HERMES_OVERRIDE_HERMESC_PATH') && File.exist?(ENV['HERMES_OVERRIDE_HERMESC_PATH']) then
|
|
@@ -85,6 +85,10 @@ def hermes_commit_envvar_defined()
|
|
|
85
85
|
return ENV.has_key?('HERMES_COMMIT')
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
+
def hermes_v1_enabled()
|
|
89
|
+
return ENV['RCT_HERMES_V1_ENABLED'] == "1"
|
|
90
|
+
end
|
|
91
|
+
|
|
88
92
|
def force_build_from_tag(react_native_path)
|
|
89
93
|
return ENV[ENV_BUILD_FROM_SOURCE] === 'true' && File.exist?(hermestag_file(react_native_path))
|
|
90
94
|
end
|
|
@@ -170,13 +174,19 @@ end
|
|
|
170
174
|
|
|
171
175
|
def podspec_source_build_from_github_tag(react_native_path)
|
|
172
176
|
tag = File.read(hermestag_file(react_native_path)).strip
|
|
173
|
-
|
|
177
|
+
|
|
178
|
+
if hermes_v1_enabled()
|
|
179
|
+
hermes_log("Using tag defined in sdks/.hermesv1version: #{tag}")
|
|
180
|
+
else
|
|
181
|
+
hermes_log("Using tag defined in sdks/.hermesversion: #{tag}")
|
|
182
|
+
end
|
|
174
183
|
return {:git => HERMES_GITHUB_URL, :tag => tag}
|
|
175
184
|
end
|
|
176
185
|
|
|
177
186
|
def podspec_source_build_from_github_main()
|
|
178
|
-
|
|
179
|
-
|
|
187
|
+
branch = hermes_v1_enabled() ? "250829098.0.0-stable" : "main"
|
|
188
|
+
hermes_log("Using the latest commit from #{branch}.")
|
|
189
|
+
return {:git => HERMES_GITHUB_URL, :commit => `git ls-remote #{HERMES_GITHUB_URL} #{branch} | cut -f 1`.strip}
|
|
180
190
|
end
|
|
181
191
|
|
|
182
192
|
def podspec_source_download_prebuild_release_tarball(react_native_path, version)
|
|
@@ -200,7 +210,11 @@ def artifacts_dir()
|
|
|
200
210
|
end
|
|
201
211
|
|
|
202
212
|
def hermestag_file(react_native_path)
|
|
203
|
-
|
|
213
|
+
if hermes_v1_enabled()
|
|
214
|
+
return File.join(react_native_path, "sdks", ".hermesv1version")
|
|
215
|
+
else
|
|
216
|
+
return File.join(react_native_path, "sdks", ".hermesversion")
|
|
217
|
+
end
|
|
204
218
|
end
|
|
205
219
|
|
|
206
220
|
def release_tarball_url(version, build_type)
|
|
@@ -210,10 +224,18 @@ def release_tarball_url(version, build_type)
|
|
|
210
224
|
ENV['ENTERPRISE_REPOSITORY'] != nil && ENV['ENTERPRISE_REPOSITORY'] != "" ?
|
|
211
225
|
ENV['ENTERPRISE_REPOSITORY'] :
|
|
212
226
|
"https://repo1.maven.org/maven2"
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
227
|
+
|
|
228
|
+
if hermes_v1_enabled()
|
|
229
|
+
namespace = "com/facebook/hermes"
|
|
230
|
+
# Sample url from Maven:
|
|
231
|
+
# https://repo1.maven.org/maven2/com/facebook/hermes/hermes-ios/0.14.0/hermes-ios-0.14.0-debug.tar.gz
|
|
232
|
+
return "#{maven_repo_url}/#{namespace}/hermes-ios/#{version}/hermes-ios-#{version}-#{build_type.to_s}.tar.gz"
|
|
233
|
+
else
|
|
234
|
+
namespace = "com/facebook/react"
|
|
235
|
+
# Sample url from Maven:
|
|
236
|
+
# https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.71.0/react-native-artifacts-0.71.0-hermes-ios-debug.tar.gz
|
|
237
|
+
return "#{maven_repo_url}/#{namespace}/react-native-artifacts/#{version}/react-native-artifacts-#{version}-hermes-ios-#{build_type.to_s}.tar.gz"
|
|
238
|
+
end
|
|
217
239
|
end
|
|
218
240
|
|
|
219
241
|
def download_stable_hermes(react_native_path, version, configuration)
|
|
@@ -235,9 +257,18 @@ def download_hermes_tarball(react_native_path, tarball_url, version, configurati
|
|
|
235
257
|
end
|
|
236
258
|
|
|
237
259
|
def nightly_tarball_url(version)
|
|
260
|
+
# TODO: T231755027 update coordinates and versioning
|
|
238
261
|
artifact_coordinate = "react-native-artifacts"
|
|
239
262
|
artifact_name = "hermes-ios-debug.tar.gz"
|
|
240
|
-
|
|
263
|
+
namespace = "com/facebook/react"
|
|
264
|
+
|
|
265
|
+
if hermes_v1_enabled()
|
|
266
|
+
artifact_coordinate = "hermes-ios"
|
|
267
|
+
artifact_name = "hermes-ios-debug.tar.gz"
|
|
268
|
+
namespace = "com/facebook/hermes"
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
xml_url = "https://central.sonatype.com/repository/maven-snapshots/#{namespace}/#{artifact_coordinate}/#{version}-SNAPSHOT/maven-metadata.xml"
|
|
241
272
|
|
|
242
273
|
response = Net::HTTP.get_response(URI(xml_url))
|
|
243
274
|
if response.is_a?(Net::HTTPSuccess)
|
|
@@ -245,7 +276,7 @@ def nightly_tarball_url(version)
|
|
|
245
276
|
timestamp = xml.elements['metadata/versioning/snapshot/timestamp'].text
|
|
246
277
|
build_number = xml.elements['metadata/versioning/snapshot/buildNumber'].text
|
|
247
278
|
full_version = "#{version}-#{timestamp}-#{build_number}"
|
|
248
|
-
final_url = "https://central.sonatype.com/repository/maven-snapshots
|
|
279
|
+
final_url = "https://central.sonatype.com/repository/maven-snapshots/#{namespace}/#{artifact_coordinate}/#{version}-SNAPSHOT/#{artifact_coordinate}-#{full_version}-#{artifact_name}"
|
|
249
280
|
|
|
250
281
|
return final_url
|
|
251
282
|
else
|
|
@@ -88,6 +88,11 @@ function configure_apple_framework {
|
|
|
88
88
|
xcode_15_flags="LINKER:-ld_classic"
|
|
89
89
|
fi
|
|
90
90
|
|
|
91
|
+
boost_context_flag=""
|
|
92
|
+
if [[ $1 == "catalyst" ]]; then
|
|
93
|
+
boost_context_flag="-DHERMES_ALLOW_BOOST_CONTEXT=0"
|
|
94
|
+
fi
|
|
95
|
+
|
|
91
96
|
pushd "$HERMES_PATH" > /dev/null || exit 1
|
|
92
97
|
cmake -S . -B "build_$1" \
|
|
93
98
|
-DHERMES_EXTRA_LINKER_FLAGS="$xcode_15_flags" \
|
|
@@ -107,7 +112,8 @@ function configure_apple_framework {
|
|
|
107
112
|
-DIMPORT_HOST_COMPILERS:PATH="$IMPORT_HOST_COMPILERS_PATH" \
|
|
108
113
|
-DJSI_DIR="$JSI_PATH" \
|
|
109
114
|
-DHERMES_RELEASE_VERSION="for RN $(get_release_version)" \
|
|
110
|
-
-DCMAKE_BUILD_TYPE="$cmake_build_type"
|
|
115
|
+
-DCMAKE_BUILD_TYPE="$cmake_build_type" \
|
|
116
|
+
$boost_context_flag
|
|
111
117
|
popd > /dev/null || exit 1
|
|
112
118
|
}
|
|
113
119
|
|
|
@@ -59,6 +59,11 @@ if [[ $xcode_major_version -ge 15 ]]; then
|
|
|
59
59
|
xcode_15_flags="LINKER:-ld_classic"
|
|
60
60
|
fi
|
|
61
61
|
|
|
62
|
+
boost_context_flag=""
|
|
63
|
+
if [[ $PLATFORM_NAME == "catalyst" ]]; then
|
|
64
|
+
boost_context_flag="-DHERMES_ALLOW_BOOST_CONTEXT=0"
|
|
65
|
+
fi
|
|
66
|
+
|
|
62
67
|
architectures=$( echo "$ARCHS" | tr " " ";" )
|
|
63
68
|
|
|
64
69
|
echo "Configure Apple framework"
|
|
@@ -83,7 +88,8 @@ echo "Configure Apple framework"
|
|
|
83
88
|
-DIMPORT_HOST_COMPILERS:PATH="${hermesc_path}" \
|
|
84
89
|
-DJSI_DIR="$jsi_path" \
|
|
85
90
|
-DHERMES_RELEASE_VERSION="for RN $release_version" \
|
|
86
|
-
-DCMAKE_BUILD_TYPE="$cmake_build_type"
|
|
91
|
+
-DCMAKE_BUILD_TYPE="$cmake_build_type" \
|
|
92
|
+
$boost_context_flag
|
|
87
93
|
|
|
88
94
|
echo "Build Apple framework"
|
|
89
95
|
|
|
@@ -96,6 +102,7 @@ echo "Copy Apple framework to destroot/Library/Frameworks"
|
|
|
96
102
|
|
|
97
103
|
platform_copy_destination=$(get_platform_copy_destination $PLATFORM_NAME)
|
|
98
104
|
|
|
105
|
+
mkdir -p "${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/${platform_copy_destination}"
|
|
99
106
|
cp -pfR \
|
|
100
107
|
"${PODS_ROOT}/hermes-engine/build/${PLATFORM_NAME}/lib/hermesvm.framework" \
|
|
101
108
|
"${PODS_ROOT}/hermes-engine/destroot/Library/Frameworks/${platform_copy_destination}"
|
|
@@ -18,7 +18,7 @@ SDKROOT=$(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
|
|
|
18
18
|
env -i \
|
|
19
19
|
PATH="$PATH" \
|
|
20
20
|
SDKROOT="$SDKROOT" \
|
|
21
|
-
"$CMAKE_BINARY" -S "${PODS_ROOT}/hermes-engine" -B "$hermesc_dir_path" -DJSI_DIR="$jsi_path"
|
|
21
|
+
"$CMAKE_BINARY" -S "${PODS_ROOT}/hermes-engine" -B "$hermesc_dir_path" -DJSI_DIR="$jsi_path" -DCMAKE_BUILD_TYPE=Release
|
|
22
22
|
|
|
23
23
|
env -i \
|
|
24
24
|
PATH="$PATH" \
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
const {
|
|
13
|
+
const {spawnSync} = require('child_process');
|
|
14
14
|
const fs = require('fs');
|
|
15
15
|
const yargs = require('yargs');
|
|
16
16
|
|
|
@@ -62,7 +62,9 @@ function replaceHermesConfiguration(configuration, version, podsRoot) {
|
|
|
62
62
|
fs.mkdirSync(finalLocation, {recursive: true});
|
|
63
63
|
|
|
64
64
|
console.log('Extracting the tarball');
|
|
65
|
-
|
|
65
|
+
spawnSync('tar', ['-xf', tarballURLPath, '-C', finalLocation], {
|
|
66
|
+
stdio: 'inherit',
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
function updateLastBuildConfiguration(configuration) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/settings.gradle.kts
CHANGED
|
@@ -29,3 +29,12 @@ include(":packages:react-native:ReactAndroid:hermes-engine")
|
|
|
29
29
|
|
|
30
30
|
project(":packages:react-native:ReactAndroid:hermes-engine").projectDir =
|
|
31
31
|
file("ReactAndroid/hermes-engine/")
|
|
32
|
+
|
|
33
|
+
// Since Gradle 9.0, all the projects in the path must have an existing folder.
|
|
34
|
+
// As we build :packages:react-native:ReactAndroid, we need to declare the folders
|
|
35
|
+
// for :packages and :packages:react-native as well as otherwise the build from
|
|
36
|
+
// source will fail with a missing folder exception.
|
|
37
|
+
|
|
38
|
+
project(":packages").projectDir = file("/tmp")
|
|
39
|
+
|
|
40
|
+
project(":packages:react-native").projectDir = file("/tmp")
|
|
@@ -12,29 +12,49 @@ import {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
|
|
|
12
12
|
|
|
13
13
|
let initialized = false;
|
|
14
14
|
|
|
15
|
-
export default function
|
|
15
|
+
export default function setUpPerformanceModern() {
|
|
16
16
|
if (initialized) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
initialized = true;
|
|
21
21
|
|
|
22
|
+
const Performance = require('../webapis/performance/Performance').default;
|
|
23
|
+
|
|
24
|
+
// We don't use `polyfillGlobal` to define this lazily because the
|
|
25
|
+
// `performance` object is always accessed.
|
|
26
|
+
// $FlowExpectedError[cannot-write]
|
|
27
|
+
global.performance = new Performance();
|
|
28
|
+
|
|
22
29
|
polyfillGlobal(
|
|
23
|
-
'
|
|
30
|
+
'EventCounts',
|
|
31
|
+
() => require('../webapis/performance/EventTiming').EventCounts_public,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
polyfillGlobal(
|
|
35
|
+
'Performance',
|
|
36
|
+
() => require('../webapis/performance/Performance').Performance_public,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
polyfillGlobal(
|
|
40
|
+
'PerformanceEntry',
|
|
24
41
|
() =>
|
|
25
|
-
require('../webapis/performance/
|
|
42
|
+
require('../webapis/performance/PerformanceEntry')
|
|
43
|
+
.PerformanceEntry_public,
|
|
26
44
|
);
|
|
27
45
|
|
|
28
46
|
polyfillGlobal(
|
|
29
|
-
'
|
|
47
|
+
'PerformanceEventTiming',
|
|
30
48
|
() =>
|
|
31
|
-
require('../webapis/performance/
|
|
32
|
-
.
|
|
49
|
+
require('../webapis/performance/EventTiming')
|
|
50
|
+
.PerformanceEventTiming_public,
|
|
33
51
|
);
|
|
34
52
|
|
|
35
53
|
polyfillGlobal(
|
|
36
|
-
'
|
|
37
|
-
() =>
|
|
54
|
+
'PerformanceLongTaskTiming',
|
|
55
|
+
() =>
|
|
56
|
+
require('../webapis/performance/LongTasks')
|
|
57
|
+
.PerformanceLongTaskTiming_public,
|
|
38
58
|
);
|
|
39
59
|
|
|
40
60
|
polyfillGlobal(
|
|
@@ -44,28 +64,33 @@ export default function setUpPerformanceObserver() {
|
|
|
44
64
|
|
|
45
65
|
polyfillGlobal(
|
|
46
66
|
'PerformanceMeasure',
|
|
47
|
-
() =>
|
|
67
|
+
() =>
|
|
68
|
+
require('../webapis/performance/UserTiming').PerformanceMeasure_public,
|
|
48
69
|
);
|
|
49
70
|
|
|
50
71
|
polyfillGlobal(
|
|
51
|
-
'
|
|
52
|
-
() =>
|
|
72
|
+
'PerformanceObserver',
|
|
73
|
+
() =>
|
|
74
|
+
require('../webapis/performance/PerformanceObserver').PerformanceObserver,
|
|
53
75
|
);
|
|
54
76
|
|
|
55
77
|
polyfillGlobal(
|
|
56
|
-
'
|
|
78
|
+
'PerformanceObserverEntryList',
|
|
57
79
|
() =>
|
|
58
|
-
require('../webapis/performance/
|
|
59
|
-
.
|
|
80
|
+
require('../webapis/performance/PerformanceObserver')
|
|
81
|
+
.PerformanceObserverEntryList_public,
|
|
60
82
|
);
|
|
61
83
|
|
|
62
84
|
polyfillGlobal(
|
|
63
|
-
'
|
|
64
|
-
() =>
|
|
85
|
+
'PerformanceResourceTiming',
|
|
86
|
+
() =>
|
|
87
|
+
require('../webapis/performance/ResourceTiming')
|
|
88
|
+
.PerformanceResourceTiming_public,
|
|
65
89
|
);
|
|
66
90
|
|
|
67
91
|
polyfillGlobal(
|
|
68
|
-
'
|
|
69
|
-
() =>
|
|
92
|
+
'TaskAttributionTiming',
|
|
93
|
+
() =>
|
|
94
|
+
require('../webapis/performance/LongTasks').TaskAttributionTiming_public,
|
|
70
95
|
);
|
|
71
96
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
// flowlint unsafe-getters-setters:off
|
|
12
|
-
|
|
13
12
|
import type {
|
|
14
13
|
DOMHighResTimeStamp,
|
|
14
|
+
PerformanceEntryInit,
|
|
15
15
|
PerformanceEntryJSON,
|
|
16
16
|
} from './PerformanceEntry';
|
|
17
17
|
|
|
@@ -29,25 +29,20 @@ export type PerformanceEventTimingJSON = {
|
|
|
29
29
|
...
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
export interface PerformanceEventTimingInit extends PerformanceEntryInit {
|
|
33
|
+
+processingStart?: DOMHighResTimeStamp;
|
|
34
|
+
+processingEnd?: DOMHighResTimeStamp;
|
|
35
|
+
+interactionId?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
export class PerformanceEventTiming extends PerformanceEntry {
|
|
33
39
|
#processingStart: DOMHighResTimeStamp;
|
|
34
40
|
#processingEnd: DOMHighResTimeStamp;
|
|
35
41
|
#interactionId: number;
|
|
36
42
|
|
|
37
|
-
constructor(init: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
duration?: DOMHighResTimeStamp,
|
|
41
|
-
processingStart?: DOMHighResTimeStamp,
|
|
42
|
-
processingEnd?: DOMHighResTimeStamp,
|
|
43
|
-
interactionId?: number,
|
|
44
|
-
}) {
|
|
45
|
-
super({
|
|
46
|
-
name: init.name,
|
|
47
|
-
entryType: 'event',
|
|
48
|
-
startTime: init.startTime ?? 0,
|
|
49
|
-
duration: init.duration ?? 0,
|
|
50
|
-
});
|
|
43
|
+
constructor(init: PerformanceEventTimingInit) {
|
|
44
|
+
super('event', init);
|
|
45
|
+
|
|
51
46
|
this.#processingStart = init.processingStart ?? 0;
|
|
52
47
|
this.#processingEnd = init.processingEnd ?? 0;
|
|
53
48
|
this.#interactionId = init.interactionId ?? 0;
|
|
@@ -75,6 +70,18 @@ export class PerformanceEventTiming extends PerformanceEntry {
|
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
72
|
|
|
73
|
+
export const PerformanceEventTiming_public: typeof PerformanceEventTiming =
|
|
74
|
+
/* eslint-disable no-shadow */
|
|
75
|
+
// $FlowExpectedError[incompatible-type]
|
|
76
|
+
function PerformanceEventTiming() {
|
|
77
|
+
throw new TypeError(
|
|
78
|
+
"Failed to construct 'PerformanceEventTiming': Illegal constructor",
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// $FlowExpectedError[prop-missing]
|
|
83
|
+
PerformanceEventTiming_public.prototype = PerformanceEventTiming.prototype;
|
|
84
|
+
|
|
78
85
|
type EventCountsForEachCallbackType =
|
|
79
86
|
| (() => void)
|
|
80
87
|
| ((value: number) => void)
|
|
@@ -139,3 +146,15 @@ export class EventCounts {
|
|
|
139
146
|
return getCachedEventCounts().values();
|
|
140
147
|
}
|
|
141
148
|
}
|
|
149
|
+
|
|
150
|
+
export const EventCounts_public: typeof EventCounts =
|
|
151
|
+
/* eslint-disable no-shadow */
|
|
152
|
+
// $FlowExpectedError[incompatible-type]
|
|
153
|
+
function EventCounts() {
|
|
154
|
+
throw new TypeError(
|
|
155
|
+
"Failed to construct 'EventCounts': Illegal constructor",
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// $FlowExpectedError[prop-missing]
|
|
160
|
+
EventCounts_public.prototype = EventCounts.prototype;
|