1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

fix latestverion timeout

This commit is contained in:
sunnylqm
2025-05-07 13:20:56 +08:00
parent 0cfb1a9beb
commit 2e8e242e75
4 changed files with 58 additions and 32 deletions

View File

@@ -98,7 +98,7 @@ export async function getAppInfo(fn: string) {
const metaJsonFile = await appInfoParser.parser.getEntryFromHarmonyApp(
/rawfile\/meta.json/,
);
let metaData = {};
let metaData: Record<string, any> = {};
if (metaJsonFile) {
metaData = JSON.parse(metaJsonFile.toString());
}
@@ -181,16 +181,13 @@ export async function printVersionCommand() {
version: chalk.green(latestRnuCliVersion),
})}`
: '';
console.log(
`react-native-update-cli: ${pkg.version}${latestRnuCliVersion}`,
);
let rnuVersion = '';
rnuVersion = depVersions['react-native-update'];
latestRnuVersion = latestRnuVersion
? ` ${t('latestVersionTag', { version: chalk.green(latestRnuVersion) })}`
: '';
console.log(`react-native-update: ${rnuVersion}${latestRnuVersion}`);
console.log(`react-native-update-cli: ${pkg.version}${latestRnuCliVersion}`);
const rnuVersion = depVersions['react-native-update'];
if (rnuVersion) {
latestRnuVersion = latestRnuVersion
? ` ${t('latestVersionTag', { version: chalk.green(latestRnuVersion) })}`
: '';
console.log(`react-native-update: ${rnuVersion}${latestRnuVersion}`);
if (IS_CRESC) {
if (semverSatisfies(rnuVersion, '<10.27.0')) {
console.error(