diff options
author | Rebecca Turner <me@re-becca.org> | 2017-05-25 13:07:28 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:30 +0300 |
commit | 3116cfecdaaf3b76abe44ae1e3e08cce8bf8cfe1 (patch) | |
tree | 57d2419d95de04152fd4d9413ac9f673490511e4 /lib/install/is-extraneous.js | |
parent | f17f4e6e50ebf315018b812e081e56356d45ba75 (diff) |
install: Make removing packages work w/o package.json
Diffstat (limited to 'lib/install/is-extraneous.js')
-rw-r--r-- | lib/install/is-extraneous.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/install/is-extraneous.js b/lib/install/is-extraneous.js index f0d599965..a6477c237 100644 --- a/lib/install/is-extraneous.js +++ b/lib/install/is-extraneous.js @@ -6,14 +6,6 @@ function isExtraneous (tree) { return result } -function isNotRequired (tree) { - return tree.requiredBy && tree.requiredBy.length === 0 -} - -function parentHasNoPjson (tree) { - return tree.parent && tree.parent.isTop && tree.parent.error -} - function topHasNoPjson (tree) { var top = tree while (!top.isTop) top = top.parent @@ -24,8 +16,6 @@ function isNotExtraneous (tree, isCycle) { if (!isCycle) isCycle = {} if (tree.isTop || tree.userRequired) { return true - } else if (isNotRequired(tree) && parentHasNoPjson(tree)) { - return true } else if (isCycle[tree.path]) { return topHasNoPjson(tree) } else { |