Skip to content

Commit edc79e7

Browse files
committed
Merge branch 'main' into minor
2 parents 9d651e2 + 2921685 commit edc79e7

File tree

17 files changed

+948
-928
lines changed

17 files changed

+948
-928
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@ff86a557419858bb967097bfc916833f5647fa8c
34+
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

.github/workflows/size-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: pnpm install
3838

3939
- name: Download Size Data
40-
uses: dawidd6/action-download-artifact@v6
40+
uses: dawidd6/action-download-artifact@v7
4141
with:
4242
name: size-data
4343
run_id: ${{ github.event.workflow_run.id }}
@@ -56,7 +56,7 @@ jobs:
5656
path: temp/size/base.txt
5757

5858
- name: Download Previous Size Data
59-
uses: dawidd6/action-download-artifact@v6
59+
uses: dawidd6/action-download-artifact@v7
6060
with:
6161
branch: ${{ steps.pr-base.outputs.content }}
6262
workflow: size-data.yml

changelogs/CHANGELOG-3.4.md

Lines changed: 0 additions & 120 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"version": "3.5.13",
4-
"packageManager": "pnpm@9.14.4",
4+
"packageManager": "pnpm@9.15.4",
55
"type": "module",
66
"scripts": {
77
"dev": "node scripts/dev.js",
@@ -65,39 +65,39 @@
6565
"@babel/parser": "catalog:",
6666
"@babel/types": "catalog:",
6767
"@rollup/plugin-alias": "^5.1.1",
68-
"@rollup/plugin-commonjs": "^28.0.1",
68+
"@rollup/plugin-commonjs": "^28.0.2",
6969
"@rollup/plugin-json": "^6.1.0",
70-
"@rollup/plugin-node-resolve": "^15.3.0",
70+
"@rollup/plugin-node-resolve": "^16.0.0",
7171
"@rollup/plugin-replace": "5.0.4",
72-
"@swc/core": "^1.9.3",
72+
"@swc/core": "^1.10.8",
7373
"@types/hash-sum": "^1.0.2",
74-
"@types/node": "^22.10.1",
74+
"@types/node": "^22.10.7",
7575
"@types/semver": "^7.5.8",
7676
"@types/serve-handler": "^6.1.4",
77-
"@vitest/coverage-v8": "^2.1.5",
77+
"@vitest/coverage-v8": "^3.0.2",
7878
"@vue/consolidate": "1.0.0",
7979
"conventional-changelog-cli": "^5.0.0",
8080
"enquirer": "^2.4.1",
81-
"esbuild": "^0.24.0",
81+
"esbuild": "^0.24.2",
8282
"esbuild-plugin-polyfill-node": "^0.3.0",
83-
"eslint": "^9.15.0",
84-
"eslint-plugin-import-x": "^4.4.2",
85-
"@vitest/eslint-plugin": "^1.1.10",
83+
"eslint": "^9.18.0",
84+
"eslint-plugin-import-x": "^4.6.1",
85+
"@vitest/eslint-plugin": "^1.1.25",
8686
"estree-walker": "catalog:",
87-
"jsdom": "^25.0.1",
88-
"lint-staged": "^15.2.10",
87+
"jsdom": "^26.0.0",
88+
"lint-staged": "^15.4.1",
8989
"lodash": "^4.17.21",
90-
"magic-string": "^0.30.14",
90+
"magic-string": "^0.30.17",
9191
"markdown-table": "^3.0.4",
9292
"marked": "13.0.3",
93-
"npm-run-all2": "^7.0.1",
93+
"npm-run-all2": "^7.0.2",
9494
"picocolors": "^1.1.1",
95-
"prettier": "^3.3.3",
95+
"prettier": "^3.4.2",
9696
"pretty-bytes": "^6.1.1",
9797
"pug": "^3.0.3",
98-
"puppeteer": "~23.3.0",
98+
"puppeteer": "~24.1.0",
9999
"rimraf": "^6.0.1",
100-
"rollup": "^4.27.4",
100+
"rollup": "^4.31.0",
101101
"rollup-plugin-dts": "^6.1.1",
102102
"rollup-plugin-esbuild": "^6.1.1",
103103
"rollup-plugin-polyfill-node": "^0.13.0",
@@ -108,9 +108,9 @@
108108
"todomvc-app-css": "^2.4.3",
109109
"tslib": "^2.8.1",
110110
"typescript": "~5.6.2",
111-
"typescript-eslint": "^8.14.0",
111+
"typescript-eslint": "^8.20.0",
112112
"vite": "catalog:",
113-
"vitest": "^2.1.5"
113+
"vitest": "^3.0.2"
114114
},
115115
"pnpm": {
116116
"peerDependencyRules": {

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.4.2",
16+
"@vue/repl": "^4.4.3",
1717
"file-saver": "^2.0.5",
1818
"jszip": "^3.10.1",
1919
"vue": "workspace:*"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
},
1313
"devDependencies": {
1414
"@vitejs/plugin-vue": "^5.2.1",
15-
"vite": "^5.4.11"
15+
"vite": "^6.0.7"
1616
}
1717
}

packages-private/template-explorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"enableNonBrowserBranches": true
1212
},
1313
"dependencies": {
14-
"monaco-editor": "^0.52.0",
14+
"monaco-editor": "^0.52.2",
1515
"source-map-js": "^1.2.1"
1616
}
1717
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { camelize } from '@vue/shared'
1212
import { CAMELIZE } from '../runtimeHelpers'
1313
import { processExpression } from './transformExpression'
1414

15-
// v-bind without arg is handled directly in ./transformElements.ts due to it affecting
15+
// v-bind without arg is handled directly in ./transformElement.ts due to its affecting
1616
// codegen for the entire props object. This transform here is only for v-bind
1717
// *with* args.
1818
export const transformBind: DirectiveTransform = (dir, _node, context) => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { hasScopeRef, isFnExpression, isMemberExpression } from '../utils'
1717
import { TO_HANDLER_KEY } from '../runtimeHelpers'
1818

1919
export interface VOnDirectiveNode extends DirectiveNode {
20-
// v-on without arg is handled directly in ./transformElements.ts due to it affecting
20+
// v-on without arg is handled directly in ./transformElement.ts due to its affecting
2121
// codegen for the entire props object. This transform here is only for v-on
2222
// *with* args.
2323
arg: ExpressionNode

packages/compiler-sfc/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@vue/shared": "workspace:*",
5050
"estree-walker": "catalog:",
5151
"magic-string": "catalog:",
52-
"postcss": "^8.4.49",
52+
"postcss": "^8.5.1",
5353
"source-map-js": "catalog:"
5454
},
5555
"devDependencies": {
@@ -58,10 +58,10 @@
5858
"hash-sum": "^2.0.0",
5959
"lru-cache": "10.1.0",
6060
"merge-source-map": "^1.1.0",
61-
"minimatch": "~9.0.5",
61+
"minimatch": "~10.0.1",
6262
"postcss-modules": "^6.0.1",
6363
"postcss-selector-parser": "^7.0.0",
6464
"pug": "^3.0.3",
65-
"sass": "^1.82.0"
65+
"sass": "^1.83.4"
6666
}
6767
}

packages/compiler-sfc/src/compileScript.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ export function compileScript(
170170
const scriptLang = script && script.lang
171171
const scriptSetupLang = scriptSetup && scriptSetup.lang
172172

173-
let refBindings: string[] | undefined
174-
175173
if (!scriptSetup) {
176174
if (!script) {
177175
throw new Error(`[@vue/compiler-sfc] SFC contains no <script> tags.`)
@@ -740,12 +738,6 @@ export function compileScript(
740738
for (const key in setupBindings) {
741739
ctx.bindingMetadata[key] = setupBindings[key]
742740
}
743-
// known ref bindings
744-
if (refBindings) {
745-
for (const key of refBindings) {
746-
ctx.bindingMetadata[key] = BindingTypes.SETUP_REF
747-
}
748-
}
749741

750742
// 7. inject `useCssVars` calls
751743
if (

packages/reactivity/src/effectScope.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export class EffectScope implements Subscriber {
1515
depsTail: Link | undefined = undefined
1616
flags: number = 0
1717

18+
/**
19+
* @internal track `on` calls, allow `on` call multiple times
20+
*/
21+
private _on = 0
1822
/**
1923
* @internal
2024
*/
@@ -102,20 +106,27 @@ export class EffectScope implements Subscriber {
102106
}
103107
}
104108

109+
prevScope: EffectScope | undefined
105110
/**
106111
* This should only be called on non-detached scopes
107112
* @internal
108113
*/
109114
on(): void {
110-
activeEffectScope = this
115+
if (++this._on === 1) {
116+
this.prevScope = activeEffectScope
117+
activeEffectScope = this
118+
}
111119
}
112120

113121
/**
114122
* This should only be called on non-detached scopes
115123
* @internal
116124
*/
117125
off(): void {
118-
activeEffectScope = this.parent
126+
if (this._on > 0 && --this._on === 0) {
127+
activeEffectScope = this.prevScope
128+
this.prevScope = undefined
129+
}
119130
}
120131

121132
stop(fromParent?: boolean): void {

packages/runtime-core/__tests__/apiWatch.spec.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
TrackOpTypes,
3232
TriggerOpTypes,
3333
effectScope,
34+
onScopeDispose,
3435
shallowReactive,
3536
shallowRef,
3637
toRef,
@@ -1982,4 +1983,31 @@ describe('api: watch', () => {
19821983
expect(spy1).toHaveBeenCalled()
19831984
expect(spy2).toHaveBeenCalled()
19841985
})
1986+
1987+
// #12631
1988+
test('this.$watch w/ onScopeDispose', () => {
1989+
const onCleanup = vi.fn()
1990+
const toggle = ref(true)
1991+
1992+
const Comp = defineComponent({
1993+
render() {},
1994+
created(this: any) {
1995+
this.$watch(
1996+
() => 1,
1997+
function () {},
1998+
)
1999+
onScopeDispose(onCleanup)
2000+
},
2001+
})
2002+
2003+
const App = defineComponent({
2004+
render() {
2005+
return toggle.value ? h(Comp) : null
2006+
},
2007+
})
2008+
2009+
const root = nodeOps.createElement('div')
2010+
createApp(App).mount(root)
2011+
expect(onCleanup).toBeCalledTimes(0)
2012+
})
19852013
})

packages/vue/__tests__/e2e/e2eUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import puppeteer, {
22
type Browser,
33
type ClickOptions,
4+
type LaunchOptions,
45
type Page,
5-
type PuppeteerLaunchOptions,
66
} from 'puppeteer'
77

88
export const E2E_TIMEOUT: number = 30 * 1000
99

10-
const puppeteerOptions: PuppeteerLaunchOptions = {
10+
const puppeteerOptions: LaunchOptions = {
1111
args: process.env.CI ? ['--no-sandbox', '--disable-setuid-sandbox'] : [],
1212
headless: true,
1313
}

packages/vue/__tests__/e2e/todomvc.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ describe('e2e: todomvc', () => {
1414
classList,
1515
enterValue,
1616
clearValue,
17+
timeout,
1718
} = setupPuppeteer()
1819

1920
async function removeItemAt(n: number) {
@@ -101,6 +102,7 @@ describe('e2e: todomvc', () => {
101102

102103
// active filter
103104
await click('.filters li:nth-child(2) a')
105+
await timeout(1)
104106
expect(await count('.todo')).toBe(1)
105107
expect(await count('.todo.completed')).toBe(0)
106108
// add item with filter active
@@ -109,6 +111,7 @@ describe('e2e: todomvc', () => {
109111

110112
// completed filter
111113
await click('.filters li:nth-child(3) a')
114+
await timeout(1)
112115
expect(await count('.todo')).toBe(2)
113116
expect(await count('.todo.completed')).toBe(2)
114117

@@ -128,12 +131,14 @@ describe('e2e: todomvc', () => {
128131
await click('.todo .toggle')
129132
expect(await count('.todo')).toBe(1)
130133
await click('.filters li:nth-child(2) a')
134+
await timeout(1)
131135
expect(await count('.todo')).toBe(3)
132136
await click('.todo .toggle')
133137
expect(await count('.todo')).toBe(2)
134138

135139
// editing triggered by blur
136140
await click('.filters li:nth-child(1) a')
141+
await timeout(1)
137142
await click('.todo:nth-child(1) label', { clickCount: 2 })
138143
expect(await count('.todo.editing')).toBe(1)
139144
expect(await isFocused('.todo:nth-child(1) .edit')).toBe(true)

0 commit comments

Comments
 (0)