Skip to content

Commit a6c35cd

Browse files
committed
chore: merge branch 'dev'
2 parents c39eb72 + da84840 commit a6c35cd

File tree

13 files changed

+30
-31
lines changed

13 files changed

+30
-31
lines changed

.github/CONTRIBUTING.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Contributing to Vue CLI
2+
13
## Workflow
24

35
The Git workflow used in this project is largely inspired by [Gitflow workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow).
@@ -66,4 +68,4 @@ Note that `jest --onlyChanged` isn't always accurate because some tests spawn ch
6668

6769
### Plugin Development
6870

69-
See [dedicated section in docs](https://github.com/vuejs/vue-cli/blob/dev/docs/dev-guide/plugin-dev.md).
71+
See [dedicated section in docs](https://cli.vuejs.org/dev-guide/plugin-dev.html).

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vue-cli [![Build Status](https://circleci.com/gh/vuejs/vue-cli/tree/dev.svg?style=shield)](https://circleci.com/gh/vuejs/vue-cli/tree/dev) [![Windows Build status](https://ci.appveyor.com/api/projects/status/rkpafdpdwie9lqx0/branch/dev?svg=true)](https://ci.appveyor.com/project/yyx990803/vue-cli/branch/dev) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
1+
# Vue CLI [![Build Status](https://circleci.com/gh/vuejs/vue-cli/tree/dev.svg?style=shield)](https://circleci.com/gh/vuejs/vue-cli/tree/dev) [![Windows Build status](https://ci.appveyor.com/api/projects/status/rkpafdpdwie9lqx0/branch/dev?svg=true)](https://ci.appveyor.com/project/yyx990803/vue-cli/branch/dev) [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
22

33

44
> Vue CLI is the Standard Tooling for Vue.js Development.

docs/zh/guide/deployment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ now
281281

282282
你的站点会开始部署,你将获得一个形如 [https://vue.now-examples.now.sh/](https://vue.now-examples.now.sh/) 的链接。
283283

284-
开箱即用地,请求会被自动改写到 `index.html` (除了自定义的静态文件) 并带有合适的缓存请求头。你可以[改写](https://zeit.co/docs/v2/advanced/routes/)这些规则。
284+
开箱即用地,请求会被自动改写到 `index.html` (除了自定义的静态文件) 并带有合适的缓存请求头。
285285

286286
### Stdlib
287287

packages/@vue/cli-service-global/lib/globalConfigPlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ module.exports = function createConfigPlugin (context, entry, asLib) {
115115
},
116116
rules: {
117117
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
118-
'no-debugger': `process.env.NODE_ENV === 'production' ? 'error' : 'off'`
118+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
119119
}
120120
}
121121
}))

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { defaults } = require('../lib/options')
55
const assertPromptModule = require('@vue/cli-test-utils/assertPromptModule')
66

77
test('default', async () => {
8-
const epxectedPrompts = [
8+
const expectedPrompts = [
99
{
1010
message: 'pick a preset',
1111
choices: [
@@ -20,7 +20,7 @@ test('default', async () => {
2020
choose: 0
2121
}
2222
]
23-
await assertPromptModule([], epxectedPrompts, defaults.presets.default)
23+
await assertPromptModule([], expectedPrompts, defaults.presets.default)
2424
})
2525

2626
test('manual + PromptModuleAPI', async () => {

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

+3
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,9 @@ test('api: extendPackage + { prune: true }', async () => {
457457

458458
await generator.generate()
459459

460+
// should not warn about the null versions
461+
expect(logs.warn.length).toBe(0)
462+
460463
const pkg = JSON.parse(fs.readFileSync('/package.json', 'utf-8'))
461464
expect(pkg).toEqual({
462465
version: '0.0.0',

packages/@vue/cli/bin/vue.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55

66
const { chalk, semver } = require('@vue/cli-shared-utils')
77
const requiredVersion = require('../package.json').engines.node
8-
const didYouMean = require('didyoumean')
9-
10-
// Setting edit distance to 60% of the input string's length
11-
didYouMean.threshold = 0.6
8+
const leven = require('leven')
129

1310
function checkNodeVersion (wanted, id) {
1411
if (!semver.satisfies(process.version, wanted)) {
@@ -261,7 +258,15 @@ if (!process.argv.slice(2).length) {
261258
function suggestCommands (unknownCommand) {
262259
const availableCommands = program.commands.map(cmd => cmd._name)
263260

264-
const suggestion = didYouMean(unknownCommand, availableCommands)
261+
let suggestion
262+
263+
availableCommands.forEach(cmd => {
264+
const isBestMatch = leven(cmd, unknownCommand) < leven(suggestion || '', unknownCommand)
265+
if (leven(cmd, unknownCommand) < 3 && isBestMatch) {
266+
suggestion = cmd
267+
}
268+
})
269+
265270
if (suggestion) {
266271
console.log(` ` + chalk.red(`Did you mean ${chalk.yellow(suggestion)}?`))
267272
}

packages/@vue/cli/lib/promptModules/__tests__/e2e.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test('cypress', async () => {
1313
check: [0]
1414
},
1515
{
16-
message: 'Pick a E2E testing solution',
16+
message: 'Pick an E2E testing solution',
1717
choices: ['Cypress', 'Nightwatch'],
1818
choose: 0
1919
}
@@ -41,7 +41,7 @@ test('nightwatch', async () => {
4141
check: [0]
4242
},
4343
{
44-
message: 'Pick a E2E testing solution',
44+
message: 'Pick an E2E testing solution',
4545
choices: ['Cypress', 'Nightwatch'],
4646
choose: 1
4747
},

packages/@vue/cli/lib/promptModules/e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = cli => {
1414
name: 'e2e',
1515
when: answers => answers.features.includes('e2e'),
1616
type: 'list',
17-
message: 'Pick a E2E testing solution:',
17+
message: 'Pick an E2E testing solution:',
1818
choices: [
1919
{
2020
name: 'Cypress (Chrome only)',

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

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ module.exports = function mergeDeps (
4242

4343
if (prune && injectingRange == null) {
4444
delete result[depName]
45+
continue
4546
}
4647

4748
if (!isValidRange(injectingRange)) {

packages/@vue/cli/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"commander": "^2.20.0",
3434
"debug": "^4.1.0",
3535
"deepmerge": "^4.2.2",
36-
"didyoumean": "^1.2.1",
3736
"download-git-repo": "^1.0.2",
3837
"ejs": "^2.7.1",
3938
"envinfo": "^7.5.0",
@@ -45,6 +44,7 @@
4544
"javascript-stringify": "^1.6.0",
4645
"js-yaml": "^3.13.1",
4746
"jscodeshift": "^0.7.0",
47+
"leven": "^3.1.0",
4848
"lodash.clonedeep": "^4.5.0",
4949
"lru-cache": "^5.1.1",
5050
"minimist": "^1.2.0",
@@ -53,6 +53,7 @@
5353
"shortid": "^2.2.15",
5454
"slash": "^3.0.0",
5555
"validate-npm-package-name": "^3.0.0",
56+
"vue": "^2.6.11",
5657
"vue-jscodeshift-adapter": "^2.0.2",
5758
"yaml-front-matter": "^3.4.1"
5859
},

scripts/release.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const release = async () => {
9595
}
9696
}
9797

98-
let distTag = 'latest'
98+
let distTag = cliOptions['dist-tag'] || 'latest'
9999
if (bump === 'prerelease' || semver.prerelease(version)) {
100100
distTag = 'next'
101101
}

yarn.lock

+2-15
Original file line numberDiff line numberDiff line change
@@ -2529,7 +2529,7 @@
25292529
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
25302530
integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==
25312531

2532-
"@types/mocha@^5.2.4", "@types/mocha@^5.2.6":
2532+
"@types/mocha@^5.2.6":
25332533
version "5.2.7"
25342534
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea"
25352535
integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==
@@ -2798,14 +2798,6 @@
27982798
resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.1.tgz#18723530d304f443021da2292d6ec9502826104a"
27992799
integrity sha512-8VCoJeeH8tCkzhkpfOkt+abALQkS11OIHhte5MBzYaKMTqK0A3ZAKEUVAffsOklhEv7t0yrQt696Opnu9oAx+w==
28002800

2801-
2802-
version "1.0.0-beta.29"
2803-
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.29.tgz#c942cf25e891cf081b6a03332b4ae1ef430726f0"
2804-
integrity sha512-yX4sxEIHh4M9yAbLA/ikpEnGKMNBCnoX98xE1RwxfhQVcn0MaXNSj1Qmac+ZydTj6VBSEVukchBogXBTwc+9iA==
2805-
dependencies:
2806-
dom-event-types "^1.0.0"
2807-
lodash "^4.17.4"
2808-
28092801
28102802
version "1.0.0-beta.31"
28112803
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz#580d6e45f07452e497d69807d80986e713949b73"
@@ -5161,7 +5153,7 @@ chrome-trace-event@^1.0.2:
51615153
dependencies:
51625154
tslib "^1.9.0"
51635155

5164-
chromedriver@80, chromedriver@^80.0.0:
5156+
chromedriver@^80.0.0:
51655157
version "80.0.0"
51665158
resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-80.0.0.tgz#f9e2af4c2117e7e07dc4558cf9496a70ad6c3ddc"
51675159
integrity sha512-W4tIbaOve7HeGFLnbbZMV4AUlnBaapL+H41fvDFKOXCmUvgPhxVN9y/c3EgmsOcokLQkqxpOC/txEujms1eT0w==
@@ -6778,11 +6770,6 @@ [email protected]:
67786770
dependencies:
67796771
streamsearch "0.1.2"
67806772

6781-
didyoumean@^1.2.1:
6782-
version "1.2.1"
6783-
resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.1.tgz#e92edfdada6537d484d73c0172fd1eba0c4976ff"
6784-
integrity sha1-6S7f2tplN9SE1zwBcv0eugxJdv8=
6785-
67866773
diff-sequences@^24.9.0:
67876774
version "24.9.0"
67886775
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5"

0 commit comments

Comments
 (0)