react-native 0.83.0-rc.2 → 0.83.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/packagerconnection/PackagerConnectionSettings.kt +13 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/networking/CMakeLists.txt +7 -0
- package/package.json +8 -8
- package/scripts/cocoapods/rncore.rb +14 -1
- package/scripts/cocoapods/utils.rb +2 -0
- package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +7 -3
- package/scripts/codegen/generate-artifacts-executor/index.js +48 -29
- package/scripts/codegen/generate-artifacts-executor/utils.js +17 -4
- package/sdks/.hermesv1version +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +1 -4
- package/sdks/hermes-engine/version.properties +1 -1
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 83;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.4';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -5,13 +5,19 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
@file:Suppress("DEPRECATION") // PreferenceManager should be migrated to androidx
|
|
9
|
+
|
|
8
10
|
package com.facebook.react.packagerconnection
|
|
9
11
|
|
|
10
12
|
import android.content.Context
|
|
13
|
+
import android.content.SharedPreferences
|
|
14
|
+
import android.preference.PreferenceManager
|
|
11
15
|
import com.facebook.common.logging.FLog
|
|
12
16
|
import com.facebook.react.modules.systeminfo.AndroidInfoHelpers
|
|
13
17
|
|
|
14
18
|
public open class PackagerConnectionSettings(private val appContext: Context) {
|
|
19
|
+
private val preferences: SharedPreferences =
|
|
20
|
+
PreferenceManager.getDefaultSharedPreferences(appContext)
|
|
15
21
|
public val packageName: String = appContext.packageName
|
|
16
22
|
private val _additionalOptionsForPackager: MutableMap<String, String> = mutableMapOf()
|
|
17
23
|
private var _packagerOptionsUpdater: (Map<String, String>) -> Map<String, String> = { it }
|
|
@@ -24,6 +30,12 @@ public open class PackagerConnectionSettings(private val appContext: Context) {
|
|
|
24
30
|
cachedHost?.let {
|
|
25
31
|
return it
|
|
26
32
|
}
|
|
33
|
+
|
|
34
|
+
val hostFromSettings = preferences.getString(PREFS_DEBUG_SERVER_HOST_KEY, null)
|
|
35
|
+
if (!hostFromSettings.isNullOrEmpty()) {
|
|
36
|
+
return hostFromSettings
|
|
37
|
+
}
|
|
38
|
+
|
|
27
39
|
val host = AndroidInfoHelpers.getServerHost(appContext)
|
|
28
40
|
if (host == AndroidInfoHelpers.DEVICE_LOCALHOST) {
|
|
29
41
|
FLog.w(
|
|
@@ -63,5 +75,6 @@ public open class PackagerConnectionSettings(private val appContext: Context) {
|
|
|
63
75
|
|
|
64
76
|
private companion object {
|
|
65
77
|
private val TAG = PackagerConnectionSettings::class.java.simpleName
|
|
78
|
+
private const val PREFS_DEBUG_SERVER_HOST_KEY = "debug_http_host"
|
|
66
79
|
}
|
|
67
80
|
}
|
|
@@ -21,3 +21,10 @@ target_link_libraries(react_networking
|
|
|
21
21
|
jsinspector_tracing
|
|
22
22
|
react_performance_timeline
|
|
23
23
|
react_timing)
|
|
24
|
+
|
|
25
|
+
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
26
|
+
target_compile_options(react_networking PRIVATE
|
|
27
|
+
-DREACT_NATIVE_DEBUGGER_ENABLED=1
|
|
28
|
+
-DREACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1
|
|
29
|
+
)
|
|
30
|
+
endif ()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.83.0-rc.
|
|
3
|
+
"version": "0.83.0-rc.4",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.83.0-rc.
|
|
164
|
-
"@react-native/codegen": "0.83.0-rc.
|
|
165
|
-
"@react-native/community-cli-plugin": "0.83.0-rc.
|
|
166
|
-
"@react-native/gradle-plugin": "0.83.0-rc.
|
|
167
|
-
"@react-native/js-polyfills": "0.83.0-rc.
|
|
168
|
-
"@react-native/normalize-colors": "0.83.0-rc.
|
|
169
|
-
"@react-native/virtualized-lists": "0.83.0-rc.
|
|
163
|
+
"@react-native/assets-registry": "0.83.0-rc.4",
|
|
164
|
+
"@react-native/codegen": "0.83.0-rc.4",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.83.0-rc.4",
|
|
166
|
+
"@react-native/gradle-plugin": "0.83.0-rc.4",
|
|
167
|
+
"@react-native/js-polyfills": "0.83.0-rc.4",
|
|
168
|
+
"@react-native/normalize-colors": "0.83.0-rc.4",
|
|
169
|
+
"@react-native/virtualized-lists": "0.83.0-rc.4",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.0",
|
|
@@ -233,7 +233,16 @@ class ReactNativeCoreUtils
|
|
|
233
233
|
|
|
234
234
|
# Add the dSYMs folder to the framework folder
|
|
235
235
|
rncore_log(" Adding dSYMs to framework tarball")
|
|
236
|
-
|
|
236
|
+
|
|
237
|
+
# Move symbol bundles into each of the slices in the xcframework
|
|
238
|
+
# Example:
|
|
239
|
+
# move dSYMs/ios-arm64/. into React.xcframework/ios-arm64/React.framework/dSYMs/.
|
|
240
|
+
Dir.glob(File.join(dsyms_tmp_dir, "*")).each do |dsym_path|
|
|
241
|
+
slice_name = File.basename(dsym_path)
|
|
242
|
+
slice_dsym_dest = File.join("React.xcframework", slice_name, "React.framework", "dSYMs")
|
|
243
|
+
rncore_log(" Adding dSYM slice #{slice_name} into tarball at #{slice_dsym_dest}")
|
|
244
|
+
`(cd "#{File.dirname(frameworkTarPath)}" && mkdir -p "#{slice_dsym_dest}" && cp -R "#{dsym_path}/." "#{slice_dsym_dest}" && tar -rf "#{frameworkTarPath}" "#{slice_dsym_dest}")`
|
|
245
|
+
end
|
|
237
246
|
|
|
238
247
|
# Now gzip the framework tarball again - remember to use the .tar file and not the .gz file
|
|
239
248
|
rncore_log(" Packing #{Pathname.new(frameworkTarPath).relative_path_from(Pathname.pwd).to_s}")
|
|
@@ -246,6 +255,10 @@ class ReactNativeCoreUtils
|
|
|
246
255
|
# Remove backup of original tarballs
|
|
247
256
|
FileUtils.rm_f("#{frameworkTarball}.orig")
|
|
248
257
|
|
|
258
|
+
# Remove temp dSYMs folder and the temp Framework folder
|
|
259
|
+
FileUtils.rm_rf(dsyms_tmp_dir)
|
|
260
|
+
FileUtils.rm_rf(File.join(artifacts_dir, "React.xcframework"))
|
|
261
|
+
|
|
249
262
|
rescue => e
|
|
250
263
|
rncore_log("Failed to process dSYMs: #{e.message}", :error)
|
|
251
264
|
# Restore the original tarballs
|
|
@@ -59,8 +59,10 @@ class ReactNativePodsUtils
|
|
|
59
59
|
def self.set_gcc_preprocessor_definition_for_debugger(installer)
|
|
60
60
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-jsinspector", :debug)
|
|
61
61
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-RCTNetwork", :debug)
|
|
62
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED=1", "React-networking", :debug)
|
|
62
63
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-jsinspector", :debug)
|
|
63
64
|
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-RCTNetwork", :debug)
|
|
65
|
+
self.add_build_settings_to_pod(installer, "GCC_PREPROCESSOR_DEFINITIONS", "REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY=1", "React-networking", :debug)
|
|
64
66
|
end
|
|
65
67
|
|
|
66
68
|
def self.turn_off_resource_bundle_react_core(installer)
|
|
@@ -76,14 +76,18 @@ function getInputFiles(appPath /*: string */, appPkgJson /*: $FlowFixMe */) {
|
|
|
76
76
|
return `[${list}]`;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
function codegenScripts(appPath /*: string */,
|
|
80
|
-
const relativeAppPath = path.relative(
|
|
79
|
+
function codegenScripts(appPath /*: string */, baseOutputPath /*: string */) {
|
|
80
|
+
const relativeAppPath = path.relative(baseOutputPath, appPath);
|
|
81
|
+
const relativeReactNativeRootFolder = path.relative(
|
|
82
|
+
baseOutputPath,
|
|
83
|
+
REACT_NATIVE_PACKAGE_ROOT_FOLDER,
|
|
84
|
+
);
|
|
81
85
|
return `<<-SCRIPT
|
|
82
86
|
pushd "$PODS_ROOT/../" > /dev/null
|
|
83
87
|
RCT_SCRIPT_POD_INSTALLATION_ROOT=$(pwd)
|
|
84
88
|
popd >/dev/null
|
|
85
89
|
|
|
86
|
-
export RCT_SCRIPT_RN_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT/${
|
|
90
|
+
export RCT_SCRIPT_RN_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT/${relativeReactNativeRootFolder}"
|
|
87
91
|
export RCT_SCRIPT_APP_PATH="$RCT_SCRIPT_POD_INSTALLATION_ROOT/${relativeAppPath.length === 0 ? '.' : relativeAppPath}"
|
|
88
92
|
export RCT_SCRIPT_OUTPUT_DIR="$RCT_SCRIPT_POD_INSTALLATION_ROOT"
|
|
89
93
|
export RCT_SCRIPT_TYPE="withCodegenDiscovery"
|
|
@@ -63,7 +63,7 @@ const path = require('path');
|
|
|
63
63
|
function execute(
|
|
64
64
|
projectRoot /*: string */,
|
|
65
65
|
targetPlatform /*: string */,
|
|
66
|
-
|
|
66
|
+
optionalBaseOutputPath /*: ?string */,
|
|
67
67
|
source /*: string */,
|
|
68
68
|
runReactNativeCodegen /*: boolean */ = true,
|
|
69
69
|
) {
|
|
@@ -88,32 +88,35 @@ function execute(
|
|
|
88
88
|
buildCodegenIfNeeded();
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
const
|
|
92
|
-
projectRoot,
|
|
93
|
-
// NOTE: Used to load `build/generated/autolinking/autolinking.json` generated by `scripts/cocoapods/autolinking.rb`
|
|
94
|
-
// If we have RCT_SCRIPT_OUTPUT_DIR (set in `react_native_pods_utils/script_phases.sh`, it takes precedence, otherwise
|
|
95
|
-
// we search for the `autolinking.json` output in the `baseOutputPath`
|
|
96
|
-
process.env.RCT_SCRIPT_OUTPUT_DIR != null &&
|
|
97
|
-
process.env.RCT_SCRIPT_OUTPUT_DIR.length > 0
|
|
98
|
-
? process.env.RCT_SCRIPT_OUTPUT_DIR
|
|
99
|
-
: baseOutputPath,
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
const codegenEnabledLibraries = findCodegenEnabledLibraries(
|
|
103
|
-
pkgJson,
|
|
104
|
-
projectRoot,
|
|
105
|
-
baseOutputPath,
|
|
106
|
-
reactNativeConfig,
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
if (codegenEnabledLibraries.length === 0) {
|
|
110
|
-
codegenLog('No codegen-enabled libraries found.', true);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
let platforms =
|
|
91
|
+
const platforms =
|
|
114
92
|
targetPlatform === 'all' ? supportedPlatforms : [targetPlatform];
|
|
115
93
|
|
|
94
|
+
// NOTE: We cache the external libraries search (which may not run) across platforms to not change previous behaviour
|
|
95
|
+
const externalLibrariesCache /*: { current?: ?Array<$FlowFixMe> } */ = {};
|
|
96
|
+
|
|
116
97
|
for (const platform of platforms) {
|
|
98
|
+
// NOTE: This needs to be computed per-platform since `platform` can alter the path via a `package.json:codegenConfig.outputDir[platform]` override
|
|
99
|
+
const baseOutputPath = computeBaseOutputPath(
|
|
100
|
+
projectRoot,
|
|
101
|
+
optionalBaseOutputPath,
|
|
102
|
+
pkgJson,
|
|
103
|
+
platform,
|
|
104
|
+
);
|
|
105
|
+
const reactNativeConfig = readReactNativeConfig(
|
|
106
|
+
projectRoot,
|
|
107
|
+
baseOutputPath,
|
|
108
|
+
);
|
|
109
|
+
const codegenEnabledLibraries = findCodegenEnabledLibraries(
|
|
110
|
+
pkgJson,
|
|
111
|
+
projectRoot,
|
|
112
|
+
baseOutputPath,
|
|
113
|
+
reactNativeConfig,
|
|
114
|
+
externalLibrariesCache,
|
|
115
|
+
);
|
|
116
|
+
if (codegenEnabledLibraries.length === 0) {
|
|
117
|
+
codegenLog('No codegen-enabled libraries found.', true);
|
|
118
|
+
}
|
|
119
|
+
|
|
117
120
|
const disabledLibraries = findDisabledLibrariesByPlatform(
|
|
118
121
|
reactNativeConfig,
|
|
119
122
|
platform,
|
|
@@ -208,22 +211,38 @@ function readOutputDirFromPkgJson(
|
|
|
208
211
|
return null;
|
|
209
212
|
}
|
|
210
213
|
|
|
211
|
-
function
|
|
214
|
+
function computeBaseOutputPath(
|
|
212
215
|
projectRoot /*: string */,
|
|
213
|
-
|
|
216
|
+
optionalBaseOutputPath /*: ?string */,
|
|
214
217
|
pkgJson /*: $FlowFixMe */,
|
|
215
218
|
platform /*: string */,
|
|
216
219
|
) {
|
|
217
|
-
if (
|
|
220
|
+
if (
|
|
221
|
+
process.env.RCT_SCRIPT_OUTPUT_DIR != null &&
|
|
222
|
+
process.env.RCT_SCRIPT_OUTPUT_DIR.length > 0
|
|
223
|
+
) {
|
|
224
|
+
return process.env.RCT_SCRIPT_OUTPUT_DIR;
|
|
225
|
+
}
|
|
226
|
+
let baseOutputPath /*: string */;
|
|
227
|
+
if (optionalBaseOutputPath == null) {
|
|
218
228
|
const outputDirFromPkgJson = readOutputDirFromPkgJson(pkgJson, platform);
|
|
219
229
|
if (outputDirFromPkgJson != null) {
|
|
220
|
-
// $FlowFixMe[reassign-const]
|
|
221
230
|
baseOutputPath = path.join(projectRoot, outputDirFromPkgJson);
|
|
222
231
|
} else {
|
|
223
|
-
// $FlowFixMe[reassign-const]
|
|
224
232
|
baseOutputPath = projectRoot;
|
|
225
233
|
}
|
|
234
|
+
} else {
|
|
235
|
+
baseOutputPath = optionalBaseOutputPath;
|
|
226
236
|
}
|
|
237
|
+
return baseOutputPath;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function computeOutputPath(
|
|
241
|
+
projectRoot /*: string */,
|
|
242
|
+
baseOutputPath /*: string */,
|
|
243
|
+
pkgJson /*: $FlowFixMe */,
|
|
244
|
+
platform /*: string */,
|
|
245
|
+
) /*: string */ {
|
|
227
246
|
if (pkgJsonIncludesGeneratedCode(pkgJson)) {
|
|
228
247
|
// Don't create nested directories for libraries to make importing generated headers easier.
|
|
229
248
|
return baseOutputPath;
|
|
@@ -98,9 +98,11 @@ function cleanupEmptyFilesAndFolders(filepath /*: string */) {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
function readGeneratedAutolinkingOutput(
|
|
101
|
+
projectRoot /*: string */,
|
|
101
102
|
baseOutputPath /*: string */,
|
|
102
103
|
) /*: $FlowFixMe */ {
|
|
103
104
|
// NOTE: Generated by scripts/cocoapods/autolinking.rb in list_native_modules (called by use_native_modules)
|
|
105
|
+
// The `baseOutputPath` is based on a CLI argument and optional
|
|
104
106
|
const autolinkingGeneratedPath = path.resolve(
|
|
105
107
|
baseOutputPath,
|
|
106
108
|
'build/generated/autolinking/autolinking.json',
|
|
@@ -120,7 +122,10 @@ function readReactNativeConfig(
|
|
|
120
122
|
projectRoot /*: string */,
|
|
121
123
|
baseOutputPath /*: string */,
|
|
122
124
|
) /*: $FlowFixMe */ {
|
|
123
|
-
const autolinkingOutput = readGeneratedAutolinkingOutput(
|
|
125
|
+
const autolinkingOutput = readGeneratedAutolinkingOutput(
|
|
126
|
+
projectRoot,
|
|
127
|
+
baseOutputPath,
|
|
128
|
+
);
|
|
124
129
|
const rnConfigFilePath = path.resolve(projectRoot, 'react-native.config.js');
|
|
125
130
|
if (autolinkingOutput) {
|
|
126
131
|
return autolinkingOutput;
|
|
@@ -141,6 +146,7 @@ function findCodegenEnabledLibraries(
|
|
|
141
146
|
projectRoot /*: string */,
|
|
142
147
|
baseOutputPath /*: string */,
|
|
143
148
|
reactNativeConfig /*: $FlowFixMe */,
|
|
149
|
+
externalLibrariesCache /*: { current?: ?Array<$FlowFixMe> } */ = {},
|
|
144
150
|
) /*: Array<$FlowFixMe> */ {
|
|
145
151
|
const projectLibraries = findProjectRootLibraries(pkgJson, projectRoot);
|
|
146
152
|
if (pkgJsonIncludesGeneratedCode(pkgJson)) {
|
|
@@ -149,8 +155,14 @@ function findCodegenEnabledLibraries(
|
|
|
149
155
|
const libraries = [...projectLibraries];
|
|
150
156
|
// If we ran autolinking, we shouldn't try to run our own "autolinking-like"
|
|
151
157
|
// library discovery
|
|
152
|
-
if (!readGeneratedAutolinkingOutput(baseOutputPath)) {
|
|
153
|
-
|
|
158
|
+
if (!readGeneratedAutolinkingOutput(projectRoot, baseOutputPath)) {
|
|
159
|
+
const externalLibraries =
|
|
160
|
+
externalLibrariesCache.current ??
|
|
161
|
+
(externalLibrariesCache.current = findExternalLibraries(
|
|
162
|
+
pkgJson,
|
|
163
|
+
projectRoot,
|
|
164
|
+
));
|
|
165
|
+
libraries.push(...externalLibraries);
|
|
154
166
|
}
|
|
155
167
|
libraries.push(
|
|
156
168
|
...findLibrariesFromReactNativeConfig(projectRoot, reactNativeConfig),
|
|
@@ -265,7 +277,8 @@ function findExternalLibraries(
|
|
|
265
277
|
pkgJson.dependencies[dependency],
|
|
266
278
|
'package.json',
|
|
267
279
|
);
|
|
268
|
-
}
|
|
280
|
+
}
|
|
281
|
+
if (!configFilePath) {
|
|
269
282
|
return [];
|
|
270
283
|
}
|
|
271
284
|
}
|
package/sdks/.hermesv1version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
hermes-v250829098.0.
|
|
1
|
+
hermes-v250829098.0.4
|
|
@@ -72,10 +72,7 @@ Pod::Spec.new do |spec|
|
|
|
72
72
|
# In other cases, when using Hermes V1, the prebuilt versioned binaries can be used.
|
|
73
73
|
if source_type != HermesEngineSourceType::LOCAL_PREBUILT_TARBALL
|
|
74
74
|
hermes_compiler_path = File.dirname(Pod::Executable.execute_command('node', ['-p',
|
|
75
|
-
|
|
76
|
-
"hermes-compiler",
|
|
77
|
-
{paths: [process.argv[1]]}
|
|
78
|
-
)', __dir__]).strip
|
|
75
|
+
"require.resolve(\"hermes-compiler\", {paths: [\"#{react_native_path}\"]})", __dir__]).strip
|
|
79
76
|
)
|
|
80
77
|
|
|
81
78
|
spec.user_target_xcconfig = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
HERMES_VERSION_NAME=0.14.0
|
|
2
|
-
HERMES_V1_VERSION_NAME=250829098.0.
|
|
2
|
+
HERMES_V1_VERSION_NAME=250829098.0.4
|