Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaudiahdz <cghr1990@gmail.com>2020-04-01 00:18:46 +0300
committerisaacs <i@izs.me>2020-05-08 04:12:58 +0300
commitca4c3795fe5ed58b5828208c18e785ecea13baf4 (patch)
tree515c162deab322f5897d740c5abaeb0066ec433c /lib/outdated.js
parent82e5db952cb82b282a7bafecb6a9c02c6a9c7060 (diff)
chore: remove figgy-pudding from cli
Diffstat (limited to 'lib/outdated.js')
-rw-r--r--lib/outdated.js33
1 files changed, 8 insertions, 25 deletions
diff --git a/lib/outdated.js b/lib/outdated.js
index abce6cd29..b16eba0a7 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -34,8 +34,6 @@ const pickManifest = require('npm-pick-manifest')
const fetchPackageMetadata = require('./fetch-package-metadata.js')
const mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js')
const npm = require('./npm.js')
-const npmConfig = require('./config/figgy-config.js')
-const figgyPudding = require('figgy-pudding')
const { packument } = require('pacote')
const long = npm.config.get('long')
const isExtraneous = require('./install/is-extraneous.js')
@@ -45,26 +43,9 @@ const moduleName = require('./utils/module-name.js')
const output = require('./utils/output.js')
const ansiTrim = require('./utils/ansi-trim')
-const OutdatedConfig = figgyPudding({
- also: {},
- color: {},
- depth: {},
- dev: 'development',
- development: {},
- global: {},
- json: {},
- only: {},
- parseable: {},
- prod: 'production',
- production: {},
- save: {},
- 'save-dev': {},
- 'save-optional': {}
-})
-
function uniq (list) {
- // we maintain the array because we need an array, not iterator, return
- // value.
+ // we maintain the array because we need an array,
+ // not iterator, return value
var uniqed = []
var seen = new Set()
list.forEach(function (item) {
@@ -87,11 +68,11 @@ function outdated (args, silent, cb) {
cb = silent
silent = false
}
- let opts = OutdatedConfig(npmConfig())
+ let opts = npm.flatOptions
var dir = path.resolve(npm.dir, '..')
// default depth for `outdated` is 0 (cf. `ls`)
- if (opts.depth === Infinity) opts = opts.concat({depth: 0})
+ if (opts.depth === Infinity) opts = { ...opts, depth: 0 }
readPackageTree(dir, andComputeMetadata(function (er, tree) {
if (!tree) return cb(er)
@@ -372,9 +353,11 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, opts, cb, type
} else if (parsed.type === 'remote') {
return doIt('remote', 'remote')
} else {
- return packument(parsed, opts.concat({
+ return packument(parsed, {
+ ...opts,
'prefer-online': true
- })).nodeify(updateDeps)
+ })
+ .then(() => updateDeps())
}
function doIt (wanted, latest) {