fix(visionos): declare support for 0.74 (#1933)
* fix(visionos): declare support for 0.74 * fixup! fix(visionos): declare support for 0.74 * fix: remove --no-packager as it is currently broken --------- Co-authored-by: Lorenzo Sciandra <lsciandra@microsoft.com>
This commit is contained in:
Родитель
0c31391393
Коммит
de0723127b
|
@ -15,6 +15,7 @@
|
|||
"macos": "react-native run-macos --no-packager --scheme Example",
|
||||
"set-react-version": "yarn workspace react-native-test-app set-react-version",
|
||||
"start": "react-native start",
|
||||
"visionos": "react-native run-visionos",
|
||||
"windows": "react-native run-windows --no-packager"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
"yoctocolors": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@callstack/react-native-visionos": "0.73",
|
||||
"@callstack/react-native-visionos": "0.73 - 0.74",
|
||||
"@expo/config-plugins": ">=5.0",
|
||||
"react": "17.0.1 - 18.2",
|
||||
"react-native": "0.66 - 0.74 || >=0.75.0-0 <0.75.0",
|
||||
|
|
|
@ -348,22 +348,35 @@ async function getProfile(v, coreOnly) {
|
|||
}
|
||||
|
||||
default: {
|
||||
const [reactNative, { version: rnmVersion }, { version: rnwVersion }] =
|
||||
await Promise.all([
|
||||
fetchPackageInfo(`react-native@^${v}.0-0`),
|
||||
coreOnly
|
||||
? Promise.resolve({ version: undefined })
|
||||
: fetchPackageInfo(`react-native-macos@^${v}.0-0`),
|
||||
coreOnly
|
||||
? Promise.resolve({ version: undefined })
|
||||
: fetchPackageInfo(`react-native-windows@^${v}.0-0`),
|
||||
]);
|
||||
const manifest = /** @type {Manifest} */ (readJSONFile("package.json"));
|
||||
const visionos = manifest.defaultPlatformPackages?.["visionos"];
|
||||
if (!visionos) {
|
||||
throw new Error("Missing platform package for visionOS");
|
||||
}
|
||||
|
||||
const versions = {
|
||||
core: fetchPackageInfo(`react-native@^${v}.0-0`),
|
||||
macos: coreOnly
|
||||
? Promise.resolve({ version: undefined })
|
||||
: fetchPackageInfo(`react-native-macos@^${v}.0-0`),
|
||||
visionos: coreOnly
|
||||
? Promise.resolve({ version: undefined })
|
||||
: fetchPackageInfo(`${visionos}@^${v}.0-0`),
|
||||
windows: coreOnly
|
||||
? Promise.resolve({ version: undefined })
|
||||
: fetchPackageInfo(`react-native-windows@^${v}.0-0`),
|
||||
};
|
||||
const reactNative = await versions.core;
|
||||
const commonDeps = await resolveCommonDependencies(v, reactNative);
|
||||
|
||||
/** @type {(manifest: Manifest) => string | undefined} */
|
||||
const getVersion = ({ version }) => version;
|
||||
return {
|
||||
...commonDeps,
|
||||
"react-native": reactNative.version,
|
||||
"react-native-macos": rnmVersion,
|
||||
"react-native-windows": rnwVersion,
|
||||
"react-native-macos": await versions.macos.then(getVersion),
|
||||
"react-native-windows": await versions.windows.then(getVersion),
|
||||
[visionos]: await versions.visionos.then(getVersion),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12276,7 +12276,7 @@ __metadata:
|
|||
uuid: "npm:^9.0.0"
|
||||
yoctocolors: "npm:^2.0.0"
|
||||
peerDependencies:
|
||||
"@callstack/react-native-visionos": 0.73
|
||||
"@callstack/react-native-visionos": 0.73 - 0.74
|
||||
"@expo/config-plugins": ">=5.0"
|
||||
react: 17.0.1 - 18.2
|
||||
react-native: 0.66 - 0.74 || >=0.75.0-0 <0.75.0
|
||||
|
|
Загрузка…
Ссылка в новой задаче