expo-desktop 0.1.9 → 0.1.11
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/build/common/app-json.js
CHANGED
|
@@ -29,4 +29,7 @@ export const PackageJson = type({
|
|
|
29
29
|
"dependencies?": "Record<string, string>",
|
|
30
30
|
"devDependencies?": "Record<string, string>",
|
|
31
31
|
"peerDependencies?": "Record<string, string>",
|
|
32
|
+
// Not quite sure how to express arbitrarily recursive types in ArkType, so
|
|
33
|
+
// I'll just support two levels for now.
|
|
34
|
+
"overrides?": "Record<string, string | Record<string, string>>",
|
|
32
35
|
});
|
|
@@ -251,6 +251,17 @@ async function updatePackageJson({ name, projectPath, task, versions, }) {
|
|
|
251
251
|
packageJson.devDependencies["@react-native-community/cli"] = "latest";
|
|
252
252
|
packageJson.devDependencies["@rnx-kit/metro-config"] = "latest";
|
|
253
253
|
packageJson.devDependencies["@react-native/metro-config"] = `~0.${versions.minor}`;
|
|
254
|
+
if (!packageJson.overrides) {
|
|
255
|
+
packageJson.overrides = {};
|
|
256
|
+
}
|
|
257
|
+
// react-native-macos and react-native-windows may declare conflicting peer
|
|
258
|
+
// dependency ranges to what the Expo template provides.
|
|
259
|
+
if (packageJson.dependencies.react) {
|
|
260
|
+
packageJson.overrides.react = packageJson.dependencies.react;
|
|
261
|
+
}
|
|
262
|
+
if (packageJson.dependencies["react-native"]) {
|
|
263
|
+
packageJson.overrides["react-native"] = packageJson.dependencies["react-native"];
|
|
264
|
+
}
|
|
254
265
|
}
|
|
255
266
|
try {
|
|
256
267
|
await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
|
|
@@ -323,8 +323,8 @@ function getExpoBlankTypeScriptForRNVersion({ major, minor }) {
|
|
|
323
323
|
.map((patch) => parseInt(patch))
|
|
324
324
|
.sort((a, b) => b - a)
|
|
325
325
|
.at(0);
|
|
326
|
-
if (
|
|
326
|
+
if (typeof highestPatch !== "number") {
|
|
327
327
|
return;
|
|
328
328
|
}
|
|
329
|
-
return
|
|
329
|
+
return patches[highestPatch];
|
|
330
330
|
}
|