diff options
author | isaacs <i@izs.me> | 2020-07-08 04:29:38 +0300 |
---|---|---|
committer | Ruy Adorno <ruyadorno@hotmail.com> | 2020-07-08 20:53:06 +0300 |
commit | 8b729997dfdeeb3af7fda07a0d6e885c510d2d0b (patch) | |
tree | 2560451ad221019eb2c9576a8d050a838914a84e | |
parent | fa65ba7969ac7f13554ae33c5bb34574c9d892e6 (diff) |
remove trailing whitespace
PR-URL: https://github.com/npm/cli/pull/1495
Credit: @isaacs
Close: #1495
Reviewed-by: @ruyadorno
-rw-r--r-- | lib/fund.js | 2 | ||||
-rw-r--r-- | lib/outdated.js | 4 | ||||
-rw-r--r-- | lib/pack.js | 2 | ||||
-rw-r--r-- | lib/publish.js | 8 | ||||
-rw-r--r-- | lib/unpublish.js | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/lib/fund.js b/lib/fund.js index f62cb5ca0..660e22468 100644 --- a/lib/fund.js +++ b/lib/fund.js @@ -141,7 +141,7 @@ async function openFundingUrl ({ path, tree, spec, fundingSourceNumber }) { .concat(normalizeFunding(funding)) .filter(isValidFunding) - const matchesValidSource = + const matchesValidSource = validSources.length === 1 || (fundingSourceNumber > 0 && fundingSourceNumber <= validSources.length) diff --git a/lib/outdated.js b/lib/outdated.js index 04a1a7e3c..a4e3e7029 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -141,7 +141,7 @@ async function outdated_ (tree, deps, opts) { // deps different from prod not currently // on disk are not included in the output if (edge.error === 'MISSING' && type !== 'dependencies') return - + try { const packument = await getPackument(spec) const expected = edge.spec @@ -178,7 +178,7 @@ async function outdated_ (tree, deps, opts) { } } - + const p = [] if (deps.length !== 0) { // specific deps diff --git a/lib/pack.js b/lib/pack.js index 510c4781b..19d8e2d8d 100644 --- a/lib/pack.js +++ b/lib/pack.js @@ -52,7 +52,7 @@ async function pack_ (arg, opts) { if (!dryRun) { await writeFile(filename, tarballData) - } + } return pkgContents } diff --git a/lib/publish.js b/lib/publish.js index 4c496a3e4..940099e74 100644 --- a/lib/publish.js +++ b/lib/publish.js @@ -29,7 +29,7 @@ async function publish (args, cb) { if (args.length === 0) args = ['.'] if (args.length !== 1) return cb(publish.usage) - log.verbose('publish', args) + log.verbose('publish', args) const opts = { ...npm.flatOptions } const { json, defaultTag } = opts @@ -59,16 +59,16 @@ async function publish_ (arg, opts) { stdio: 'inherit', pkg: manifest }) - + const tarballData = await pack(arg) const pkgContents = await getContents(manifest, tarballData) if (!json) { logTar(pkgContents, { log, unicode }) } - + if (!dryRun) { - // The purpose of re-reading the manifest is in case it changed, + // The purpose of re-reading the manifest is in case it changed, // so that we send the latest and greatest thing to the registry manifest = await readJson(`${arg}/package.json`) await otplease(opts, opts => libpub(arg, manifest, opts)) diff --git a/lib/unpublish.js b/lib/unpublish.js index 0f3cf4729..2e52ef671 100644 --- a/lib/unpublish.js +++ b/lib/unpublish.js @@ -99,7 +99,7 @@ async function unpublish (args, cb) { }) } } - + } else { ret = await otplease(opts, opts => libunpub(spec, opts)) } |