Skip to content

Commit 44d53ef

Browse files
authored
Merge branch 'main' into edison/fix/13169
2 parents f643f3a + 9fa787c commit 44d53ef

File tree

74 files changed

+2906
-975
lines changed

Some content is hidden

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

74 files changed

+2906
-975
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,8 @@ jobs:
104104
- name: Run prettier
105105
run: pnpm run format-check
106106

107+
- name: Run tsc
108+
run: pnpm run check
109+
107110
- name: Run type declaration tests
108111
run: pnpm run test-dts

CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
## [3.5.14](https://github.com/vuejs/core/compare/v3.5.13...v3.5.14) (2025-05-15)
2+
3+
4+
### Bug Fixes
5+
6+
* **compat:** correct deprecation message for v-bind.sync usage ([#13137](https://github.com/vuejs/core/issues/13137)) ([466b30f](https://github.com/vuejs/core/commit/466b30f4049ec89fb282624ec17d1a93472ab93f)), closes [#13133](https://github.com/vuejs/core/issues/13133)
7+
* **compiler-core:** remove slot cache from parent renderCache during unmounting ([#13215](https://github.com/vuejs/core/issues/13215)) ([5d166f3](https://github.com/vuejs/core/commit/5d166f3796a03a497435fc079c6a83a4e9c6cf52))
8+
* **compiler-sfc:** fix scope handling for props destructure in function parameters and catch clauses ([8e34357](https://github.com/vuejs/core/commit/8e3435779a667de485cf9efd78667d0ca14c5f84)), closes [#12790](https://github.com/vuejs/core/issues/12790)
9+
* **compiler-sfc:** treat the return value of `useTemplateRef` as a definite ref ([#13197](https://github.com/vuejs/core/issues/13197)) ([8ae1122](https://github.com/vuejs/core/commit/8ae11226e8ee938615e17c7b81dc38ae3f7cefb9))
10+
* **compiler:** fix spelling error in domTagConfig ([#13043](https://github.com/vuejs/core/issues/13043)) ([388295b](https://github.com/vuejs/core/commit/388295b27f3cc69eba25d325bbe60a36a3df831a))
11+
* **customFormatter:** properly accessing ref value during debugger ([#12948](https://github.com/vuejs/core/issues/12948)) ([fdbd026](https://github.com/vuejs/core/commit/fdbd02658301dd794fe0c84f0018d080a07fca9f))
12+
* **hmr/teleport:** adjust static children traversal for HMR in dev mode ([#12819](https://github.com/vuejs/core/issues/12819)) ([5e37dd0](https://github.com/vuejs/core/commit/5e37dd009562bcd8080a200c32abde2d6e4f0305)), closes [#12816](https://github.com/vuejs/core/issues/12816)
13+
* **hmr:** avoid hydration for hmr root reload ([#12450](https://github.com/vuejs/core/issues/12450)) ([1f98a9c](https://github.com/vuejs/core/commit/1f98a9c493d01c21befa90107f0593bc92a58932)), closes [vitejs/vite-plugin-vue#146](https://github.com/vitejs/vite-plugin-vue/issues/146) [vitejs/vite-plugin-vue#477](https://github.com/vitejs/vite-plugin-vue/issues/477)
14+
* **hmr:** avoid hydration for hmr updating ([#12262](https://github.com/vuejs/core/issues/12262)) ([9c4dbbc](https://github.com/vuejs/core/commit/9c4dbbc5185125835ad3e49baba303bd54676111)), closes [#7706](https://github.com/vuejs/core/issues/7706) [#8170](https://github.com/vuejs/core/issues/8170)
15+
* **reactivity:** ensure markRaw objects are not reactive ([#12824](https://github.com/vuejs/core/issues/12824)) ([295b5ec](https://github.com/vuejs/core/commit/295b5ec19b6a52c4a56652cc4d6e93a4ea7c14ed)), closes [#12807](https://github.com/vuejs/core/issues/12807)
16+
* **reactivity:** ensure multiple effectScope on() and off() calls maintains correct active scope ([22dcbf3](https://github.com/vuejs/core/commit/22dcbf3e20eb84f69c8952f6f70d9990136a4a68)), closes [#12631](https://github.com/vuejs/core/issues/12631) [#12632](https://github.com/vuejs/core/issues/12632) [#12641](https://github.com/vuejs/core/issues/12641)
17+
* **reactivity:** should not recompute if computed does not track reactive data ([#12341](https://github.com/vuejs/core/issues/12341)) ([0b23fd2](https://github.com/vuejs/core/commit/0b23fd23833cf085e7e112bf4435cfc9b360d072)), closes [#12337](https://github.com/vuejs/core/issues/12337)
18+
* **runtime-core:** stop tracking deps in setRef during unmount ([#13210](https://github.com/vuejs/core/issues/13210)) ([016c472](https://github.com/vuejs/core/commit/016c472bd2e7604b21c69dee1da8545ce26e4d2f))
19+
* **runtime-core:** update __vnode of static nodes when patching along the optimized path ([#13223](https://github.com/vuejs/core/issues/13223)) ([b3ecee3](https://github.com/vuejs/core/commit/b3ecee3da8ed5c55dea89ce6b4b376b2b722b018))
20+
* **runtime-core:** inherit comment nodes during block patch in production build ([#10748](https://github.com/vuejs/core/issues/10748)) ([6264505](https://github.com/vuejs/core/commit/626450590d81f79117b34d2a73073b1dc8f551bd)), closes [#10747](https://github.com/vuejs/core/issues/10747) [#12650](https://github.com/vuejs/core/issues/12650)
21+
* **runtime-core:** prevent unmounted vnode from being inserted during transition leave ([#12862](https://github.com/vuejs/core/issues/12862)) ([d6a6ec1](https://github.com/vuejs/core/commit/d6a6ec13ce521683bfb2a22932778ef7b51f8600)), closes [#12860](https://github.com/vuejs/core/issues/12860)
22+
* **runtime-core:** respect immutability for readonly reactive arrays in `v-for` ([#13091](https://github.com/vuejs/core/issues/13091)) ([3f27c58](https://github.com/vuejs/core/commit/3f27c58ffbd4309df369bc89493fdc284dc540bb)), closes [#13087](https://github.com/vuejs/core/issues/13087)
23+
* **runtime-dom:** always treat autocorrect as attribute ([#13001](https://github.com/vuejs/core/issues/13001)) ([1499135](https://github.com/vuejs/core/commit/1499135c227236e037bb746beeb777941b0b58ff)), closes [#5705](https://github.com/vuejs/core/issues/5705)
24+
* **slots:** properly warn if slot invoked in setup ([#12195](https://github.com/vuejs/core/issues/12195)) ([9196222](https://github.com/vuejs/core/commit/9196222ae1d63b52b35ac5fbf5e71494587ccf05)), closes [#12194](https://github.com/vuejs/core/issues/12194)
25+
* **ssr:** properly init slots during ssr rendering ([#12441](https://github.com/vuejs/core/issues/12441)) ([2206cd2](https://github.com/vuejs/core/commit/2206cd235a1627c540e795e378b7564a55b47313)), closes [#12438](https://github.com/vuejs/core/issues/12438)
26+
* **transition:** fix KeepAlive with transition out-in mode behavior in production ([#12468](https://github.com/vuejs/core/issues/12468)) ([343c891](https://github.com/vuejs/core/commit/343c89122448719bd6ed6bd9de986dfb2721d6bf)), closes [#12465](https://github.com/vuejs/core/issues/12465)
27+
* **TransitionGroup:** reset prevChildren to prevent memory leak ([#13183](https://github.com/vuejs/core/issues/13183)) ([8b848cb](https://github.com/vuejs/core/commit/8b848cbbd2af337d23e19e202f9ab433f8580855)), closes [#13181](https://github.com/vuejs/core/issues/13181)
28+
* **types:** allow return any for Options API lifecycle hooks ([#5914](https://github.com/vuejs/core/issues/5914)) ([06310e8](https://github.com/vuejs/core/commit/06310e82f5bed62d1b9733dcb18cd8d6edc988de))
29+
* **types:** the directive's modifiers should be optional ([#12605](https://github.com/vuejs/core/issues/12605)) ([10e54dc](https://github.com/vuejs/core/commit/10e54dcc86a7967f3196d96200bcbd1d3d42082f))
30+
* **typos:** fix comments referencing transformElement.ts ([#12551](https://github.com/vuejs/core/issues/12551))[ci-skip] ([11c053a](https://github.com/vuejs/core/commit/11c053a5429ad0d27a0e2c78b6b026ea00ace116))
31+
32+
33+
### Features
34+
35+
* **types:** add type TemplateRef ([#12645](https://github.com/vuejs/core/issues/12645)) ([636a861](https://github.com/vuejs/core/commit/636a8619f06c71dfd79f7f6412fd130c4f84226f))
36+
37+
38+
139
## [3.5.13](https://github.com/vuejs/core/compare/v3.5.12...v3.5.13) (2024-11-15)
240

341

@@ -8,7 +46,7 @@
846
* **custom-element:** avoid triggering mutationObserver when relecting props ([352bc88](https://github.com/vuejs/core/commit/352bc88c1bd2fda09c61ab17ea1a5967ffcd7bc0)), closes [#12214](https://github.com/vuejs/core/issues/12214) [#12215](https://github.com/vuejs/core/issues/12215)
947
* **deps:** update dependency postcss to ^8.4.48 ([#12356](https://github.com/vuejs/core/issues/12356)) ([b5ff930](https://github.com/vuejs/core/commit/b5ff930089985a58c3553977ef999cec2a6708a4))
1048
* **hydration:** the component vnode's el should be updated when a mismatch occurs. ([#12255](https://github.com/vuejs/core/issues/12255)) ([a20a4cb](https://github.com/vuejs/core/commit/a20a4cb36a3e717d1f8f259d0d59f133f508ff0a)), closes [#12253](https://github.com/vuejs/core/issues/12253)
11-
* **reactiivty:** avoid unnecessary watcher effect removal from inactive scope ([2193284](https://github.com/vuejs/core/commit/21932840eae72ffcd357a62ec596aaecc7ec224a)), closes [#5783](https://github.com/vuejs/core/issues/5783) [#5806](https://github.com/vuejs/core/issues/5806)
49+
* **reactivity:** avoid unnecessary watcher effect removal from inactive scope ([2193284](https://github.com/vuejs/core/commit/21932840eae72ffcd357a62ec596aaecc7ec224a)), closes [#5783](https://github.com/vuejs/core/issues/5783) [#5806](https://github.com/vuejs/core/issues/5806)
1250
* **reactivity:** release nested effects/scopes on effect scope stop ([#12373](https://github.com/vuejs/core/issues/12373)) ([bee2f5e](https://github.com/vuejs/core/commit/bee2f5ee62dc0cd04123b737779550726374dd0a)), closes [#12370](https://github.com/vuejs/core/issues/12370)
1351
* **runtime-dom:** set css vars before user onMounted hooks ([2d5c5e2](https://github.com/vuejs/core/commit/2d5c5e25e9b7a56e883674fb434135ac514429b5)), closes [#11533](https://github.com/vuejs/core/issues/11533)
1452
* **runtime-dom:** set css vars on update to handle child forcing reflow in onMount ([#11561](https://github.com/vuejs/core/issues/11561)) ([c4312f9](https://github.com/vuejs/core/commit/c4312f9c715c131a09e552ba46e9beb4b36d55e6))

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Please make sure to respect issue requirements and use [the new issue helper](ht
3535
## Stay In Touch
3636

3737
- [X](https://x.com/vuejs)
38+
- [Bluesky](https://bsky.app/profile/vuejs.org)
3839
- [Blog](https://blog.vuejs.org/)
3940
- [Job Board](https://vuejobs.com/?ref=vuejs)
4041

package.json

Lines changed: 17 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.5.13",
4-
"packageManager": "pnpm@10.7.0",
3+
"version": "3.5.14",
4+
"packageManager": "pnpm@10.11.0",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -69,23 +69,23 @@
6969
"@rollup/plugin-json": "^6.1.0",
7070
"@rollup/plugin-node-resolve": "^16.0.1",
7171
"@rollup/plugin-replace": "5.0.4",
72-
"@swc/core": "^1.11.13",
72+
"@swc/core": "^1.11.24",
7373
"@types/hash-sum": "^1.0.2",
74-
"@types/node": "^22.13.14",
74+
"@types/node": "^22.15.21",
7575
"@types/semver": "^7.7.0",
7676
"@types/serve-handler": "^6.1.4",
77-
"@vitest/coverage-v8": "^3.0.9",
78-
"@vitest/eslint-plugin": "^1.1.38",
77+
"@vitest/coverage-v8": "^3.1.4",
78+
"@vitest/eslint-plugin": "^1.2.0",
7979
"@vue/consolidate": "1.0.0",
8080
"conventional-changelog-cli": "^5.0.0",
8181
"enquirer": "^2.4.1",
82-
"esbuild": "^0.25.2",
82+
"esbuild": "^0.25.4",
8383
"esbuild-plugin-polyfill-node": "^0.3.0",
84-
"eslint": "^9.23.0",
85-
"eslint-plugin-import-x": "^4.9.4",
84+
"eslint": "^9.27.0",
85+
"eslint-plugin-import-x": "^4.12.2",
8686
"estree-walker": "catalog:",
87-
"jsdom": "^26.0.0",
88-
"lint-staged": "^15.5.0",
87+
"jsdom": "^26.1.0",
88+
"lint-staged": "^15.5.2",
8989
"lodash": "^4.17.21",
9090
"magic-string": "^0.30.17",
9191
"markdown-table": "^3.0.4",
@@ -95,38 +95,21 @@
9595
"prettier": "^3.5.3",
9696
"pretty-bytes": "^6.1.1",
9797
"pug": "^3.0.3",
98-
"puppeteer": "~24.4.0",
98+
"puppeteer": "~24.9.0",
9999
"rimraf": "^6.0.1",
100-
"rollup": "^4.38.0",
100+
"rollup": "^4.41.0",
101101
"rollup-plugin-dts": "^6.2.1",
102102
"rollup-plugin-esbuild": "^6.2.1",
103103
"rollup-plugin-polyfill-node": "^0.13.0",
104-
"semver": "^7.7.1",
104+
"semver": "^7.7.2",
105105
"serve": "^14.2.4",
106106
"serve-handler": "^6.1.6",
107-
"simple-git-hooks": "^2.12.1",
107+
"simple-git-hooks": "^2.13.0",
108108
"todomvc-app-css": "^2.4.3",
109109
"tslib": "^2.8.1",
110110
"typescript": "~5.6.2",
111-
"typescript-eslint": "^8.28.0",
111+
"typescript-eslint": "^8.32.1",
112112
"vite": "catalog:",
113-
"vitest": "^3.0.9"
114-
},
115-
"pnpm": {
116-
"peerDependencyRules": {
117-
"allowedVersions": {
118-
"typescript-eslint>eslint": "^9.0.0",
119-
"@typescript-eslint/eslint-plugin>eslint": "^9.0.0",
120-
"@typescript-eslint/parser>eslint": "^9.0.0",
121-
"@typescript-eslint/type-utils>eslint": "^9.0.0",
122-
"@typescript-eslint/utils>eslint": "^9.0.0"
123-
}
124-
},
125-
"onlyBuiltDependencies": [
126-
"@swc/core",
127-
"esbuild",
128-
"puppeteer",
129-
"simple-git-hooks"
130-
]
113+
"vitest": "^3.1.4"
131114
}
132115
}

packages-private/dts-test/componentInstance.test-d.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,18 @@ describe('Generic component', () => {
137137
expectType<string | number>(comp.msg)
138138
expectType<Array<string | number>>(comp.list)
139139
})
140+
141+
// #12751
142+
{
143+
const Comp = defineComponent({
144+
__typeEmits: {} as {
145+
'update:visible': [value?: boolean]
146+
},
147+
})
148+
const comp: ComponentInstance<typeof Comp> = {} as any
149+
150+
expectType<((value?: boolean) => any) | undefined>(comp['onUpdate:visible'])
151+
expectType<{ 'onUpdate:visible'?: (value?: boolean) => any }>(comp['$props'])
152+
// @ts-expect-error
153+
comp['$props']['$props']
154+
}

packages-private/dts-test/defineComponent.test-d.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import { type IsAny, type IsUnion, describe, expectType } from './utils'
2020
describe('with object props', () => {
2121
interface ExpectedProps {
2222
a?: number | undefined
23+
aa: number
24+
aaa: number | null
25+
aaaa: number | undefined
2326
b: string
2427
e?: Function
2528
h: boolean
@@ -53,6 +56,19 @@ describe('with object props', () => {
5356

5457
const props = {
5558
a: Number,
59+
aa: {
60+
type: Number as PropType<number | undefined>,
61+
default: 1,
62+
},
63+
aaa: {
64+
type: Number as PropType<number | null>,
65+
default: 1,
66+
},
67+
aaaa: {
68+
type: Number as PropType<number | undefined>,
69+
// `as const` prevents widening to `boolean` (keeps literal `true` type)
70+
required: true as const,
71+
},
5672
// required should make property non-void
5773
b: {
5874
type: String,
@@ -146,6 +162,13 @@ describe('with object props', () => {
146162
setup(props) {
147163
// type assertion. See https://github.com/SamVerschueren/tsd
148164
expectType<ExpectedProps['a']>(props.a)
165+
expectType<ExpectedProps['aa']>(props.aa)
166+
expectType<ExpectedProps['aaa']>(props.aaa)
167+
168+
// @ts-expect-error should included `undefined`
169+
expectType<number>(props.aaaa)
170+
expectType<ExpectedProps['aaaa']>(props.aaaa)
171+
149172
expectType<ExpectedProps['b']>(props.b)
150173
expectType<ExpectedProps['e']>(props.e)
151174
expectType<ExpectedProps['h']>(props.h)
@@ -198,6 +221,8 @@ describe('with object props', () => {
198221
render() {
199222
const props = this.$props
200223
expectType<ExpectedProps['a']>(props.a)
224+
expectType<ExpectedProps['aa']>(props.aa)
225+
expectType<ExpectedProps['aaa']>(props.aaa)
201226
expectType<ExpectedProps['b']>(props.b)
202227
expectType<ExpectedProps['e']>(props.e)
203228
expectType<ExpectedProps['h']>(props.h)
@@ -225,6 +250,8 @@ describe('with object props', () => {
225250

226251
// should also expose declared props on `this`
227252
expectType<ExpectedProps['a']>(this.a)
253+
expectType<ExpectedProps['aa']>(this.aa)
254+
expectType<ExpectedProps['aaa']>(this.aaa)
228255
expectType<ExpectedProps['b']>(this.b)
229256
expectType<ExpectedProps['e']>(this.e)
230257
expectType<ExpectedProps['h']>(this.h)
@@ -269,6 +296,7 @@ describe('with object props', () => {
269296
expectType<JSX.Element>(
270297
<MyComponent
271298
a={1}
299+
aaaa={1}
272300
b="b"
273301
bb="bb"
274302
e={() => {}}
@@ -295,6 +323,7 @@ describe('with object props', () => {
295323

296324
expectType<Component>(
297325
<MyComponent
326+
aaaa={1}
298327
b="b"
299328
dd={{ n: 1 }}
300329
ddd={['ddd']}

packages-private/sfc-playground/src/download/template/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"vue": "latest"
1212
},
1313
"devDependencies": {
14-
"@vitejs/plugin-vue": "^5.2.3",
15-
"vite": "^6.2.3"
14+
"@vitejs/plugin-vue": "^5.2.4",
15+
"vite": "^6.3.5"
1616
}
1717
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ describe('compiler: cacheStatic transform', () => {
170170
{
171171
/* _ slot flag */
172172
},
173+
{
174+
type: NodeTypes.JS_PROPERTY,
175+
key: { content: '__' },
176+
value: { content: '[0]' },
177+
},
173178
],
174179
})
175180
})
@@ -197,6 +202,11 @@ describe('compiler: cacheStatic transform', () => {
197202
{
198203
/* _ slot flag */
199204
},
205+
{
206+
type: NodeTypes.JS_PROPERTY,
207+
key: { content: '__' },
208+
value: { content: '[0]' },
209+
},
200210
],
201211
})
202212
})

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.5.13",
3+
"version": "3.5.14",
44
"description": "@vue/compiler-core",
55
"main": "index.js",
66
"module": "dist/compiler-core.esm-bundler.js",

packages/compiler-core/src/codegen.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ function createCodegenContext(
188188
name = content
189189
}
190190
}
191-
addMapping(node.loc.start, name)
191+
if (node.loc.source) {
192+
addMapping(node.loc.start, name)
193+
}
192194
}
193195
if (newlineIndex === NewlineType.Unknown) {
194196
// multiple newlines, full iteration
@@ -225,7 +227,7 @@ function createCodegenContext(
225227
context.column = code.length - newlineIndex
226228
}
227229
}
228-
if (node && node.loc !== locStub) {
230+
if (node && node.loc !== locStub && node.loc.source) {
229231
addMapping(node.loc.end)
230232
}
231233
}

0 commit comments

Comments
 (0)