diff options
author | Ruy Adorno <ruyadorno@hotmail.com> | 2021-03-01 19:38:43 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-03-02 16:08:55 +0300 |
commit | f3d67000a0a6bdce5cbb9ad506a008e5d709bb71 (patch) | |
tree | 650f0737f1d7676f374b523f27bf9b26bb70bb00 /deps/npm/lib/view.js | |
parent | 725d48ae777ec23e915370019a60a835a2569711 (diff) |
deps: upgrade npm to 7.6.0
PR-URL: https://github.com/nodejs/node/pull/37559
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'deps/npm/lib/view.js')
-rw-r--r-- | deps/npm/lib/view.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index bc9a13d85dd..d6d79d35c55 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -26,11 +26,11 @@ const usage = usageUtil( const cmd = (args, cb) => view(args).then(() => cb()).catch(cb) -const completion = async (opts, cb) => { +const completion = async (opts) => { if (opts.conf.argv.remain.length <= 2) { // There used to be registry completion here, but it stopped // making sense somewhere around 50,000 packages on the registry - return cb() + return } // have the package, get the fields const config = { ...npm.flatOptions, fullMetadata: true, preferOnline: true } @@ -39,8 +39,8 @@ const completion = async (opts, cb) => { const pckmnt = await packument(spec, config) const dv = pckmnt.versions[pckmnt['dist-tags'][defaultTag]] pckmnt.versions = Object.keys(pckmnt.versions).sort(semver.compareLoose) - const fields = getFields(pckmnt).concat(getFields(dv)) - return cb(null, fields) + + return getFields(pckmnt).concat(getFields(dv)) function getFields (d, f, pref) { f = f || [] |