diff options
author | Gar <gar+gh@danger.computer> | 2022-05-09 19:26:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-09 19:26:35 +0300 |
commit | 5baa4a7c64319485604982f9060702a7cee8a85c (patch) | |
tree | 55ce901dbe1db23e519a703dac66e1b3f1142b3b /tap-snapshots | |
parent | 86f443e97aa58c1a06b8eb6f523656274234bb71 (diff) |
fix: consolidate bugs, docs, repo command logic (#4857)
All three of these commands do the same thing: open a manifest and find
a url inside to open it. The finding of that manifest was not very
consistent across these three commands. Some work with workspaces while
others don't. Some work correctly with `--prefix` while others don't.
This PR consolidates these commands so that they all are consistent in
how they find the manifest being referenced. The specifics of which url
they open are still left to each command. The util that only these
three commands were using was consolidated into their base class.
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test/lib/load-all-commands.js.test.cjs | 6 | ||||
-rw-r--r-- | tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 6 |
2 files changed, 8 insertions, 4 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 67606be07..20915cdd8 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -81,10 +81,12 @@ exports[`test/lib/load-all-commands.js TAP load each command bugs > must match s Report bugs for a package in a web browser Usage: -npm bugs [<pkgname>] +npm bugs [<pkgname> [<pkgname> ...]] Options: [--no-browser|--browser <browser>] [--registry <registry>] +[-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] +[-ws|--workspaces] [--include-workspace-root] alias: issues @@ -727,7 +729,7 @@ Usage: npm repo [<pkgname> [<pkgname> ...]] Options: -[--no-browser|--browser <browser>] +[--no-browser|--browser <browser>] [--registry <registry>] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] [-ws|--workspaces] [--include-workspace-root] 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 637999134..3487378a2 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -223,10 +223,12 @@ All commands: bugs Report bugs for a package in a web browser Usage: - npm bugs [<pkgname>] + npm bugs [<pkgname> [<pkgname> ...]] Options: [--no-browser|--browser <browser>] [--registry <registry>] + [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] + [-ws|--workspaces] [--include-workspace-root] alias: issues @@ -777,7 +779,7 @@ All commands: npm repo [<pkgname> [<pkgname> ...]] Options: - [--no-browser|--browser <browser>] + [--no-browser|--browser <browser>] [--registry <registry>] [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]] [-ws|--workspaces] [--include-workspace-root] |