react-native 0.87.0-rc.1 → 0.87.0-rc.2
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/InitializeCore.js +8 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +1 -0
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/I18n/RCTLocalizedString.mm +38 -2
- package/React-Core-prebuilt.podspec +45 -17
- package/React-Core.podspec +9 -2
- package/ReactAndroid/external-artifacts/build.gradle.kts +49 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/SynchronousMountItem.kt +8 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +10 -8
- package/react-native.config.js +81 -0
- package/scripts/cocoapods/fabric.rb +1 -1
- package/scripts/cocoapods/rncore.rb +35 -78
- package/scripts/cocoapods/rncore_facades.rb +232 -0
- package/scripts/cocoapods/rndependencies.rb +64 -3
- package/scripts/cocoapods/rndeps_facades.rb +193 -0
- package/scripts/cocoapods/spm.rb +78 -11
- package/scripts/codegen/templates/Package.swift.spm-template +97 -0
- package/scripts/react-native-xcode.sh +20 -0
- package/scripts/react_native_pods.rb +65 -16
- package/scripts/replace-rncore-version.js +53 -6
- package/scripts/setup-apple-spm.js +1165 -0
- package/scripts/spm/__doc__/rfc-spm-xcframework.md +707 -0
- package/scripts/spm/__doc__/spm-autolinking-plugins.md +244 -0
- package/scripts/spm/__doc__/spm-header-paths-contract.md +97 -0
- package/scripts/spm/__doc__/spm-plugins-assessment.md +128 -0
- package/scripts/spm/__doc__/spm-scripts.md +451 -0
- package/scripts/spm/autolinking-plugins.js +331 -0
- package/scripts/spm/download-spm-artifacts.js +1409 -0
- package/scripts/spm/expand-spm-dependencies.js +216 -0
- package/scripts/spm/flavored-frameworks.js +1008 -0
- package/scripts/spm/generate-spm-autolinking-config.js +161 -0
- package/scripts/spm/generate-spm-autolinking.js +1888 -0
- package/scripts/spm/generate-spm-package.js +302 -0
- package/scripts/spm/generate-spm-xcodeproj.js +2224 -0
- package/scripts/spm/read-podspec.js +695 -0
- package/scripts/spm/scaffold-package-swift.js +1206 -0
- package/scripts/spm/spm-pbxproj.js +654 -0
- package/scripts/spm/spm-types.js +517 -0
- package/scripts/spm/spm-utils.js +645 -0
- package/scripts/spm/sync-spm-autolinking.js +160 -0
- package/sdks/.hermesv1version +1 -0
- package/sdks/hermes-engine/utils/replace_hermes_version.js +18 -4
- package/sdks/hermes-engine/version.properties +1 -1
- package/third-party-podspecs/ReactNativeDependencies.podspec +2 -2
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +2 -2
- package/Libraries/Utilities/SceneTracker.js +0 -42
|
@@ -99,17 +99,19 @@ function replaceRNCoreConfiguration(
|
|
|
99
99
|
throw new Error(`tar extraction failed with exit code ${result.status}`);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
// Verify extraction produced the expected xcframework structure
|
|
102
|
+
// Verify extraction produced the expected xcframework structure. The
|
|
103
|
+
// module map now lives per-slice inside React.framework, so check the
|
|
104
|
+
// xcframework's Info.plist instead of a root Modules/module.modulemap.
|
|
103
105
|
const xcfwPath = path.join(tmpExtractDir, 'React.xcframework');
|
|
104
|
-
const
|
|
105
|
-
if (!fs.existsSync(
|
|
106
|
+
const infoPlistPath = path.join(xcfwPath, 'Info.plist');
|
|
107
|
+
if (!fs.existsSync(infoPlistPath)) {
|
|
106
108
|
throw new Error(
|
|
107
|
-
`Extraction verification failed: ${
|
|
109
|
+
`Extraction verification failed: ${infoPlistPath} not found`,
|
|
108
110
|
);
|
|
109
111
|
}
|
|
110
112
|
|
|
111
|
-
// Delete
|
|
112
|
-
//
|
|
113
|
+
// Delete only directories in finalLocation (e.g. the React.xcframework) -
|
|
114
|
+
// not files, so any sibling files written during pod install are preserved.
|
|
113
115
|
const dirs = fs
|
|
114
116
|
.readdirSync(finalLocation, {withFileTypes: true})
|
|
115
117
|
.filter(dirent => dirent.isDirectory());
|
|
@@ -144,6 +146,51 @@ function replaceRNCoreConfiguration(
|
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
}
|
|
149
|
+
|
|
150
|
+
// The podspec prepare_command flattens ReactNativeHeaders' headers into a
|
|
151
|
+
// top-level Headers/ dir, but it does not re-run on a config swap. Mirror
|
|
152
|
+
// it here: re-flatten the headers (identical across slices) and drop the
|
|
153
|
+
// now-redundant xcframework so $(PODS_ROOT)/React-Core-prebuilt/Headers
|
|
154
|
+
// keeps resolving <react/...>, <yoga/...>, etc.
|
|
155
|
+
//
|
|
156
|
+
// Fail closed when the swapped-in tarball lacks ReactNativeHeaders: the
|
|
157
|
+
// directory purge above already deleted the previous Headers/, so
|
|
158
|
+
// continuing silently would leave the injected -fmodule-map-file flag
|
|
159
|
+
// dangling and break every <react/...> include only on a config switch —
|
|
160
|
+
// with no pointer to the version-skewed artifact that caused it.
|
|
161
|
+
const rnhXcfw = path.join(finalLocation, 'ReactNativeHeaders.xcframework');
|
|
162
|
+
if (!fs.existsSync(rnhXcfw)) {
|
|
163
|
+
throw new Error(
|
|
164
|
+
`ReactNativeHeaders.xcframework not found in the extracted tarball at ${finalLocation}. ` +
|
|
165
|
+
'The downloaded artifact predates the headers-spec layout (or is incomplete); ' +
|
|
166
|
+
'use a prebuilt tarball matching this react-native version.',
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
const slice = fs
|
|
170
|
+
.readdirSync(rnhXcfw, {withFileTypes: true})
|
|
171
|
+
.find(
|
|
172
|
+
dirent =>
|
|
173
|
+
dirent.isDirectory() &&
|
|
174
|
+
fs.existsSync(path.join(rnhXcfw, dirent.name.toString(), 'Headers')),
|
|
175
|
+
);
|
|
176
|
+
if (!slice) {
|
|
177
|
+
throw new Error(
|
|
178
|
+
`No slice with a Headers directory found inside ${rnhXcfw}.`,
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
const headersDest = path.join(finalLocation, 'Headers');
|
|
182
|
+
fs.rmSync(headersDest, {force: true, recursive: true});
|
|
183
|
+
const cpHeaders = spawnSync(
|
|
184
|
+
'cp',
|
|
185
|
+
['-R', path.join(rnhXcfw, slice.name.toString(), 'Headers'), headersDest],
|
|
186
|
+
{stdio: 'inherit'},
|
|
187
|
+
);
|
|
188
|
+
if (cpHeaders.status !== 0) {
|
|
189
|
+
throw new Error(
|
|
190
|
+
`Flattening ReactNativeHeaders failed with exit code ${cpHeaders.status}`,
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
fs.rmSync(rnhXcfw, {force: true, recursive: true});
|
|
147
194
|
} finally {
|
|
148
195
|
// Clean up temp directory
|
|
149
196
|
fs.rmSync(tmpDir, {force: true, recursive: true});
|