Skip to content

Commit

Permalink
fix: extendPackage object values should be string
Browse files Browse the repository at this point in the history
  • Loading branch information
pksunkara committed Jan 6, 2020
1 parent 413470d commit 52e6400
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@vue/cli/lib/util/mergeDeps.js
Expand Up @@ -10,9 +10,10 @@ module.exports = function resolveDeps (generatorId, to, from, sources, forceNewV
for (const name in from) {
const r1 = to[name]
const r2 = from[name]
const r2IsString = typeof r2 === 'string'
const sourceGeneratorId = sources[name]
const isValidURI = r2.match(/^(?:file|git|git\+ssh|git\+http|git\+https|git\+file|https?):/) != null
const isValidGitHub = r2.match(/^[^/]+\/[^/]+/) != null
const isValidURI = r2IsString && r2.match(/^(?:file|git|git\+ssh|git\+http|git\+https|git\+file|https?):/) != null
const isValidGitHub = r2IsString && r2.match(/^[^/]+\/[^/]+/) != null

// if they are the same, do nothing. Helps when non semver type deps are used
if (r1 === r2) continue
Expand Down

0 comments on commit 52e6400

Please sign in to comment.