Skip to content

Commit d7c8930

Browse files
committed
chore: merge branch 'dev' into docs [ci skip]
2 parents fbc25fc + c9aaa2f commit d7c8930

File tree

30 files changed

+973
-496
lines changed

30 files changed

+973
-496
lines changed

.circleci/config.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ jobs:
1818
- checkout
1919
- restore_cache:
2020
keys:
21-
- v1-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
22-
- v1-vue-cli-{{ .Branch }}-
23-
- v1-vue-cli
21+
- v2-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
2422
- run: yarn --network-timeout 600000
2523
- save_cache:
26-
key: v1-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
24+
key: v2-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
2725
paths:
2826
- node_modules/
2927
- ~/.cache
@@ -61,7 +59,8 @@ jobs:
6159
steps:
6260
- attach_workspace:
6361
at: ~/
64-
- run: yarn test -p unit-mocha,unit-jest,e2e-nightwatch,e2e-cypress
62+
- run: yarn test -p unit-mocha,unit-jest,e2e-cypress
63+
# e2e-nightwatch was left out due to some unknown issues with selenium and the CI image
6564
- run: yarn test tsPluginE2e
6665

6766
cli-ui:

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@
4646
"@vue/conventional-changelog": "^0.1.1",
4747
"babel-core": "7.0.0-bridge.0",
4848
"babel-eslint": "^10.0.1",
49-
"conventional-changelog": "^1.1.24",
50-
"debug": "^3.1.0",
49+
"conventional-changelog": "^3.0.5",
50+
"debug": "^4.1.0",
5151
"eslint": "^5.0.0",
52-
"eslint-plugin-graphql": "^2.1.1",
53-
"eslint-plugin-node": "^6.0.1",
52+
"eslint-plugin-graphql": "^3.0.1",
53+
"eslint-plugin-node": "^8.0.0",
5454
"eslint-plugin-vue": "^5.0.0",
55-
"eslint-plugin-vue-libs": "^2.1.0",
55+
"eslint-plugin-vue-libs": "^3.0.0",
5656
"execa": "^1.0.0",
5757
"globby": "^8.0.1",
5858
"http-server": "^0.11.1",
5959
"inquirer": "^6.0.0",
6060
"jest": "^23.1.0",
6161
"lerna": "^3.4.3",
62-
"lint-staged": "^7.2.2",
62+
"lint-staged": "^8.1.0",
6363
"memfs": "^2.8.0",
6464
"minimist": "^1.2.0",
6565
"puppeteer": "^1.0.0",
@@ -76,8 +76,8 @@
7676
"@babel/preset-env": "^7.0.0",
7777
"babel-core": "7.0.0-bridge.0",
7878
"ps-tree": "^1.1.1",
79-
"vue": "2.5.17",
80-
"vue-template-compiler": "2.5.17",
81-
"vue-server-renderer": "2.5.17"
79+
"vue": "2.5.21",
80+
"vue-template-compiler": "2.5.21",
81+
"vue-server-renderer": "2.5.21"
8282
}
8383
}

packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test('polyfill detection', () => {
1414
targets: { node: 'current' }
1515
}]]
1616
})
17-
// default includes
17+
// default i ncludes
1818
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
1919
// usage-based detection
2020
expect(code).not.toMatch(`import "core-js/modules/es6.map"`)
@@ -32,7 +32,7 @@ test('polyfill detection', () => {
3232
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
3333
expect(code).toMatch(`import "core-js/modules/es6.array.iterator"`)
3434
// usage-based detection
35-
expect(code).toMatch(`import "core-js/modules/es6.map"`)
35+
expect(code).toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
3636
})
3737

3838
test('modern mode always skips polyfills', () => {
@@ -49,7 +49,7 @@ test('modern mode always skips polyfills', () => {
4949
// default includes
5050
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
5151
// usage-based detection
52-
expect(code).not.toMatch(`import "core-js/modules/es6.map"`)
52+
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
5353

5454
;({ code } = babel.transformSync(`
5555
const a = new Map()
@@ -63,7 +63,7 @@ test('modern mode always skips polyfills', () => {
6363
// default includes
6464
expect(code).not.toMatch(`import "core-js/modules/es6.promise"`)
6565
// usage-based detection
66-
expect(code).not.toMatch(`import "core-js/modules/es6.map"`)
66+
expect(code).not.toMatch(/import _Map from ".*runtime-corejs2\/core-js\/map"/)
6767
delete process.env.VUE_CLI_MODERN_BUILD
6868
})
6969

@@ -92,7 +92,7 @@ test('async/await', () => {
9292
// should use regenerator runtime
9393
expect(code).toMatch(`import "regenerator-runtime/runtime"`)
9494
// should use required helper instead of inline
95-
expect(code).toMatch(/@babel.*runtime\/helpers\/.*asyncToGenerator/)
95+
expect(code).toMatch(/import _asyncToGenerator from ".*runtime-corejs2\/helpers\/esm\/asyncToGenerator\"/)
9696
})
9797

9898
test('jsx', () => {

packages/@vue/babel-preset-app/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ module.exports = (context, options = {}) => {
142142
// transform runtime, but only for helpers
143143
plugins.push([require('@babel/plugin-transform-runtime'), {
144144
regenerator: useBuiltIns !== 'usage',
145-
corejs: useBuiltIns !== false ? false : 2,
145+
// use @babel/runtime-corejs2 so that helpers that need polyfillable APIs will reference core-js instead.
146+
// if useBuiltIns is not set to 'usage', then it means users would take care of the polyfills on their own,
147+
// i.e., core-js 2 is no longer needed.
148+
corejs: (useBuiltIns === 'usage' && !process.env.VUE_CLI_MODERN_BUILD) ? 2 : false,
146149
helpers: useBuiltIns === 'usage',
147150
useESModules: !process.env.VUE_CLI_BABEL_TRANSPILE_MODULES,
148151
absoluteRuntime: path.dirname(require.resolve('@babel/runtime/package.json'))

packages/@vue/babel-preset-app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
"@babel/plugin-transform-runtime": "^7.0.0",
2929
"@babel/preset-env": "^7.0.0",
3030
"@babel/runtime": "^7.0.0",
31+
"@babel/runtime-corejs2": "^7.2.0",
3132
"babel-helper-vue-jsx-merge-props": "^2.0.3",
3233
"babel-plugin-dynamic-import-node": "^2.2.0",
3334
"babel-plugin-transform-vue-jsx": "^4.0.1",
34-
"core-js": "^2.5.7"
35+
"core-js": "^2.6.0"
3536
}
3637
}

packages/@vue/cli-plugin-e2e-cypress/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@vue/cli-shared-utils": "^3.2.0",
26-
"cypress": "^3.1.2",
27-
"eslint-plugin-cypress": "^2.1.2"
26+
"cypress": "^3.1.3",
27+
"eslint-plugin-cypress": "^2.1.3"
2828
}
2929
}

packages/@vue/cli-plugin-e2e-nightwatch/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
},
2424
"dependencies": {
2525
"@vue/cli-shared-utils": "^3.2.0",
26-
"chromedriver": "^2.44.0",
27-
"deepmerge": "^2.2.1",
26+
"chromedriver": "^2.45.0",
27+
"deepmerge": "^3.0.0",
2828
"execa": "^1.0.0",
2929
"nightwatch": "^0.9.21",
3030
"selenium-server": "^3.141.59"

packages/@vue/cli-plugin-eslint/__tests__/eslintPlugin.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,22 @@ test('should not fix with --no-fix option', async () => {
120120
// files should not have been fixed
121121
expect(await read('src/main.js')).not.toMatch(';')
122122
})
123+
124+
// #3167
125+
test('should not throw when src folder is ignored by .eslintignore', async () => {
126+
const project = await create('eslint-ignore', {
127+
plugins: {
128+
'@vue/cli-plugin-babel': {},
129+
'@vue/cli-plugin-eslint': {
130+
config: 'airbnb',
131+
lintOn: 'commit'
132+
}
133+
}
134+
})
135+
136+
const { write, run } = project
137+
await write('.eslintignore', 'src\n')
138+
139+
// should not throw
140+
await run('vue-cli-service lint')
141+
})

packages/@vue/cli-plugin-eslint/generator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => {
5454
} else if (config === 'prettier') {
5555
eslintConfig.extends.push('@vue/prettier')
5656
Object.assign(pkg.devDependencies, {
57-
'@vue/eslint-config-prettier': '^4.0.0'
57+
'@vue/eslint-config-prettier': '^4.0.1'
5858
})
5959
// prettier & default config do not have any style rules
6060
// so no need to generate an editorconfig file
@@ -71,7 +71,7 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => {
7171

7272
if (lintOn.includes('commit')) {
7373
Object.assign(pkg.devDependencies, {
74-
'lint-staged': '^7.2.2'
74+
'lint-staged': '^8.1.0'
7575
})
7676
pkg.gitHooks = {
7777
'pre-commit': 'lint-staged'

packages/@vue/cli-plugin-eslint/lint.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,27 @@ module.exports = function lint (args = {}, api) {
3131
cwd
3232
}, argsConfig)
3333

34+
const engine = new CLIEngine(config)
35+
36+
// .eslintrc.js files (ignored by default)
37+
const dotFiles = [
38+
'.*.js',
39+
'{src,tests}/**/.*.js'
40+
].filter(pattern => globby.sync(path.join(cwd, pattern)).length)
41+
3442
const defaultFilesToLint = [
3543
'src',
3644
'tests',
3745
// root config files
38-
'*.js',
39-
// .eslintrc files (ignored by default)
40-
'.*.js',
41-
'{src,tests}/**/.*.js'
42-
].filter(pattern => globby.sync(path.join(cwd, pattern)).length)
46+
'*.js'
47+
]
48+
.filter(pattern =>
49+
globby
50+
.sync(path.join(cwd, pattern))
51+
.some(p => !engine.isPathIgnored(p))
52+
)
53+
.concat(dotFiles)
4354

44-
const engine = new CLIEngine(config)
4555
const files = args._ && args._.length
4656
? args._
4757
: defaultFilesToLint

packages/@vue/cli-plugin-typescript/__tests__/tsPluginE2e.spec.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ if (!process.env.APPVEYOR) {
2121
})
2222
}
2323

24-
test('nightwatch', async () => {
25-
const project = await create('ts-e2e-nightwatch', {
26-
plugins: {
27-
'@vue/cli-plugin-typescript': {},
28-
'@vue/cli-plugin-e2e-nightwatch': {}
29-
}
24+
if (!process.env.CIRCLECI) {
25+
test('nightwatch', async () => {
26+
const project = await create('ts-e2e-nightwatch', {
27+
plugins: {
28+
'@vue/cli-plugin-typescript': {},
29+
'@vue/cli-plugin-e2e-nightwatch': {}
30+
}
31+
})
32+
await project.run(`vue-cli-service test:e2e`)
3033
})
31-
await project.run(`vue-cli-service test:e2e`)
32-
})
34+
}

packages/@vue/cli-plugin-typescript/generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = (api, {
4040
if (lintOn.includes('commit')) {
4141
api.extendPackage({
4242
devDependencies: {
43-
'lint-staged': '^7.2.2'
43+
'lint-staged': '^8.1.0'
4444
},
4545
gitHooks: {
4646
'pre-commit': 'lint-staged'

packages/@vue/cli-plugin-typescript/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module.exports = (api, options) => {
8080

8181
if (!api.hasPlugin('eslint')) {
8282
api.registerCommand('lint', {
83-
descriptions: 'lint source files with TSLint',
83+
description: 'lint source files with TSLint',
8484
usage: 'vue-cli-service lint [options] [...files]',
8585
options: {
8686
'--format [formatter]': 'specify formatter (default: codeFrame)',

packages/@vue/cli-plugin-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"@types/webpack-env": "^1.13.6",
2626
"@vue/cli-shared-utils": "^3.2.0",
27-
"fork-ts-checker-webpack-plugin": "^0.5.0",
27+
"fork-ts-checker-webpack-plugin": "^0.5.2",
2828
"globby": "^8.0.1",
2929
"ts-loader": "^5.3.1",
3030
"tslint": "^5.11.0"

packages/@vue/cli-plugin-unit-jest/generator/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ const applyTS = module.exports.applyTS = (api, invoking) => {
8888
})
8989
if (api.hasPlugin('babel')) {
9090
api.extendPackage({
91+
jest: {
92+
global: {
93+
'ts-jest': {
94+
// we need babel to transpile JSX
95+
babelConfig: true
96+
}
97+
}
98+
},
9199
devDependencies: {
92100
// this is for now necessary to force ts-jest and vue-jest to use babel 7
93101
'babel-core': '7.0.0-bridge.0'

packages/@vue/cli-plugin-unit-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"jest": "^23.6.0",
2929
"jest-serializer-vue": "^2.0.2",
3030
"jest-transform-stub": "^1.0.0",
31-
"vue-jest": "^3.0.1"
31+
"vue-jest": "^3.0.2"
3232
},
3333
"devDependencies": {
3434
"@vue/test-utils": "^1.0.0-beta.20",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('jsdom-global')(undefined, { pretendToBeVisual: true })
1+
require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://localhost' })

packages/@vue/cli-service-global/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"babel-eslint": "^10.0.1",
2929
"chalk": "^2.4.1",
3030
"resolve": "^1.8.1",
31-
"vue": "^2.5.17",
32-
"vue-template-compiler": "^2.5.17"
31+
"vue": "^2.5.21",
32+
"vue-template-compiler": "^2.5.21"
3333
}
3434
}

packages/@vue/cli-service/generator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ module.exports = (api, options) => {
99
'build': 'vue-cli-service build'
1010
},
1111
dependencies: {
12-
'vue': '^2.5.17'
12+
'vue': '^2.5.21'
1313
},
1414
devDependencies: {
15-
'vue-template-compiler': '^2.5.17'
15+
'vue-template-compiler': '^2.5.21'
1616
},
1717
'postcss': {
1818
'plugins': {

packages/@vue/cli-service/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
"lodash.defaultsdeep": "^4.6.0",
5151
"lodash.mapvalues": "^4.6.0",
5252
"lodash.transform": "^4.6.0",
53-
"mini-css-extract-plugin": "^0.4.5",
53+
"mini-css-extract-plugin": "^0.5.0",
5454
"minimist": "^1.2.0",
5555
"ora": "^3.0.0",
56-
"portfinder": "^1.0.19",
56+
"portfinder": "^1.0.20",
5757
"postcss-loader": "^3.0.0",
5858
"read-pkg": "^4.0.1",
5959
"semver": "^5.6.0",
@@ -65,20 +65,20 @@
6565
"thread-loader": "^1.2.0",
6666
"url-loader": "^1.1.2",
6767
"vue-loader": "^15.4.2",
68-
"webpack": "^4.26.1",
68+
"webpack": "4",
6969
"webpack-bundle-analyzer": "^3.0.3",
7070
"webpack-chain": "^4.11.0",
7171
"webpack-dev-server": "^3.1.10",
72-
"webpack-merge": "^4.1.4",
72+
"webpack-merge": "^4.1.5",
7373
"yorkie": "^2.0.0"
7474
},
7575
"peerDependencies": {
7676
"vue-template-compiler": "^2.0.0"
7777
},
7878
"devDependencies": {
79-
"vue": "^2.5.17",
79+
"vue": "^2.5.21",
8080
"vue-router": "^3.0.1",
81-
"vue-template-compiler": "^2.5.17",
81+
"vue-template-compiler": "^2.5.21",
8282
"vuex": "^3.0.1"
8383
},
8484
"publishConfig": {

packages/@vue/cli-shared-utils/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
"dependencies": {
2222
"chalk": "^2.4.1",
2323
"execa": "^1.0.0",
24-
"joi": "^13.0.0",
24+
"joi": "^14.3.0",
2525
"launch-editor": "^2.2.1",
26-
"lru-cache": "^4.1.3",
26+
"lru-cache": "^5.1.1",
2727
"node-ipc": "^9.1.1",
2828
"opn": "^5.3.0",
29-
"ora": "^2.1.0",
29+
"ora": "^3.0.0",
3030
"request": "^2.87.0",
3131
"request-promise-native": "^1.0.5",
3232
"semver": "^5.5.0",

packages/@vue/cli-test-utils/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
},
2323
"dependencies": {
2424
"execa": "^1.0.0",
25-
"json-server": "^0.12.2",
25+
"fs-extra": "^7.0.1",
26+
"json-server": "^0.14.0",
2627
"puppeteer": "^1.0.0",
27-
"strip-ansi": "^3.0.0"
28+
"strip-ansi": "^5.0.0"
2829
}
2930
}

0 commit comments

Comments
 (0)