Skip to content

Commit

Permalink
chore: merge branch 'dev' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sodatea committed Feb 7, 2020
2 parents 7f2140a + 807382c commit d7acff5
Show file tree
Hide file tree
Showing 134 changed files with 4,119 additions and 2,651 deletions.
13 changes: 11 additions & 2 deletions .circleci/config.yml
Expand Up @@ -18,10 +18,10 @@ jobs:
- checkout
- restore_cache:
keys:
- v2-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v2-vue-cli-{{ checksum "yarn.lock" }}
- run: yarn --network-timeout 600000
- save_cache:
key: v2-vue-cli-{{ .Branch }}-{{ checksum "yarn.lock" }}
key: v2-vue-cli-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- ~/.cache
Expand Down Expand Up @@ -52,7 +52,16 @@ jobs:
at: ~/
- run: yarn lint-without-fix
- run: yarn check-links
- restore_cache:
keys:
# TODO: should use a more accurate cache key
- v2-vue-cli-offline-{{ checksum "yarn.lock" }}
- run: yarn config set yarn-offline-mirror ~/npm-packages-offline-cache
- run: yarn test -p cli-service-global,eslint,pwa,babel,babel-preset-app,vuex,router
- save_cache:
key: v2-vue-cli-offline-{{ checksum "yarn.lock" }}
paths:
- ~/npm-packages-offline-cache

group-4:
<<: *defaults
Expand Down
87 changes: 87 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,91 @@

## 4.2.0 (2020-02-07)

#### :rocket: New Features
* `@vue/cli-plugin-babel`, `@vue/cli-plugin-eslint`, `@vue/cli-plugin-typescript`, `@vue/cli`
* [#5149](https://github.com/vuejs/vue-cli/pull/5149) feat(GeneratorAPI): allow passing options to `api.extendPackage` ([@sodatea](https://github.com/sodatea))
* `@vue/cli-plugin-unit-jest`, `@vue/cli-plugin-unit-mocha`
* [#5147](https://github.com/vuejs/vue-cli/pull/5147) feat: create projects with @vue/test-utils beta 31 ([@sodatea](https://github.com/sodatea))
* `@vue/cli-ui`, `@vue/cli`
* [#5134](https://github.com/vuejs/vue-cli/pull/5134) feat: lock minor versions when creating projects / adding plugins ([@sodatea](https://github.com/sodatea))
* `@vue/cli-plugin-typescript`, `@vue/cli-ui`
* [#5128](https://github.com/vuejs/vue-cli/pull/5128) feat: upgrade to typescript@~3.7.5 ([@sodatea](https://github.com/sodatea))
* `@vue/cli`
* [#5091](https://github.com/vuejs/vue-cli/pull/5091) feat: `vue upgrade` monorepo support, `--from` option, and a new `vue migrate --from` command ([@sodatea](https://github.com/sodatea))
* [#4828](https://github.com/vuejs/vue-cli/pull/4828) feat: add option `--merge` to `create` command ([@zyy7259](https://github.com/zyy7259))
* `@vue/cli-service`
* [#4953](https://github.com/vuejs/vue-cli/pull/4953) feat: adds transparent PnP support to Webpack ([@arcanis](https://github.com/arcanis))
* [#2411](https://github.com/vuejs/vue-cli/pull/2411) feat(cli): add `--stdin` flag to serve ([@nullpilot](https://github.com/nullpilot))
* `@vue/babel-preset-app`, `@vue/cli-plugin-e2e-nightwatch`, `@vue/cli-plugin-eslint`, `@vue/cli-plugin-pwa`, `@vue/cli-ui-addon-webpack`, `@vue/cli-ui-addon-widgets`, `@vue/cli-ui`, `@vue/cli`
* [#4933](https://github.com/vuejs/vue-cli/pull/4933) feat: upgrade to eslint 6 ([@sodatea](https://github.com/sodatea))
* `@vue/cli-service`, `@vue/cli-shared-utils`, `@vue/cli`
* [#4827](https://github.com/vuejs/vue-cli/pull/4827) feat: respect existing package.json ([@zyy7259](https://github.com/zyy7259))
* `@vue/babel-preset-app`
* [#4959](https://github.com/vuejs/vue-cli/pull/4959) feat: specify babel runtime version ([@zyy7259](https://github.com/zyy7259))
* `@vue/cli-service-global`
* [#5029](https://github.com/vuejs/vue-cli/pull/5029) feat: don't throw on console/debugger statements for `vue serve` ([@sodatea](https://github.com/sodatea))

#### :bug: Bug Fix
* `@vue/cli-shared-utils`, `@vue/cli`
* [#5150](https://github.com/vuejs/vue-cli/pull/5150) fix: should infer package manager from config if there's no lockfile in the project ([@sodatea](https://github.com/sodatea))
* [#5045](https://github.com/vuejs/vue-cli/pull/5045) refactor: use a plain http request to get package metadata ([@sodatea](https://github.com/sodatea))
* `@vue/cli`
* [#5062](https://github.com/vuejs/vue-cli/pull/5062) fix `afterInvoke`/`onCreateComplete` callbacks in Migrator ([@sodatea](https://github.com/sodatea))
* [#5038](https://github.com/vuejs/vue-cli/pull/5038) fix: `extendPackage` dependency versions should be string ([@pksunkara](https://github.com/pksunkara))
* `@vue/cli-ui`, `@vue/cli`
* [#4985](https://github.com/vuejs/vue-cli/pull/4985) fix(CORS): only allow connections from the designated host ([@Akryum](https://github.com/Akryum))
* [#5142](https://github.com/vuejs/vue-cli/pull/5142) fix(CORS): fixup #4985, allow same-origin ws requests of any domain ([@sodatea](https://github.com/sodatea))
* `@vue/cli-plugin-e2e-cypress`
* [#5108](https://github.com/vuejs/vue-cli/pull/5108) fix(e2e-cypress): make `--headless` work with `--browser chrome` ([@LinusBorg](https://github.com/LinusBorg))
* [#4910](https://github.com/vuejs/vue-cli/pull/4910) fix: comment eslint disable in cypress config ([@cexbrayat](https://github.com/cexbrayat))
* `@vue/cli-service`
* [#5113](https://github.com/vuejs/vue-cli/pull/5113) fix: correctly calculate cacheIdentifier from lockfiles ([@sodatea](https://github.com/sodatea))
* `@vue/cli-plugin-pwa`
* [#5089](https://github.com/vuejs/vue-cli/pull/5089) fix: pwa-plugin avoid generating manifest when path is an URL ([@tkint](https://github.com/tkint))
* `@vue/cli-plugin-unit-jest`, `@vue/cli-plugin-unit-mocha`
* [#5028](https://github.com/vuejs/vue-cli/pull/5028) fix applyESLint when eslint plugin is added after unit test plugins ([@sodatea](https://github.com/sodatea))
* `@vue/cli-service`, `@vue/cli-test-utils`
* [#5069](https://github.com/vuejs/vue-cli/pull/5069) Use a single websocket connection for HMR ([@lbogdan](https://github.com/lbogdan))
* `@vue/cli-plugin-e2e-nightwatch`
* [#5016](https://github.com/vuejs/vue-cli/pull/5016) fix(e2e-nightwatch): check for correct flag name ([@LinusBorg](https://github.com/LinusBorg))

#### :memo: Documentation
* [#5019](https://github.com/vuejs/vue-cli/pull/5019) Updated zh-cn translation in cli section ([@mactanxin](https://github.com/mactanxin))

#### :house: Internal
* `@vue/babel-preset-app`, `@vue/cli-plugin-babel`
* [#5133](https://github.com/vuejs/vue-cli/pull/5133) refactor: remove usage of deprecated babel functions, preparing for babel 8 ([@sodatea](https://github.com/sodatea))
* `@vue/cli-service`
* [#5123](https://github.com/vuejs/vue-cli/pull/5123) fix: `vue-template-compiler` can be optional if `@vue/compiler-sfc` presents ([@sodatea](https://github.com/sodatea))
* [#5060](https://github.com/vuejs/vue-cli/pull/5060) refactor: use the `title` option in the html template, instead of hard-code the project name ([@sodatea](https://github.com/sodatea))
* `@vue/cli`
* [#5110](https://github.com/vuejs/vue-cli/pull/5110) refactor: use env variables to set registry for package managers ([@sodatea](https://github.com/sodatea))
* `@vue/cli-shared-utils`
* [#5092](https://github.com/vuejs/vue-cli/pull/5092) refactor: use `createRequire` to load/resolve modules ([@sodatea](https://github.com/sodatea))
* `@vue/cli-plugin-router`, `@vue/cli-plugin-typescript`, `@vue/cli-service`
* [#4991](https://github.com/vuejs/vue-cli/pull/4991) 🎨 style: unified components' naming style ([@taoweicn](https://github.com/taoweicn))

#### Committers: 17
- Alexander Sokolov ([@Alex-Sokolov](https://github.com/Alex-Sokolov))
- Bogdan Luca ([@lbogdan](https://github.com/lbogdan))
- Cédric Exbrayat ([@cexbrayat](https://github.com/cexbrayat))
- Dan Hogan ([@danhogan](https://github.com/danhogan))
- Daniel Bächtold ([@danbaechtold](https://github.com/danbaechtold))
- Eduardo San Martin Morote ([@posva](https://github.com/posva))
- Guillaume Chau ([@Akryum](https://github.com/Akryum))
- Haoqun Jiang ([@sodatea](https://github.com/sodatea))
- Marcel Lindig ([@nullpilot](https://github.com/nullpilot))
- Maël Nison ([@arcanis](https://github.com/arcanis))
- Pavan Kumar Sunkara ([@pksunkara](https://github.com/pksunkara))
- Tao Wei ([@taoweicn](https://github.com/taoweicn))
- Thomas Kint ([@tkint](https://github.com/tkint))
- Thorsten Lünborg ([@LinusBorg](https://github.com/LinusBorg))
- Xin Tan ([@mactanxin](https://github.com/mactanxin))
- Yingya Zhang ([@zyy7259](https://github.com/zyy7259))
- plantainX ([@cheqianxiao](https://github.com/cheqianxiao))



## 4.1.2 (2019-12-28)

#### :bug: Bug Fix
Expand Down
5 changes: 4 additions & 1 deletion appveyor.yml
Expand Up @@ -10,12 +10,15 @@ test_script:
- git --version
- node --version
- yarn --version
- yarn config set yarn-offline-mirror ./npm-packages-offline-cache
- yarn test
# ui tests temporarily disabled due to Cypress 3.0 issue on windows
# - cd "packages/@vue/cli-ui" && yarn test

cache:
- node_modules -> yarn.lock
- node_modules -> appveyor.yml, **\package.json, yarn.lock
- '%LOCALAPPDATA%\Yarn -> appveyor.yml, **\package.json, yarn.lock'
- npm-packages-offline-cache -> appveyor.yml, **\package.json, yarn.lock

build: off

Expand Down
2 changes: 1 addition & 1 deletion docs/core-plugins/pwa.md
Expand Up @@ -69,7 +69,7 @@ file, or the `"vue"` field in `package.json`.

- Default: `'manifest.json'`

The path of app’s manifest.
The path of app’s manifest. If the path is an URL, the plugin won't generate a manifest.json in the dist directory during the build.

- **pwa.manifestOptions**

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/config/README.md
Expand Up @@ -147,7 +147,7 @@ module.exports = {

Для отображения ошибок линтинга в браузере можно указать `lintOnSave: 'default'`. Это заставит `eslint-loader` генерировать ошибки и любые ошибки линтинга приведут к неудаче компиляции сборки.

Установка значения в `'errors'` заставит `eslint-loader` считать все предупреждения ошибками, а значит и они будут отображены в браузере.
Установка значения в `'error'` заставит `eslint-loader` считать все предупреждения ошибками, а значит и они будут отображены в браузере.

Кроме того, можно настроить отображение в браузере предупреждений и ошибок:

Expand Down
12 changes: 12 additions & 0 deletions docs/ru/core-plugins/pwa.md
Expand Up @@ -26,6 +26,11 @@

Настройки, передаваемые в используемый `workbox-webpack-plugin`.

При использовании шаблона App Shell в режиме `GenerateSW` можно настроить точку входа таким образом, чтобы убедиться, что все страницы загружаются в оффлайне:
```js
navigateFallback: 'index.html'
```

Для получения дополнительной информации о поддерживаемых значениях обратитесь к руководству для [`GenerateSW`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_generatesw_config) или для [`InjectManifest`](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin#full_injectmanifest_config).

- **pwa.name**
Expand Down Expand Up @@ -106,6 +111,13 @@ module.exports = {
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',

// настройки манифеста
manifestOptions: {
display: 'landscape',
background_color: '#42B883'
// ...другие настройки манифеста...
},

// настройка workbox-плагина
workboxPluginMode: 'InjectManifest',
workboxOptions: {
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,7 +1,7 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"version": "4.1.2",
"version": "4.2.0",
"packages": [
"packages/@vue/babel-preset-app",
"packages/@vue/cli*",
Expand Down
45 changes: 25 additions & 20 deletions package.json
Expand Up @@ -44,50 +44,55 @@
]
},
"devDependencies": {
"@babel/core": "^7.7.4",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/eslint-config-prettier": "^5.0.0",
"@vue/eslint-config-standard": "^4.0.0",
"@vue/eslint-config-typescript": "^4.0.0",
"@vuepress/plugin-pwa": "^1.2.0",
"@vuepress/theme-vue": "^1.2.0",
"@babel/core": "^7.8.4",
"@vue/eslint-config-airbnb": "^5.0.2",
"@vue/eslint-config-prettier": "^6.0.0",
"@vue/eslint-config-standard": "^5.1.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vuepress/plugin-pwa": "^1.3.0",
"@vuepress/theme-vue": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^24.9.0",
"chromedriver": "^78.0.1",
"chromedriver": "^80.0.0",
"debug": "^4.1.0",
"eslint": "^5.16.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-graphql": "^3.1.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.2.2",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"eslint-plugin-vue-libs": "^4.0.0",
"execa": "^1.0.0",
"geckodriver": "^1.19.1",
"globby": "^9.2.0",
"graphql": "^14.3.1",
"http-server": "^0.11.1",
"graphql": "^14.6.0",
"http-server": "^0.12.1",
"inquirer": "^6.3.1",
"jest": "^24.9.0",
"lerna": "^3.19.0",
"lerna-changelog": "^0.8.3",
"lint-staged": "^9.5.0",
"memfs": "^3.0.1",
"memfs": "^3.0.4",
"minimist": "^1.2.0",
"prettier": ">= 1.13.0",
"request": "^2.87.0",
"request-promise-native": "^1.0.8",
"rimraf": "^3.0.0",
"rimraf": "^3.0.1",
"semver": "^6.1.0",
"typescript": "^3.4.5",
"vuepress": "^1.2.0",
"typescript": "~3.7.5",
"vuepress": "^1.3.0",
"webpack": "^4.0.0",
"yorkie": "^2.0.0"
},
"resolutions": {
"puppeteer": "1.11.0",
"vue": "^2.6.10",
"vue-template-compiler": "^2.6.10",
"vue-server-renderer": "^2.6.10"
"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11",
"vue-server-renderer": "^2.6.11"
}
}
34 changes: 21 additions & 13 deletions packages/@vue/babel-preset-app/index.js
Expand Up @@ -14,17 +14,16 @@ const defaultPolyfills = [
]

function getPolyfills (targets, includes, { ignoreBrowserslistConfig, configPath }) {
const { isPluginRequired } = require('@babel/preset-env')
const builtInsList = require('core-js-compat/data')
const getTargets = require('@babel/preset-env/lib/targets-parser').default
const builtInTargets = getTargets(targets, {
ignoreBrowserslistConfig,
configPath
})
const getTargets = require('@babel/helper-compilation-targets').default
const builtInTargets = getTargets(targets, { ignoreBrowserslistConfig, configPath })

// if no targets specified, include all default polyfills
if (!targets && !Object.keys(builtInTargets).length) {
return includes
}

return includes.filter(item => {
return isPluginRequired(builtInTargets, builtInsList[item])
})
const { list } = require('core-js-compat')({ targets: builtInTargets })
return includes.filter(item => list.includes(item))
}

module.exports = (context, options = {}) => {
Expand Down Expand Up @@ -53,6 +52,7 @@ module.exports = (context, options = {}) => {
}

const runtimePath = path.dirname(require.resolve('@babel/runtime/package.json'))
const runtimeVersion = require('@babel/runtime/package.json').version
const {
polyfills: userPolyfills,
loose = false,
Expand All @@ -78,7 +78,13 @@ module.exports = (context, options = {}) => {
// However, this may cause hash inconsistency if the project is moved to another directory.
// So here we allow user to explicit disable this option if hash consistency is a requirement
// and the runtime version is sure to be correct.
absoluteRuntime = runtimePath
absoluteRuntime = runtimePath,

// https://babeljs.io/docs/en/babel-plugin-transform-runtime#version
// By default transform-runtime assumes that @babel/runtime@7.0.0-beta.0 is installed, which means helpers introduced later than 7.0.0-beta.0 will be inlined instead of imported.
// See https://github.com/babel/babel/issues/10261
// And https://github.com/facebook/docusaurus/pull/2111
version = runtimeVersion
} = options

// resolve targets
Expand Down Expand Up @@ -167,7 +173,7 @@ module.exports = (context, options = {}) => {
decoratorsBeforeExport,
legacy: decoratorsLegacy !== false
}],
[require('@babel/plugin-proposal-class-properties'), { loose }],
[require('@babel/plugin-proposal-class-properties'), { loose }]
)

// transform runtime, but only for helpers
Expand All @@ -180,7 +186,9 @@ module.exports = (context, options = {}) => {
helpers: useBuiltIns === 'usage',
useESModules: !process.env.VUE_CLI_BABEL_TRANSPILE_MODULES,

absoluteRuntime
absoluteRuntime,

version
}])

return {
Expand Down
27 changes: 14 additions & 13 deletions packages/@vue/babel-preset-app/package.json
@@ -1,6 +1,6 @@
{
"name": "@vue/babel-preset-app",
"version": "4.1.2",
"version": "4.2.0",
"description": "babel-preset-app for vue-cli",
"main": "index.js",
"publishConfig": {
Expand All @@ -22,19 +22,20 @@
},
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/babel-preset-app#readme",
"dependencies": {
"@babel/core": "^7.7.4",
"@babel/helper-module-imports": "^7.7.4",
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-decorators": "^7.7.4",
"@babel/plugin-syntax-dynamic-import": "^7.7.4",
"@babel/plugin-syntax-jsx": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/runtime": "^7.7.4",
"@babel/core": "^7.8.4",
"@babel/helper-compilation-targets": "^7.8.4",
"@babel/helper-module-imports": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-jsx": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@vue/babel-preset-jsx": "^1.1.2",
"babel-plugin-dynamic-import-node": "^2.2.0",
"core-js": "^3.4.4",
"core-js-compat": "^3.4.4"
"babel-plugin-dynamic-import-node": "^2.3.0",
"core-js": "^3.6.4",
"core-js-compat": "^3.6.4"
},
"peerDependencies": {
"@babel/core": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-init/package.json
@@ -1,6 +1,6 @@
{
"name": "@vue/cli-init",
"version": "4.1.2",
"version": "4.2.0",
"description": "init addon for vue-cli",
"main": "index.js",
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-overlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@vue/cli-overlay",
"version": "4.1.2",
"version": "4.2.0",
"description": "error overlay & dev server middleware for vue-cli",
"main": "dist/client.js",
"files": [
Expand Down

0 comments on commit d7acff5

Please sign in to comment.