Skip to content

Commit 9caf40e

Browse files
authored
Merge branch 'main' into edison/fix/13453
2 parents d88b2f4 + 439e1a5 commit 9caf40e

File tree

75 files changed

+1463
-819
lines changed

Some content is hidden

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

75 files changed

+1463
-819
lines changed

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
- name: Run prettier
3232
run: pnpm run format
3333

34-
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
34+
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ jobs:
3636
- name: Install deps
3737
run: pnpm install
3838

39+
- name: Update npm
40+
run: npm i -g npm@latest
41+
3942
- name: Build and publish
4043
id: publish
4144
run: |
4245
pnpm release --publishOnly
43-
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4546
4647
- name: Create GitHub release
4748
id: release_tag

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
## [3.5.18](https://github.com/vuejs/core/compare/v3.5.17...v3.5.18) (2025-07-23)
2+
3+
4+
### Bug Fixes
5+
6+
* **compiler-core:** avoid cached text vnodes retaining detached DOM nodes ([#13662](https://github.com/vuejs/core/issues/13662)) ([00695a5](https://github.com/vuejs/core/commit/00695a5b41b2d032deaeada83831ff83aa6bfd4e)), closes [#13661](https://github.com/vuejs/core/issues/13661)
7+
* **compiler-core:** avoid self updates of `v-pre` ([#12556](https://github.com/vuejs/core/issues/12556)) ([21b685a](https://github.com/vuejs/core/commit/21b685ad9d9d0e6060fc7d07b719bf35f2d9ae1f))
8+
* **compiler-core:** identifiers in function parameters should not be inferred as references ([#13548](https://github.com/vuejs/core/issues/13548)) ([9b02923](https://github.com/vuejs/core/commit/9b029239edf88558465b941e1e4c085f92b1ebff))
9+
* **compiler-core:** recognize empty string as non-identifier ([#12553](https://github.com/vuejs/core/issues/12553)) ([ce93339](https://github.com/vuejs/core/commit/ce933390ad1c72bed258f7ad959a78f0e8acdf57))
10+
* **compiler-core:** transform empty `v-bind` dynamic argument content correctly ([#12554](https://github.com/vuejs/core/issues/12554)) ([d3af67e](https://github.com/vuejs/core/commit/d3af67e878790892f9d34cfea15d13625aabe733))
11+
* **compiler-sfc:** transform empty srcset w/ includeAbsolute: true ([#13639](https://github.com/vuejs/core/issues/13639)) ([d8e40ef](https://github.com/vuejs/core/commit/d8e40ef7e1c20ee86b294e7cf78e2de60d12830e)), closes [vitejs/vite-plugin-vue#631](https://github.com/vitejs/vite-plugin-vue/issues/631)
12+
* **css-vars:** nullish v-bind in style should not lead to unexpected inheritance ([#12461](https://github.com/vuejs/core/issues/12461)) ([c85f1b5](https://github.com/vuejs/core/commit/c85f1b5a132eb8ec25f71b250e25e65a5c20964f)), closes [#12434](https://github.com/vuejs/core/issues/12434) [#12439](https://github.com/vuejs/core/issues/12439) [#7474](https://github.com/vuejs/core/issues/7474) [#7475](https://github.com/vuejs/core/issues/7475)
13+
* **custom-element:** ensure exposed methods are accessible from custom elements by making them enumerable ([#13634](https://github.com/vuejs/core/issues/13634)) ([90573b0](https://github.com/vuejs/core/commit/90573b06bf6fb6c14c6bbff6c4e34e0ab108953a)), closes [#13632](https://github.com/vuejs/core/issues/13632)
14+
* **hydration:** prevent lazy hydration for updated components ([#13511](https://github.com/vuejs/core/issues/13511)) ([a9269c6](https://github.com/vuejs/core/commit/a9269c642bf944560bc29adb5dae471c11cd9ee8)), closes [#13510](https://github.com/vuejs/core/issues/13510)
15+
* **runtime-core:** ensure correct anchor el for unresolved async components ([#13560](https://github.com/vuejs/core/issues/13560)) ([7f29943](https://github.com/vuejs/core/commit/7f2994393dcdb82cacbf62e02b5ba5565f32588b)), closes [#13559](https://github.com/vuejs/core/issues/13559)
16+
* **slots:** refine internal key checking to support slot names starting with an underscore ([#13612](https://github.com/vuejs/core/issues/13612)) ([c5f7db1](https://github.com/vuejs/core/commit/c5f7db11542bb2246363aef78c88a8e6cef0ee93)), closes [#13611](https://github.com/vuejs/core/issues/13611)
17+
* **ssr:** ensure empty slots render as a comment node in Transition ([#13396](https://github.com/vuejs/core/issues/13396)) ([8cfc10a](https://github.com/vuejs/core/commit/8cfc10a80b9cbf5d801ab149e49b8506d192e7e1)), closes [#13394](https://github.com/vuejs/core/issues/13394)
18+
19+
20+
21+
## [3.5.17](https://github.com/vuejs/core/compare/v3.5.16...v3.5.17) (2025-06-18)
22+
23+
24+
### Bug Fixes
25+
26+
* **compat:** allow v-model built in modifiers on component ([#12654](https://github.com/vuejs/core/issues/12654)) ([cb14b86](https://github.com/vuejs/core/commit/cb14b860f150c4a83bcd52cd26096b7a5aa3a2bf)), closes [#12652](https://github.com/vuejs/core/issues/12652)
27+
* **compile-sfc:** handle mapped types work with omit and pick ([#12648](https://github.com/vuejs/core/issues/12648)) ([4eb46e4](https://github.com/vuejs/core/commit/4eb46e443f1878199755cb73d481d318a9714392)), closes [#12647](https://github.com/vuejs/core/issues/12647)
28+
* **compiler-core:** do not increase newlines in `InEntity` state ([#13362](https://github.com/vuejs/core/issues/13362)) ([f05a8d6](https://github.com/vuejs/core/commit/f05a8d613bd873b811cfdb9979ccac8382dba322))
29+
* **compiler-core:** ignore whitespace when matching adjacent v-if ([#12321](https://github.com/vuejs/core/issues/12321)) ([10ebcef](https://github.com/vuejs/core/commit/10ebcef8c870dbc042b0ea49b1424b2e8f692145)), closes [#9173](https://github.com/vuejs/core/issues/9173)
30+
* **compiler-core:** prevent comments from blocking static node hoisting ([#13345](https://github.com/vuejs/core/issues/13345)) ([55dad62](https://github.com/vuejs/core/commit/55dad625acd9e9ddd5a933d5e323ecfdec1a612f)), closes [#13344](https://github.com/vuejs/core/issues/13344)
31+
* **compiler-sfc:** improved type resolution for function type aliases ([#13452](https://github.com/vuejs/core/issues/13452)) ([f3479aa](https://github.com/vuejs/core/commit/f3479aac9625f4459e650d1c0a70e73863147903)), closes [#13444](https://github.com/vuejs/core/issues/13444)
32+
* **custom-element:** ensure configureApp is applied to async component ([#12607](https://github.com/vuejs/core/issues/12607)) ([5ba1afb](https://github.com/vuejs/core/commit/5ba1afba09c3ea56c1c17484f5d8aeae210ce52a)), closes [#12448](https://github.com/vuejs/core/issues/12448)
33+
* **custom-element:** prevent injecting child styles if shadowRoot is false ([#12769](https://github.com/vuejs/core/issues/12769)) ([73055d8](https://github.com/vuejs/core/commit/73055d8d9578d485e3fe846726b50666e1aa56f5)), closes [#12630](https://github.com/vuejs/core/issues/12630)
34+
* **reactivity:** add `__v_skip` flag to `Dep` to prevent reactive conversion ([#12804](https://github.com/vuejs/core/issues/12804)) ([e8d8f5f](https://github.com/vuejs/core/commit/e8d8f5f604e821acc46b4200d5b06979c05af1c2)), closes [#12803](https://github.com/vuejs/core/issues/12803)
35+
* **runtime-core:** unset old ref during patching when new ref is absent ([#12900](https://github.com/vuejs/core/issues/12900)) ([47ddf98](https://github.com/vuejs/core/commit/47ddf986021dff8de68b0da72787e53a6c19de4c)), closes [#12898](https://github.com/vuejs/core/issues/12898)
36+
* **slots:** make cache indexes marker non-enumerable ([#13469](https://github.com/vuejs/core/issues/13469)) ([919c447](https://github.com/vuejs/core/commit/919c44744bba1f0c661c87d2059c3b429611aa7e)), closes [#13468](https://github.com/vuejs/core/issues/13468)
37+
* **ssr:** handle initial selected state for select with v-model + v-for/v-if option ([#13487](https://github.com/vuejs/core/issues/13487)) ([1552095](https://github.com/vuejs/core/commit/15520954f9f1c7f834175938a50dba5d4be0e6c4)), closes [#13486](https://github.com/vuejs/core/issues/13486)
38+
* **types:** typo of `vOnce` and `vSlot` ([#13343](https://github.com/vuejs/core/issues/13343)) ([762fae4](https://github.com/vuejs/core/commit/762fae4b57ad60602e5c84465a3bff562785b314))
39+
40+
41+
142
## [3.5.16](https://github.com/vuejs/core/compare/v3.5.15...v3.5.16) (2025-05-29)
243

344

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
3-
"version": "3.5.16",
4-
"packageManager": "pnpm@10.11.1",
3+
"version": "3.5.18",
4+
"packageManager": "pnpm@10.13.1",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -65,21 +65,21 @@
6565
"@babel/parser": "catalog:",
6666
"@babel/types": "catalog:",
6767
"@rollup/plugin-alias": "^5.1.1",
68-
"@rollup/plugin-commonjs": "^28.0.3",
68+
"@rollup/plugin-commonjs": "^28.0.6",
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.29",
72+
"@swc/core": "^1.13.1",
7373
"@types/hash-sum": "^1.0.2",
74-
"@types/node": "^22.15.29",
74+
"@types/node": "^22.16.5",
7575
"@types/semver": "^7.7.0",
7676
"@types/serve-handler": "^6.1.4",
7777
"@vitest/coverage-v8": "^3.1.4",
7878
"@vitest/eslint-plugin": "^1.2.1",
7979
"@vue/consolidate": "1.0.0",
8080
"conventional-changelog-cli": "^5.0.0",
8181
"enquirer": "^2.4.1",
82-
"esbuild": "^0.25.5",
82+
"esbuild": "^0.25.8",
8383
"esbuild-plugin-polyfill-node": "^0.3.0",
8484
"eslint": "^9.27.0",
8585
"eslint-plugin-import-x": "^4.13.1",
@@ -97,7 +97,7 @@
9797
"pug": "^3.0.3",
9898
"puppeteer": "~24.9.0",
9999
"rimraf": "^6.0.1",
100-
"rollup": "^4.41.1",
100+
"rollup": "^4.45.1",
101101
"rollup-plugin-dts": "^6.2.1",
102102
"rollup-plugin-esbuild": "^6.2.1",
103103
"rollup-plugin-polyfill-node": "^0.13.0",

packages-private/sfc-playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"vite": "catalog:"
1414
},
1515
"dependencies": {
16-
"@vue/repl": "^4.5.1",
16+
"@vue/repl": "^4.6.2",
1717
"file-saver": "^2.0.5",
1818
"jszip": "^3.10.1",
1919
"vue": "workspace:*"

packages-private/sfc-playground/src/App.vue

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Header from './Header.vue'
33
import { Repl, useStore, SFCOptions, useVueImportMap } from '@vue/repl'
44
import Monaco from '@vue/repl/monaco-editor'
5-
import { ref, watchEffect, onMounted, computed } from 'vue'
5+
import { ref, watchEffect, onMounted, computed, watch } from 'vue'
66
77
const replRef = ref<InstanceType<typeof Repl>>()
88
@@ -115,6 +115,34 @@ onMounted(() => {
115115
// @ts-expect-error process shim for old versions of @vue/compiler-sfc dependency
116116
window.process = { env: {} }
117117
})
118+
119+
const isVaporSupported = ref(false)
120+
watch(
121+
() => store.vueVersion,
122+
(version, oldVersion) => {
123+
const [major, minor] = (version || store.compiler.version)
124+
.split('.')
125+
.map((v: string) => parseInt(v, 10))
126+
isVaporSupported.value = major > 3 || (major === 3 && minor >= 6)
127+
if (oldVersion) reloadPage()
128+
},
129+
{ immediate: true, flush: 'pre' },
130+
)
131+
132+
const previewOptions = computed(() => ({
133+
customCode: {
134+
importCode: `import { initCustomFormatter${isVaporSupported.value ? ', vaporInteropPlugin' : ''} } from 'vue'`,
135+
useCode: `
136+
${isVaporSupported.value ? 'app.use(vaporInteropPlugin)' : ''}
137+
if (window.devtoolsFormatters) {
138+
const index = window.devtoolsFormatters.findIndex((v) => v.__vue_custom_formatter)
139+
window.devtoolsFormatters.splice(index, 1)
140+
initCustomFormatter()
141+
} else {
142+
initCustomFormatter()
143+
}`,
144+
},
145+
}))
118146
</script>
119147

120148
<template>
@@ -141,20 +169,11 @@ onMounted(() => {
141169
:editorOptions="{ autoSaveText: false }"
142170
:store="store"
143171
:showCompileOutput="true"
172+
:showSsrOutput="useSSRMode"
173+
:showOpenSourceMap="true"
144174
:autoResize="true"
145175
:clearConsole="false"
146-
:preview-options="{
147-
customCode: {
148-
importCode: `import { initCustomFormatter } from 'vue'`,
149-
useCode: `if (window.devtoolsFormatters) {
150-
const index = window.devtoolsFormatters.findIndex((v) => v.__vue_custom_formatter)
151-
window.devtoolsFormatters.splice(index, 1)
152-
initCustomFormatter()
153-
} else {
154-
initCustomFormatter()
155-
}`,
156-
},
157-
}"
176+
:preview-options="previewOptions"
158177
/>
159178
</template>
160179

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ return function render(_ctx, _cache) {
6060
6161
return (_openBlock(), _createElementBlock("div", null, _cache[0] || (_cache[0] = [
6262
_createElementVNode("span", null, null, -1 /* CACHED */),
63-
_createTextVNode("foo"),
63+
_createTextVNode("foo", -1 /* CACHED */),
6464
_createElementVNode("div", null, null, -1 /* CACHED */)
6565
])))
6666
}

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,25 @@ describe('compiler: v-if', () => {
301301
])
302302
})
303303

304+
test('error on adjacent v-else', () => {
305+
const onError = vi.fn()
306+
307+
const {
308+
node: { branches },
309+
} = parseWithIfTransform(
310+
`<div v-if="false"/><div v-else/><div v-else/>`,
311+
{ onError },
312+
0,
313+
)
314+
315+
expect(onError.mock.calls[0]).toMatchObject([
316+
{
317+
code: ErrorCodes.X_V_ELSE_NO_ADJACENT_IF,
318+
loc: branches[branches.length - 1].loc,
319+
},
320+
])
321+
})
322+
304323
test('error on user key', () => {
305324
const onError = vi.fn()
306325
// dynamic

packages/compiler-core/__tests__/utils.spec.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import type { ExpressionNode, TransformContext } from '../src'
1+
import { babelParse, walkIdentifiers } from '@vue/compiler-sfc'
2+
import {
3+
type ExpressionNode,
4+
type TransformContext,
5+
isReferencedIdentifier,
6+
} from '../src'
27
import { type Position, createSimpleExpression } from '../src/ast'
38
import {
49
advancePositionWithClone,
@@ -115,3 +120,18 @@ test('toValidAssetId', () => {
115120
'_component_test_2797935797_1',
116121
)
117122
})
123+
124+
describe('isReferencedIdentifier', () => {
125+
test('identifiers in function parameters should not be inferred as references', () => {
126+
expect.assertions(4)
127+
const ast = babelParse(`(({ title }) => [])`)
128+
walkIdentifiers(
129+
ast.program.body[0],
130+
(node, parent, parentStack, isReference) => {
131+
expect(isReference).toBe(false)
132+
expect(isReferencedIdentifier(node, parent, parentStack)).toBe(false)
133+
},
134+
true,
135+
)
136+
})
137+
})

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

0 commit comments

Comments
 (0)