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:
Diffstat (limited to 'lib/utils/completion/installed-shallow.js')
-rw-r--r--lib/utils/completion/installed-shallow.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/utils/completion/installed-shallow.js b/lib/utils/completion/installed-shallow.js
index c9c680e7d..1c9b8ef5a 100644
--- a/lib/utils/completion/installed-shallow.js
+++ b/lib/utils/completion/installed-shallow.js
@@ -1,10 +1,8 @@
-const npm = require('../../npm.js')
const { promisify } = require('util')
const readdir = promisify(require('readdir-scoped-modules'))
-const names = global => readdir(global ? npm.globalDir : npm.localDir)
-
-const installedShallow = async (opts) => {
+const installedShallow = async (npm, opts) => {
+ const names = global => readdir(global ? npm.globalDir : npm.localDir)
const { conf: { argv: { remain } } } = opts
if (remain.length > 3)
return null