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

npm / arborist / #999 / 1

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 06 May 2021 05:08PM UTC
Files 38
Run time 17min
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

06 May 2021 05:06PM UTC coverage: 100.0%. Remained the same
#999.1

push

nlf
audit: support alias specs and root package names

When the root package has a name like `@magic/semver`, in a folder named
something like `/path/to/magic/semver`, the audit logic would look at
node.name, and see it as `semver`, and then report it as a
vulnerability.

Additionally, a dependency like `npm:mkdirp@0.5.1` would not be detected
as a vulnerability, because the alias spec would never match against the
semver range (assuming that the dependency name even was found as a
vulnerability in the first place).

The fix here is:

1. Add Node.packageName getter, which returns the `name` field from the
  node's package object.
2. Add this field as a queryable field in the inventory.
3. Base audits off of the packageName field, rather than the name field.

Fix: https://github.com/npm/cli/issues/3166

PR-URL: https://github.com/npm/arborist/pull/278
Credit: @isaacs
Close: #278
Reviewed-by: @nlf

3047 of 3047 branches covered (100.0%)

Branch coverage included in aggregate %.

4110 of 4110 relevant lines covered (100.0%)

564.15 hits per line

Source Files on job #999.1
  • Tree
  • List 0
  • Changed 8
  • Source Changed 7
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 999
  • fd8b156e on github
  • Prev Job for on (##998.1)
  • Next Job for on (##1000.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