Skip to content

Commit 8415f76

Browse files
authored
Merge branch 'main' into colon-before-directive
2 parents e986337 + 5af3dd9 commit 8415f76

File tree

555 files changed

+43185
-16327
lines changed

Some content is hidden

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

555 files changed

+43185
-16327
lines changed

.eslintignore

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

.eslintrc.cjs

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

.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: 37 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: [
@@ -46,5 +55,21 @@
4655

4756
// ESM only
4857
'estree-walker',
58+
59+
// pinned
60+
// https://github.com/vuejs/core/issues/10300#issuecomment-1940855364
61+
'lru-cache',
62+
63+
// pinned
64+
// https://github.com/vuejs/core/commit/a012e39b373f1b6918e5c89856e8f902e1bfa14d
65+
'@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',
4974
],
5075
}

.github/workflows/autofix.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ jobs:
1111
env:
1212
PUPPETEER_SKIP_DOWNLOAD: 'true'
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515

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

19-
- name: Set node version to 18
20-
uses: actions/setup-node@v4
19+
- name: Install Node.js
20+
uses: actions/setup-node@v6
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@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/canary-minor.yml

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

0 commit comments

Comments
 (0)