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 <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2024-07-27 15:03:57 +01:00
parent 1e4b91f6d7
commit 7dbf877e8d
+15 -6
View File
@@ -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!'));
}