Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
dedupe: Remove unused code
Browse files Browse the repository at this point in the history
Remove useless normalizeTree override. This was needed back before
loadCurrentTree used readGlobalPackageData for globals.

PR-URL: #15083
Credit: @iarna
Reviewed-By: @zkat
  • Loading branch information
iarna authored and zkat committed Dec 1, 2016
1 parent 9776d8f commit f0f7b0f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions lib/dedupe.js
Expand Up @@ -48,19 +48,6 @@ function Deduper (where, dryrun) {
}
util.inherits(Deduper, Installer)

Deduper.prototype.normalizeTree = function (log, cb) {
validate('OF', arguments)
log.silly('dedupe', 'normalizeTree')
// If we're looking globally only look at the one package we're operating on
if (npm.config.get('global')) {
var args = this.args
this.currentTree.children = this.currentTree.children.filter(function (child) {
return args.filter(function (arg) { return arg === moduleName(child) }).length
})
}
Installer.prototype.normalizeTree.call(this, log, cb)
}

Deduper.prototype.loadIdealTree = function (cb) {
validate('F', arguments)
log.silly('install', 'loadIdealTree')
Expand Down

1 comment on commit f0f7b0f

@a7madgamal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you just dedupe a deduper? :D

Please sign in to comment.