From 41facf6435ced4e416d74111d9c3ff00ee19ab7d Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 10 Mar 2021 16:11:34 -0800 Subject: feat(help): refactor npm help/help-search Lots of dead code removed thanks to streamlining of logic. `npm help` `npm ` and `npm help-search` are all now separated concerns, handling their own use cases. `help` calls `help-search` as a last resort, but `npm ` no longer tries to wind its way through to `help-search` just to get the basic npm usage displayed. The `did you mean` output has been expanded. It now always suggests top level commands, scripts, and bins, and suggests them in the way they should be called. PR-URL: https://github.com/npm/cli/pull/2859 Credit: @wraithgar Close: #2859 Reviewed-by: @ruyadorno --- lib/ls.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ls.js') diff --git a/lib/ls.js b/lib/ls.js index 3b73f4d1e..65b3ddfe7 100644 --- a/lib/ls.js +++ b/lib/ls.js @@ -23,6 +23,11 @@ const _type = Symbol('type') const BaseCommand = require('./base-command.js') class LS extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get description () { + return 'List installed packages' + } + /* istanbul ignore next - see test/lib/load-all-commands.js */ static get name () { return 'ls' -- cgit v1.2.3