diff options
Diffstat (limited to 'lib/ls.js')
-rw-r--r-- | lib/ls.js | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -9,7 +9,6 @@ module.exports = exports = ls var path = require('path') var url = require('url') var readPackageTree = require('read-package-tree') -var log = require('npmlog') var archy = require('archy') var semver = require('semver') var color = require('ansicolors') @@ -19,7 +18,7 @@ var sortedObject = require('sorted-object') var extend = Object.assign || require('util')._extend var npm = require('./npm.js') var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') -var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var computeMetadata = require('./install/deps.js').computeMetadata var packageId = require('./utils/package-id.js') var usage = require('./utils/usage') var output = require('./utils/output.js') @@ -37,14 +36,14 @@ function ls (args, silent, cb) { silent = false } var dir = path.resolve(npm.dir, '..') - readPackageTree(dir, andRecalculateMetadata(iferr(cb, function (physicalTree) { + readPackageTree(dir, andComputeMetadata(iferr(cb, function (physicalTree) { lsFromTree(dir, physicalTree, args, silent, cb) }))) } -function andRecalculateMetadata (next) { +function andComputeMetadata (next) { return function (er, tree) { - recalculateMetadata(tree || {}, log, next) + next(null, computeMetadata(tree || {})) } } |