diff --git a/.yarn/versions/f490339e.yml b/.yarn/versions/f490339e.yml new file mode 100644 index 000000000000..b9ef967a4a38 --- /dev/null +++ b/.yarn/versions/f490339e.yml @@ -0,0 +1,23 @@ +releases: + "@yarnpkg/cli": patch + "@yarnpkg/plugin-essentials": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/doctor" diff --git a/packages/plugin-essentials/sources/commands/install.ts b/packages/plugin-essentials/sources/commands/install.ts index 90ba5534993d..4407420f7b67 100644 --- a/packages/plugin-essentials/sources/commands/install.ts +++ b/packages/plugin-essentials/sources/commands/install.ts @@ -245,7 +245,7 @@ export default class YarnCommand extends BaseCommand { report.reportSeparator(); } else if (Configuration.telemetry?.shouldShowTips) { const data = await httpUtils.get(`https://repo.yarnpkg.com/tags`, {configuration, jsonResponse: true}).catch(() => null) as { - latest: {stable: string, canary: string}; + latest: {stable: string | null, canary: string | null}; tips: Array<{message: string, url?: string}>; } | null; @@ -256,7 +256,7 @@ export default class YarnCommand extends BaseCommand { const releaseType = isRcBinary ? `canary` : `stable`; const candidate = data.latest[releaseType]; - if (semver.gt(candidate, YarnVersion)) { + if (candidate !== null && semver.gt(candidate, YarnVersion)) { newVersion = [releaseType, candidate]; } }