dependents / dependents/node-dependency-tree

Filter before resolving with filing-cabinet?

Open
#184 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
777
Forks
83
PR merge metrics
No merged PRs in 30d

Description

Hello - I'm curious if you'd be interested in a proposal to support filtering _before_ resolving with file-cabinet. What I'm trying to accomplish is to prevent certain dependencies from being considered at all so that I can fail fast when something can't be resolved. Currently, the `filter` option filters _after_ dependencies have been extracted and resolved, and there's no way to filter these before they're added to the `nonExistent` array. If it were possible to filter before resolution, I could prevent these dependencies from being considered at all. I can't easily post-process `nonExistent` because I need to know from which file the dependencies were from. So, I'm thinking if the filtering functionality were augmented to support filtering pre-resolution, I could just hook into that.

If this sounds interesting, I can work on a PR. I imagine we can't just move the `filter` function call before the file cabinet call since that would be a breaking change, but could maybe add an additional config or similar? Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.