diff --git a/index.js b/index.js index 6954505..8026f9f 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,11 @@ const pickManifest = (packument, wanted, opts) => { packument.policyRestrictions.versions) || {} const time = before && verTimes ? +(new Date(before)) : Infinity - const spec = npa.resolve(name, wanted || defaultTag) + let spec = npa.resolve(name, wanted || defaultTag) + if (spec.type === 'alias') { + spec = spec.subSpec + } + const type = spec.type const distTags = packument['dist-tags'] || {}