Skip to content

Filter before resolving with filing-cabinet? #184

@rmunch

Description

@rmunch

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!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rmunch

        Issue actions

          Filter before resolving with filing-cabinet? · Issue #184 · dependents/node-dependency-tree