Skip to content

Commit 2538dd8

Browse files
committed
chore: merge branch 'dev' into babel-upgrade
2 parents 6a1c71b + 528c465 commit 2538dd8

File tree

107 files changed

+193
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+193
-209
lines changed

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
# [3.0.5](https://github.com/vuejs/vue-cli/compare/v3.0.4...v3.0.5) (2018-10-09)
2+
3+
## babel-preset-app
4+
5+
#### Bug Fixes
6+
7+
* only enable helper aliasing when `useBuiltIns` equals `usage` ([da64938](https://github.com/vuejs/vue-cli/commit/da64938)), closes [#2637](https://github.com/vuejs/vue-cli/issues/2637)
8+
9+
## cli
10+
11+
#### Bug Fixes
12+
13+
* **preset:** plugin invoke order don't sort by unicode order ([#2656](https://github.com/vuejs/vue-cli/issues/2656)) ([f99796e](https://github.com/vuejs/vue-cli/commit/f99796e))
14+
15+
## cli-plugin-babel
16+
17+
#### Bug Fixes
18+
19+
* also look up loaders in local `node_modules` in case deps are not hoisted ([fed948a](https://github.com/vuejs/vue-cli/commit/fed948a)), closes [#2599](https://github.com/vuejs/vue-cli/issues/2599)
20+
* plugin sub `node_module` directory should have higher priority in `resolveLoader.modules` ([47a28e0](https://github.com/vuejs/vue-cli/commit/47a28e0))
21+
22+
## cli-plugin-e2e-cypress
23+
24+
#### Bug Fixes
25+
26+
* [@cypress](https://github.com/cypress)/webpack-preprocessor is both a peer dep and a dev dep ([6fd5e5d](https://github.com/vuejs/vue-cli/commit/6fd5e5d))
27+
* fix eslint errors when using airbnb config ([35e8d83](https://github.com/vuejs/vue-cli/commit/35e8d83)), closes [#2667](https://github.com/vuejs/vue-cli/issues/2667)
28+
29+
## cli-service
30+
31+
#### Bug Fixes
32+
33+
* build --target lib should merge externals in vue.config.js ([#2653](https://github.com/vuejs/vue-cli/issues/2653)) ([20dd09d](https://github.com/vuejs/vue-cli/commit/20dd09d)), closes [#2646](https://github.com/vuejs/vue-cli/issues/2646)
34+
* fix test issues for cypress GUI ([ab0503b](https://github.com/vuejs/vue-cli/commit/ab0503b))
35+
36+
## cli-service-global
37+
38+
#### Bug Fixes
39+
40+
* **cli-service-global:** fix eslint-loader config (close [#2654](https://github.com/vuejs/vue-cli/issues/2654)) ([#2655](https://github.com/vuejs/vue-cli/issues/2655)) ([2b104b4](https://github.com/vuejs/vue-cli/commit/2b104b4))
41+
42+
43+
144
# [3.0.4](https://github.com/vuejs/vue-cli/compare/v3.0.3...v3.0.4) (2018-09-25)
245

346
## cli

docs/guide/build-targets.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ App is the default build target. In this mode:
1313

1414
## Library
1515

16+
::: tip Note on IE Compatibility
17+
In lib mode, the public path is [dynamically determined](https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js) based on the URL from which the main js file is loaded (to enable dynamic assets loading). However, this feature requires `document.currentScript` support, which is missing in IE. So it's recommended to include the [current-script-polyfill](https://www.npmjs.com/package/current-script-polyfill) in the final web page before the library is imported, if IE support is a requirement.
18+
:::
19+
1620
::: tip Note on Vue Dependency
1721
In lib mode, Vue is *externalized*. This means the bundle will not bundle Vue even if your code imports Vue. If the lib is used via a bundler, it will attempt to load Vue as a dependency through the bundler; otherwise, it falls back to a global `Vue` variable.
1822
:::

docs/guide/html-and-static-assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
// modify its options:
5353
config.plugin('prefetch').tap(options => {
5454
options[0].fileBlacklist = options[0].fileBlacklist || []
55-
options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/])
55+
options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
5656
return options
5757
})
5858
}

docs/ru/guide/html-and-static-assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
// изменяем его настройки:
5353
config.plugin('prefetch').tap(options => {
5454
options[0].fileBlacklist = options[0].fileBlacklist || []
55-
options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/])
55+
options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
5656
return options
5757
})
5858
}

docs/zh/guide/build-targets.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,15 @@
1313

1414
##
1515

16+
::: tip 关于 IE 兼容性的提醒
17+
在库模式中,项目的 `publicPath` 是根据主文件的加载路径[动态设置]((https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-service/lib/commands/build/setPublicPath.js))的(用以支持动态的资源加载能力)。但是这个功能用到了 `document.currentScript`,而 IE 浏览器并不支持这一特性。所以如果网站需要支持 IE 的话,建议使用库之前先在页面上引入 [current-script-polyfill](https://www.npmjs.com/package/current-script-polyfill)
18+
:::
19+
1620
::: tip 注意对 Vue 的依赖
1721
在库模式中,Vue 是*外置的*。这意味着包中不会有 Vue,即便你在代码中导入了 Vue。如果这个库会通过一个打包器使用,它将尝试通过打包器以依赖的方式加载 Vue;否则就会回退到一个全局的 `Vue` 变量。
1822
:::
1923

24+
2025
你可以通过下面的命令将一个单独的入口构建为一个库:
2126

2227
```

docs/zh/guide/html-and-static-assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
// 修改它的选项:
5353
config.plugin('prefetch').tap(options => {
5454
options[0].fileBlacklist = options[0].fileBlacklist || []
55-
options[0].fileBlacklist.push([/myasyncRoute(.)+?\.js$/])
55+
options[0].fileBlacklist.push(/myasyncRoute(.)+?\.js$/)
5656
return options
5757
})
5858
}

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"lerna": "2.5.1",
33
"npmClient": "yarn",
44
"useWorkspaces": true,
5-
"version": "3.0.4"
5+
"version": "3.0.5"
66
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = (context, options = {}) => {
3939
const {
4040
polyfills: userPolyfills,
4141
loose = false,
42+
debug = false,
4243
useBuiltIns = 'usage',
4344
modules = false,
4445
targets: rawTargets,
@@ -101,6 +102,7 @@ module.exports = (context, options = {}) => {
101102
const envOptions = {
102103
spec,
103104
loose,
105+
debug,
104106
modules,
105107
targets,
106108
useBuiltIns,
@@ -135,6 +137,7 @@ module.exports = (context, options = {}) => {
135137
plugins.push([require('@babel/plugin-transform-runtime'), {
136138
regenerator: useBuiltIns !== 'usage',
137139
corejs: useBuiltIns !== false ? false : 2,
140+
helpers: useBuiltIns === 'usage',
138141
useESModules: !process.env.VUE_CLI_BABEL_TRANSPILE_MODULES
139142
}])
140143

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/babel-preset-app",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "babel-preset-app for vue-cli",
55
"main": "index.js",
66
"publishConfig": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-init",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "init addon for vue-cli",
55
"main": "index.js",
66
"publishConfig": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-overlay",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "error overlay & dev server middleware for vue-cli",
55
"main": "dist/client.js",
66
"files": [

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = (api, options) => {
55
const cliServicePath = require('path').dirname(require.resolve('@vue/cli-service'))
66

77
api.chainWebpack(webpackConfig => {
8-
webpackConfig.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
8+
webpackConfig.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
99

1010
const jsRule = webpackConfig.module
1111
.rule('js')

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-babel",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "babel plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -20,7 +20,7 @@
2020
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-babel#readme",
2121
"dependencies": {
2222
"@babel/core": "^7.0.0",
23-
"@vue/babel-preset-app": "^3.0.4",
23+
"@vue/babel-preset-app": "^3.0.5",
2424
"babel-loader": "^8.0.4"
2525
},
2626
"publishConfig": {
Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
jest.setTimeout(process.env.APPVEYOR ? 80000 : 60000)
1+
jest.setTimeout(process.env.APPVEYOR ? 120000 : 60000)
22

33
const create = require('@vue/cli-test-utils/createTestProject')
44

5-
// temporarily disabled on AppVeyor due to upstream issue
6-
// https://github.com/cypress-io/cypress/issues/1841
7-
if (!process.env.APPVEYOR) {
8-
test('should work', async () => {
9-
const project = await create('e2e-cypress', {
10-
plugins: {
11-
'@vue/cli-plugin-babel': {},
12-
'@vue/cli-plugin-e2e-cypress': {}
5+
test('should work', async () => {
6+
const project = await create('e2e-cypress', {
7+
plugins: {
8+
'@vue/cli-plugin-babel': {},
9+
'@vue/cli-plugin-e2e-cypress': {},
10+
'@vue/cli-plugin-eslint': {
11+
config: 'airbnb',
12+
lintOn: 'save'
1313
}
14-
})
14+
}
15+
})
16+
17+
const pkg = JSON.parse(await project.read('package.json'))
18+
expect(pkg.devDependencies).toHaveProperty('@cypress/webpack-preprocessor')
1519

16-
const config = JSON.parse(await project.read('cypress.json'))
17-
config.video = false
18-
await project.write('cypress.json', JSON.stringify(config))
20+
const config = JSON.parse(await project.read('cypress.json'))
21+
config.video = false
22+
await project.write('cypress.json', JSON.stringify(config))
1923

24+
if (!process.env.CI) {
25+
await project.run(`vue-cli-service test:e2e`)
26+
} else if (!process.env.APPVEYOR) {
2027
await project.run(`vue-cli-service test:e2e --headless`)
21-
})
22-
} else {
23-
test('should work', () => {
24-
// empty spec to avoid jest bailing
25-
})
26-
}
28+
}
29+
})

packages/@vue/cli-plugin-e2e-cypress/generator/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ module.exports = api => {
55
})
66

77
api.extendPackage({
8+
devDependencies: {
9+
'@cypress/webpack-preprocessor': '^3.0.0'
10+
},
811
scripts: {
912
'test:e2e': 'vue-cli-service test:e2e'
1013
}

packages/@vue/cli-plugin-e2e-cypress/generator/template/tests/e2e/plugins/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// https://docs.cypress.io/guides/guides/plugins-guide.html
2+
/* eslint-disable import/no-extraneous-dependencies, global-require */
23
const webpack = require('@cypress/webpack-preprocessor')
34

45
module.exports = (on, config) => {

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-e2e-cypress",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "e2e-cypress plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -23,8 +23,11 @@
2323
},
2424
"dependencies": {
2525
"@cypress/webpack-preprocessor": "^3.0.0",
26-
"@vue/cli-shared-utils": "^3.0.4",
26+
"@vue/cli-shared-utils": "^3.0.5",
2727
"cypress": "^3.1.0",
2828
"eslint-plugin-cypress": "^2.0.1"
29+
},
30+
"peerDependencies": {
31+
"@cypress/webpack-preprocessor": "^3.0.0"
2932
}
3033
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-e2e-nightwatch",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "e2e-nightwatch plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -22,7 +22,7 @@
2222
"access": "public"
2323
},
2424
"dependencies": {
25-
"@vue/cli-shared-utils": "^3.0.4",
25+
"@vue/cli-shared-utils": "^3.0.5",
2626
"chromedriver": "^2.42.1",
2727
"deepmerge": "^2.2.1",
2828
"execa": "^1.0.0",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ test('should work', async () => {
7979
// fix it
8080
setTimeout(() => {
8181
write('src/App.vue', app)
82-
}, process.env.CI ? 1000 : 200)
82+
}, process.env.CI ? 2000 : 200)
8383
} else if (data.match(/Compiled successfully/)) {
8484
// should compile on 2nd update
8585
expect(isFirstMsg).toBe(false)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => {
1616
if (config === 'airbnb') {
1717
eslintConfig.extends.push('@vue/airbnb')
1818
Object.assign(pkg.devDependencies, {
19-
'@vue/eslint-config-airbnb': '^3.0.4'
19+
'@vue/eslint-config-airbnb': '^3.0.5'
2020
})
2121
} else if (config === 'standard') {
2222
eslintConfig.extends.push('@vue/standard')
2323
Object.assign(pkg.devDependencies, {
24-
'@vue/eslint-config-standard': '^3.0.4'
24+
'@vue/eslint-config-standard': '^3.0.5'
2525
})
2626
} else if (config === 'prettier') {
2727
eslintConfig.extends.push('@vue/prettier')
2828
Object.assign(pkg.devDependencies, {
29-
'@vue/eslint-config-prettier': '^3.0.4'
29+
'@vue/eslint-config-prettier': '^3.0.5'
3030
})
3131
} else {
3232
// default
@@ -87,7 +87,7 @@ const applyTS = module.exports.applyTS = api => {
8787
}
8888
},
8989
devDependencies: {
90-
'@vue/eslint-config-typescript': '^3.0.4'
90+
'@vue/eslint-config-typescript': '^3.0.5'
9191
}
9292
})
9393
}

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

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

2626
api.chainWebpack(webpackConfig => {
27-
webpackConfig.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
27+
webpackConfig.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
2828

2929
webpackConfig.module
3030
.rule('eslint')

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-eslint",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "eslint plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -22,7 +22,7 @@
2222
"access": "public"
2323
},
2424
"dependencies": {
25-
"@vue/cli-shared-utils": "^3.0.4",
25+
"@vue/cli-shared-utils": "^3.0.5",
2626
"babel-eslint": "^10.0.1",
2727
"eslint": "^4.19.1",
2828
"eslint-loader": "^2.1.1",

packages/@vue/cli-plugin-pwa/generator/template/public/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
"short_name": "<%- rootOptions.projectName %>",
44
"icons": [
55
{
6-
"src": "/img/icons/android-chrome-192x192.png",
6+
"src": "./img/icons/android-chrome-192x192.png",
77
"sizes": "192x192",
88
"type": "image/png"
99
},
1010
{
11-
"src": "/img/icons/android-chrome-512x512.png",
11+
"src": "./img/icons/android-chrome-512x512.png",
1212
"sizes": "512x512",
1313
"type": "image/png"
1414
}
1515
],
16-
"start_url": "/index.html",
16+
"start_url": "./index.html",
1717
"display": "standalone",
1818
"background_color": "#000000",
1919
"theme_color": "#4DBA87"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-pwa",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"description": "pwa plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -22,7 +22,7 @@
2222
"access": "public"
2323
},
2424
"dependencies": {
25-
"@vue/cli-shared-utils": "^3.0.4",
25+
"@vue/cli-shared-utils": "^3.0.5",
2626
"workbox-webpack-plugin": "^3.6.2"
2727
},
2828
"devDependencies": {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = (api, options) => {
55
const useThreads = process.env.NODE_ENV === 'production' && options.parallel
66

77
api.chainWebpack(config => {
8-
config.resolveLoader.modules.add(path.join(__dirname, 'node_modules'))
8+
config.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
99

1010
if (!options.pages) {
1111
config.entry('app')

0 commit comments

Comments
 (0)