Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-06-02 19:47:11 +0300
committerGar <gar+gh@danger.computer>2021-06-10 20:17:01 +0300
commitef668ab57b15789c6e2971ac39d8ecb3757629fa (patch)
tree8d9df4e2c28ead9b7375f76a80016a701ca09650 /tap-snapshots
parent992799cd8c4427ed8c57270b399b2d6bbc94f2a8 (diff)
feat(diff): add workspace support
Refactored a bit so that we can more easily change the `top` and `prefix` params that were being used, and are different under the workspace context. PR-URL: https://github.com/npm/cli/pull/3368 Credit: @wraithgar Close: #3368 Reviewed-by: @ruyadorno
Diffstat (limited to 'tap-snapshots')
-rw-r--r--tap-snapshots/test/lib/load-all-commands.js.test.cjs12
-rw-r--r--tap-snapshots/test/lib/utils/npm-usage.js.test.cjs12
2 files changed, 10 insertions, 14 deletions
diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
index d40be4286..097123d46 100644
--- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs
+++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs
@@ -199,16 +199,14 @@ The registry diff command
Usage:
npm diff [...<paths>]
-npm diff --diff=<pkg-name> [...<paths>]
-npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
-npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
-npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>] [...<paths>]
Options:
-[--diff <diff> [--diff <diff> ...]] [--diff-name-only]
-[--diff-unified <diff-unified>] [--diff-ignore-all-space] [--diff-no-prefix]
-[--diff-src-prefix <diff-src-prefix>] [--diff-dst-prefix <diff-dst-prefix>]
+[--diff <pkg-name|spec|version> [--diff <pkg-name|spec|version> ...]]
+[--diff-name-only] [--diff-unified <number>] [--diff-ignore-all-space]
+[--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
[--diff-text] [-g|--global] [--tag <tag>]
+[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
+[-ws|--workspaces]
Run "npm help diff" for more info
`
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 7fdcf0c5d..54f6c3d2f 100644
--- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
+++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs
@@ -336,16 +336,14 @@ All commands:
Usage:
npm diff [...<paths>]
- npm diff --diff=<pkg-name> [...<paths>]
- npm diff --diff=<version-a> [--diff=<version-b>] [...<paths>]
- npm diff --diff=<spec-a> [--diff=<spec-b>] [...<paths>]
- npm diff [--diff-ignore-all-space] [--diff-name-only] [...<paths>] [...<paths>]
Options:
- [--diff <diff> [--diff <diff> ...]] [--diff-name-only]
- [--diff-unified <diff-unified>] [--diff-ignore-all-space] [--diff-no-prefix]
- [--diff-src-prefix <diff-src-prefix>] [--diff-dst-prefix <diff-dst-prefix>]
+ [--diff <pkg-name|spec|version> [--diff <pkg-name|spec|version> ...]]
+ [--diff-name-only] [--diff-unified <number>] [--diff-ignore-all-space]
+ [--diff-no-prefix] [--diff-src-prefix <path>] [--diff-dst-prefix <path>]
[--diff-text] [-g|--global] [--tag <tag>]
+ [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
+ [-ws|--workspaces]
Run "npm help diff" for more info