Skip to content

Commit bb364ef

Browse files
committed
fix: resolve conflicts
2 parents 3e40425 + 8dcb6c7 commit bb364ef

File tree

291 files changed

+11328
-5421
lines changed

Some content is hidden

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

291 files changed

+11328
-5421
lines changed

.eslintrc.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ module.exports = {
66
parserOptions: {
77
sourceType: 'module'
88
},
9+
plugins: ["jest"],
910
rules: {
11+
'no-debugger': 'error',
1012
'no-unused-vars': [
1113
'error',
1214
// we are only using this rule to check for unused arguments since TS
@@ -16,10 +18,11 @@ module.exports = {
1618
// most of the codebase are expected to be env agnostic
1719
'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
1820
// since we target ES2015 for baseline support, we need to forbid object
19-
// rest spread usage (both assign and destructure)
21+
// rest spread usage in destructure as it compiles into a verbose helper.
22+
// TS now compiles assignment spread into Object.assign() calls so that
23+
// is allowed.
2024
'no-restricted-syntax': [
2125
'error',
22-
'ObjectExpression > SpreadElement',
2326
'ObjectPattern > RestElement',
2427
'AwaitExpression'
2528
]
@@ -30,7 +33,9 @@ module.exports = {
3033
files: ['**/__tests__/**', 'test-dts/**'],
3134
rules: {
3235
'no-restricted-globals': 'off',
33-
'no-restricted-syntax': 'off'
36+
'no-restricted-syntax': 'off',
37+
'jest/no-disabled-tests': 'error',
38+
'jest/no-focused-tests': 'error'
3439
}
3540
},
3641
// shared, may be used in any env
@@ -50,7 +55,7 @@ module.exports = {
5055
// Packages targeting Node
5156
{
5257
files: [
53-
'packages/{compiler-sfc,compiler-ssr,server-renderer,ref-transform}/**'
58+
'packages/{compiler-sfc,compiler-ssr,server-renderer,reactivity-transform}/**'
5459
],
5560
rules: {
5661
'no-restricted-globals': ['error', ...DOMGlobals],

.github/FUNDING.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
open_collective: vuejs
2-
patreon: evanyou
31
github: yyx990803
2+
open_collective: vuejs
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "\U0001F41E Bug report"
2+
description: Create a report to help us improve
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
**Before You Start...**
8+
9+
This form is only for submitting bug reports. If you have a usage question
10+
or are unsure if this is really a bug, make sure to:
11+
12+
- Read the [docs](https://vuejs.org/)
13+
- Ask on [Discord Chat](https://chat.vuejs.org/)
14+
- Ask on [GitHub Discussions](https://github.com/vuejs/core/discussions)
15+
- Look for / ask questions on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=vue.js)
16+
17+
Also try to search for your issue - it may have already been answered or even fixed in the development branch.
18+
However, if you find that an old, closed issue still persists in the latest version,
19+
you should open a new issue using the form below instead of commenting on the old issue.
20+
- type: input
21+
id: version
22+
attributes:
23+
label: Vue version
24+
validations:
25+
required: true
26+
- type: input
27+
id: reproduction-link
28+
attributes:
29+
label: Link to minimal reproduction
30+
description: |
31+
The easiest way to provide a reproduction is by showing the bug in [The SFC Playground](https://sfc.vuejs.org/).
32+
If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
33+
If neither of these are suitable, you can always provide a GitHub reporistory.
34+
35+
The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed
36+
to show the bug. See [Bug Reproduction Guidelines](https://github.com/vuejs/core/blob/main/.github/bug-repro-guidelines.md) for more details.
37+
38+
Please do not just fill in a random link. The issue will be closed if no valid reproduction is provided.
39+
placeholder: Reproduction Link
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: steps-to-reproduce
44+
attributes:
45+
label: Steps to reproduce
46+
description: |
47+
What do we need to do after opening your repro in order to make the bug happen? Clear and concise reproduction instructions are important for us to be able to triage your issue in a timely manner. Note that you can use [Markdown](https://guides.github.com/features/mastering-markdown/) to format lists and code.
48+
placeholder: Steps to reproduce
49+
validations:
50+
required: true
51+
- type: textarea
52+
id: expected
53+
attributes:
54+
label: What is expected?
55+
validations:
56+
required: true
57+
- type: textarea
58+
id: actually-happening
59+
attributes:
60+
label: What is actually happening?
61+
validations:
62+
required: true
63+
- type: textarea
64+
id: system-info
65+
attributes:
66+
label: System Info
67+
description: Output of `npx envinfo --system --npmPackages vue --binaries --browsers`
68+
render: shell
69+
placeholder: System, Binaries, Browsers
70+
- type: textarea
71+
id: additional-comments
72+
attributes:
73+
label: Any additional comments?
74+
description: e.g. some background/context of how you ran into this bug.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Create new issue
4-
url: https://new-issue.vuejs.org/?repo=vuejs/vue-next
5-
about: Please use the following link to create a new issue.
3+
- name: Discord Chat
4+
url: https://chat.vuejs.org
5+
about: Ask questions and discuss with other Vue users in real time.
6+
- name: Questions & Discussions
7+
url: https://github.com/vuejs/core/discussions
8+
about: Use GitHub discussions for message-board style questions and discussions.
69
- name: Patreon
710
url: https://www.patreon.com/evanyou
811
about: Love Vue.js? Please consider supporting us via Patreon.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "\U0001F680 New feature proposal"
2+
description: Suggest an idea for this project
3+
labels: [":sparkles: feature request"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
**Before You Start...**
9+
10+
This form is only for submitting feature requests. If you have a usage question
11+
or are unsure if this is really a bug, make sure to:
12+
13+
- Read the [docs](https://vuejs.org/)
14+
- Ask on [Discord Chat](https://chat.vuejs.org/)
15+
- Ask on [GitHub Discussions](https://github.com/vuejs/core/discussions)
16+
- Look for / ask questions on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=vue.js)
17+
18+
Also try to search for your issue - another user may have already requested something similar!
19+
20+
- type: textarea
21+
id: problem-description
22+
attributes:
23+
label: What problem does this feature solve?
24+
description: |
25+
Explain your use case, context, and rationale behind this feature request. More importantly, what is the **end user experience** you are trying to build that led to the need for this feature?
26+
27+
An important design goal of Vue is keeping the API surface small and straightforward. In general, we only consider adding new features that solve a problem that cannot be easily dealt with using existing APIs (i.e. not just an alternative way of doing things that can already be done). The problem should also be common enough to justify the addition.
28+
placeholder: Problem description
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: proposed-API
33+
attributes:
34+
label: What does the proposed API look like?
35+
description: |
36+
Describe how you propose to solve the problem and provide code samples of how the API would work once implemented. Note that you can use [Markdown](https://guides.github.com/features/mastering-markdown/) to format your code blocks.
37+
placeholder: Steps to reproduce
38+
validations:
39+
required: true

.github/bug-repro-guidelines.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## About Bug Reproductions
2+
3+
A bug reproduction is a piece of code that can run and demonstrate how a bug can happen.
4+
5+
### Text is not enough
6+
7+
It's impossible to fix a bug from mere text descriptions. First, it's very difficult to precisely describe a technical problem while keeping it easy to follow; Second, the real cause may very well be something that you forgot to even mention. A reproduction is the only way that can reliably help us understand what is going on, so please provide one.
8+
9+
### A repro must be runnable
10+
11+
Screenshots or videos are NOT reproductions! They only show that the bug exists, but do not provide enough information on why it happens. Only runnable code provides the most complete context and allows us to properly debug the scenario. That said, in some cases videos/gifs can help explain interaction issues that are hard to describe in text.
12+
13+
### A repro should be minimal
14+
15+
Some users would give us a link to a real project and hope we can help them figure out what is wrong. We generally do not accept such requests because:
16+
17+
You are already familiar with your codebase, but we are not. It is extremely time-consuming to hunt a bug in a big and unfamiliar codebase.
18+
19+
The problematic behavior may very well be caused by your code rather than by a bug in Vue.
20+
21+
A minimal reproduction means it demonstrates the bug, and the bug only. It should only contain the bare minimum amount of code that can reliably cause the bug. Try your best to get rid of anything that aren't directly related to the problem.
22+
23+
### How to create a repro
24+
25+
For Vue 3 core reproductions, try reproducing it in [The SFC Playground](https://sfc.vuejs.org/).
26+
27+
If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
28+
29+
If neither of these are suitable, you can always provide a GitHub repository.

.github/contributing.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Hi! I'm really excited that you are interested in contributing to Vue.js. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
44

5-
- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
5+
- [Code of Conduct](https://vuejs.org/about/coc.html)
66
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
77
- [Pull Request Guidelines](#pull-request-guidelines)
88
- [Development Setup](#development-setup)
@@ -17,7 +17,9 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
1717

1818
## Pull Request Guidelines
1919

20-
- Checkout a topic branch from a base branch, e.g. `master`, and merge back against that branch.
20+
- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
21+
22+
- [Make sure to tick the "Allow edits from maintainers" box](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This allows us to directly make minor edits / refactors and saves a lot of time.
2123

2224
- If adding a new feature:
2325

@@ -40,7 +42,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
4042

4143
## Development Setup
4244

43-
You will need [Node.js](https://nodejs.org) **version 10+**, and [PNPM](https://pnpm.io).
45+
You will need [Node.js](https://nodejs.org) **version 16+**, and [PNPM](https://pnpm.io) **version 7+**.
4446

4547
We also recommend installing [ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier.
4648

@@ -90,7 +92,7 @@ Additional formats that only apply to the main `vue` package:
9092
- **`esm-bundler-runtime`**
9193
- **`esm-browser-runtime`**
9294

93-
More details about each of these formats can be found in the [`vue` package README](https://github.com/vuejs/vue-next/blob/master/packages/vue/README.md#which-dist-file-to-use) and the [Rollup config file](https://github.com/vuejs/vue-next/blob/master/rollup.config.js).
95+
More details about each of these formats can be found in the [`vue` package README](https://github.com/vuejs/core/blob/main/packages/vue/README.md#which-dist-file-to-use) and the [Rollup config file](https://github.com/vuejs/core/blob/main/rollup.config.js).
9496

9597
For example, to build `runtime-core` with the global build only:
9698

@@ -123,19 +125,22 @@ The `dev` script bundles a target package (default: `vue`) in a specified format
123125
```bash
124126
$ nr dev
125127

126-
> rollup v1.19.4
127-
> bundles packages/vue/src/index.ts → packages/vue/dist/vue.global.js...
128+
> watching: packages/vue/dist/vue.global.js
128129
```
129130

130-
- The `dev` script also supports fuzzy match for the target package, but will only match the first package matched.
131+
- **Important:** output of the `dev` script is for development and debugging only. While it has the same runtime behavior, the generated code should never be published to npm.
132+
133+
- The `dev` script does not support fuzzy match - you must specify the full package name, e.g. `nr dev runtime-core`.
131134

132135
- The `dev` script supports specifying build format via the `-f` flag just like the `build` script.
133136

134137
- The `dev` script also supports the `-s` flag for generating source maps, but it will make rebuilds slower.
135138

139+
- The `dev` script supports the `-i` flag for inlining all deps. This is useful when debugging `esm-bundler` builds which externalizes deps by default.
140+
136141
### `nr dev-compiler`
137142

138-
The `dev-compiler` script builds, watches and serves the [Template Explorer](https://github.com/vuejs/vue-next/tree/master/packages/template-explorer) at `http://localhost:5000`. This is extremely useful when working on the compiler.
143+
The `dev-compiler` script builds, watches and serves the [Template Explorer](https://github.com/vuejs/core/tree/main/packages/template-explorer) at `http://localhost:5000`. This is extremely useful when working on the compiler.
139144

140145
### `nr test`
141146

@@ -175,6 +180,8 @@ This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) set
175180

176181
- `compiler-dom`: Compiler with additional plugins specifically targeting the browser.
177182

183+
- `compiler-sfc`: Lower level utilities for compiling Vue Single File Components.
184+
178185
- `compiler-ssr`: Compiler that produces render functions optimized for server-side rendering.
179186

180187
- `template-explorer`: A development tool for debugging compiler output. You can run `nr dev template-explorer` and open its `index.html` to get a repl of template compilation based on current source code.

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,9 @@ updates:
6262
- dependency-name: node-notifier
6363
versions:
6464
- 8.0.1
65+
- package-ecosystem: "github-actions"
66+
directory: "/"
67+
schedule:
68+
interval: monthly
69+
open-pull-requests-limit: 10
70+
versioning-strategy: lockfile-only

.github/workflows/ci.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ on:
55
- '**'
66
pull_request:
77
branches:
8-
- master
8+
- main
99
jobs:
10-
test:
10+
unit-test:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
1414

1515
- name: Install pnpm
16-
uses: pnpm/[email protected]
17-
with:
18-
version: 6.15.1
16+
uses: pnpm/action-setup@v2
1917

2018
- name: Set node version to 16
2119
uses: actions/setup-node@v2
@@ -26,17 +24,34 @@ jobs:
2624
- run: pnpm install
2725

2826
- name: Run unit tests
29-
run: pnpm run test -- --ci
27+
run: pnpm run test-unit
3028

31-
test-dts:
29+
e2e-test:
3230
runs-on: ubuntu-latest
3331
steps:
3432
- uses: actions/checkout@v2
3533

3634
- name: Install pnpm
37-
uses: pnpm/[email protected]
35+
uses: pnpm/action-setup@v2
36+
37+
- name: Set node version to 16
38+
uses: actions/setup-node@v2
3839
with:
39-
version: 6.15.1
40+
node-version: 16
41+
cache: 'pnpm'
42+
43+
- run: pnpm install
44+
45+
- name: Run e2e tests
46+
run: pnpm run test-e2e
47+
48+
lint-and-test-dts:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v2
52+
53+
- name: Install pnpm
54+
uses: pnpm/action-setup@v2
4055

4156
- name: Set node version to 16
4257
uses: actions/setup-node@v2
@@ -46,6 +61,9 @@ jobs:
4661

4762
- run: pnpm install
4863

64+
- name: Run eslint
65+
run: pnpm run lint
66+
4967
- name: Run type declaration tests
5068
run: pnpm run test-dts
5169

@@ -57,9 +75,7 @@ jobs:
5775
- uses: actions/checkout@v2
5876

5977
- name: Install pnpm
60-
uses: pnpm/[email protected]
61-
with:
62-
version: 6.15.1
78+
uses: pnpm/action-setup@v2
6379

6480
- name: Set node version to 16
6581
uses: actions/setup-node@v2

.github/workflows/release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
with:
2121
tag_name: ${{ github.ref }}
2222
body: |
23-
Please refer to [CHANGELOG.md](https://github.com/vuejs/vue-next/blob/master/CHANGELOG.md) for details.
23+
Please refer to [CHANGELOG.md](https://github.com/vuejs/core/blob/main/CHANGELOG.md) for details.

0 commit comments

Comments
 (0)