Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

feat: expose isDirect boolean for direct dependencies on the Vuln type - #323

Merged
isaacs merged 1 commit into
npm:mainfrom
naugtur:direct-only
Sep 28, 2021
Merged

isaacs merged 1 commit into
npm:mainfrom
naugtur:direct-only

Conversation

@naugtur

@naugtur naugtur commented Sep 20, 2021

Copy link
Copy Markdown
Contributor

This is in relation to
npm/rfcs#372

I've extracted what can already be merged without much controversy from #301
and provided test coverage.

@isaacs let me know if this is ok now, I'd like to merge this one and use it in npm-audit-resolver
and then go back to working on types - the logic there demands I spend some more time figuring out what I want to achieve in more detail than I initially anticipated.

Co-authored-by: isaacs <i@izs.me>
PR-URL: npm#323
Credit: @naugtur
Close: npm#323
Reviewed-by: @isaacs
@isaacs isaacs closed this in 50c293d Sep 28, 2021
@isaacs
isaacs merged commit 50c293d into npm:main Sep 28, 2021
@isaacs

isaacs commented Sep 28, 2021

Copy link
Copy Markdown
Contributor

Adjusted the code a bit so that workspace dependencies are also considered "direct", and replaced the flatmap with a for loop to exit a bit quicker.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants