`npm run` output (without args) should ignore loglevel


(Jason Karns) #1

The run-script subcommand is documented to list all available script if not given a script name as an argument:

If no "command" is provided, it will list the available scripts.

Since that’s the expected output for the command, it shouldn’t be treated as diagnostic output.

However, if npm’s log level is set to silent, the output is muted, which indicates the list of commands are being treated as diagnostic log output, not command output.

I propose that npm run print the list of available scripts regardless of log level, since it is “data” output, not diagnostic.

(original github issue: https://github.com/npm/npm/issues/14115)