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/prefix.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/prefix.js') diff --git a/lib/prefix.js b/lib/prefix.js index 5ade87f64..1298a3c5b 100644 --- a/lib/prefix.js +++ b/lib/prefix.js @@ -1,6 +1,11 @@ const BaseCommand = require('./base-command.js') class Prefix extends BaseCommand { + /* istanbul ignore next - see test/lib/load-all-commands.js */ + static get description () { + return 'Display prefix' + } + /* istanbul ignore next - see test/lib/load-all-commands.js */ static get name () { return 'prefix' -- cgit v1.2.3