Skip to content

Commit 11d17d9

Browse files
hamedbaatourhaoqunjiang
authored andcommittedJan 20, 2019
feat(ui): enforce package.json npm rules (#3232)
1 parent 108d801 commit 11d17d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/@vue/cli-ui/apollo-server/connectors/projects.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async function create (input, context) {
281281

282282
const inCurrent = input.folder === '.'
283283
const name = inCurrent ? path.relative('../', process.cwd()) : input.folder
284-
creator.name = name
284+
creator.name = name.toLowerCase()
285285

286286
// Answers
287287
const answers = prompts.getAnswers()

‎packages/@vue/cli-ui/src/util/folders.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function isValidName (name) {
2-
return !name.match(/[/@\s+%:]/) && encodeURIComponent(name) === name
2+
return !name.match(/[/@\s+%:]|^[_.]/) && encodeURIComponent(name) === name && name.length <= 214
33
}
44

55
export function isValidMultiName (name) {

0 commit comments

Comments
 (0)
Please sign in to comment.