Closed rwjblue closed 6 years ago
@rwjblue CI here is only testing Node 0.10 and 0.12. maybe we should adjust that first before merging this?
@Turbo87 - Seems unrelated to these changes, but taken care of in https://github.com/stefanpenner/hash-for-dep/pull/39 (and this PR has been rebased to re-run CI).
When a package is installed by
npm
, any of itsoptionalDependencies
are added to the packages owndependencies
hash. Unfortunately, this means that we will discover things independencies
that are not actually present in thenode_modules
heirarchy.This commit handles the specific error condition when a package cannot be found and simply returns
null
, if the package is missing it (by definition) cannot affect the host packages cache key (which is why it is ok to just ignore missing packages).Fixes #20