Skip to content

Commit 37c63d1

Browse files
authored
Merge pull request #1 from vuejs/master
Pull the latest
2 parents 5a7a1b8 + b228abb commit 37c63d1

File tree

293 files changed

+18916
-3921
lines changed

Some content is hidden

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

293 files changed

+18916
-3921
lines changed

.circleci/config.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = {
4141
},
4242
// Packages targeting DOM
4343
{
44-
files: ['packages/{vue,runtime-dom}/**'],
44+
files: ['packages/{vue,vue-compat,runtime-dom}/**'],
4545
rules: {
4646
'no-restricted-globals': ['error', ...NodeGlobals]
4747
}
@@ -56,7 +56,7 @@ module.exports = {
5656
},
5757
// Private package, browser only + no syntax restrictions
5858
{
59-
files: ['packages/template-explorer/**'],
59+
files: ['packages/template-explorer/**', 'packages/sfc-playground/**'],
6060
rules: {
6161
'no-restricted-globals': ['error', ...NodeGlobals],
6262
'no-restricted-syntax': 'off'

.github/dependabot.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10
8+
versioning-strategy: lockfile-only
9+
ignore:
10+
- dependency-name: "@types/node"
11+
versions:
12+
- 14.14.24
13+
- 14.14.37
14+
- dependency-name: "@babel/parser"
15+
versions:
16+
- 7.12.11
17+
- 7.12.13
18+
- 7.12.14
19+
- 7.12.15
20+
- 7.12.16
21+
- 7.12.17
22+
- 7.13.0
23+
- 7.13.10
24+
- 7.13.11
25+
- 7.13.13
26+
- 7.13.4
27+
- 7.13.9
28+
- dependency-name: eslint
29+
versions:
30+
- 7.23.0
31+
- dependency-name: postcss
32+
versions:
33+
- 8.2.4
34+
- 8.2.5
35+
- 8.2.7
36+
- 8.2.8
37+
- dependency-name: typescript
38+
versions:
39+
- 4.2.2
40+
- dependency-name: "@babel/types"
41+
versions:
42+
- 7.12.12
43+
- 7.12.13
44+
- 7.12.17
45+
- 7.13.0
46+
- dependency-name: pug-code-gen
47+
versions:
48+
- 2.0.3
49+
- dependency-name: estree-walker
50+
versions:
51+
- 2.0.2
52+
- dependency-name: "@typescript-eslint/parser"
53+
versions:
54+
- 4.14.2
55+
- 4.15.0
56+
- dependency-name: "@microsoft/api-extractor"
57+
versions:
58+
- 7.13.1
59+
- dependency-name: rollup
60+
versions:
61+
- 2.38.5
62+
- dependency-name: node-notifier
63+
versions:
64+
- 8.0.1

.github/workflows/size-check.yml renamed to .github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
1-
name: 'size'
1+
name: 'ci'
22
on:
33
push:
44
branches:
5-
- master
5+
- '**'
66
pull_request:
77
branches:
88
- master
99
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: bahmutov/npm-install@v1
15+
- name: Run unit tests
16+
run: yarn test --ci
17+
18+
test-dts:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v1
22+
- uses: bahmutov/npm-install@v1
23+
- name: Run type declaration tests
24+
run: yarn test-dts
25+
1026
size:
1127
runs-on: ubuntu-latest
1228
env:
@@ -15,7 +31,8 @@ jobs:
1531
- uses: actions/checkout@v1
1632
- uses: bahmutov/npm-install@v1
1733

18-
- uses: posva/[email protected]
34+
- name: Check build size
35+
uses: posva/[email protected]
1936
with:
2037
github_token: ${{ secrets.GITHUB_TOKEN }}
2138
build_script: size

CHANGELOG.md

Lines changed: 435 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vue-next [![beta](https://img.shields.io/npm/v/vue/next.svg)](https://www.npmjs.com/package/vue/v/next) [![CircleCI](https://circleci.com/gh/vuejs/vue-next.svg?style=svg&circle-token=fb883a2d0a73df46e80b2e79fd430959d8f2b488)](https://circleci.com/gh/vuejs/vue-next)
1+
# vue-next [![npm](https://img.shields.io/npm/v/vue/next.svg)](https://www.npmjs.com/package/vue/v/next) [![build status](https://github.com/vuejs/vue-next/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/vuejs/vue-next/actions/workflows/ci.yml)
22

33
This is the repository for Vue 3.0.
44

@@ -9,7 +9,11 @@ This is the repository for Vue 3.0.
99
- Scaffold via [Vite](https://github.com/vitejs/vite):
1010

1111
```bash
12-
npm init vite-app hello-vue3 # OR yarn create vite-app hello-vue3
12+
# npm
13+
npm init @vitejs/app
14+
# yarn
15+
yarn create @vitejs/app
16+
# select vue template
1317
```
1418

1519
- Scaffold via [vue-cli](https://cli.vuejs.org/):
@@ -24,7 +28,7 @@ This is the repository for Vue 3.0.
2428

2529
Please consult the [Migration Guide](https://v3.vuejs.org/guide/migration/introduction.html).
2630

27-
- Note: IE11 support is still pending.
31+
Also note: Vue 3 does not support IE11 ([RFC](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0038-vue3-ie11-support.md) | [Discussion](https://github.com/vuejs/rfcs/discussions/296)).
2832

2933
## Supporting Libraries
3034

@@ -61,18 +65,27 @@ We are working on a new version of the Devtools with a new UI and refactored int
6165

6266
### IDE Support
6367

64-
It is recommended to use [VSCode](https://code.visualstudio.com/) with our official extension [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur), which provides comprehensive IDE support for Vue 3.
68+
It is recommended to use [VSCode](https://code.visualstudio.com/). There are currently two viable extensions for Single-File Components (SFCs) support:
69+
70+
- [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur) (recommended if you are used to Vetur features)
71+
- [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (recommended if using TypeScript with SFCs, or `<script setup>` syntax)
72+
73+
### TypeScript Support
74+
75+
- All Vue 3 packages ship with types.
76+
- [vue-tsc](https://github.com/johnsoncodehk/vue-tsc) perform TypeScript type checks / diagnostics on Vue SFCs via the command line.
77+
- [vue-dts-gen](https://github.com/egoist/vue-dts-gen): generate TypeScript definitions from Vue SFCs.
6578

6679
### Other Projects
6780

68-
| Project | NPM | Repo |
69-
| --------------------- | ----------------------------- | -------------------- |
70-
| @vue/babel-plugin-jsx | [![rc][jsx-badge]][jsx-npm] | [[GitHub][jsx-code]] |
81+
| Project | NPM | Repo |
82+
| --------------------- | ------------------------------- | -------------------- |
83+
| @vue/babel-plugin-jsx | [![rc][jsx-badge]][jsx-npm] | [[GitHub][jsx-code]] |
7184
| eslint-plugin-vue | [![stable][epv-badge]][epv-npm] | [[GitHub][epv-code]] |
72-
| @vue/test-utils | [![beta][vtu-badge]][vtu-npm] | [[GitHub][vtu-code]] |
73-
| vue-class-component | [![beta][vcc-badge]][vcc-npm] | [[GitHub][vcc-code]] |
74-
| vue-loader | [![beta][vl-badge]][vl-npm] | [[GitHub][vl-code]] |
75-
| rollup-plugin-vue | [![beta][rpv-badge]][rpv-npm] | [[GitHub][rpv-code]] |
85+
| @vue/test-utils | [![beta][vtu-badge]][vtu-npm] | [[GitHub][vtu-code]] |
86+
| vue-class-component | [![beta][vcc-badge]][vcc-npm] | [[GitHub][vcc-code]] |
87+
| vue-loader | [![beta][vl-badge]][vl-npm] | [[GitHub][vl-code]] |
88+
| rollup-plugin-vue | [![beta][rpv-badge]][rpv-npm] | [[GitHub][rpv-code]] |
7689

7790
[jsx-badge]: https://img.shields.io/npm/v/@vue/babel-plugin-jsx.svg
7891
[jsx-npm]: https://www.npmjs.com/package/@vue/babel-plugin-jsx

jest.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ module.exports = {
1212
__NODE_JS__: true,
1313
__FEATURE_OPTIONS_API__: true,
1414
__FEATURE_SUSPENSE__: true,
15-
__FEATURE_PROD_DEVTOOLS__: false
15+
__FEATURE_PROD_DEVTOOLS__: false,
16+
__COMPAT__: true
1617
},
1718
coverageDirectory: 'coverage',
1819
coverageReporters: ['html', 'lcov', 'text'],
1920
collectCoverageFrom: [
2021
'packages/*/src/**/*.ts',
2122
'!packages/runtime-test/src/utils/**',
2223
'!packages/template-explorer/**',
24+
'!packages/sfc-playground/**',
2325
'!packages/size-check/**',
2426
'!packages/runtime-core/src/profiling.ts',
2527
'!packages/runtime-core/src/customFormatter.ts',
@@ -28,11 +30,14 @@ module.exports = {
2830
// only called in browsers
2931
'!packages/vue/src/devCheck.ts',
3032
// only used as a build entry
31-
'!packages/vue/src/runtime.ts'
33+
'!packages/vue/src/runtime.ts',
34+
// mostly just entries
35+
'!packages/vue-compat/**'
3236
],
3337
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
3438
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
3539
moduleNameMapper: {
40+
'@vue/compat': '<rootDir>/packages/vue-compat/src',
3641
'^@vue/(.*?)$': '<rootDir>/packages/$1/src',
3742
vue: '<rootDir>/packages/vue/src'
3843
},

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "3.0.5",
3+
"version": "3.1.1",
44
"workspaces": [
55
"packages/*"
66
],
@@ -18,7 +18,9 @@
1818
"dev-compiler": "npm-run-all --parallel \"dev template-explorer\" serve",
1919
"serve": "serve",
2020
"open": "open http://localhost:5000/packages/template-explorer/local.html",
21-
"preinstall": "node ./scripts/checkYarn.js"
21+
"preinstall": "node ./scripts/checkYarn.js",
22+
"prebuild-sfc-playground": "node scripts/build.js compiler shared -af cjs && node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime && node scripts/build.js compiler-sfc -f esm-browser",
23+
"build-sfc-playground": "cd packages/sfc-playground && vite build"
2224
},
2325
"types": "test-dts/index.d.ts",
2426
"tsd": {
@@ -42,10 +44,10 @@
4244
},
4345
"devDependencies": {
4446
"@babel/types": "^7.12.0",
45-
"@microsoft/api-extractor": "^7.12.1",
46-
"@rollup/plugin-commonjs": "^17.0.0",
47+
"@microsoft/api-extractor": "^7.15.1",
48+
"@rollup/plugin-commonjs": "^18.0.0",
4749
"@rollup/plugin-json": "^4.0.0",
48-
"@rollup/plugin-node-resolve": "^11.0.0",
50+
"@rollup/plugin-node-resolve": "^11.2.1",
4951
"@rollup/plugin-replace": "^2.3.4",
5052
"@types/hash-sum": "^1.0.0",
5153
"@types/jest": "^26.0.16",
@@ -66,15 +68,16 @@
6668
"npm-run-all": "^4.1.5",
6769
"prettier": "~1.14.0",
6870
"puppeteer": "^2.0.0",
69-
"rollup": "^2.26.11",
71+
"rollup": "~2.38.5",
7072
"rollup-plugin-node-builtins": "^2.1.2",
7173
"rollup-plugin-node-globals": "^1.4.0",
74+
"rollup-plugin-polyfill-node": "^0.6.2",
7275
"rollup-plugin-terser": "^7.0.2",
7376
"rollup-plugin-typescript2": "^0.27.2",
7477
"semver": "^7.3.2",
7578
"serve": "^11.3.0",
7679
"ts-jest": "^26.2.0",
77-
"typescript": "^4.1.3",
80+
"typescript": "^4.2.2",
7881
"yorkie": "^2.0.0"
7982
}
8083
}

packages/compiler-core/__tests__/__snapshots__/codegen.spec.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ return function render(_ctx, _cache) {
6666
const _component_Foo = _resolveComponent(\\"Foo\\")
6767
const _component_bar_baz = _resolveComponent(\\"bar-baz\\")
6868
const _component_barbaz = _resolveComponent(\\"barbaz\\")
69+
const _component_Qux = _resolveComponent(\\"Qux\\", true)
6970
const _directive_my_dir_0 = _resolveDirective(\\"my_dir_0\\")
7071
const _directive_my_dir_1 = _resolveDirective(\\"my_dir_1\\")
7172
let _temp0, _temp1, _temp2

packages/compiler-core/__tests__/__snapshots__/compile.spec.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`compiler: integration tests function mode 1`] = `
55
66
return function render(_ctx, _cache) {
77
with (_ctx) {
8-
const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = _Vue
8+
const { toDisplayString: _toDisplayString, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList, createVNode: _createVNode } = _Vue
99
1010
return (_openBlock(), _createBlock(\\"div\\", {
1111
id: \\"foo\\",
@@ -16,7 +16,7 @@ return function render(_ctx, _cache) {
1616
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
1717
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [
1818
_createTextVNode(\\"no\\")
19-
], 64 /* STABLE_FRAGMENT */)),
19+
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)),
2020
(_openBlock(true), _createBlock(_Fragment, null, _renderList(list, (value, index) => {
2121
return (_openBlock(), _createBlock(\\"div\\", null, [
2222
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)
@@ -28,7 +28,7 @@ return function render(_ctx, _cache) {
2828
`;
2929

3030
exports[`compiler: integration tests function mode w/ prefixIdentifiers: true 1`] = `
31-
"const { toDisplayString: _toDisplayString, createVNode: _createVNode, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList } = Vue
31+
"const { toDisplayString: _toDisplayString, openBlock: _openBlock, createBlock: _createBlock, createCommentVNode: _createCommentVNode, createTextVNode: _createTextVNode, Fragment: _Fragment, renderList: _renderList, createVNode: _createVNode } = Vue
3232
3333
return function render(_ctx, _cache) {
3434
return (_openBlock(), _createBlock(\\"div\\", {
@@ -40,7 +40,7 @@ return function render(_ctx, _cache) {
4040
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
4141
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [
4242
_createTextVNode(\\"no\\")
43-
], 64 /* STABLE_FRAGMENT */)),
43+
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)),
4444
(_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {
4545
return (_openBlock(), _createBlock(\\"div\\", null, [
4646
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)
@@ -51,7 +51,7 @@ return function render(_ctx, _cache) {
5151
`;
5252

5353
exports[`compiler: integration tests module mode 1`] = `
54-
"import { toDisplayString as _toDisplayString, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList } from \\"vue\\"
54+
"import { toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, Fragment as _Fragment, renderList as _renderList, createVNode as _createVNode } from \\"vue\\"
5555
5656
export function render(_ctx, _cache) {
5757
return (_openBlock(), _createBlock(\\"div\\", {
@@ -63,7 +63,7 @@ export function render(_ctx, _cache) {
6363
? (_openBlock(), _createBlock(\\"div\\", { key: 0 }, \\"yes\\"))
6464
: (_openBlock(), _createBlock(_Fragment, { key: 1 }, [
6565
_createTextVNode(\\"no\\")
66-
], 64 /* STABLE_FRAGMENT */)),
66+
], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */)),
6767
(_openBlock(true), _createBlock(_Fragment, null, _renderList(_ctx.list, (value, index) => {
6868
return (_openBlock(), _createBlock(\\"div\\", null, [
6969
_createVNode(\\"span\\", null, _toDisplayString(value + index), 1 /* TEXT */)

0 commit comments

Comments
 (0)