From 8c9e24778db867cb3148bc247c7e321639aa9f58 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 8 Apr 2021 10:08:23 -0700 Subject: feat(version): add workspace support PR-URL: https://github.com/npm/cli/pull/3055 Credit: @wraithgar Close: #3055 Reviewed-by: @darcyclarke --- tap-snapshots/test/lib/dist-tag.js.test.cjs | 15 ++++--- tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 47 ++++++++++++++++------ 2 files changed, 44 insertions(+), 18 deletions(-) (limited to 'tap-snapshots') diff --git a/tap-snapshots/test/lib/dist-tag.js.test.cjs b/tap-snapshots/test/lib/dist-tag.js.test.cjs index ea25b568b..86a9c84eb 100644 --- a/tap-snapshots/test/lib/dist-tag.js.test.cjs +++ b/tap-snapshots/test/lib/dist-tag.js.test.cjs @@ -16,7 +16,8 @@ npm dist-tag rm npm dist-tag ls [] Options: -[-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] +[-w|--workspace [-w|--workspace ...]] +[-ws|--workspaces] alias: dist-tags @@ -34,7 +35,8 @@ npm dist-tag rm npm dist-tag ls [] Options: -[-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] +[-w|--workspace [-w|--workspace ...]] +[-ws|--workspaces] alias: dist-tags @@ -61,7 +63,8 @@ npm dist-tag rm npm dist-tag ls [] Options: -[-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] +[-w|--workspace [-w|--workspace ...]] +[-ws|--workspaces] alias: dist-tags @@ -85,7 +88,8 @@ npm dist-tag rm npm dist-tag ls [] Options: -[-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] +[-w|--workspace [-w|--workspace ...]] +[-ws|--workspaces] alias: dist-tags @@ -139,7 +143,8 @@ npm dist-tag rm npm dist-tag ls [] Options: -[-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] +[-w|--workspace [-w|--workspace ...]] +[-ws|--workspaces] alias: dist-tags diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs index 6bd38772e..e32d5e9f4 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -204,7 +204,8 @@ All commands: npm audit [fix] Options: - [--audit-level ] [--dry-run] [-f|--force] [--json] [--package-lock-only] [--production] + [--audit-level ] [--dry-run] [-f|--force] + [--json] [--package-lock-only] [--production] Run "npm help audit" for more info @@ -324,7 +325,8 @@ All commands: npm dist-tag ls [] Options: - [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] alias: dist-tags @@ -338,7 +340,9 @@ All commands: npm docs [ [ ...]] Options: - [--browser|--browser ] [--registry ] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [--browser|--browser ] [--registry ] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] alias: home @@ -373,7 +377,8 @@ All commands: npm exec --package=foo -c ' [args...]' Options: - [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] alias: x @@ -416,7 +421,8 @@ All commands: npm fund [[<@scope>/]] Options: - [--json] [--browser|--browser ] [--unicode] [--which ] + [--json] [--browser|--browser ] [--unicode] + [--which ] Run "npm help fund" for more info @@ -482,7 +488,8 @@ All commands: npm install / Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer] [-E|--save-exact] + [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer] + [-E|--save-exact] aliases: i, in, ins, inst, insta, instal, isnt, isnta, isntal, add @@ -516,7 +523,8 @@ All commands: npm install-test / Options: - [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer] [-E|--save-exact] + [-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer] + [-E|--save-exact] alias: it @@ -625,7 +633,9 @@ All commands: npm pack [[<@scope>/]...] Options: - [--dry-run] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [--dry-run] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] Run "npm help pack" for more info @@ -705,7 +715,9 @@ All commands: npm repo [ [ ...]] Options: - [--browser|--browser ] [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [--browser|--browser ] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] Run "npm help repo" for more info @@ -738,7 +750,8 @@ All commands: npm run-script [-- ] Options: - [-w|--workspace [-w|--workspace ...]] [-ws|--workspaces] + [-w|--workspace [-w|--workspace ...]] + [-ws|--workspaces] aliases: run, rum, urn @@ -775,7 +788,8 @@ All commands: npm set-script [