Skip to content
This repository has been 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
merged 1 commit into from
Sep 28, 2021

Conversation

naugtur
Copy link
Contributor

@naugtur naugtur commented Sep 20, 2021

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
Copy link
Contributor

isaacs commented Sep 28, 2021

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