Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 1d8727e

Browse files
committed
chore: Merge branch 'main' into minor
2 parents a501a85 + a3e8aaf commit 1d8727e

Some content is hidden

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

61 files changed

+1450
-749
lines changed

.github/commit-convention.md

Lines changed: 1 addition & 1 deletion
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

.github/workflows/size-data.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,3 @@ jobs:
4141
with:
4242
name: size-data
4343
path: temp/size
44-
45-
- name: Save PR number
46-
if: ${{github.event_name == 'pull_request'}}
47-
run: echo ${{ github.event.number }} > ./pr.txt
48-
49-
- uses: actions/upload-artifact@v4
50-
if: ${{github.event_name == 'pull_request'}}
51-
with:
52-
name: pr-number
53-
path: pr.txt

.github/workflows/size-report.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ jobs:
3535
- name: Install dependencies
3636
run: pnpm install
3737

38-
- name: Download PR number
39-
uses: dawidd6/action-download-artifact@v3
40-
with:
41-
name: pr-number
42-
run_id: ${{ github.event.workflow_run.id }}
43-
44-
- name: Read PR Number
45-
id: pr-number
46-
uses: juliangruber/read-file-action@v1
47-
with:
48-
path: ./pr.txt
49-
5038
- name: Download Size Data
5139
uses: dawidd6/action-download-artifact@v3
5240
with:
@@ -77,7 +65,6 @@ jobs:
7765
uses: actions-cool/maintain-one-comment@v3
7866
with:
7967
token: ${{ secrets.GITHUB_TOKEN }}
80-
number: ${{ steps.pr-number.outputs.content }}
8168
body: |
8269
${{ steps.size-report.outputs.content }}
8370
<!-- VUE_CORE_SIZE -->

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## [3.4.27](https://github.com/vuejs/core/compare/v3.4.26...v3.4.27) (2024-05-06)
2+
3+
4+
### Bug Fixes
5+
6+
* **compat:** include legacy scoped slots ([#10868](https://github.com/vuejs/core/issues/10868)) ([8366126](https://github.com/vuejs/core/commit/83661264a4ced3cb2ff6800904a86dd9e82bbfe2)), closes [#8869](https://github.com/vuejs/core/issues/8869)
7+
* **compiler-core:** add support for arrow aysnc function with unbracketed ([#5789](https://github.com/vuejs/core/issues/5789)) ([ca7d421](https://github.com/vuejs/core/commit/ca7d421e8775f6813f8943d32ab485e0c542f98b)), closes [#5788](https://github.com/vuejs/core/issues/5788)
8+
* **compiler-dom:** restrict createStaticVNode usage with option elements ([#10846](https://github.com/vuejs/core/issues/10846)) ([0e3d617](https://github.com/vuejs/core/commit/0e3d6178b02d0386d779720ae2cc4eac1d1ec990)), closes [#6568](https://github.com/vuejs/core/issues/6568) [#7434](https://github.com/vuejs/core/issues/7434)
9+
* **compiler-sfc:** handle keyof operator ([#10874](https://github.com/vuejs/core/issues/10874)) ([10d34a5](https://github.com/vuejs/core/commit/10d34a5624775f20437ccad074a97270ef74c3fb)), closes [#10871](https://github.com/vuejs/core/issues/10871)
10+
* **hydration:** handle edge case of style mismatch without style attribute ([f2c1412](https://github.com/vuejs/core/commit/f2c1412e46a8fad3e13403bfa78335c4f704f21c)), closes [#10786](https://github.com/vuejs/core/issues/10786)
11+
12+
13+
114
# [3.5.0-alpha.2](https://github.com/vuejs/core/compare/v3.4.26...v3.5.0-alpha.2) (2024-05-04)
215

316

eslint.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ export default tseslint.config(
4545
message:
4646
'Our output target is ES2016, so async/await syntax should be avoided.',
4747
},
48+
{
49+
selector: 'ChainExpression',
50+
message:
51+
'Our output target is ES2016, and optional chaining results in ' +
52+
'verbose helpers and should be avoided.',
53+
},
4854
],
4955
'sort-imports': ['error', { ignoreDeclarationSort: true }],
5056

@@ -134,7 +140,7 @@ export default tseslint.config(
134140
{
135141
files: [
136142
'eslint.config.js',
137-
'rollup.config.js',
143+
'rollup*.config.js',
138144
'scripts/**',
139145
'./*.{js,ts}',
140146
'packages/*/*.js',

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"version": "3.5.0-alpha.2",
4-
"packageManager": "pnpm@9.0.6",
4+
"packageManager": "pnpm@9.1.2",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -59,58 +59,58 @@
5959
"node": ">=18.12.0"
6060
},
6161
"devDependencies": {
62-
"@babel/parser": "^7.24.4",
63-
"@babel/types": "^7.24.0",
62+
"@babel/parser": "^7.24.6",
63+
"@babel/types": "^7.24.6",
6464
"@codspeed/vitest-plugin": "^3.1.0",
6565
"@rollup/plugin-alias": "^5.1.0",
66-
"@rollup/plugin-commonjs": "^25.0.7",
66+
"@rollup/plugin-commonjs": "^25.0.8",
6767
"@rollup/plugin-json": "^6.1.0",
6868
"@rollup/plugin-node-resolve": "^15.2.3",
6969
"@rollup/plugin-replace": "5.0.4",
7070
"@rollup/plugin-terser": "^0.4.4",
7171
"@types/hash-sum": "^1.0.2",
7272
"@types/minimist": "^1.2.5",
73-
"@types/node": "^20.12.7",
73+
"@types/node": "^20.12.12",
7474
"@types/semver": "^7.5.8",
7575
"@vitest/coverage-istanbul": "^1.5.2",
7676
"@vue/consolidate": "1.0.0",
7777
"conventional-changelog-cli": "^4.1.0",
7878
"enquirer": "^2.4.1",
79-
"esbuild": "^0.20.2",
79+
"esbuild": "^0.21.4",
8080
"esbuild-plugin-polyfill-node": "^0.3.0",
81-
"eslint": "^9.1.1",
82-
"eslint-plugin-import-x": "^0.5.0",
81+
"eslint": "^9.3.0",
82+
"eslint-plugin-import-x": "^0.5.1",
8383
"eslint-plugin-vitest": "^0.5.4",
8484
"estree-walker": "^2.0.2",
8585
"execa": "^8.0.1",
8686
"jsdom": "^24.0.0",
87-
"lint-staged": "^15.2.2",
87+
"lint-staged": "^15.2.5",
8888
"lodash": "^4.17.21",
8989
"magic-string": "^0.30.10",
9090
"markdown-table": "^3.0.3",
9191
"marked": "^12.0.2",
9292
"minimist": "^1.2.8",
93-
"npm-run-all2": "^6.1.2",
94-
"picocolors": "^1.0.0",
93+
"npm-run-all2": "^6.2.0",
94+
"picocolors": "^1.0.1",
9595
"prettier": "^3.2.5",
9696
"pretty-bytes": "^6.1.1",
97-
"pug": "^3.0.2",
97+
"pug": "^3.0.3",
9898
"puppeteer": "~22.7.1",
99-
"rimraf": "^5.0.5",
100-
"rollup": "^4.17.1",
101-
"rollup-plugin-dts": "^6.1.0",
99+
"rimraf": "^5.0.7",
100+
"rollup": "^4.18.0",
101+
"rollup-plugin-dts": "^6.1.1",
102102
"rollup-plugin-esbuild": "^6.1.1",
103103
"rollup-plugin-polyfill-node": "^0.13.0",
104-
"semver": "^7.6.0",
104+
"semver": "^7.6.2",
105105
"serve": "^14.2.3",
106106
"simple-git-hooks": "^2.11.1",
107-
"terser": "^5.30.4",
107+
"terser": "^5.31.0",
108108
"todomvc-app-css": "^2.4.3",
109109
"tslib": "^2.6.2",
110-
"tsx": "^4.7.3",
110+
"tsx": "^4.11.0",
111111
"typescript": "~5.4.5",
112-
"typescript-eslint": "^7.7.1",
113-
"vite": "^5.2.10",
112+
"typescript-eslint": "^7.10.0",
113+
"vite": "^5.2.11",
114114
"vitest": "^1.5.2"
115115
},
116116
"pnpm": {

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,18 @@ describe('compiler: element transform', () => {
12841284
})
12851285
})
12861286

1287+
test('<math> should be forced into blocks', () => {
1288+
const ast = parse(`<div><math/></div>`)
1289+
transform(ast, {
1290+
nodeTransforms: [transformElement],
1291+
})
1292+
expect((ast as any).children[0].children[0].codegenNode).toMatchObject({
1293+
type: NodeTypes.VNODE_CALL,
1294+
tag: `"math"`,
1295+
isBlock: true,
1296+
})
1297+
})
1298+
12871299
test('force block for runtime custom directive w/ children', () => {
12881300
const { node } = parseWithElementTransform(`<div v-foo>hello</div>`)
12891301
expect(node.isBlock).toBe(true)

packages/compiler-core/__tests__/transforms/vOn.spec.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,23 @@ describe('compiler: transform v-on', () => {
286286
})
287287
})
288288

289+
test('should NOT wrap as function if expression is already function expression (async)', () => {
290+
const { node } = parseWithVOn(
291+
`<div @click="async $event => await foo($event)"/>`,
292+
)
293+
expect((node.codegenNode as VNodeCall).props).toMatchObject({
294+
properties: [
295+
{
296+
key: { content: `onClick` },
297+
value: {
298+
type: NodeTypes.SIMPLE_EXPRESSION,
299+
content: `async $event => await foo($event)`,
300+
},
301+
},
302+
],
303+
})
304+
})
305+
289306
test('should NOT wrap as function if expression is already function expression (with newlines)', () => {
290307
const { node } = parseWithVOn(
291308
`<div @click="
@@ -630,6 +647,39 @@ describe('compiler: transform v-on', () => {
630647
})
631648
})
632649

650+
test('inline async arrow function with no bracket expression handler', () => {
651+
const { root, node } = parseWithVOn(
652+
`<div v-on:click="async e => await foo(e)" />`,
653+
{
654+
prefixIdentifiers: true,
655+
cacheHandlers: true,
656+
},
657+
)
658+
659+
expect(root.cached).toBe(1)
660+
const vnodeCall = node.codegenNode as VNodeCall
661+
// should not treat cached handler as dynamicProp, so no flags
662+
expect(vnodeCall.patchFlag).toBeUndefined()
663+
expect(
664+
(vnodeCall.props as ObjectExpression).properties[0].value,
665+
).toMatchObject({
666+
type: NodeTypes.JS_CACHE_EXPRESSION,
667+
index: 0,
668+
value: {
669+
type: NodeTypes.COMPOUND_EXPRESSION,
670+
children: [
671+
`async `,
672+
{ content: `e` },
673+
` => await `,
674+
{ content: `_ctx.foo` },
675+
`(`,
676+
{ content: `e` },
677+
`)`,
678+
],
679+
},
680+
})
681+
})
682+
633683
test('inline async function expression handler', () => {
634684
const { root, node } = parseWithVOn(
635685
`<div v-on:click="async function () { await foo() } " />`,

packages/compiler-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
},
4747
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
4848
"dependencies": {
49-
"@babel/parser": "^7.24.4",
49+
"@babel/parser": "^7.24.6",
5050
"@vue/shared": "workspace:*",
5151
"entities": "^4.5.0",
5252
"estree-walker": "^2.0.2",
5353
"source-map-js": "^1.2.0"
5454
},
5555
"devDependencies": {
56-
"@babel/types": "^7.24.0"
56+
"@babel/types": "^7.24.6"
5757
}
5858
}

packages/compiler-core/src/ast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ export interface ForRenderListExpression extends CallExpression {
571571
}
572572

573573
export interface ForIteratorExpression extends FunctionExpression {
574-
returns: BlockCodegenNode
574+
returns?: BlockCodegenNode
575575
}
576576

577577
// AST Utilities ---------------------------------------------------------------

0 commit comments

Comments
 (0)