Skip to content

Commit 19e10ff

Browse files
authored
Merge branch 'minor' into c/use-oxlint
2 parents 0e254ce + 77067ab commit 19e10ff

31 files changed

+927
-802
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "3.5.13",
3+
"version": "3.5.14",
44
"packageManager": "[email protected]",
55
"type": "module",
66
"scripts": {

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

packages/compiler-sfc/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-sfc",
3-
"version": "3.5.13",
3+
"version": "3.5.14",
44
"description": "@vue/compiler-sfc",
55
"main": "dist/compiler-sfc.cjs.js",
66
"module": "dist/compiler-sfc.esm-browser.js",

packages/compiler-ssr/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-ssr",
3-
"version": "3.5.13",
3+
"version": "3.5.14",
44
"description": "@vue/compiler-ssr",
55
"main": "dist/compiler-ssr.cjs.js",
66
"types": "dist/compiler-ssr.d.ts",

packages/reactivity/__tests__/computed.spec.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ import {
2525
toRaw,
2626
triggerRef,
2727
} from '../src'
28-
import { EffectFlags, pauseTracking, resetTracking } from '../src/effect'
2928
import type { ComputedRef, ComputedRefImpl } from '../src/computed'
29+
import { pauseTracking, resetTracking } from '../src/effect'
30+
import { SubscriberFlags } from '../src/system'
3031

3132
describe('reactivity/computed', () => {
3233
it('should return updated value', () => {
@@ -409,9 +410,9 @@ describe('reactivity/computed', () => {
409410
a.value++
410411
e.value
411412

412-
expect(e.deps!.dep).toBe(b.dep)
413-
expect(e.deps!.nextDep!.dep).toBe(d.dep)
414-
expect(e.deps!.nextDep!.nextDep!.dep).toBe(c.dep)
413+
expect(e.deps!.dep).toBe(b)
414+
expect(e.deps!.nextDep!.dep).toBe(d)
415+
expect(e.deps!.nextDep!.nextDep!.dep).toBe(c)
415416
expect(cSpy).toHaveBeenCalledTimes(2)
416417

417418
a.value++
@@ -466,8 +467,12 @@ describe('reactivity/computed', () => {
466467
const c2 = computed(() => c1.value) as unknown as ComputedRefImpl
467468

468469
c2.value
469-
expect(c1.flags & EffectFlags.DIRTY).toBeFalsy()
470-
expect(c2.flags & EffectFlags.DIRTY).toBeFalsy()
470+
expect(
471+
c1.flags & (SubscriberFlags.Dirty | SubscriberFlags.PendingComputed),
472+
).toBe(0)
473+
expect(
474+
c2.flags & (SubscriberFlags.Dirty | SubscriberFlags.PendingComputed),
475+
).toBe(0)
471476
})
472477

473478
it('should chained computeds dirtyLevel update with first computed effect', () => {

packages/reactivity/__tests__/effect.spec.ts

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
import {
2+
computed,
3+
h,
4+
nextTick,
5+
nodeOps,
6+
ref,
7+
render,
8+
serializeInner,
9+
} from '@vue/runtime-test'
10+
import { ITERATE_KEY, getDepFromReactive } from '../src/dep'
11+
import { onEffectCleanup, pauseTracking, resetTracking } from '../src/effect'
112
import {
213
type DebuggerEvent,
314
type ReactiveEffectRunner,
@@ -11,23 +22,7 @@ import {
1122
stop,
1223
toRaw,
1324
} from '../src/index'
14-
import { type Dep, ITERATE_KEY, getDepFromReactive } from '../src/dep'
15-
import {
16-
computed,
17-
h,
18-
nextTick,
19-
nodeOps,
20-
ref,
21-
render,
22-
serializeInner,
23-
} from '@vue/runtime-test'
24-
import {
25-
endBatch,
26-
onEffectCleanup,
27-
pauseTracking,
28-
resetTracking,
29-
startBatch,
30-
} from '../src/effect'
25+
import { type Dependency, endBatch, startBatch } from '../src/system'
3126

3227
describe('reactivity/effect', () => {
3328
it('should run the passed function once (wrapped by a effect)', () => {
@@ -1183,12 +1178,12 @@ describe('reactivity/effect', () => {
11831178
})
11841179

11851180
describe('dep unsubscribe', () => {
1186-
function getSubCount(dep: Dep | undefined) {
1181+
function getSubCount(dep: Dependency | undefined) {
11871182
let count = 0
11881183
let sub = dep!.subs
11891184
while (sub) {
11901185
count++
1191-
sub = sub.prevSub
1186+
sub = sub.nextSub
11921187
}
11931188
return count
11941189
}

packages/reactivity/__tests__/gc.spec.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
type ComputedRef,
33
computed,
44
effect,
5+
effectScope,
56
reactive,
67
shallowRef as ref,
78
toRaw,
@@ -79,4 +80,36 @@ describe.skipIf(!global.gc)('reactivity/gc', () => {
7980
src.foo++
8081
expect(spy).toHaveBeenCalledTimes(2)
8182
})
83+
84+
it('should release computed that untrack by effect', async () => {
85+
const src = ref(0)
86+
// @ts-expect-error ES2021 API
87+
const c = new WeakRef(computed(() => src.value))
88+
const scope = effectScope()
89+
90+
scope.run(() => {
91+
effect(() => c.deref().value)
92+
})
93+
94+
expect(c.deref()).toBeDefined()
95+
scope.stop()
96+
await gc()
97+
expect(c.deref()).toBeUndefined()
98+
})
99+
100+
it('should release computed that untrack by effectScope', async () => {
101+
const src = ref(0)
102+
// @ts-expect-error ES2021 API
103+
const c = new WeakRef(computed(() => src.value))
104+
const scope = effectScope()
105+
106+
scope.run(() => {
107+
c.deref().value
108+
})
109+
110+
expect(c.deref()).toBeDefined()
111+
scope.stop()
112+
await gc()
113+
expect(c.deref()).toBeUndefined()
114+
})
82115
})

packages/reactivity/package.json

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

0 commit comments

Comments
 (0)