From a0d45af427be14a038554fe9b42b1a4b34f3146c Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 3 Apr 2023 14:12:15 -0700 Subject: [PATCH] fix: remove incompatible params from ci --- lib/commands/ci.js | 17 ++++++++++++++++- lib/commands/install.js | 1 + tap-snapshots/test/lib/docs.js.test.cjs | 10 ---------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/commands/ci.js b/lib/commands/ci.js index 4dd7898dc6182..9d7a169948bef 100644 --- a/lib/commands/ci.js +++ b/lib/commands/ci.js @@ -12,7 +12,22 @@ class CI extends ArboristWorkspaceCmd { static description = 'Clean install a project' static name = 'ci' - static params = Install.params + // These are in the order they will show up in when running "-h" + static params = [ + 'install-strategy', + 'legacy-bundling', + 'global-style', + 'omit', + 'strict-peer-deps', + 'package-lock', + 'foreground-scripts', + 'ignore-scripts', + 'audit', + 'bin-links', + 'fund', + 'dry-run', + ...super.params, + ] async exec () { if (this.npm.global) { diff --git a/lib/commands/install.js b/lib/commands/install.js index 246d7fdf8f02e..273edcf45c7a8 100644 --- a/lib/commands/install.js +++ b/lib/commands/install.js @@ -16,6 +16,7 @@ class Install extends ArboristWorkspaceCmd { static name = 'install' // These are in the order they will show up in when running "-h" + // If adding to this list, consider adding also to ci.js static params = [ 'save', 'save-exact', diff --git a/tap-snapshots/test/lib/docs.js.test.cjs b/tap-snapshots/test/lib/docs.js.test.cjs index fc7f70481be7b..c55de507787d0 100644 --- a/tap-snapshots/test/lib/docs.js.test.cjs +++ b/tap-snapshots/test/lib/docs.js.test.cjs @@ -2210,8 +2210,6 @@ Usage: npm ci Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--install-strategy ] [--legacy-bundling] [--global-style] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] @@ -2229,9 +2227,6 @@ npm ci aliases: clean-install, ic, install-clean, isntall-clean \`\`\` -#### \`save\` -#### \`save-exact\` -#### \`global\` #### \`install-strategy\` #### \`legacy-bundling\` #### \`global-style\` @@ -2811,8 +2806,6 @@ Usage: npm install-ci-test Options: -[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer|--save-bundle] -[-E|--save-exact] [-g|--global] [--install-strategy ] [--legacy-bundling] [--global-style] [--omit [--omit ...]] [--strict-peer-deps] [--no-package-lock] [--foreground-scripts] @@ -2830,9 +2823,6 @@ npm install-ci-test aliases: cit, clean-install-test, sit \`\`\` -#### \`save\` -#### \`save-exact\` -#### \`global\` #### \`install-strategy\` #### \`legacy-bundling\` #### \`global-style\`