diff options
author | isaacs <i@izs.me> | 2020-08-06 02:29:31 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-08-06 21:13:44 +0300 |
commit | cf2819210327952696346486002239f9fc184a3e (patch) | |
tree | 29833c17b7bceb657ba75ef80089cd2fb0860bbc /tap-snapshots | |
parent | 0d9b1271d92271fccab086fa07b10bd18cf31cc8 (diff) |
Improve abbrevs for install and help
The existence of 'install-test' and 'install-clean' make 'npm inst' no longer
de-reference to 'npm install'. Similarly, the existence of 'help-search'
prevents 'hel' from being a shorthand for 'help'.
This adds some artisanally hand-crafted abbreviations for these cases.
Fix: #1617
PR-URL: https://github.com/npm/cli/pull/1622
Credit: @isaacs
Close: #1622
Reviewed-by: @ruyadorno
Diffstat (limited to 'tap-snapshots')
-rw-r--r-- | tap-snapshots/test-lib-config-cmd-list.js-TAP.test.js | 24 | ||||
-rw-r--r-- | tap-snapshots/test-lib-utils-update-notifier.js-TAP.test.js | 24 | ||||
-rw-r--r-- | tap-snapshots/test-lib-view.js-TAP.test.js | 2 |
3 files changed, 32 insertions, 18 deletions
diff --git a/tap-snapshots/test-lib-config-cmd-list.js-TAP.test.js b/tap-snapshots/test-lib-config-cmd-list.js-TAP.test.js index 3a0c47d3c..d7db532f4 100644 --- a/tap-snapshots/test-lib-config-cmd-list.js-TAP.test.js +++ b/tap-snapshots/test-lib-config-cmd-list.js-TAP.test.js @@ -10,16 +10,23 @@ Object { "affordances": Object { "add": "install", "add-user": "adduser", - "apihelp": "help", "author": "owner", "dist-tags": "dist-tag", "find": "search", + "hlep": "help", "home": "docs", "ic": "ci", + "in": "install", "info": "view", "innit": "init", + "ins": "install", + "inst": "install", + "insta": "install", + "instal": "install", "install-clean": "ci", - "isntall": "install", + "isnt": "install", + "isnta": "install", + "isntal": "install", "isntall-clean": "ci", "issues": "bugs", "la": "ll", @@ -40,7 +47,6 @@ Object { "aliases": Object { "add": "install", "add-user": "adduser", - "apihelp": "help", "author": "owner", "c": "config", "cit": "install-ci-test", @@ -50,13 +56,21 @@ Object { "ddp": "dedupe", "dist-tags": "dist-tag", "find": "search", + "hlep": "help", "home": "docs", "i": "install", "ic": "ci", + "in": "install", "info": "view", "innit": "init", + "ins": "install", + "inst": "install", + "insta": "install", + "instal": "install", "install-clean": "ci", - "isntall": "install", + "isnt": "install", + "isnta": "install", + "isntal": "install", "isntall-clean": "ci", "issues": "bugs", "it": "install-test", @@ -125,7 +139,6 @@ Object { "fund", "org", "help", - "help-search", "ls", "ll", "search", @@ -154,6 +167,7 @@ Object { ], "plumbing": Array [ "birthday", + "help-search", ], "shorthands": Object { "c": "config", diff --git a/tap-snapshots/test-lib-utils-update-notifier.js-TAP.test.js b/tap-snapshots/test-lib-utils-update-notifier.js-TAP.test.js index 0e2841a3f..cab4cdf18 100644 --- a/tap-snapshots/test-lib-utils-update-notifier.js-TAP.test.js +++ b/tap-snapshots/test-lib-utils-update-notifier.js-TAP.test.js @@ -6,73 +6,73 @@ */ 'use strict' exports[`test/lib/utils/update-notifier.js TAP notification situations color and unicode major > must match snapshot 1`] = ` -New [31mmajor[39m version of npm available! [31m<<major>>-beta.0[39m → [32m7.0.0[39m +New [31mmajor[39m version of npm available! [31m<<major>>-beta.1[39m → [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations color and unicode minor > must match snapshot 1`] = ` -New [33mminor[39m version of npm available! [31m<<minor>>-beta.0[39m → [32m7.0.0[39m +New [33mminor[39m version of npm available! [31m<<minor>>-beta.1[39m → [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations color and unicode minor > must match snapshot 2`] = ` -New [32mpatch[39m version of npm available! [31m<<patch>>-beta.0[39m → [32m7.0.0[39m +New [32mpatch[39m version of npm available! [31m<<patch>>-beta.1[39m → [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations color, no unicode major > must match snapshot 1`] = ` -New [31mmajor[39m version of npm available! [31m<<major>>-beta.0[39m -> [32m7.0.0[39m +New [31mmajor[39m version of npm available! [31m<<major>>-beta.1[39m -> [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations color, no unicode minor > must match snapshot 1`] = ` -New [33mminor[39m version of npm available! [31m<<minor>>-beta.0[39m -> [32m7.0.0[39m +New [33mminor[39m version of npm available! [31m<<minor>>-beta.1[39m -> [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations color, no unicode minor > must match snapshot 2`] = ` -New [32mpatch[39m version of npm available! [31m<<patch>>-beta.0[39m -> [32m7.0.0[39m +New [32mpatch[39m version of npm available! [31m<<patch>>-beta.1[39m -> [32m7.0.0[39m [33mChangelog:[39m [36mhttps://github.com/npm/cli/releases/tag/v7.0.0[39m Run [32mnpm install -g npm[39m to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations no color, no unicode major > must match snapshot 1`] = ` -New major version of npm available! <<major>>-beta.0 -> 7.0.0 +New major version of npm available! <<major>>-beta.1 -> 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations no color, no unicode minor > must match snapshot 1`] = ` -New minor version of npm available! <<minor>>-beta.0 -> 7.0.0 +New minor version of npm available! <<minor>>-beta.1 -> 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations no color, no unicode minor > must match snapshot 2`] = ` -New patch version of npm available! <<patch>>-beta.0 -> 7.0.0 +New patch version of npm available! <<patch>>-beta.1 -> 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations unicode, no color major > must match snapshot 1`] = ` -New major version of npm available! <<major>>-beta.0 → 7.0.0 +New major version of npm available! <<major>>-beta.1 → 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations unicode, no color minor > must match snapshot 1`] = ` -New minor version of npm available! <<minor>>-beta.0 → 7.0.0 +New minor version of npm available! <<minor>>-beta.1 → 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` exports[`test/lib/utils/update-notifier.js TAP notification situations unicode, no color minor > must match snapshot 2`] = ` -New patch version of npm available! <<patch>>-beta.0 → 7.0.0 +New patch version of npm available! <<patch>>-beta.1 → 7.0.0 Changelog: https://github.com/npm/cli/releases/tag/v7.0.0 Run npm i -g npm to update! ` diff --git a/tap-snapshots/test-lib-view.js-TAP.test.js b/tap-snapshots/test-lib-view.js-TAP.test.js index 473ad227d..6bccea684 100644 --- a/tap-snapshots/test-lib-view.js-TAP.test.js +++ b/tap-snapshots/test-lib-view.js-TAP.test.js @@ -282,7 +282,7 @@ dist dist-tags: -published [33m12 months ago[39m +published [33ma year ago[39m ` exports[`test/lib/view.js TAP should log package info package with no versions > must match snapshot 1`] = ` |