• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / cli / #2173 / 1
97%
latest: 97%

Build:
Build:
LAST BUILD BRANCH: nlf/arborist-validation
DEFAULT BRANCH: latest
Ran 26 May 2021 08:16PM UTC
Files 123
Run time 7min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 May 2021 08:14PM UTC coverage: 96.877%. Remained the same
#2173.1

push

wraithgar
fix: set audit exit code properly

When running 'npm audit', we properly exited correctly with the
appropriate exitCode based on the audit level config and the report
results.

However, when going through the reifyFinish() function (as we do for
'npm audit fix'), we were not setting that properly if the auditLevel
was not set.

Furthermore, if the auditLevel WAS set, we were setting the exit code to
non-zero for *other* reify commands (install, update, etc.), where the
audit information should be strictly advisory.

When --json and --loglevel=silent were set, the exitCode was never being
set properly.

This fixes all these problems.

PR-URL: https://github.com/npm/cli/pull/3311
Credit: @isaacs
Close: #3311
Reviewed-by: @wraithgar

3096 of 3203 branches covered (96.66%)

Branch coverage included in aggregate %.

5279 of 5442 relevant lines covered (97.0%)

24.31 hits per line

Source Files on job #2173.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 2173
  • 554e8a5c on github
  • Prev Job for on isaacs/audit-level-reify-exit-code (##2168.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc