From c0358210b782a0e63da28c3b141ab87334dc9056 Mon Sep 17 00:00:00 2001 From: Gar Date: Wed, 3 Nov 2021 13:09:18 -0700 Subject: [PATCH] fixup! address PR review comments --- lib/commands/completion.js | 2 +- lib/npm.js | 2 +- lib/utils/npm-usage.js | 2 +- test/fixtures/sandbox.js | 4 ---- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/commands/completion.js b/lib/commands/completion.js index 3d1a03a3e6f8a..fbbde0df70ea7 100644 --- a/lib/commands/completion.js +++ b/lib/commands/completion.js @@ -212,7 +212,7 @@ const dumpScript = async () => { // Really, one should not be tossing away EPIPE errors, or any // errors, so casually. But, without this, `. <(npm completion)` // can never ever work on OS X. - // Ignoring coverage, see 'non EPIPE errors cause failures' test. + // TODO Ignoring coverage, see 'non EPIPE errors cause failures' test. /* istanbul ignore next */ if (er.errno === 'EPIPE') res() diff --git a/lib/npm.js b/lib/npm.js index 7c6528aa14920..4b7b3440ff5ca 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -154,7 +154,7 @@ class Npm extends EventEmitter { } } - load () { + async load () { if (!this.loadPromise) { process.emit('time', 'npm:load') this.log.pause() diff --git a/lib/utils/npm-usage.js b/lib/utils/npm-usage.js index eb5eaf31fe017..d54c8ac5479dc 100644 --- a/lib/utils/npm-usage.js +++ b/lib/utils/npm-usage.js @@ -31,7 +31,7 @@ Configuration fields: npm help 7 config npm@${npm.version} ${dirname(dirname(__dirname))}` } -const allCommands = (npm) => { +const allCommands = async (npm) => { if (npm.config.get('long')) return usages(npm) return ('\n ' + wrap(cmdList)) diff --git a/test/fixtures/sandbox.js b/test/fixtures/sandbox.js index d021ba971742c..7c57e8d8bc88e 100644 --- a/test/fixtures/sandbox.js +++ b/test/fixtures/sandbox.js @@ -292,10 +292,6 @@ class Sandbox extends EventEmitter { const cmd = this[_npm].argv.shift() return this[_npm].exec(cmd, this[_npm].argv) - // const cmd = this[_npm].argv.shift() - // const impl = await this[_npm].cmd(cmd) - - // return impl.exec(this[_npm].argv) } async complete (command, argv, partial) {