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:
authorisaacs <i@izs.me>2020-09-02 20:51:54 +0300
committerisaacs <i@izs.me>2020-09-04 04:28:19 +0300
commita36e2537fd4c81df53fb6de01900beb9fa4fa0aa (patch)
tree33fddb9b15051bee9357625c96e2e242012b1a09 /lib/outdated.js
parentac5aa709a8609ec2beb7a8c60b3bde18f882f4e8 (diff)
outdated: don't throw on non-version/tag/range dep
Diffstat (limited to 'lib/outdated.js')
-rw-r--r--lib/outdated.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/outdated.js b/lib/outdated.js
index 660f1cd05..fa626ecbd 100644
--- a/lib/outdated.js
+++ b/lib/outdated.js
@@ -144,6 +144,10 @@ async function outdated_ (tree, deps, opts) {
try {
const packument = await getPackument(spec)
const expected = edge.spec
+ // if it's not a range, version, or tag, skip it
+ if (!npa(`${edge.name}@${edge.spec}`).registry) {
+ return null
+ }
const wanted = pickManifest(packument, expected, npm.flatOptions)
const latest = pickManifest(packument, '*', npm.flatOptions)