Skip to content

Commit 034bac0

Browse files
committed
chore: update branch
2 parents 8a0b1fc + e8e8422 commit 034bac0

File tree

492 files changed

+27919
-11192
lines changed

Some content is hidden

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

492 files changed

+27919
-11192
lines changed

.github/commit-convention.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Messages must be matched by the following regex:
88

9-
``` js
9+
```regexp
1010
/^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/
1111
```
1212

@@ -44,7 +44,7 @@ This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
4444

4545
### Full Message Format
4646

47-
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
47+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
4848

4949
```
5050
<type>(<scope>): <subject>
@@ -74,9 +74,9 @@ The scope could be anything specifying the place of the commit change. For examp
7474

7575
The subject contains a succinct description of the change:
7676

77-
* use the imperative, present tense: "change" not "changed" nor "changes"
78-
* don't capitalize the first letter
79-
* no dot (.) at the end
77+
- use the imperative, present tense: "change" not "changed" nor "changes"
78+
- don't capitalize the first letter
79+
- no dot (.) at the end
8080

8181
### Body
8282

.github/contributing.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,26 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
1717

1818
## Pull Request Guidelines
1919

20+
### What kinds of Pull Requests are accepted?
21+
22+
- Bug fix that addresses a clearly identified bug. **"Clearly identified bug"** means the bug has a proper reproduction either from a related open issue, or is included in the PR itself. Avoid submitting PRs that claim to fix something but do not sufficiently explain what is being fixed.
23+
24+
- New feature that addresses a clearly explained and widely applicable use case. **"Widely applicable"** means the new feature should provide non-trivial improvements to the majority of the user base. Vue already has a large API surface so we are quite cautious about adding new features - if the use case is niche and can be addressed via userland implementations, it likely isn't suitable to go into core.
25+
26+
The feature implementation should also consider the trade-off between the added complexity vs. the benefits gained. For example, if a small feature requires significant changes that spreads across the codebase, it is likely not worth it, or the approach should be reconsidered.
27+
28+
If the feature has a non-trivial API surface addition, or significantly affects the way a common use case is approached by the users, it should go through a discussion first in the [RFC repo](https://github.com/vuejs/rfcs/discussions). PRs of such features without prior discussion make it really difficult to steer / adjust the API design due to coupling with concrete implementations, and can lead to wasted work.
29+
30+
- Chore: typos, comment improvements, build config, CI config, etc. For typos and comment changes, try to combine multiple of them into a single PR.
31+
32+
- **It should be noted that we discourage contributors from submitting code refactors that are largely stylistic.** Code refactors are only accepted if it improves performance, or comes with sufficient explanations on why it objectively improves the code quality (e.g. makes a related feature implementation easier).
33+
34+
The reason is that code readability is subjective. The maintainers of this project have chosen to write the code in its current style based on our preferences, and we do not want to spend time explaining our stylistic preferences. Contributors should just respect the established conventions when contributing code.
35+
36+
Another aspect of it is that large scale stylistic changes result in massive diffs that touch multiple files, adding noise to the git history and makes tracing behavior changes across commits more cumbersome.
37+
38+
### Pull Request Checklist
39+
2040
- Vue core has two primary work branches: `main` and `minor`.
2141

2242
- If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch.
@@ -61,7 +81,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
6181

6282
## Development Setup
6383

64-
You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**.
84+
You will need [Node.js](https://nodejs.org) with minimum version as specified in the [`.node-version`](https://github.com/vuejs/core/blob/main/.node-version) file, and [PNPM](https://pnpm.io) with minimum version as specified in the [`"packageManager"` field in `package.json`](https://github.com/vuejs/core/blob/main/package.json#L4).
6585

6686
We also recommend installing [@antfu/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.
6787

@@ -216,7 +236,7 @@ Tests that test against source code are grouped under `nr test-unit`, while test
216236

217237
### `nr test-dts`
218238

219-
Runs `nr build-dts` first, then verify the type tests in `packages/dts-test` are working correctly against the actual built type declarations.
239+
Runs `nr build-dts` first, then verify the type tests in `packages-private/dts-test` are working correctly against the actual built type declarations.
220240

221241
## Project Structure
222242

@@ -315,7 +335,7 @@ Test coverage is continuously deployed at https://coverage.vuejs.org. PRs that i
315335

316336
### Testing Type Definition Correctness
317337

318-
Type tests are located in the `packages/dts-test` directory. To run the dts tests, run `nr test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by running `nr test-dts-only`.
338+
Type tests are located in the `packages-private/dts-test` directory. To run the dts tests, run `nr test-dts`. Note that the type test requires all relevant `*.d.ts` files to be built first (and the script does it for you). Once the `d.ts` files are built and up-to-date, the tests can be re-run by running `nr test-dts-only`.
319339

320340
## Financial Contribution
321341

.github/maintenance.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Depending on the type of the PR, different considerations need to be taken into
8080
- Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in @vue/shared are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`.
8181

8282
- Performance
83+
8384
- Be careful about code changes in "hot paths", in particular the Virtual DOM renderer (`runtime-core/src/renderer.ts`) and component instantiation code.
8485

8586
- Potential Breakage

.github/renovate.json5

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,49 @@
11
{
22
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
3-
extends: ['config:base', 'schedule:weekly', 'group:allNonMajor'],
3+
extends: ['config:recommended', 'schedule:weekly', 'group:allNonMajor'],
44
labels: ['dependencies'],
55
ignorePaths: ['**/__tests__/**'],
66
rangeStrategy: 'bump',
77
packageRules: [
88
{
9-
depTypeList: ['peerDependencies'],
9+
matchDepTypes: ['peerDependencies'],
1010
enabled: false,
1111
},
1212
{
1313
groupName: 'test',
14-
matchPackageNames: ['vitest', 'jsdom', 'puppeteer'],
15-
matchPackagePrefixes: ['@vitest'],
14+
matchPackageNames: ['vitest', 'jsdom', 'puppeteer', '@vitest{/,}**'],
1615
},
1716
{
1817
groupName: 'playground',
1918
matchFileNames: [
20-
'packages/sfc-playground/package.json',
21-
'packages/template-explorer/package.json',
19+
'packages-private/sfc-playground/package.json',
20+
'packages-private/template-explorer/package.json',
2221
],
2322
},
2423
{
2524
groupName: 'compiler',
26-
matchPackageNames: ['magic-string'],
27-
matchPackagePrefixes: ['@babel', 'postcss'],
25+
matchPackageNames: ['magic-string', '@babel{/,}**', 'postcss{/,}**'],
2826
},
2927
{
3028
groupName: 'build',
31-
matchPackageNames: ['vite', 'terser'],
32-
matchPackagePrefixes: ['rollup', 'esbuild', '@rollup', '@vitejs'],
29+
matchPackageNames: [
30+
'vite',
31+
'@swc/core',
32+
'rollup{/,}**',
33+
'esbuild{/,}**',
34+
'@rollup{/,}**',
35+
'@vitejs{/,}**',
36+
],
3337
},
3438
{
3539
groupName: 'lint',
36-
matchPackageNames: ['simple-git-hooks', 'lint-staged'],
37-
matchPackagePrefixes: ['typescript-eslint', 'eslint', 'prettier'],
40+
matchPackageNames: [
41+
'simple-git-hooks',
42+
'lint-staged',
43+
'typescript-eslint{/,}**',
44+
'eslint{/,}**',
45+
'prettier{/,}**',
46+
],
3847
},
3948
],
4049
ignoreDeps: [
@@ -54,5 +63,13 @@
5463
// pinned
5564
// https://github.com/vuejs/core/commit/a012e39b373f1b6918e5c89856e8f902e1bfa14d
5665
'@rollup/plugin-replace',
66+
67+
// pinned
68+
// only used in example for e2e tests
69+
'marked',
70+
71+
// pinned, 5.0+ has exports issues
72+
// https://github.com/vuejs/core/issues/11603
73+
'entities',
5774
],
5875
}

.github/workflows/autofix.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ jobs:
1414
- uses: actions/checkout@v4
1515

1616
- name: Install pnpm
17-
uses: pnpm/action-setup@v3.0.0
17+
uses: pnpm/action-setup@v4.0.0
1818

19-
- name: Set node version to 18
19+
- name: Install Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: 18
23-
cache: pnpm
22+
node-version-file: '.node-version'
23+
registry-url: 'https://registry.npmjs.org'
24+
cache: 'pnpm'
2425

2526
- run: pnpm install
2627

@@ -30,4 +31,4 @@ jobs:
3031
- name: Run prettier
3132
run: pnpm run format
3233

33-
- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84
34+
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c

.github/workflows/canary-minor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
ref: minor
1818

1919
- name: Install pnpm
20-
uses: pnpm/action-setup@v3.0.0
20+
uses: pnpm/action-setup@v4.0.0
2121

22-
- name: Set node version to 18
22+
- name: Install Node.js
2323
uses: actions/setup-node@v4
2424
with:
25-
node-version: 18
25+
node-version-file: '.node-version'
2626
registry-url: 'https://registry.npmjs.org'
2727
cache: 'pnpm'
2828

2929
- run: pnpm install
3030

31-
- run: pnpm release --canary --tag minor
31+
- run: pnpm release --canary --publish --tag minor
3232
env:
3333
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/canary.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- name: Install pnpm
18-
uses: pnpm/action-setup@v3.0.0
18+
uses: pnpm/action-setup@v4.0.0
1919

2020
- name: Install Node.js
2121
uses: actions/setup-node@v4
@@ -26,6 +26,6 @@ jobs:
2626

2727
- run: pnpm install
2828

29-
- run: pnpm release --canary
29+
- run: pnpm release --canary --publish
3030
env:
3131
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/ci.yml

Lines changed: 17 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -3,141 +3,40 @@ on:
33
push:
44
branches:
55
- '**'
6+
tags:
7+
- '!**'
68
pull_request:
79
branches:
810
- main
911
- minor
1012

11-
permissions:
12-
contents: read # to fetch code (actions/checkout)
13-
1413
jobs:
15-
unit-test:
16-
runs-on: ubuntu-latest
17-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
18-
env:
19-
PUPPETEER_SKIP_DOWNLOAD: 'true'
20-
steps:
21-
- uses: actions/checkout@v4
22-
23-
- name: Install pnpm
24-
uses: pnpm/[email protected]
25-
26-
- name: Install Node.js
27-
uses: actions/setup-node@v4
28-
with:
29-
node-version-file: '.node-version'
30-
cache: 'pnpm'
31-
32-
- run: pnpm install
33-
34-
- name: Run unit tests
35-
run: pnpm run test-unit
36-
37-
unit-test-windows:
38-
runs-on: windows-latest
39-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
40-
env:
41-
PUPPETEER_SKIP_DOWNLOAD: 'true'
42-
steps:
43-
- uses: actions/checkout@v4
44-
45-
- name: Install pnpm
46-
uses: pnpm/[email protected]
47-
48-
- name: Install Node.js
49-
uses: actions/setup-node@v4
50-
with:
51-
node-version-file: '.node-version'
52-
cache: 'pnpm'
53-
54-
- run: pnpm install
14+
test:
15+
if: ${{ ! startsWith(github.event.head_commit.message, 'release:') && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) }}
16+
uses: ./.github/workflows/test.yml
5517

56-
- name: Run compiler unit tests
57-
run: pnpm run test-unit compiler
58-
59-
- name: Run ssr unit tests
60-
run: pnpm run test-unit server-renderer
61-
62-
e2e-test:
63-
runs-on: ubuntu-latest
64-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
65-
steps:
66-
- uses: actions/checkout@v4
67-
68-
- name: Setup cache for Chromium binary
69-
uses: actions/cache@v4
70-
with:
71-
path: ~/.cache/puppeteer
72-
key: chromium-${{ hashFiles('pnpm-lock.yaml') }}
73-
74-
- name: Install pnpm
75-
uses: pnpm/[email protected]
76-
77-
- name: Install Node.js
78-
uses: actions/setup-node@v4
79-
with:
80-
node-version-file: '.node-version'
81-
cache: 'pnpm'
82-
83-
- run: pnpm install
84-
- run: node node_modules/puppeteer/install.mjs
85-
86-
- name: Run e2e tests
87-
run: pnpm run test-e2e
88-
89-
- name: verify treeshaking
90-
run: node scripts/verify-treeshaking.js
91-
92-
lint-and-test-dts:
18+
continuous-release:
19+
if: github.repository == 'vuejs/core'
9320
runs-on: ubuntu-latest
94-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
95-
env:
96-
PUPPETEER_SKIP_DOWNLOAD: 'true'
9721
steps:
98-
- uses: actions/checkout@v4
22+
- name: Checkout
23+
uses: actions/checkout@v4
9924

10025
- name: Install pnpm
101-
uses: pnpm/action-setup@v3.0.0
26+
uses: pnpm/action-setup@v4
10227

10328
- name: Install Node.js
10429
uses: actions/setup-node@v4
10530
with:
10631
node-version-file: '.node-version'
32+
registry-url: 'https://registry.npmjs.org'
10733
cache: 'pnpm'
10834

109-
- run: pnpm install
110-
111-
- name: Run eslint
112-
run: pnpm run lint
113-
114-
- name: Run prettier
115-
run: pnpm run format-check
116-
117-
- name: Run type declaration tests
118-
run: pnpm run test-dts
119-
120-
# benchmarks:
121-
# runs-on: ubuntu-latest
122-
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
123-
# env:
124-
# PUPPETEER_SKIP_DOWNLOAD: 'true'
125-
# steps:
126-
# - uses: actions/checkout@v4
127-
128-
# - name: Install pnpm
129-
# uses: pnpm/[email protected]
130-
131-
# - name: Install Node.js
132-
# uses: actions/setup-node@v4
133-
# with:
134-
# node-version-file: '.node-version'
135-
# cache: 'pnpm'
35+
- name: Install deps
36+
run: pnpm install
13637

137-
# - run: pnpm install
38+
- name: Build
39+
run: pnpm build --withTypes
13840

139-
# - name: Run benchmarks
140-
# uses: CodSpeedHQ/action@v2
141-
# with:
142-
# run: pnpm vitest bench --run
143-
# token: ${{ secrets.CODSPEED_TOKEN }}
41+
- name: Release
42+
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'

0 commit comments

Comments
 (0)