diff --git a/packages/solutions/app-tools/src/index.ts b/packages/solutions/app-tools/src/index.ts index 7eb3d9dd34c6..46336c9fd242 100644 --- a/packages/solutions/app-tools/src/index.ts +++ b/packages/solutions/app-tools/src/index.ts @@ -281,6 +281,7 @@ export const appTools = ( program .command('upgrade') .allowUnknownOption() + .option('-h --help', 'Show help') // In order to upgrade help work. .action(async () => { await upgradeAction(); }); diff --git a/packages/solutions/module-tools/src/command.ts b/packages/solutions/module-tools/src/command.ts index 16338a3290cd..612c284de89c 100644 --- a/packages/solutions/module-tools/src/command.ts +++ b/packages/solutions/module-tools/src/command.ts @@ -109,6 +109,7 @@ export const upgradeCommand = async (program: Command) => { program .command('upgrade') .allowUnknownOption() + .option('-h --help', 'Show help') // In order to upgrade help work. .action(async () => { await upgradeAction(); }); diff --git a/packages/solutions/monorepo-tools/src/cli/upgrade.ts b/packages/solutions/monorepo-tools/src/cli/upgrade.ts index 98d6cf4966ad..9839e5a4e830 100644 --- a/packages/solutions/monorepo-tools/src/cli/upgrade.ts +++ b/packages/solutions/monorepo-tools/src/cli/upgrade.ts @@ -5,6 +5,7 @@ export const upgradeCli = (program: Command) => { program .command('upgrade') .allowUnknownOption() + .option('-h --help', 'Show help') // In order to upgrade help work. .action(async () => { await upgradeAction(); }); diff --git a/packages/toolkit/upgrade/src/index.ts b/packages/toolkit/upgrade/src/index.ts index 58d68e2a4d32..214614237a49 100644 --- a/packages/toolkit/upgrade/src/index.ts +++ b/packages/toolkit/upgrade/src/index.ts @@ -9,7 +9,9 @@ export function defineCommand(program: Command) { const locale = getLocaleLanguage(); i18n.changeLanguage({ locale }); program + .alias('upgrade') .description(i18n.t(localeKeys.command.describe)) + .usage('npx @modern-js/upgrade [options]') .option('-c --config ', i18n.t(localeKeys.command.config)) .option('--dist-tag ', i18n.t(localeKeys.command.distTag), '') .option('--registry ', i18n.t(localeKeys.command.registry), '')