From 9a86b65359cdaee7cf0d508b45c553228ca9cd61 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sat, 19 Mar 2022 10:10:47 +0100 Subject: [PATCH] cli: rename add-deps to package fix Signed-off-by: Patrik Oldsberg --- .changeset/happy-foxes-arrive.md | 2 +- packages/cli/src/commands/{add-deps.ts => fix.ts} | 0 packages/cli/src/commands/index.ts | 13 ++++++------- 3 files changed, 7 insertions(+), 8 deletions(-) rename packages/cli/src/commands/{add-deps.ts => fix.ts} (100%) diff --git a/.changeset/happy-foxes-arrive.md b/.changeset/happy-foxes-arrive.md index 03ddfede0d..53e59c8d77 100644 --- a/.changeset/happy-foxes-arrive.md +++ b/.changeset/happy-foxes-arrive.md @@ -2,4 +2,4 @@ '@backstage/cli': patch --- -Added an experimental `add-deps` command which adds missing monorepo dependencies to the target package.` +Added an experimental `package fix` command which applies automated fixes to the target package. The initial fix that is available is to add missing monorepo dependencies to the target package. diff --git a/packages/cli/src/commands/add-deps.ts b/packages/cli/src/commands/fix.ts similarity index 100% rename from packages/cli/src/commands/add-deps.ts rename to packages/cli/src/commands/fix.ts diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index b50831f981..1d22ffb223 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -125,6 +125,12 @@ export function registerScriptCommand(program: CommanderStatic) { .description('Run tests, forwarding args to Jest, defaulting to watch mode') .action(lazy(() => import('./testCommand').then(m => m.default))); + command + .command('fix', { hidden: true }) + .description('Applies automated fixes to the package. [EXPERIMENTAL]') + .option('--deps', 'Only fix monorepo dependencies in package.json') + .action(lazy(() => import('./fix').then(m => m.command))); + command .command('clean') .description('Delete cache directories') @@ -386,13 +392,6 @@ export function registerCommands(program: CommanderStatic) { .description('Check Backstage package versioning') .action(lazy(() => import('./versions/lint').then(m => m.default))); - program - .command('add-deps', { hidden: true }) - .description( - 'Add missing monorepo dependencies to package.json [EXPERIMENTAL]', - ) - .action(lazy(() => import('./add-deps').then(m => m.command))); - // TODO(Rugvip): Deprecate in favor of package variant program .command('prepack')