diff options
author | Rebecca Turner <me@re-becca.org> | 2017-04-28 01:54:42 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:03 +0300 |
commit | 918f671a9d5d350c62a9b73481391f19afe8391c (patch) | |
tree | f237ff8810e1beab83c838a8d1d5eb908c298a3d /lib/outdated.js | |
parent | c0a30c0725070dc49ac9e004f9e33bac68c69e20 (diff) |
filespecs: Implement new file: specifier behavior
PR-URL: https://github.com/npm/npm/pull/15900
Credit: @iarna
actions: Allow actions to return promises
extract: Eliminate extra callback
finalize: Rewrite finalize as promises
update-linked: Remove update-linked action
install: Remove obsolete invalid action filtering
fetch-package-metadata: Error on installing windows paths on non-windows systems
fetch-package-metadata: Read in modules installed inside of new links
finalize: Act on realpaths because we may be installing inside a link prior to the symlink being made
finalize: Create symlinks of directory deps
deps: Resolve ambiguity for file specifiers in the traditional way
deps: Set link and realpath properties for directory deps
inflate-bundled: Distinguish published bundles from lined modules
node: Add new fromLink attribute to track sourced-to-symlinks deps
diff-trees: Don't try to install deps that are already inside a link
fetch-package-metadata: Improve error messages for link failures
install: Run preinstall lifecycle after finalize
finalize: Start reading package.json files here
decompose-actions: Don't fetch or extract links
deps: Determine if a link matches spec based on where it points
deps: Compute correct save specifier for file spec
deps: Set the isInLink property on new children
deps: When finding the install location, don't walk up out of a symlink unless PRESERVE_SYMLINKS is on
diff-trees: Stop setting isInLink, this is now a first class property
diff-trees: Only exclude children of links from adding if they were already there behind the symlink
inflate-bundled: We are using isInLink now not fromLink
inflate-bundled: realpaths should be built on realpaths
node: Eliminate fromLink as a thing
node: Fill in values for inLink, isInLink & fromBundle
save: When updating a lock/shrinkwrap don't read the damn tree again
shrinkwrap: Fill in version per the new shrinkwrap spec
install: Make _inBundle purely a debugging artifact
inflate-shrinkwrap: Fix how bundle deps are inflated
save: Detect dependency type when saving
recalculateMetadata: Rewrite as simpler and synchronous
prune: Work off computed metadata
refreshPackageJson: Copy all of the in memory version over the on-disk version except empty items
install: Reduce normalize tree function to minimum
realize-package-specifier: Bring into closer alignment with spec
read-shrinkwrap: Use child.isTop not !child.parent
copy-tree: Don't crash of requires or requiredBy are missing
copy-tree: Initialize copied nodes
dedupe: use getRequested instead of child.package._requested
install: recompute the pkg relationships after finalize
Neccessary to align behavior with shrinkwraps where relationship information
isn't available until we read the module off disk.
install: Prune the tree after building it
install: Only save deps if we made changes
inflate-shrinkwrap: Better metadata while inflating
Diffstat (limited to 'lib/outdated.js')
-rw-r--r-- | lib/outdated.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/outdated.js b/lib/outdated.js index 01cf39d10..7d5cfba86 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -23,7 +23,6 @@ outdated.completion = require('./utils/completion/installed-deep.js') var os = require('os') var url = require('url') var path = require('path') -var log = require('npmlog') var readPackageTree = require('read-package-tree') var readJson = require('read-package-json') var asyncMap = require('slide').asyncMap @@ -38,7 +37,7 @@ var npm = require('./npm.js') var long = npm.config.get('long') var mapToRegistry = require('./utils/map-to-registry.js') var isExtraneous = require('./install/is-extraneous.js') -var recalculateMetadata = require('./install/deps.js').recalculateMetadata +var computeMetadata = require('./install/deps.js').computeMetadata var moduleName = require('./utils/module-name.js') var output = require('./utils/output.js') var ansiTrim = require('./utils/ansi-trim') @@ -59,10 +58,10 @@ function uniq (list) { return uniqed } -function andRecalculateMetadata (next) { +function andComputeMetadata (next) { return function (er, tree) { if (er) return next(er) - recalculateMetadata(tree, log, next) + next(null, computeMetadata(tree)) } } @@ -76,7 +75,7 @@ function outdated (args, silent, cb) { // default depth for `outdated` is 0 (cf. `ls`) if (npm.config.get('depth') === Infinity) npm.config.set('depth', 0) - readPackageTree(dir, andRecalculateMetadata(function (er, tree) { + readPackageTree(dir, andComputeMetadata(function (er, tree) { if (!tree) return cb(er) mutateIntoLogicalTree(tree) outdated_(args, '', tree, {}, 0, function (er, list) { |