substack/module-deps — pull request #32 by dgbeck (2014-04-02 16:01:41+00:00)
Title: fix for packageTransform option bug

Hi James,

Been banging my head against the wall trying to track down an issue related to the packageFilter option. Looks like there is a bug in module deps to whereas at times it will not apply the package filter to parsed package jsons. Specifically, in the "walk" function, if lookupPkg needs to be called because `pkg.__dirname` is missing (line 129), the packageFilter is not applied to the parsed package json. However, it IS applied in the case that `pkg.__dirname` is present, as the pkg comes back from resolver already transformed. The PR fixes the issue so that the package filter is applied consistently across both cases.