Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/@vue/cli/__tests__/Generator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ test('api: extendPackage allow git, github, http, file version ranges', async ()
bad: 'mochajs/mocha#4727d357ea',
bac: 'http://asdf.com/asdf.tar.gz',
bae: 'file:../dyl',
bcd: 'npm:vue@^3.0.0',
'my-lib': 'https://bitbucket.org/user/my-lib.git#semver:^1.0.0'
}
})
Expand All @@ -182,6 +183,7 @@ test('api: extendPackage allow git, github, http, file version ranges', async ()
bad: 'mochajs/mocha#4727d357ea',
bac: 'http://asdf.com/asdf.tar.gz',
bae: 'file:../dyl',
bcd: 'npm:vue@^3.0.0',
'my-lib': 'https://bitbucket.org/user/my-lib.git#semver:^1.0.0'
}
})
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli/lib/util/mergeDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const isValidRange = range => {
const isValidGitHub = range.match(/^[^/]+\/[^/]+/) != null
const isValidURI =
range.match(
/^(?:file|git|git\+ssh|git\+http|git\+https|git\+file|https?):/
/^(?:file|git|npm|git\+ssh|git\+http|git\+https|git\+file|https?):/
) != null

return isValidSemver || isValidGitHub || isValidURI
Expand Down