Skip to content

Commit a27e33b

Browse files
authored
fix: dependent package nickname (#6304)
1 parent c604182 commit a27e33b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/@vue/cli/__tests__/Generator.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ test('api: extendPackage allow git, github, http, file version ranges', async ()
163163
bad: 'mochajs/mocha#4727d357ea',
164164
bac: 'http://asdf.com/asdf.tar.gz',
165165
bae: 'file:../dyl',
166+
bcd: 'npm:vue@^3.0.0',
166167
'my-lib': 'https://bitbucket.org/user/my-lib.git#semver:^1.0.0'
167168
}
168169
})
@@ -182,6 +183,7 @@ test('api: extendPackage allow git, github, http, file version ranges', async ()
182183
bad: 'mochajs/mocha#4727d357ea',
183184
bac: 'http://asdf.com/asdf.tar.gz',
184185
bae: 'file:../dyl',
186+
bcd: 'npm:vue@^3.0.0',
185187
'my-lib': 'https://bitbucket.org/user/my-lib.git#semver:^1.0.0'
186188
}
187189
})

packages/@vue/cli/lib/util/mergeDeps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const isValidRange = range => {
1515
const isValidGitHub = range.match(/^[^/]+\/[^/]+/) != null
1616
const isValidURI =
1717
range.match(
18-
/^(?:file|git|git\+ssh|git\+http|git\+https|git\+file|https?):/
18+
/^(?:file|git|npm|git\+ssh|git\+http|git\+https|git\+file|https?):/
1919
) != null
2020

2121
return isValidSemver || isValidGitHub || isValidURI

0 commit comments

Comments
 (0)