Skip to content

Commit 5999e36

Browse files
committed
chore: Merge branch 'main' into pr/baiwusanyu-c/8619
2 parents 5efb8bd + d61d803 commit 5999e36

File tree

341 files changed

+18075
-5841
lines changed

Some content is hidden

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

341 files changed

+18075
-5841
lines changed

.github/bug-repro-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You are already familiar with your codebase, but we are not. It is extremely tim
1818

1919
The problematic behavior may very well be caused by your code rather than by a bug in Vue.
2020

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.
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 isn't directly related to the problem.
2222

2323
### How to create a repro
2424

.github/contributing.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,32 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
2323

2424
- 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.
2525

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.
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 spread across the codebase, it is likely not worth it, or the approach should be reconsidered.
2727

2828
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.
2929

3030
- Chore: typos, comment improvements, build config, CI config, etc. For typos and comment changes, try to combine multiple of them into a single PR.
3131

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).
32+
- **It should be noted that we discourage contributors from submitting code refactors that are largely stylistic.** Code refactors are only accepted if they improve performance, or come with sufficient explanations on why they objectively improve the code quality (e.g. makes a related feature implementation easier).
3333

3434
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.
3535

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.
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 make tracing behavior changes across commits more cumbersome.
3737

3838
### Pull Request Checklist
3939

4040
- Vue core has two primary work branches: `main` and `minor`.
41-
4241
- If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch.
4342

4443
- Otherwise, it should be submitted against the `main` branch.
4544

4645
- [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.
4746

4847
- If adding a new feature:
49-
5048
- Add accompanying test case.
5149
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
5250

5351
- If fixing a bug:
54-
5552
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
5653
- Provide a detailed description of the bug in the PR. Live demo preferred.
5754
- Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `nr test-coverage`.
@@ -68,10 +65,8 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
6865

6966
- The PR should fix the intended bug **only** and not introduce unrelated changes. This includes unnecessary refactors - a PR should focus on the fix and not code style, this makes it easier to trace changes in the future.
7067

71-
- Consider the performance / size impact of the changes, and whether the bug being fixes justifies the cost. If the bug being fixed is a very niche edge case, we should try to minimize the size / perf cost to make it worthwhile.
72-
68+
- Consider the performance / size impact of the changes, and whether the bug being fixed justifies the cost. If the bug being fixed is a very niche edge case, we should try to minimize the size / perf cost to make it worthwhile.
7369
- Is the code perf-sensitive (e.g. in "hot paths" like component updates or the vdom patch function?)
74-
7570
- If the branch is dev-only, performance is less of a concern.
7671

7772
- Check how much extra bundle size the change introduces.
@@ -83,7 +78,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
8378

8479
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).
8580

86-
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.
81+
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 makes running npm scripts easier.
8782

8883
After cloning the repo, run:
8984

@@ -197,7 +192,7 @@ $ nr dev
197192

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

200-
- The `dev` script supports the `-i` flag for inlining all deps. This is useful when debugging `esm-bundler` builds which externalizes deps by default.
195+
- The `dev` script supports the `-i` flag for inlining all deps. This is useful when debugging `esm-bundler` builds which externalize deps by default.
201196

202197
### `nr dev-sfc`
203198

@@ -265,7 +260,6 @@ This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) set
265260
- `vue`: The public facing "full build" which includes both the runtime AND the compiler.
266261

267262
- Private utility packages:
268-
269263
- `dts-test`: Contains type-only tests against generated dts files.
270264

271265
- `sfc-playground`: The playground continuously deployed at https://play.vuejs.org. To run the playground locally, use [`nr dev-sfc`](#nr-dev-sfc).
@@ -331,7 +325,7 @@ Unit tests are collocated with the code being tested in each package, inside dir
331325

332326
- Only use platform-specific runtimes if the test is asserting platform-specific behavior.
333327

334-
Test coverage is continuously deployed at https://coverage.vuejs.org. PRs that improve test coverage are welcome, but in general the test coverage should be used as a guidance for finding API use cases that are not covered by tests. We don't recommend adding tests that only improve coverage but not actually test a meaning use case.
328+
Test coverage is continuously deployed at https://coverage.vuejs.org. PRs that improve test coverage are welcome, but in general the test coverage should be used as a guidance for finding API use cases that are not covered by tests. We don't recommend adding tests that only improve coverage but not actually test a meaningful use case.
335329

336330
### Testing Type Definition Correctness
337331

.github/maintenance.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ Depending on the type of the PR, different considerations need to be taken into
4747

4848
- Performance: if a refactor PR claims to improve performance, there should be benchmarks showcasing said performance unless the improvement is self-explanatory.
4949

50-
- Code quality / stylistic PRs: we should be conservative on merging this type PRs because (1) they can be subjective in many cases, and (2) they often come with large git diffs, causing merge conflicts with other pending PRs, and leading to unwanted noise when tracing changes through git history. Use your best judgement on this type of PRs on whether they are worth it.
51-
50+
- Code quality / stylistic PRs: we should be conservative on merging this type of PRs because (1) they can be subjective in many cases, and (2) they often come with large git diffs, causing merge conflicts with other pending PRs, and leading to unwanted noise when tracing changes through git history. Use your best judgement on this type of PRs on whether they are worth it.
5251
- For PRs in this category that are approved, do not merge immediately. Group them before releasing a new minor, after all feature-oriented PRs are merged.
5352

5453
### Reviewing a Feature
5554

5655
- Feature PRs should always have clear context and explanation on why the feature should be added, ideally in the form of an RFC. If the PR doesn't explain what real-world problem it is solving, ask the contributor to clarify.
5756

5857
- Decide if the feature should require an RFC process. The line isn't always clear, but a rough criteria is whether it is augmenting an existing API vs. adding a new API. Some examples:
59-
6058
- Adding a new built-in component or directive is "significant" and definitely requires an RFC.
6159
- Template syntax additions like adding a new `v-on` modifier or a new `v-bind` syntax sugar are "substantial". It would be nice to have an RFC for it, but a detailed explanation on the use case and reasoning behind the design directly in the PR itself can be acceptable.
6260
- Small, low-impact additions like exposing a new utility type or adding a new app config option can be self-explanatory, but should still provide enough context in the PR.
@@ -70,7 +68,6 @@ Depending on the type of the PR, different considerations need to be taken into
7068
- Implementation: code style should be consistent with the rest of the codebase, follow common best practices. Prefer code that is boring but easy to understand over "clever" code.
7169

7270
- Size: bundle size matters. We have a GitHub action that compares the size change for every PR. We should always aim to realize the desired changes with the smallest amount of code size increase.
73-
7471
- Sometimes we need to compare the size increase vs. perceived benefits to decide whether a change is justifiable. Also take extra care to make sure added code can be tree-shaken if not needed.
7572

7673
- Make sure to put dev-only code in `__DEV__` branches so they are tree-shakable.
@@ -80,13 +77,12 @@ Depending on the type of the PR, different considerations need to be taken into
8077
- 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`.
8178

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

8682
- Potential Breakage
8783
- avoiding runtime behavior breakage is the highest priority
8884
- if not sure, use `ecosystem-ci` to verify!
89-
- some fix inevitably cause behavior change, these must be discussed case-by-case
85+
- some fixes inevitably cause behavior change, these must be discussed case-by-case
9086
- type level breakage (e.g upgrading TS) is possible between minors
9187

9288
## PR Merge Rules for Team Members

.github/renovate.json5

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
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',
@@ -23,18 +22,28 @@
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', '@swc/core'],
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: [
@@ -58,9 +67,5 @@
5867
// pinned
5968
// only used in example for e2e tests
6069
'marked',
61-
62-
// pinned, 5.0+ has exports issues
63-
// https://github.com/vuejs/core/issues/11603
64-
'entities',
6570
],
6671
}

.github/workflows/autofix.yml

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

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

1919
- name: Install Node.js
20-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@v6
2121
with:
2222
node-version-file: '.node-version'
2323
registry-url: 'https://registry.npmjs.org'
@@ -31,4 +31,4 @@ jobs:
3131
- name: Run prettier
3232
run: pnpm run format
3333

34-
- uses: autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
34+
- uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8

.github/workflows/canary-minor.yml

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

.github/workflows/canary.yml

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

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Install pnpm
2626
uses: pnpm/action-setup@v4
2727

2828
- name: Install Node.js
29-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@v6
3030
with:
3131
node-version-file: '.node-version'
3232
registry-url: 'https://registry.npmjs.org'
@@ -39,4 +39,4 @@ jobs:
3939
run: pnpm build --withTypes
4040

4141
- name: Release
42-
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'
42+
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*' --packageManager=pnpm,npm,yarn

.github/workflows/ecosystem-ci-trigger.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
if: github.repository == 'vuejs/core' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/ecosystem-ci run')
1111
steps:
1212
- name: Check user permission
13-
uses: actions/github-script@v7
13+
uses: actions/github-script@v8
1414
with:
1515
script: |
1616
const user = context.payload.sender.login
@@ -45,7 +45,7 @@ jobs:
4545
throw new Error('not allowed')
4646
}
4747
- name: Get PR info
48-
uses: actions/github-script@v7
48+
uses: actions/github-script@v8
4949
id: get-pr-data
5050
with:
5151
script: |
@@ -62,7 +62,7 @@ jobs:
6262
commit: pr.head.sha
6363
}
6464
- name: Trigger run
65-
uses: actions/github-script@v7
65+
uses: actions/github-script@v8
6666
id: trigger
6767
env:
6868
COMMENT: ${{ github.event.comment.body }}

.github/workflows/lock-closed-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'vuejs/core'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: dessant/lock-threads@v5
15+
- uses: dessant/lock-threads@v6
1616
with:
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
issue-inactive-days: '14'

0 commit comments

Comments
 (0)