Skip to content

Commit f3ea4b8

Browse files
authored
Merge branch 'main' into fix/nested-transitiongroup
2 parents 3abe763 + 4e45bf1 commit f3ea4b8

File tree

35 files changed

+431
-509
lines changed

35 files changed

+431
-509
lines changed

.github/workflows/size-data.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ 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: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ 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+
path: /tmp/pr-number
44+
45+
- name: Read PR Number
46+
id: pr-number
47+
uses: juliangruber/read-file-action@v1
48+
with:
49+
path: /tmp/pr-number/pr.txt
50+
3851
- name: Download Size Data
3952
uses: dawidd6/action-download-artifact@v6
4053
with:
@@ -55,10 +68,18 @@ jobs:
5568
- name: Prepare report
5669
run: pnpm tsx scripts/size-report.ts > size-report.md
5770

71+
- name: Read Size Report
72+
id: size-report
73+
uses: juliangruber/read-file-action@v1
74+
with:
75+
path: ./size-report.md
76+
5877
- name: Create Comment
59-
uses: thollander/actions-[email protected]
78+
uses: actions-cool/maintain-one-comment@v3
6079
with:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62-
filePath: size-report.md
63-
pr_number: ${{ github.event.workflow_run.pull_requests[0].number }}
64-
comment_tag: VUE_CORE_SIZE
80+
token: ${{ secrets.GITHUB_TOKEN }}
81+
number: ${{ steps.pr-number.outputs.content }}
82+
body: |
83+
${{ steps.size-report.outputs.content }}
84+
<!-- VUE_CORE_SIZE -->
85+
body-include: '<!-- VUE_CORE_SIZE -->'

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## [3.4.31](https://github.com/vuejs/core/compare/v3.4.30...v3.4.31) (2024-06-28)
2+
3+
4+
### Bug Fixes
5+
6+
* **compiler-core:** handle inline comments with undefined bindings ([#11217](https://github.com/vuejs/core/issues/11217)) ([746352a](https://github.com/vuejs/core/commit/746352a14d62e9d3d9a38c359d2c54d418c1e0ac)), closes [#11216](https://github.com/vuejs/core/issues/11216)
7+
* **shared:** unwrap refs in toDisplayString ([#7306](https://github.com/vuejs/core/issues/7306)) ([0126cff](https://github.com/vuejs/core/commit/0126cfff9d93bcec70e5745519f6378e3cd3f39c)), closes [#5578](https://github.com/vuejs/core/issues/5578) [#5593](https://github.com/vuejs/core/issues/5593) [#11199](https://github.com/vuejs/core/issues/11199) [#11201](https://github.com/vuejs/core/issues/11201)
8+
9+
10+
### Reverts
11+
12+
* Revert "fix(reactivity): avoid infinite loop when render access a side effect computed ([#11135](https://github.com/vuejs/core/issues/11135))" ([e0df985](https://github.com/vuejs/core/commit/e0df985f0317fb65c5b461bf224375c7763f0269))
13+
* Revert "fix(reactivity): fix side effect computed dirty level (#11183)" ([6c303ea](https://github.com/vuejs/core/commit/6c303eacd14b7b0de0accc228f6abeb43d706f63)), closes [#11183](https://github.com/vuejs/core/issues/11183)
14+
15+
16+
117
## [3.4.30](https://github.com/vuejs/core/compare/v3.4.29...v3.4.30) (2024-06-22)
218

319
**Note: this release contains a fix (#11150) that requires `vue-tsc` to also be updated in sync to ^2.0.22. See #11196**

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.4.30",
4-
"packageManager": "pnpm@9.4.0",
3+
"version": "3.4.31",
4+
"packageManager": "pnpm@9.5.0",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -67,10 +67,9 @@
6767
"@rollup/plugin-json": "^6.1.0",
6868
"@rollup/plugin-node-resolve": "^15.2.3",
6969
"@rollup/plugin-replace": "5.0.4",
70-
"@swc/core": "^1.6.5",
70+
"@swc/core": "^1.6.13",
7171
"@types/hash-sum": "^1.0.2",
72-
"@types/minimist": "^1.2.5",
73-
"@types/node": "^20.14.8",
72+
"@types/node": "^20.14.10",
7473
"@types/semver": "^7.5.8",
7574
"@vitest/coverage-istanbul": "^1.6.0",
7675
"@vue/consolidate": "1.0.0",
@@ -82,21 +81,19 @@
8281
"eslint-plugin-import-x": "^0.5.1",
8382
"eslint-plugin-vitest": "^0.5.4",
8483
"estree-walker": "^2.0.2",
85-
"execa": "^9.3.0",
8684
"jsdom": "^24.1.0",
8785
"lint-staged": "^15.2.7",
8886
"lodash": "^4.17.21",
8987
"magic-string": "^0.30.10",
9088
"markdown-table": "^3.0.3",
9189
"marked": "^12.0.2",
92-
"minimist": "^1.2.8",
93-
"npm-run-all2": "^6.2.0",
90+
"npm-run-all2": "^6.2.2",
9491
"picocolors": "^1.0.1",
9592
"prettier": "^3.3.2",
9693
"pretty-bytes": "^6.1.1",
9794
"pug": "^3.0.3",
9895
"puppeteer": "~22.12.0",
99-
"rimraf": "^5.0.7",
96+
"rimraf": "^5.0.8",
10097
"rollup": "^4.18.0",
10198
"rollup-plugin-dts": "^6.1.1",
10299
"rollup-plugin-esbuild": "^6.1.1",
@@ -107,7 +104,7 @@
107104
"terser": "^5.31.1",
108105
"todomvc-app-css": "^2.4.3",
109106
"tslib": "^2.6.3",
110-
"tsx": "^4.15.7",
107+
"tsx": "^4.16.2",
111108
"typescript": "~5.4.5",
112109
"typescript-eslint": "^7.13.1",
113110
"vite": "^5.3.1",

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,17 @@ describe('compiler: expression transform', () => {
384384
)
385385
})
386386

387+
test('should not error', () => {
388+
const onError = vi.fn()
389+
parseWithExpressionTransform(
390+
`<p :id="undefined /* force override the id */"/>`,
391+
{
392+
onError,
393+
},
394+
)
395+
expect(onError).not.toHaveBeenCalled()
396+
})
397+
387398
test('should prefix in assignment', () => {
388399
const node = parseWithExpressionTransform(
389400
`{{ x = 1 }}`,

packages/compiler-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-core",
3-
"version": "3.4.30",
3+
"version": "3.4.31",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",

packages/compiler-core/src/babelUtils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function walkIdentifiers(
1717
root: Node,
1818
onIdentifier: (
1919
node: Identifier,
20-
parent: Node,
20+
parent: Node | null,
2121
parentStack: Node[],
2222
isReference: boolean,
2323
isLocal: boolean,
@@ -36,7 +36,7 @@ export function walkIdentifiers(
3636
: root
3737

3838
walk(root, {
39-
enter(node: Node & { scopeIds?: Set<string> }, parent: Node | undefined) {
39+
enter(node: Node & { scopeIds?: Set<string> }, parent: Node | null) {
4040
parent && parentStack.push(parent)
4141
if (
4242
parent &&
@@ -47,9 +47,9 @@ export function walkIdentifiers(
4747
}
4848
if (node.type === 'Identifier') {
4949
const isLocal = !!knownIds[node.name]
50-
const isRefed = isReferencedIdentifier(node, parent!, parentStack)
50+
const isRefed = isReferencedIdentifier(node, parent, parentStack)
5151
if (includeAll || (isRefed && !isLocal)) {
52-
onIdentifier(node, parent!, parentStack, isRefed, isLocal)
52+
onIdentifier(node, parent, parentStack, isRefed, isLocal)
5353
}
5454
} else if (
5555
node.type === 'ObjectProperty' &&
@@ -79,7 +79,7 @@ export function walkIdentifiers(
7979
}
8080
}
8181
},
82-
leave(node: Node & { scopeIds?: Set<string> }, parent: Node | undefined) {
82+
leave(node: Node & { scopeIds?: Set<string> }, parent: Node | null) {
8383
parent && parentStack.pop()
8484
if (node !== rootExp && node.scopeIds) {
8585
for (const id of node.scopeIds) {

packages/compiler-core/src/transforms/transformExpression.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ export function processExpression(
116116
}
117117

118118
const { inline, bindingMetadata } = context
119-
const rewriteIdentifier = (raw: string, parent?: Node, id?: Identifier) => {
119+
const rewriteIdentifier = (
120+
raw: string,
121+
parent?: Node | null,
122+
id?: Identifier,
123+
) => {
120124
const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw]
121125
if (inline) {
122126
// x = y
@@ -313,9 +317,10 @@ export function processExpression(
313317
// local scope variable (a v-for alias, or a v-slot prop)
314318
if (
315319
!(needPrefix && isLocal) &&
316-
parent.type !== 'CallExpression' &&
317-
parent.type !== 'NewExpression' &&
318-
parent.type !== 'MemberExpression'
320+
(!parent ||
321+
(parent.type !== 'CallExpression' &&
322+
parent.type !== 'NewExpression' &&
323+
parent.type !== 'MemberExpression'))
319324
) {
320325
;(node as QualifiedId).isConstant = true
321326
}

packages/compiler-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-dom",
3-
"version": "3.4.30",
3+
"version": "3.4.31",
44
"description": "@vue/compiler-dom",
55
"main": "index.js",
66
"module": "dist/compiler-dom.esm-bundler.js",

packages/compiler-sfc/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue/compiler-sfc",
3-
"version": "3.4.30",
3+
"version": "3.4.31",
44
"description": "@vue/compiler-sfc",
55
"main": "dist/compiler-sfc.cjs.js",
66
"module": "dist/compiler-sfc.esm-browser.js",
@@ -58,7 +58,7 @@
5858
"hash-sum": "^2.0.0",
5959
"lru-cache": "10.1.0",
6060
"merge-source-map": "^1.1.0",
61-
"minimatch": "^9.0.4",
61+
"minimatch": "^9.0.5",
6262
"postcss-modules": "^6.0.0",
6363
"postcss-selector-parser": "^6.1.0",
6464
"pug": "^3.0.3",

0 commit comments

Comments
 (0)