Skip to content

Commit 6857b82

Browse files
committed
chore: Merge branch 'dev' into next
2 parents adb8c7d + b94da37 commit 6857b82

File tree

39 files changed

+250
-94
lines changed

39 files changed

+250
-94
lines changed

CHANGELOG.md

+37
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,41 @@
11

2+
## 4.5.5 (2020-09-10)
3+
4+
#### :bug: Bug Fix
5+
* `@vue/cli-service`
6+
* [#5868](https://github.com/vuejs/vue-cli/pull/5868) fix: enable some syntax extensions by default for vue script compiler ([@sodatea](https://github.com/sodatea))
7+
* `@vue/cli-plugin-router`, `@vue/cli-service`
8+
* [#5852](https://github.com/vuejs/vue-cli/pull/5852) fix: fix duplicate id="app" in Vue 3 project template ([@sodatea](https://github.com/sodatea))
9+
* `@vue/cli-plugin-unit-jest`, `@vue/cli-plugin-unit-mocha`
10+
* [#5591](https://github.com/vuejs/vue-cli/pull/5591) fix(unit-jest, unit-mocha): generate passing tests when `bare` option is used with router enabled (#3544) ([@IwalkAlone](https://github.com/IwalkAlone))
11+
* `@vue/cli-plugin-pwa`
12+
* [#5820](https://github.com/vuejs/vue-cli/pull/5820) fix: allow turning off theme color tags ([@GabrielGMartinsBr](https://github.com/GabrielGMartinsBr))
13+
* `@vue/cli`
14+
* [#5827](https://github.com/vuejs/vue-cli/pull/5827) fix: fix support for Node.js v8 and deprecate it ([@sodatea](https://github.com/sodatea))
15+
* [#5823](https://github.com/vuejs/vue-cli/pull/5823) Handle GPG sign git config for initial commit ([@spenserblack](https://github.com/spenserblack))
16+
* [#5808](https://github.com/vuejs/vue-cli/pull/5808) fix: strip non-ansi characters from registry config ([@sodatea](https://github.com/sodatea))
17+
* [#5801](https://github.com/vuejs/vue-cli/pull/5801) fix: do not throw when api.render is called from an anonymous function ([@sodatea](https://github.com/sodatea))
18+
19+
#### :house: Internal
20+
* `@vue/cli-ui`
21+
* [#3687](https://github.com/vuejs/vue-cli/pull/3687) perf(ui): improve get folder list to use Promises instead of sync ([@pikax](https://github.com/pikax))
22+
23+
#### :hammer: Underlying Tools
24+
* `@vue/babel-preset-app`
25+
* [#5831](https://github.com/vuejs/vue-cli/pull/5831) chore: rename jsx package scope from ant-design-vue to vue ([@Amour1688](https://github.com/Amour1688))
26+
27+
#### Committers: 8
28+
- Booker Zhao ([@binggg](https://github.com/binggg))
29+
- Carlos Rodrigues ([@pikax](https://github.com/pikax))
30+
- Haoqun Jiang ([@sodatea](https://github.com/sodatea))
31+
- Renan Cidale Assumpcao ([@rcidaleassumpo](https://github.com/rcidaleassumpo))
32+
- Sergey Skrynnikov ([@IwalkAlone](https://github.com/IwalkAlone))
33+
- Spenser Black ([@spenserblack](https://github.com/spenserblack))
34+
- [@GabrielGMartinsBr](https://github.com/GabrielGMartinsBr)
35+
- 天泽 ([@Amour1688](https://github.com/Amour1688))
36+
37+
38+
239
## 4.5.4 (2020-08-18)
340

441
#### :bug: Bug Fix

docs/dev-guide/plugin-dev.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ module.exports.hooks = (api) => {
289289
const renderIndex = lines.findIndex(line => line.match(/render/))
290290
lines[renderIndex] += `${EOL} router,`
291291
292-
fs.writeFileSync(api.entryFile, lines.join(EOL), { encoding: 'utf-8' })
292+
fs.writeFileSync(api.resolve(api.entryFile), lines.join(EOL), { encoding: 'utf-8' })
293293
})
294294
}
295295
```

docs/guide/deployment.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ If you are using the PWA plugin, your app must be served over HTTPS so that [Ser
4444
If you are deploying to `https://<USERNAME>.github.io/<REPO>/`, (i.e. your repository is at `https://github.com/<USERNAME>/<REPO>`), set `publicPath` to `"/<REPO>/"`. For example, if your repo name is "my-project", your `vue.config.js` should look like this:
4545

4646
``` js
47+
// vue.config.js file to be place in the root of your repository
48+
4749
module.exports = {
4850
publicPath: process.env.NODE_ENV === 'production'
4951
? '/my-project/'
@@ -265,20 +267,20 @@ You can now access your project on `https://<YOUR-PROJECT-ID>.firebaseapp.com` o
265267

266268
Please refer to the [Firebase Documentation](https://firebase.google.com/docs/hosting/deploying) for more details.
267269

268-
### Now
270+
### Vercel
269271

270-
This example uses the latest Now platform version 2.
272+
This example uses the latest Vercel platform version 2.
271273

272-
1. Install the Now CLI:
274+
1. Install the Vercel CLI:
273275

274276
```bash
275-
npm install -g now
277+
npm install -g vercel
276278
277279
# Or, if you prefer a local one
278-
npm install now
280+
npm install vercel
279281
```
280282

281-
2. Add a `now.json` file to your project root:
283+
2. Add a `vercel.json` file to your project root:
282284

283285
```json
284286
{
@@ -287,7 +289,7 @@ npm install now
287289
"builds": [
288290
{
289291
"src": "package.json",
290-
"use": "@now/static-build"
292+
"use": "@vercel/static-build"
291293
}
292294
],
293295
"routes": [
@@ -320,24 +322,24 @@ npm install now
320322
```diff
321323
- {
322324
- "src": "package.json",
323-
- "use": "@now/static-build"
325+
- "use": "@vercel/static-build"
324326
- }
325327
+ {
326328
+ "src": "package.json",
327-
+ "use": "@now/static-build",
329+
+ "use": "@vercel/static-build",
328330
+ "config": { "distDir": "build" }
329331
+ }
330332
```
331333

332334
3. Adding a `now-build` script in `package.json`:
333335

334336
```json
335-
"now-build": "npm run build"
337+
"vercel-build": "npm run build"
336338
```
337339

338-
To make a deployment, run `now`.
340+
To make a deployment, run `vercel`.
339341

340-
If you want your deployment aliased, run `now --target production` instead.
342+
If you want your deployment aliased, run `vercel --target production` instead.
341343

342344
### Stdlib
343345

docs/guide/installation.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ If you have the previous `vue-cli` (1.x or 2.x) package installed globally, you
66
:::
77

88
::: tip Node Version Requirement
9-
Vue CLI requires [Node.js](https://nodejs.org/) version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
9+
Vue CLI 4.x requires [Node.js](https://nodejs.org/) version 8.9 or above (v10+ recommended). You can manage multiple versions of Node on the same machine with [n](https://github.com/tj/n), [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
10+
11+
As Node.js v8 has reached end-of-life, it's now recommended to use Node.js v10+ for best compatibility.
12+
If you have to stay with Node.js v8, please make sure npm v6 is used as the default package manager. (`npm -v` to check the version, and `vue config --set packageManager npm` to set the default package manager.)
1013
:::
1114

1215
To install the new package, use one of the following commands. You need administrator privileges to execute these unless npm was installed on your system through a Node.js version manager (e.g. n or nvm).
@@ -38,15 +41,15 @@ yarn global upgrade --latest @vue/cli
3841

3942
#### Project Dependencies
4043

41-
Upgrade commands shown above apply to the global Vue CLI installation. To upgrade one or more `@vue/cli` related packages (including packages starting with `@vue/cli-plugin-`) inside your project, run `vue upgrade` inside the project directory:
44+
Upgrade commands shown above apply to the global Vue CLI installation. To upgrade one or more `@vue/cli` related packages (including packages starting with `@vue/cli-plugin-` or `vue-cli-plugin-`) inside your project, run `vue upgrade` inside the project directory:
4245

4346
```
4447
Usage: upgrade [options] [plugin-name]
4548
4649
(experimental) upgrade vue cli service / plugins
4750
4851
Options:
49-
-t, --to <version> Upgrade <package-name> to a version that is not latest
52+
-t, --to <version> Upgrade <plugin-name> to a version that is not latest
5053
-f, --from <version> Skip probing installed plugin, assuming it is upgraded from the designated version
5154
-r, --registry <url> Use specified npm registry when installing dependencies
5255
--all Upgrade all plugins

docs/zh/guide/deployment.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -292,31 +292,31 @@ firebase deploy --only hosting
292292

293293
请参考 [Firebase 文档](https://firebase.google.com/docs/hosting/deploying) 来获取更多细节。
294294

295-
### ZEIT Now
295+
### Vercel
296296

297-
[ZEIT Now](https://zeit.co/) 是一个网站和无服务器 (Serverless) API 云平台,你可以使用你的个人域名 (或是免费的 `.now.sh` URL) 部署你的 Vue 项目。
297+
[Vercel](https://vercel.com/) 是一个网站和无服务器 (Serverless) API 云平台,你可以使用你的个人域名 (或是免费的 `.vercel.app` URL) 部署你的 Vue 项目。
298298

299299
#### 步骤一:安装 Now CLI
300300

301-
要使用 [npm](https://www.npmjs.com/package/now) 安装其命令行界面,运行以下命令:
301+
要使用 [npm](https://www.npmjs.com/package/vercel) 安装其命令行界面,运行以下命令:
302302

303303
```
304-
npm install -g now
304+
npm install -g vercel
305305
```
306306

307307
#### 步骤二:部署
308308

309309
在项目根目录运行以下命令部署你的应用:
310310

311311
```
312-
now
312+
vercel
313313
```
314314

315-
**此外**,你还可以使用他们的 [GitHub](https://zeit.co/github) 或 [GitLab](https://zeit.co/gitlab) 集成服务。
315+
**此外**,你还可以使用他们的 [GitHub](https://vercel.com/github) 或 [GitLab](https://vercel.com/gitlab) 集成服务。
316316

317317
大功告成!
318318

319-
你的站点会开始部署,你将获得一个形如 [https://vue.now-examples.now.sh/](https://vue.now-examples.now.sh/) 的链接。
319+
你的站点会开始部署,你将获得一个形如 [https://vue.now-examples.now.sh/](https://vue.now-examples.now.sh/) (或`.vercel.app`)的链接。
320320

321321
开箱即用地,请求会被自动改写到 `index.html` (除了自定义的静态文件) 并带有合适的缓存请求头。
322322

docs/zh/guide/installation.md

+34-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ Vue CLI 的包名称由 `vue-cli` 改成了 `@vue/cli`。
66
:::
77

88
::: tip Node 版本要求
9-
Vue CLI 需要 [Node.js](https://nodejs.org/) 8.9 或更高版本 (推荐 8.11.0+)。你可以使用 [nvm](https://github.com/creationix/nvm)[nvm-windows](https://github.com/coreybutler/nvm-windows) 在同一台电脑中管理多个 Node 版本。
9+
Vue CLI 4.x 需要 [Node.js](https://nodejs.org/) v8.9 或更高版本 (推荐 v10 以上)。你可以使用 [n](https://github.com/tj/n)[nvm](https://github.com/creationix/nvm)[nvm-windows](https://github.com/coreybutler/nvm-windows) 在同一台电脑中管理多个 Node 版本。
10+
11+
由于 Node.js v8 已不再维护,我们建议使用 Node.js v10 以上的版本,以保证最佳的兼容性。
12+
如果暂时无法升级 Node.js 版本,请使用 npm v6 作为默认的包管理工具。(可以用 `npm -v` 检查 npm 版本,然后运行 `vue config --set packageManager npm` 以设置默认包管理工具。)
1013
:::
1114

1215
可以使用下列任一命令安装这个新的包:
@@ -24,3 +27,33 @@ yarn global add @vue/cli
2427
```bash
2528
vue --version
2629
```
30+
31+
### 升级
32+
33+
如需升级全局的 Vue CLI 包,请运行:
34+
35+
``` bash
36+
npm update -g @vue/cli
37+
38+
# 或者
39+
yarn global upgrade --latest @vue/cli
40+
```
41+
42+
#### 项目依赖
43+
44+
上面列出来的命令是用于升级全局的 Vue CLI。如需升级项目中的 Vue CLI 相关模块(以 `@vue/cli-plugin-``vue-cli-plugin-` 开头),请在项目目录下运行 `vue upgrade`
45+
46+
```
47+
用法: upgrade [options] [plugin-name]
48+
49+
(试用)升级 Vue CLI 服务及插件
50+
51+
选项:
52+
-t, --to <version> 升级 <plugin-name> 到指定的版本
53+
-f, --from <version> 跳过本地版本检测,默认插件是从此处指定的版本升级上来
54+
-r, --registry <url> 使用指定的 registry 地址安装依赖
55+
--all 升级所有的插件
56+
--next 检查插件新版本时,包括 alpha/beta/rc 版本在内
57+
-h, --help 输出帮助内容
58+
```
59+

docs/zh/guide/plugins-and-presets.md

+4
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,10 @@ GitLab 和 BitBucket 也是支持的。如果要从私有 repo 获取,请确
191191
``` bash
192192
vue create --preset gitlab:username/repo --clone my-project
193193
vue create --preset bitbucket:username/repo --clone my-project
194+
195+
# 私有服务器
196+
vue create --preset gitlab:my-gitlab-server.com:group/projectname --clone my-project
197+
vue create --preset direct:ssh://[email protected]/group/projectname.git --clone my-project
194198
```
195199

196200
### 加载文件系统中的 Preset

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"npmClient": "yarn",
33
"useWorkspaces": true,
4-
"version": "4.5.4",
4+
"version": "4.5.5",
55
"packages": [
66
"packages/@vue/babel-preset-app",
77
"packages/@vue/cli*",

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/babel-preset-app",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "babel-preset-app for vue-cli",
55
"main": "index.js",
66
"publishConfig": {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-init",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "init addon for vue-cli",
55
"main": "index.js",
66
"publishConfig": {

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

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

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-babel",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "babel plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -21,8 +21,8 @@
2121
"homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/cli-plugin-babel#readme",
2222
"dependencies": {
2323
"@babel/core": "^7.11.6",
24-
"@vue/babel-preset-app": "^4.5.4",
25-
"@vue/cli-shared-utils": "^4.5.4",
24+
"@vue/babel-preset-app": "^4.5.5",
25+
"@vue/cli-shared-utils": "^4.5.5",
2626
"babel-loader": "^8.1.0",
2727
"cache-loader": "^4.1.0",
2828
"thread-loader": "^2.1.3",

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-e2e-cypress",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "e2e-cypress plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -23,7 +23,7 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@vue/cli-shared-utils": "^4.5.4",
26+
"@vue/cli-shared-utils": "^4.5.5",
2727
"cypress": "^3.8.3",
2828
"eslint-plugin-cypress": "^2.10.3"
2929
},

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-e2e-nightwatch",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "e2e-nightwatch plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -23,7 +23,7 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@vue/cli-shared-utils": "^4.5.4",
26+
"@vue/cli-shared-utils": "^4.5.5",
2727
"deepmerge": "^4.2.2",
2828
"nightwatch": "^1.4.1"
2929
},

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-e2e-webdriverio",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "e2e-webdriverio plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"@types/mocha": "^8.0.1",
29-
"@vue/cli-shared-utils": "^4.5.4",
29+
"@vue/cli-shared-utils": "^4.5.5",
3030
"@wdio/cli": "^6.4.6",
3131
"@wdio/local-runner": "^6.4.6",
3232
"@wdio/mocha-framework": "^6.4.0",

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-eslint",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "eslint plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -23,7 +23,7 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@vue/cli-shared-utils": "^4.5.4",
26+
"@vue/cli-shared-utils": "^4.5.5",
2727
"eslint-loader": "^2.2.1",
2828
"globby": "^9.2.0",
2929
"inquirer": "^7.1.0",

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/cli-plugin-pwa",
3-
"version": "4.5.4",
3+
"version": "4.5.5",
44
"description": "pwa plugin for vue-cli",
55
"main": "index.js",
66
"repository": {
@@ -23,7 +23,7 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@vue/cli-shared-utils": "^4.5.4",
26+
"@vue/cli-shared-utils": "^4.5.5",
2727
"webpack": "^4.0.0",
2828
"workbox-webpack-plugin": "^4.3.1"
2929
},

packages/@vue/cli-plugin-router/__tests__/routerGenerator.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ test('use with Vue 3', async () => {
8585

8686
expect(files['src/main.js']).toMatch('.use(router)')
8787

88+
expect(files['src/App.vue']).not.toMatch('<div id="app">')
89+
8890
expect(pkg.dependencies).toHaveProperty('vue-router')
8991
expect(pkg.dependencies['vue-router']).toMatch('^4')
9092
})

0 commit comments

Comments
 (0)