Make 'npm install --loglevel warn' Output Quieter #4335
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What / Why
I know this is kind of trivial, but I was trying to turn off the
up to date in 420ms
and14 packages are looking for funding
-type messages in my CI/CD pipeline, and was surprised/disappointed to discover thatnpm install --loglevel error
wasn't good enough.Having to reach for
--silent
seems a little too heavy-handed, IMHO... "changed", "audit", and "funding" messages aren't errors, per se — or even warnings, for that matter — they don't alert me to imminent breakage — and--silent
is a foot-gun waiting to happen; I'm infinitely more likely to miss something important. But I understand wanting to keep them in the default output.Describe the request in detail. What it does and why it's being changed.
This PR simply makes it so
--loglevel warn
is sufficient to turn them off, without impacting other, actualnpm install
errors...Instead of:
it simply does:
[Note: That also meant setting the fixture from warn to notice in
test/lib/utils/reify-output.js:beforeEach
]References
Related to #3311