From 7dbf877e8d9dbe74db435f4645f11183acc1eb60 Mon Sep 17 00:00:00 2001 From: MT Lewis Date: Sat, 27 Jul 2024 15:03:57 +0100 Subject: [PATCH] backstage-cli: improve messaging around yarn-plugin Moves the message to the end to make it more likely users will see it, and add some details on how to migrate away from the plugin. Signed-off-by: MT Lewis --- packages/cli/src/commands/versions/bump.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/commands/versions/bump.ts b/packages/cli/src/commands/versions/bump.ts index 6579fc84d8..e092302393 100644 --- a/packages/cli/src/commands/versions/bump.ts +++ b/packages/cli/src/commands/versions/bump.ts @@ -80,12 +80,6 @@ export default async (opts: OptionValues) => { const lockfile = await Lockfile.load(lockfilePath); const hasYarnPlugin = await getHasYarnPlugin(); - if (hasYarnPlugin) { - console.log( - `Backstage yarn plugin detected, will use backstage: version ranges where possible...`, - ); - } - let pattern = opts.pattern; if (!pattern) { @@ -298,6 +292,21 @@ export default async (opts: OptionValues) => { console.log(); } + if (hasYarnPlugin) { + console.log(); + console.log( + chalk.blue( + `${chalk.bold( + 'NOTE', + )}: this bump used backstage:^ versions in package.json files, since the Backstage ` + + `yarn plugin was detected in the repository. To migrate back to explicit npm versions, ` + + `remove the plugin by running "yarn plugin remove @yarnpkg/plugin-backstage", then ` + + `repeat this command.`, + ), + ); + console.log(); + } + console.log(chalk.green('Version bump complete!')); }