From 2328b051f4efa1f1394b7d4e73b7c3f76e430e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Sat, 28 Sep 2024 09:56:09 +0800 Subject: [PATCH 001/222] fix(compiler-sfc): do not skip `TSSatisfiesExpression` when transforming props destructure (#12062) close #12061 --- packages/compiler-sfc/src/script/definePropsDestructure.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/compiler-sfc/src/script/definePropsDestructure.ts b/packages/compiler-sfc/src/script/definePropsDestructure.ts index 341b537d878..f9a56e32e44 100644 --- a/packages/compiler-sfc/src/script/definePropsDestructure.ts +++ b/packages/compiler-sfc/src/script/definePropsDestructure.ts @@ -242,6 +242,7 @@ export function transformDestructuredProps( parent.type.startsWith('TS') && parent.type !== 'TSAsExpression' && parent.type !== 'TSNonNullExpression' && + parent.type !== 'TSSatisfiesExpression' && parent.type !== 'TSTypeAssertion' ) { return this.skip() From 29de6f8b0bb1a604f247b0712daac29e93aa6f3e Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 28 Sep 2024 19:24:55 +0800 Subject: [PATCH 002/222] chore: remove no longer used property on Dep --- packages/reactivity/src/dep.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/reactivity/src/dep.ts b/packages/reactivity/src/dep.ts index e7e9672dc9e..7e404874348 100644 --- a/packages/reactivity/src/dep.ts +++ b/packages/reactivity/src/dep.ts @@ -85,7 +85,6 @@ export class Dep { /** * For object property deps cleanup */ - target?: unknown = undefined map?: KeyToDepMap = undefined key?: unknown = undefined @@ -263,7 +262,6 @@ export function track(target: object, type: TrackOpTypes, key: unknown): void { let dep = depsMap.get(key) if (!dep) { depsMap.set(key, (dep = new Dep())) - dep.target = target dep.map = depsMap dep.key = key } From d3f5e6e5319b4ffaa55ca9a2ea3d95d78e76fa58 Mon Sep 17 00:00:00 2001 From: Tycho Date: Thu, 3 Oct 2024 23:16:52 +0800 Subject: [PATCH 003/222] fix(reactivity): prevent overwriting `next` property during batch processing (#12075) close #12072 --- packages/reactivity/__tests__/watch.spec.ts | 17 +++++++++++ packages/reactivity/src/computed.ts | 2 +- packages/reactivity/src/effect.ts | 33 ++++++++++++--------- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/packages/reactivity/__tests__/watch.spec.ts b/packages/reactivity/__tests__/watch.spec.ts index 882e8a245fa..245acfd63be 100644 --- a/packages/reactivity/__tests__/watch.spec.ts +++ b/packages/reactivity/__tests__/watch.spec.ts @@ -260,4 +260,21 @@ describe('watch', () => { src.value = 10 expect(spy).toHaveBeenCalledTimes(2) }) + + test('should ensure correct execution order in batch processing', () => { + const dummy: number[] = [] + const n1 = ref(0) + const n2 = ref(0) + const sum = computed(() => n1.value + n2.value) + watch(n1, () => { + dummy.push(1) + n2.value++ + }) + watch(sum, () => dummy.push(2)) + watch(n1, () => dummy.push(3)) + + n1.value++ + + expect(dummy).toEqual([1, 2, 3]) + }) }) diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index 628cf46367b..ea798e201d4 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -121,7 +121,7 @@ export class ComputedRefImpl implements Subscriber { // avoid infinite self recursion activeSub !== this ) { - batch(this) + batch(this, true) return true } else if (__DEV__) { // TODO warn diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index dad800d146d..243518839b3 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -234,9 +234,15 @@ export class ReactiveEffect let batchDepth = 0 let batchedSub: Subscriber | undefined +let batchedComputed: Subscriber | undefined -export function batch(sub: Subscriber): void { +export function batch(sub: Subscriber, isComputed = false): void { sub.flags |= EffectFlags.NOTIFIED + if (isComputed) { + sub.next = batchedComputed + batchedComputed = sub + return + } sub.next = batchedSub batchedSub = sub } @@ -257,24 +263,23 @@ export function endBatch(): void { return } + if (batchedComputed) { + let e: Subscriber | undefined = batchedComputed + batchedComputed = undefined + while (e) { + const next: Subscriber | undefined = e.next + e.next = undefined + e.flags &= ~EffectFlags.NOTIFIED + e = next + } + } + let error: unknown while (batchedSub) { let e: Subscriber | undefined = batchedSub - let next: Subscriber | undefined - // 1st pass: clear notified flags for computed upfront - // we use the ACTIVE flag as a discriminator between computed and effect, - // since NOTIFIED is useless for an inactive effect anyway. - while (e) { - if (!(e.flags & EffectFlags.ACTIVE)) { - e.flags &= ~EffectFlags.NOTIFIED - } - e = e.next - } - e = batchedSub batchedSub = undefined - // 2nd pass: run effects while (e) { - next = e.next + const next: Subscriber | undefined = e.next e.next = undefined e.flags &= ~EffectFlags.NOTIFIED if (e.flags & EffectFlags.ACTIVE) { From 435e4fefad0df3a79a077d4b9a985af6ce830d70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:17:22 +0800 Subject: [PATCH 004/222] chore(deps): update all non-major dependencies (#12080) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 135 ++++++++++------------------- 3 files changed, 51 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index f958d2521c4..a8c4b440db8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.5.10", - "packageManager": "pnpm@9.10.0", + "packageManager": "pnpm@9.12.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -68,7 +68,7 @@ "@rollup/plugin-replace": "5.0.4", "@swc/core": "^1.7.28", "@types/hash-sum": "^1.0.2", - "@types/node": "^20.16.5", + "@types/node": "^20.16.10", "@types/semver": "^7.5.8", "@types/serve-handler": "^6.1.4", "@vitest/coverage-v8": "^2.1.1", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 2487f621f9f..4390d50977e 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -62,6 +62,6 @@ "postcss-modules": "^6.0.0", "postcss-selector-parser": "^6.1.2", "pug": "^3.0.3", - "sass": "^1.78.0" + "sass": "^1.79.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index edcfab24945..586fe7e1ca2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: ^1.0.2 version: 1.0.2 '@types/node': - specifier: ^20.16.5 - version: 20.16.5 + specifier: ^20.16.10 + version: 20.16.10 '@types/semver': specifier: ^7.5.8 version: 7.5.8 @@ -70,7 +70,7 @@ importers: version: 6.1.4 '@vitest/coverage-v8': specifier: ^2.1.1 - version: 2.1.1(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) + version: 2.1.1(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -94,7 +94,7 @@ importers: version: 4.2.1(eslint@9.10.0)(typescript@5.6.2) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) + version: 0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)) estree-walker: specifier: 'catalog:' version: 2.0.2 @@ -175,10 +175,10 @@ importers: version: 8.5.0(eslint@9.10.0)(typescript@5.6.2) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + version: 5.4.0(@types/node@20.16.10)(sass@1.79.4) vitest: specifier: ^2.1.1 - version: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + version: 2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4) packages-private/dts-built-test: dependencies: @@ -218,10 +218,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue) + version: 5.1.2(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))(vue@packages+vue) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + version: 5.4.0(@types/node@20.16.10)(sass@1.79.4) packages-private/template-explorer: dependencies: @@ -236,10 +236,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue) + version: 5.1.2(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))(vue@packages+vue) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + version: 5.4.0(@types/node@20.16.10)(sass@1.79.4) vue: specifier: workspace:* version: link:../../packages/vue @@ -333,8 +333,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 sass: - specifier: ^1.78.0 - version: 1.78.0 + specifier: ^1.79.4 + version: 1.79.4 packages/compiler-ssr: dependencies: @@ -1165,8 +1165,8 @@ packages: '@types/hash-sum@1.0.2': resolution: {integrity: sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==} - '@types/node@20.16.5': - resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} + '@types/node@20.16.10': + resolution: {integrity: sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1389,10 +1389,6 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} @@ -1458,10 +1454,6 @@ packages: resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} engines: {node: '>=10.0.0'} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} - engines: {node: '>=8'} - boxen@7.0.0: resolution: {integrity: sha512-j//dBVuyacJbvW+tvZ9HuH03fZ46QcaKvvhZickZqtB271DxJ7SNRSNxrV/dZX0085m7hISRZWbzWlJvx/rHSg==} engines: {node: '>=14.16'} @@ -1533,9 +1525,9 @@ packages: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} chromium-bidi@0.6.5: resolution: {integrity: sha512-RuLrmzYrxSb0s9SgpB+QN5jJucPduZQ/9SIe76MDxYJuecPW5mxMdacJ1f4EtgiV+R0p3sCkznTMvH0MPGFqjA==} @@ -2219,10 +2211,6 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - is-core-module@2.15.0: resolution: {integrity: sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==} engines: {node: '>= 0.4'} @@ -2571,10 +2559,6 @@ packages: resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} engines: {node: ^16.14.0 || >=18.0.0} - normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - npm-normalize-package-bin@3.0.1: resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2881,9 +2865,9 @@ packages: readable-stream@2.3.8: resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + readdirp@4.0.1: + resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} + engines: {node: '>= 14.16.0'} registry-auth-token@3.3.2: resolution: {integrity: sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==} @@ -2977,8 +2961,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.78.0: - resolution: {integrity: sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==} + sass@1.79.4: + resolution: {integrity: sha512-K0QDSNPXgyqO4GZq2HO5Q70TLxTH6cIT59RdoCHMivrC8rqzaTw5ab9prjz9KUN1El4FLXrBXJhik61JR4HcGg==} engines: {node: '>=14.0.0'} hasBin: true @@ -3975,7 +3959,7 @@ snapshots: '@types/hash-sum@1.0.2': {} - '@types/node@20.16.5': + '@types/node@20.16.10': dependencies: undici-types: 6.19.6 @@ -3987,13 +3971,13 @@ snapshots: '@types/serve-handler@6.1.4': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.10 '@types/trusted-types@2.0.7': {} '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.10 optional: true '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2)': @@ -4115,12 +4099,12 @@ snapshots: '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue)': + '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))(vue@packages+vue)': dependencies: - vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) vue: link:packages/vue - '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0))': + '@vitest/coverage-v8@2.1.1(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -4134,7 +4118,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4) transitivePeerDependencies: - supports-color @@ -4145,13 +4129,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) '@vitest/pretty-format@2.1.1': dependencies: @@ -4243,11 +4227,6 @@ snapshots: ansi-styles@6.2.1: {} - anymatch@3.1.3: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - arch@2.2.0: {} arg@5.0.2: {} @@ -4305,8 +4284,6 @@ snapshots: basic-ftp@5.0.5: {} - binary-extensions@2.3.0: {} - boxen@7.0.0: dependencies: ansi-align: 3.0.1 @@ -4387,17 +4364,9 @@ snapshots: check-error@2.1.1: {} - chokidar@3.6.0: + chokidar@4.0.1: dependencies: - anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 + readdirp: 4.0.1 chromium-bidi@0.6.5(devtools-protocol@0.0.1330662): dependencies: @@ -4778,12 +4747,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)): + eslint-plugin-vitest@0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)): dependencies: '@typescript-eslint/utils': 7.18.0(eslint@9.10.0)(typescript@5.6.2) eslint: 9.10.0 optionalDependencies: - vitest: 2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) + vitest: 2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4) transitivePeerDependencies: - supports-color - typescript @@ -5169,10 +5138,6 @@ snapshots: is-arrayish@0.2.1: {} - is-binary-path@2.1.0: - dependencies: - binary-extensions: 2.3.0 - is-core-module@2.15.0: dependencies: hasown: 2.0.2 @@ -5504,8 +5469,6 @@ snapshots: semver: 7.6.3 validate-npm-package-license: 3.0.4 - normalize-path@3.0.0: {} - npm-normalize-package-bin@3.0.1: {} npm-run-all2@6.2.3: @@ -5876,9 +5839,7 @@ snapshots: string_decoder: 1.1.1 util-deprecate: 1.0.2 - readdirp@3.6.0: - dependencies: - picomatch: 2.3.1 + readdirp@4.0.1: {} registry-auth-token@3.3.2: dependencies: @@ -6001,9 +5962,9 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.78.0: + sass@1.79.4: dependencies: - chokidar: 3.6.0 + chokidar: 4.0.1 immutable: 4.3.7 source-map-js: 1.2.1 @@ -6321,12 +6282,12 @@ snapshots: vary@1.1.2: {} - vite-node@2.1.1(@types/node@20.16.5)(sass@1.78.0): + vite-node@2.1.1(@types/node@20.16.10)(sass@1.79.4): dependencies: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 - vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) transitivePeerDependencies: - '@types/node' - less @@ -6338,20 +6299,20 @@ snapshots: - supports-color - terser - vite@5.4.0(@types/node@20.16.5)(sass@1.78.0): + vite@5.4.0(@types/node@20.16.10)(sass@1.79.4): dependencies: esbuild: 0.21.5 postcss: 8.4.41 rollup: 4.20.0 optionalDependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.10 fsevents: 2.3.3 - sass: 1.78.0 + sass: 1.79.4 - vitest@2.1.1(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0): + vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -6366,11 +6327,11 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) - vite-node: 2.1.1(@types/node@20.16.5)(sass@1.78.0) + vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) + vite-node: 2.1.1(@types/node@20.16.10)(sass@1.79.4) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.16.5 + '@types/node': 20.16.10 jsdom: 25.0.0 transitivePeerDependencies: - less From 3a55c3e4217ffcac394c7d9c5eab5d7224b217a1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:17:36 +0800 Subject: [PATCH 005/222] chore(deps): update dependency rollup to ^4.24.0 (#12081) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 215 +++++++++++++++++++++++++------------------------ 2 files changed, 111 insertions(+), 106 deletions(-) diff --git a/package.json b/package.json index a8c4b440db8..ea2f9109ed1 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "pug": "^3.0.3", "puppeteer": "~23.3.0", "rimraf": "^6.0.1", - "rollup": "^4.22.4", + "rollup": "^4.24.0", "rollup-plugin-dts": "^6.1.1", "rollup-plugin-esbuild": "^6.1.1", "rollup-plugin-polyfill-node": "^0.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 586fe7e1ca2..e28c12cd5be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,19 +40,19 @@ importers: version: 7.25.2 '@rollup/plugin-alias': specifier: ^5.1.1 - version: 5.1.1(rollup@4.22.4) + version: 5.1.1(rollup@4.24.0) '@rollup/plugin-commonjs': specifier: ^26.0.3 - version: 26.0.3(rollup@4.22.4) + version: 26.0.3(rollup@4.24.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.22.4) + version: 6.1.0(rollup@4.24.0) '@rollup/plugin-node-resolve': specifier: ^15.3.0 - version: 15.3.0(rollup@4.22.4) + version: 15.3.0(rollup@4.24.0) '@rollup/plugin-replace': specifier: 5.0.4 - version: 5.0.4(rollup@4.22.4) + version: 5.0.4(rollup@4.24.0) '@swc/core': specifier: ^1.7.28 version: 1.7.28 @@ -138,17 +138,17 @@ importers: specifier: ^6.0.1 version: 6.0.1 rollup: - specifier: ^4.22.4 - version: 4.22.4 + specifier: ^4.24.0 + version: 4.24.0 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.22.4)(typescript@5.6.2) + version: 6.1.1(rollup@4.24.0)(typescript@5.6.2) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.24.0)(rollup@4.22.4) + version: 6.1.1(esbuild@0.24.0)(rollup@4.24.0) rollup-plugin-polyfill-node: specifier: ^0.13.0 - version: 0.13.0(rollup@4.22.4) + version: 0.13.0(rollup@4.24.0) semver: specifier: ^7.6.3 version: 7.6.3 @@ -926,8 +926,8 @@ packages: cpu: [arm] os: [android] - '@rollup/rollup-android-arm-eabi@4.22.4': - resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} cpu: [arm] os: [android] @@ -936,8 +936,8 @@ packages: cpu: [arm64] os: [android] - '@rollup/rollup-android-arm64@4.22.4': - resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} cpu: [arm64] os: [android] @@ -946,8 +946,8 @@ packages: cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.22.4': - resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} cpu: [arm64] os: [darwin] @@ -956,8 +956,8 @@ packages: cpu: [x64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.4': - resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} cpu: [x64] os: [darwin] @@ -966,8 +966,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': - resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} cpu: [arm] os: [linux] @@ -976,8 +976,8 @@ packages: cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.22.4': - resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} cpu: [arm] os: [linux] @@ -986,8 +986,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.4': - resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} cpu: [arm64] os: [linux] @@ -996,8 +996,8 @@ packages: cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.4': - resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} cpu: [arm64] os: [linux] @@ -1006,8 +1006,8 @@ packages: cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': - resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} cpu: [ppc64] os: [linux] @@ -1016,8 +1016,8 @@ packages: cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.22.4': - resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} cpu: [riscv64] os: [linux] @@ -1026,8 +1026,8 @@ packages: cpu: [s390x] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.4': - resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} cpu: [s390x] os: [linux] @@ -1036,8 +1036,8 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.22.4': - resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} cpu: [x64] os: [linux] @@ -1046,8 +1046,8 @@ packages: cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.4': - resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} cpu: [x64] os: [linux] @@ -1056,8 +1056,8 @@ packages: cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.22.4': - resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} cpu: [arm64] os: [win32] @@ -1066,8 +1066,8 @@ packages: cpu: [ia32] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.4': - resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} cpu: [ia32] os: [win32] @@ -1076,8 +1076,8 @@ packages: cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.4': - resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} cpu: [x64] os: [win32] @@ -1162,6 +1162,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/hash-sum@1.0.2': resolution: {integrity: sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==} @@ -2938,8 +2941,8 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - rollup@4.22.4: - resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3751,154 +3754,154 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-alias@5.1.1(rollup@4.22.4)': + '@rollup/plugin-alias@5.1.1(rollup@4.24.0)': optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/plugin-commonjs@26.0.3(rollup@4.22.4)': + '@rollup/plugin-commonjs@26.0.3(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) commondir: 1.0.1 estree-walker: 2.0.2 glob: 10.4.5 is-reference: 1.2.1 magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/plugin-inject@5.0.5(rollup@4.22.4)': + '@rollup/plugin-inject@5.0.5(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) estree-walker: 2.0.2 magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/plugin-json@6.1.0(rollup@4.22.4)': + '@rollup/plugin-json@6.1.0(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/plugin-node-resolve@15.3.0(rollup@4.22.4)': + '@rollup/plugin-node-resolve@15.3.0(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/plugin-replace@5.0.4(rollup@4.22.4)': + '@rollup/plugin-replace@5.0.4(rollup@4.24.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) magic-string: 0.30.11 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 - '@rollup/pluginutils@5.1.0(rollup@4.22.4)': + '@rollup/pluginutils@5.1.0(rollup@4.24.0)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.22.4 + rollup: 4.24.0 '@rollup/rollup-android-arm-eabi@4.20.0': optional: true - '@rollup/rollup-android-arm-eabi@4.22.4': + '@rollup/rollup-android-arm-eabi@4.24.0': optional: true '@rollup/rollup-android-arm64@4.20.0': optional: true - '@rollup/rollup-android-arm64@4.22.4': + '@rollup/rollup-android-arm64@4.24.0': optional: true '@rollup/rollup-darwin-arm64@4.20.0': optional: true - '@rollup/rollup-darwin-arm64@4.22.4': + '@rollup/rollup-darwin-arm64@4.24.0': optional: true '@rollup/rollup-darwin-x64@4.20.0': optional: true - '@rollup/rollup-darwin-x64@4.22.4': + '@rollup/rollup-darwin-x64@4.24.0': optional: true '@rollup/rollup-linux-arm-gnueabihf@4.20.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': optional: true '@rollup/rollup-linux-arm-musleabihf@4.20.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.4': + '@rollup/rollup-linux-arm-musleabihf@4.24.0': optional: true '@rollup/rollup-linux-arm64-gnu@4.20.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.4': + '@rollup/rollup-linux-arm64-gnu@4.24.0': optional: true '@rollup/rollup-linux-arm64-musl@4.20.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.4': + '@rollup/rollup-linux-arm64-musl@4.24.0': optional: true '@rollup/rollup-linux-powerpc64le-gnu@4.20.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': optional: true '@rollup/rollup-linux-riscv64-gnu@4.20.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.4': + '@rollup/rollup-linux-riscv64-gnu@4.24.0': optional: true '@rollup/rollup-linux-s390x-gnu@4.20.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.4': + '@rollup/rollup-linux-s390x-gnu@4.24.0': optional: true '@rollup/rollup-linux-x64-gnu@4.20.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.4': + '@rollup/rollup-linux-x64-gnu@4.24.0': optional: true '@rollup/rollup-linux-x64-musl@4.20.0': optional: true - '@rollup/rollup-linux-x64-musl@4.22.4': + '@rollup/rollup-linux-x64-musl@4.24.0': optional: true '@rollup/rollup-win32-arm64-msvc@4.20.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.4': + '@rollup/rollup-win32-arm64-msvc@4.24.0': optional: true '@rollup/rollup-win32-ia32-msvc@4.20.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.4': + '@rollup/rollup-win32-ia32-msvc@4.24.0': optional: true '@rollup/rollup-win32-x64-msvc@4.20.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.4': + '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true '@swc/core-darwin-arm64@1.7.28': @@ -3957,6 +3960,8 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/hash-sum@1.0.2': {} '@types/node@20.16.10': @@ -5880,29 +5885,29 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.0 - rollup-plugin-dts@6.1.1(rollup@4.22.4)(typescript@5.6.2): + rollup-plugin-dts@6.1.1(rollup@4.24.0)(typescript@5.6.2): dependencies: magic-string: 0.30.11 - rollup: 4.22.4 + rollup: 4.24.0 typescript: 5.6.2 optionalDependencies: '@babel/code-frame': 7.24.7 - rollup-plugin-esbuild@6.1.1(esbuild@0.24.0)(rollup@4.22.4): + rollup-plugin-esbuild@6.1.1(esbuild@0.24.0)(rollup@4.24.0): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.22.4) + '@rollup/pluginutils': 5.1.0(rollup@4.24.0) debug: 4.3.6 es-module-lexer: 1.5.4 esbuild: 0.24.0 get-tsconfig: 4.7.6 - rollup: 4.22.4 + rollup: 4.24.0 transitivePeerDependencies: - supports-color - rollup-plugin-polyfill-node@0.13.0(rollup@4.22.4): + rollup-plugin-polyfill-node@0.13.0(rollup@4.24.0): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.22.4) - rollup: 4.22.4 + '@rollup/plugin-inject': 5.0.5(rollup@4.24.0) + rollup: 4.24.0 rollup@4.20.0: dependencies: @@ -5926,26 +5931,26 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.20.0 fsevents: 2.3.3 - rollup@4.22.4: + rollup@4.24.0: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.4 - '@rollup/rollup-android-arm64': 4.22.4 - '@rollup/rollup-darwin-arm64': 4.22.4 - '@rollup/rollup-darwin-x64': 4.22.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 - '@rollup/rollup-linux-arm-musleabihf': 4.22.4 - '@rollup/rollup-linux-arm64-gnu': 4.22.4 - '@rollup/rollup-linux-arm64-musl': 4.22.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 - '@rollup/rollup-linux-riscv64-gnu': 4.22.4 - '@rollup/rollup-linux-s390x-gnu': 4.22.4 - '@rollup/rollup-linux-x64-gnu': 4.22.4 - '@rollup/rollup-linux-x64-musl': 4.22.4 - '@rollup/rollup-win32-arm64-msvc': 4.22.4 - '@rollup/rollup-win32-ia32-msvc': 4.22.4 - '@rollup/rollup-win32-x64-msvc': 4.22.4 + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 fsevents: 2.3.3 rrweb-cssom@0.6.0: {} From 577edca8e7795436efd710d1c289ea8ea2642b0e Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:21:31 +0100 Subject: [PATCH 006/222] fix(scheduler): job ordering when the post queue is flushing (#12090) --- .../runtime-core/__tests__/scheduler.spec.ts | 54 +++++++++++++++++++ packages/runtime-core/src/scheduler.ts | 22 +++----- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/packages/runtime-core/__tests__/scheduler.spec.ts b/packages/runtime-core/__tests__/scheduler.spec.ts index cf961667e68..3e454aec023 100644 --- a/packages/runtime-core/__tests__/scheduler.spec.ts +++ b/packages/runtime-core/__tests__/scheduler.spec.ts @@ -441,6 +441,29 @@ describe('scheduler', () => { await nextTick() expect(calls).toEqual(['job1', 'job2', 'cb1', 'cb2']) }) + + test('jobs added during post flush are ordered correctly', async () => { + const calls: string[] = [] + + const job1: SchedulerJob = () => { + calls.push('job1') + } + job1.id = 1 + + const job2: SchedulerJob = () => { + calls.push('job2') + } + job2.id = 2 + + queuePostFlushCb(() => { + queueJob(job2) + queueJob(job1) + }) + + await nextTick() + + expect(calls).toEqual(['job1', 'job2']) + }) }) test('sort job based on id', async () => { @@ -758,6 +781,37 @@ describe('scheduler', () => { expect(spy).toHaveBeenCalledTimes(1) }) + test('flushPreFlushCbs inside a post job', async () => { + const calls: string[] = [] + const callsAfterFlush: string[] = [] + + const job1: SchedulerJob = () => { + calls.push('job1') + } + job1.id = 1 + job1.flags! |= SchedulerJobFlags.PRE + + const job2: SchedulerJob = () => { + calls.push('job2') + } + job2.id = 2 + job2.flags! |= SchedulerJobFlags.PRE + + queuePostFlushCb(() => { + queueJob(job2) + queueJob(job1) + + // e.g. nested app.mount() call + flushPreFlushCbs() + callsAfterFlush.push(...calls) + }) + + await nextTick() + + expect(callsAfterFlush).toEqual(['job1', 'job2']) + expect(calls).toEqual(['job1', 'job2']) + }) + it('nextTick should return promise', async () => { const fn = vi.fn(() => { return 1 diff --git a/packages/runtime-core/src/scheduler.ts b/packages/runtime-core/src/scheduler.ts index 798f850b7de..b40c31d3952 100644 --- a/packages/runtime-core/src/scheduler.ts +++ b/packages/runtime-core/src/scheduler.ts @@ -40,11 +40,8 @@ export interface SchedulerJob extends Function { export type SchedulerJobs = SchedulerJob | SchedulerJob[] -let isFlushing = false -let isFlushPending = false - const queue: SchedulerJob[] = [] -let flushIndex = 0 +let flushIndex = -1 const pendingPostFlushCbs: SchedulerJob[] = [] let activePostFlushCbs: SchedulerJob[] | null = null @@ -74,7 +71,7 @@ export function nextTick( // watcher should be inserted immediately before the update job. This allows // watchers to be skipped if the component is unmounted by the parent update. function findInsertionIndex(id: number) { - let start = isFlushing ? flushIndex + 1 : 0 + let start = flushIndex + 1 let end = queue.length while (start < end) { @@ -115,8 +112,7 @@ export function queueJob(job: SchedulerJob): void { } function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true + if (!currentFlushPromise) { currentFlushPromise = resolvedPromise.then(flushJobs) } } @@ -141,8 +137,8 @@ export function queuePostFlushCb(cb: SchedulerJobs): void { export function flushPreFlushCbs( instance?: ComponentInternalInstance, seen?: CountMap, - // if currently flushing, skip the current job itself - i: number = isFlushing ? flushIndex + 1 : 0, + // skip the current job + i: number = flushIndex + 1, ): void { if (__DEV__) { seen = seen || new Map() @@ -211,8 +207,6 @@ const getId = (job: SchedulerJob): number => job.id == null ? (job.flags! & SchedulerJobFlags.PRE ? -1 : Infinity) : job.id function flushJobs(seen?: CountMap) { - isFlushPending = false - isFlushing = true if (__DEV__) { seen = seen || new Map() } @@ -255,15 +249,13 @@ function flushJobs(seen?: CountMap) { } } - flushIndex = 0 + flushIndex = -1 queue.length = 0 flushPostFlushCbs(seen) - isFlushing = false currentFlushPromise = null - // some postFlushCb queued jobs! - // keep flushing until it drains. + // If new jobs have been added to either queue, keep flushing if (queue.length || pendingPostFlushCbs.length) { flushJobs(seen) } From 57315ab9688c9741a271d1075bbd28cbe5f71e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:22:27 +0800 Subject: [PATCH 007/222] fix(types): correctly infer `TypeProps` when it is `any` (#12073) close #12058 --- .../runtime-core/src/apiDefineComponent.ts | 18 ++++++++---------- packages/shared/src/typeUtils.ts | 6 ++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 3748fc81c63..d5e2feb5e6d 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -27,7 +27,7 @@ import type { EmitsToProps, TypeEmitsToOptions, } from './componentEmits' -import { extend, isFunction } from '@vue/shared' +import { type IsKeyValues, extend, isFunction } from '@vue/shared' import type { VNodeProps } from './vnode' import type { ComponentPublicInstanceConstructor, @@ -208,15 +208,13 @@ export function defineComponent< ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions : RuntimeEmitsOptions, - InferredProps = unknown extends TypeProps - ? keyof TypeProps extends never - ? string extends RuntimePropsKeys - ? ComponentObjectPropsOptions extends RuntimePropsOptions - ? {} - : ExtractPropTypes - : { [key in RuntimePropsKeys]?: any } - : TypeProps - : TypeProps, + InferredProps = IsKeyValues extends true + ? TypeProps + : string extends RuntimePropsKeys + ? ComponentObjectPropsOptions extends RuntimePropsOptions + ? {} + : ExtractPropTypes + : { [key in RuntimePropsKeys]?: any }, TypeRefs extends Record = {}, TypeEl extends Element = any, >( diff --git a/packages/shared/src/typeUtils.ts b/packages/shared/src/typeUtils.ts index 1fd161ceb05..f5b9e6ec3c8 100644 --- a/packages/shared/src/typeUtils.ts +++ b/packages/shared/src/typeUtils.ts @@ -13,6 +13,12 @@ export type LooseRequired = { [P in keyof (T & Required)]: T[P] } // https://stackoverflow.com/questions/49927523/disallow-call-with-any/49928360#49928360 export type IfAny = 0 extends 1 & T ? Y : N +export type IsKeyValues = IfAny< + T, + false, + T extends object ? (keyof T extends K ? true : false) : false +> + /** * Utility for extracting the parameters from a function overload (for typed emits) * https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709 From c97bb84d0b0a16b012f886b6498e924415ed63e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:22:57 +0800 Subject: [PATCH 008/222] fix(types): infer the first generic type of `Ref` correctly (#12094) --- packages/reactivity/src/reactive.ts | 2 +- packages/reactivity/src/ref.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/reactivity/src/reactive.ts b/packages/reactivity/src/reactive.ts index 7d9c33aa4d0..729c854965e 100644 --- a/packages/reactivity/src/reactive.ts +++ b/packages/reactivity/src/reactive.ts @@ -167,7 +167,7 @@ export type DeepReadonly = T extends Builtin ? WeakSet> : T extends Promise ? Promise> - : T extends Ref + : T extends Ref ? Readonly>> : T extends {} ? { readonly [K in keyof T]: DeepReadonly } diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 43b26b78f9d..6b8d541819d 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -489,12 +489,12 @@ export type ShallowUnwrapRef = { [K in keyof T]: DistributeRef } -type DistributeRef = T extends Ref ? V : T +type DistributeRef = T extends Ref ? V : T export type UnwrapRef = - T extends ShallowRef + T extends ShallowRef ? V - : T extends Ref + : T extends Ref ? UnwrapRefSimple : UnwrapRefSimple From 6f8589437635706f825ccec51800effba1d2bf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:24:09 +0800 Subject: [PATCH 009/222] fix(type): should not intersect `PublicProps` with `Props` (#12077) --- packages/runtime-core/src/apiDefineComponent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index d5e2feb5e6d..9ae6b41a4da 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -79,7 +79,7 @@ export type DefineComponent< Mixin, Extends, E, - PP & Props, + PP, Defaults, MakeDefaultsOptional, {}, From 6e4de8d75e064a220c57c942c4239ca46fc7fe49 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 3 Oct 2024 23:49:47 +0800 Subject: [PATCH 010/222] release: v3.5.11 --- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- packages/compiler-core/package.json | 2 +- packages/compiler-dom/package.json | 2 +- packages/compiler-sfc/package.json | 2 +- packages/compiler-ssr/package.json | 2 +- packages/reactivity/package.json | 2 +- packages/runtime-core/package.json | 2 +- packages/runtime-dom/package.json | 2 +- packages/server-renderer/package.json | 2 +- packages/shared/package.json | 2 +- packages/vue-compat/package.json | 2 +- packages/vue/package.json | 2 +- 13 files changed, 26 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf07a8d199..6a176ee1c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +## [3.5.11](https://github.com/vuejs/core/compare/v3.5.10...v3.5.11) (2024-10-03) + + +### Bug Fixes + +* **compiler-sfc:** do not skip `TSSatisfiesExpression` when transforming props destructure ([#12062](https://github.com/vuejs/core/issues/12062)) ([2328b05](https://github.com/vuejs/core/commit/2328b051f4efa1f1394b7d4e73b7c3f76e430e7c)), closes [#12061](https://github.com/vuejs/core/issues/12061) +* **reactivity:** prevent overwriting `next` property during batch processing ([#12075](https://github.com/vuejs/core/issues/12075)) ([d3f5e6e](https://github.com/vuejs/core/commit/d3f5e6e5319b4ffaa55ca9a2ea3d95d78e76fa58)), closes [#12072](https://github.com/vuejs/core/issues/12072) +* **scheduler:** job ordering when the post queue is flushing ([#12090](https://github.com/vuejs/core/issues/12090)) ([577edca](https://github.com/vuejs/core/commit/577edca8e7795436efd710d1c289ea8ea2642b0e)) +* **types:** correctly infer `TypeProps` when it is `any` ([#12073](https://github.com/vuejs/core/issues/12073)) ([57315ab](https://github.com/vuejs/core/commit/57315ab9688c9741a271d1075bbd28cbe5f71e2f)), closes [#12058](https://github.com/vuejs/core/issues/12058) +* **types:** should not intersect `PublicProps` with `Props` ([#12077](https://github.com/vuejs/core/issues/12077)) ([6f85894](https://github.com/vuejs/core/commit/6f8589437635706f825ccec51800effba1d2bf5f)) +* **types:** infer the first generic type of `Ref` correctly ([#12094](https://github.com/vuejs/core/issues/12094)) ([c97bb84](https://github.com/vuejs/core/commit/c97bb84d0b0a16b012f886b6498e924415ed63e5)) + + + ## [3.5.10](https://github.com/vuejs/core/compare/v3.5.9...v3.5.10) (2024-09-27) diff --git a/package.json b/package.json index ea2f9109ed1..fcbf7c4f437 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.5.10", + "version": "3.5.11", "packageManager": "pnpm@9.12.0", "type": "module", "scripts": { diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 69458ec9636..4fb76016867 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/compiler-core", "main": "index.js", "module": "dist/compiler-core.esm-bundler.js", diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index 2034e480040..ed5950dc748 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/compiler-dom", "main": "index.js", "module": "dist/compiler-dom.esm-bundler.js", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 4390d50977e..7cbeb9a3cd8 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/compiler-sfc", "main": "dist/compiler-sfc.cjs.js", "module": "dist/compiler-sfc.esm-browser.js", diff --git a/packages/compiler-ssr/package.json b/packages/compiler-ssr/package.json index b5f91635b47..16da421ad9b 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index 7d5bf4b69c5..cc02882d06c 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index 350b8b08696..0e10386a00b 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 6dfb2d6a9a4..f8c094d336e 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 36fb68c11c4..c45d7c8f2a7 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.5.10", + "version": "3.5.11", "description": "@vue/server-renderer", "main": "index.js", "module": "dist/server-renderer.esm-bundler.js", diff --git a/packages/shared/package.json b/packages/shared/package.json index f10dc1c5e88..dbd2a8f2c22 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.5.10", + "version": "3.5.11", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index adb0b628069..e8c292c94fd 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.5.10", + "version": "3.5.11", "description": "Vue 3 compatibility build for Vue 2", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", diff --git a/packages/vue/package.json b/packages/vue/package.json index c73e89334f2..1a063eefe81 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.5.10", + "version": "3.5.11", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", From b094c72b3d40c52c7124f145a9db028509a11202 Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:09:23 +0100 Subject: [PATCH 011/222] fix(watch): watchEffect clean-up with SSR (#12097) close #11956 --- packages/runtime-core/src/apiWatch.ts | 16 +- .../__tests__/ssrWatch.spec.ts | 174 +++++++++++++++++- 2 files changed, 184 insertions(+), 6 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 798b6e7261b..8f6168cdf29 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -170,15 +170,14 @@ function doWatch( if (__DEV__) baseWatchOptions.onWarn = warn + // immediate watcher or watchEffect + const runsImmediately = (cb && immediate) || (!cb && flush !== 'post') let ssrCleanup: (() => void)[] | undefined if (__SSR__ && isInSSRComponentSetup) { if (flush === 'sync') { const ctx = useSSRContext()! ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []) - } else if (!cb || immediate) { - // immediately watch or watchEffect - baseWatchOptions.once = true - } else { + } else if (!runsImmediately) { const watchStopHandle = () => {} watchStopHandle.stop = NOOP watchStopHandle.resume = NOOP @@ -226,7 +225,14 @@ function doWatch( const watchHandle = baseWatch(source, cb, baseWatchOptions) - if (__SSR__ && ssrCleanup) ssrCleanup.push(watchHandle) + if (__SSR__ && isInSSRComponentSetup) { + if (ssrCleanup) { + ssrCleanup.push(watchHandle) + } else if (runsImmediately) { + watchHandle() + } + } + return watchHandle } diff --git a/packages/server-renderer/__tests__/ssrWatch.spec.ts b/packages/server-renderer/__tests__/ssrWatch.spec.ts index c157c90cd42..40c49740d3e 100644 --- a/packages/server-renderer/__tests__/ssrWatch.spec.ts +++ b/packages/server-renderer/__tests__/ssrWatch.spec.ts @@ -1,4 +1,12 @@ -import { createSSRApp, defineComponent, h, ref, watch } from 'vue' +import { + createSSRApp, + defineComponent, + h, + nextTick, + ref, + watch, + watchEffect, +} from 'vue' import { type SSRContext, renderToString } from '../src' describe('ssr: watch', () => { @@ -27,4 +35,168 @@ describe('ssr: watch', () => { expect(html).toMatch('hello world') }) + + test('should work with flush: sync and immediate: true', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watch( + text, + () => { + msg = text.value + }, + { flush: 'sync', immediate: true }, + ) + expect(msg).toBe('start') + text.value = 'changed' + expect(msg).toBe('changed') + text.value = 'changed again' + expect(msg).toBe('changed again') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles!.length).toBe(1) + expect(html).toMatch('changed again') + await nextTick() + expect(msg).toBe('changed again') + }) + + test('should run once with immediate: true', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watch( + text, + () => { + msg = String(text.value) + }, + { immediate: true }, + ) + text.value = 'changed' + expect(msg).toBe('start') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles).toBeUndefined() + expect(html).toMatch('start') + await nextTick() + expect(msg).toBe('start') + }) + + test('should run once with immediate: true and flush: post', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watch( + text, + () => { + msg = String(text.value) + }, + { immediate: true, flush: 'post' }, + ) + text.value = 'changed' + expect(msg).toBe('start') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles).toBeUndefined() + expect(html).toMatch('start') + await nextTick() + expect(msg).toBe('start') + }) +}) + +describe('ssr: watchEffect', () => { + test('should run with flush: sync', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watchEffect( + () => { + msg = text.value + }, + { flush: 'sync' }, + ) + expect(msg).toBe('start') + text.value = 'changed' + expect(msg).toBe('changed') + text.value = 'changed again' + expect(msg).toBe('changed again') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles!.length).toBe(1) + expect(html).toMatch('changed again') + await nextTick() + expect(msg).toBe('changed again') + }) + + test('should run once with default flush (pre)', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watchEffect(() => { + msg = text.value + }) + text.value = 'changed' + expect(msg).toBe('start') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles).toBeUndefined() + expect(html).toMatch('start') + await nextTick() + expect(msg).toBe('start') + }) + + test('should not run for flush: post', async () => { + const text = ref('start') + let msg = 'unchanged' + + const App = defineComponent(() => { + watchEffect( + () => { + msg = text.value + }, + { flush: 'post' }, + ) + text.value = 'changed' + expect(msg).toBe('unchanged') + return () => h('div', null, msg) + }) + + const app = createSSRApp(App) + const ctx: SSRContext = {} + const html = await renderToString(app, ctx) + + expect(ctx.__watcherHandles).toBeUndefined() + expect(html).toMatch('unchanged') + await nextTick() + expect(msg).toBe('unchanged') + }) }) From f7cbea2111c7770a180b640f36f6a5d4d6abc698 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:33:18 +0800 Subject: [PATCH 012/222] fix(deps): update dependency monaco-editor to ^0.52.0 (#12119) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages-private/template-explorer/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages-private/template-explorer/package.json b/packages-private/template-explorer/package.json index a5ad38c1ad8..e8bdf0bccbb 100644 --- a/packages-private/template-explorer/package.json +++ b/packages-private/template-explorer/package.json @@ -11,7 +11,7 @@ "enableNonBrowserBranches": true }, "dependencies": { - "monaco-editor": "^0.51.0", + "monaco-editor": "^0.52.0", "source-map-js": "^1.2.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e28c12cd5be..dbb6b20e530 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -226,8 +226,8 @@ importers: packages-private/template-explorer: dependencies: monaco-editor: - specifier: ^0.51.0 - version: 0.51.0 + specifier: ^0.52.0 + version: 0.52.0 source-map-js: specifier: ^1.2.1 version: 1.2.1 @@ -2527,8 +2527,8 @@ packages: mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} - monaco-editor@0.51.0: - resolution: {integrity: sha512-xaGwVV1fq343cM7aOYB6lVE4Ugf0UyimdD/x5PWcWBMKENwectaEu77FAN7c5sFiyumqeJdX1RPTh1ocioyDjw==} + monaco-editor@0.52.0: + resolution: {integrity: sha512-OeWhNpABLCeTqubfqLMXGsqf6OmPU6pHM85kF3dhy6kq5hnhuVS1p3VrEW/XhWHc71P2tHyS5JFySD8mgs1crw==} ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -5450,7 +5450,7 @@ snapshots: mitt@3.0.1: {} - monaco-editor@0.51.0: {} + monaco-editor@0.52.0: {} ms@2.0.0: {} From 73a3666deee6c2f969f94f3064ffef358a172a27 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:42:31 +0800 Subject: [PATCH 013/222] chore(deps): update dependency @rollup/plugin-commonjs to v28 (#12120) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index fcbf7c4f437..a5f5466b78b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@babel/parser": "catalog:", "@babel/types": "catalog:", "@rollup/plugin-alias": "^5.1.1", - "@rollup/plugin-commonjs": "^26.0.3", + "@rollup/plugin-commonjs": "^28.0.0", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-replace": "5.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dbb6b20e530..82b4919e400 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: ^5.1.1 version: 5.1.1(rollup@4.24.0) '@rollup/plugin-commonjs': - specifier: ^26.0.3 - version: 26.0.3(rollup@4.24.0) + specifier: ^28.0.0 + version: 28.0.0(rollup@4.24.0) '@rollup/plugin-json': specifier: ^6.1.0 version: 6.1.0(rollup@4.24.0) @@ -867,8 +867,8 @@ packages: rollup: optional: true - '@rollup/plugin-commonjs@26.0.3': - resolution: {integrity: sha512-2BJcolt43MY+y5Tz47djHkodCC3c1VKVrBDKpVqHKpQ9z9S158kCCqB8NF6/gzxLdNlYW9abB3Ibh+kOWLp8KQ==} + '@rollup/plugin-commonjs@28.0.0': + resolution: {integrity: sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==} engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: rollup: ^2.68.0||^3.0.0||^4.0.0 @@ -1974,6 +1974,14 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.4.0: + resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -3758,14 +3766,15 @@ snapshots: optionalDependencies: rollup: 4.24.0 - '@rollup/plugin-commonjs@26.0.3(rollup@4.24.0)': + '@rollup/plugin-commonjs@28.0.0(rollup@4.24.0)': dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.24.0) commondir: 1.0.1 estree-walker: 2.0.2 - glob: 10.4.5 + fdir: 6.4.0(picomatch@2.3.1) is-reference: 1.2.1 magic-string: 0.30.11 + picomatch: 2.3.1 optionalDependencies: rollup: 4.24.0 @@ -3802,7 +3811,7 @@ snapshots: '@rollup/pluginutils@5.1.0(rollup@4.24.0)': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: @@ -4832,7 +4841,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} @@ -4900,6 +4909,10 @@ snapshots: dependencies: pend: 1.2.0 + fdir@6.4.0(picomatch@2.3.1): + optionalDependencies: + picomatch: 2.3.1 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -5184,7 +5197,7 @@ snapshots: is-reference@1.2.1: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 is-regex@1.1.4: dependencies: From 723f5887167e3c508deb1b1d4a8b6de4856a94d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:45:08 +0800 Subject: [PATCH 014/222] chore(deps-dev): bump vite from 5.4.0 to 5.4.8 (#12121) Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.4.0 to 5.4.8. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v5.4.8/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v5.4.8/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82b4919e400..11746669dfe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3342,6 +3342,37 @@ packages: terser: optional: true + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + vitest@2.1.1: resolution: {integrity: sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -4143,13 +4174,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@20.16.10)(sass@1.79.4))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) + vite: 5.4.8(@types/node@20.16.10)(sass@1.79.4) '@vitest/pretty-format@2.1.1': dependencies: @@ -6305,7 +6336,7 @@ snapshots: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 - vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) + vite: 5.4.8(@types/node@20.16.10)(sass@1.79.4) transitivePeerDependencies: - '@types/node' - less @@ -6327,10 +6358,20 @@ snapshots: fsevents: 2.3.3 sass: 1.79.4 + vite@5.4.8(@types/node@20.16.10)(sass@1.79.4): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.24.0 + optionalDependencies: + '@types/node': 20.16.10 + fsevents: 2.3.3 + sass: 1.79.4 + vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@20.16.10)(sass@1.79.4)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -6345,7 +6386,7 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.16.10)(sass@1.79.4) + vite: 5.4.8(@types/node@20.16.10)(sass@1.79.4) vite-node: 2.1.1(@types/node@20.16.10)(sass@1.79.4) why-is-node-running: 2.3.0 optionalDependencies: From 35785f3cd7bd86cbec3f8324022491da2d088b61 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 10:45:41 +0800 Subject: [PATCH 015/222] chore(deps): update lint (#12118) * chore(deps): update lint * chore: update package name --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: daiwei --- eslint.config.js | 2 +- package.json | 8 +- pnpm-lock.yaml | 372 ++++++++++++++++++++++------------------------- 3 files changed, 180 insertions(+), 202 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 2e752e19107..b752b2e19f1 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,6 @@ import importX from 'eslint-plugin-import-x' import tseslint from 'typescript-eslint' -import vitest from 'eslint-plugin-vitest' +import vitest from '@vitest/eslint-plugin' import { builtinModules } from 'node:module' const DOMGlobals = ['window', 'document'] diff --git a/package.json b/package.json index a5f5466b78b..b58d1f73c49 100644 --- a/package.json +++ b/package.json @@ -77,9 +77,9 @@ "enquirer": "^2.4.1", "esbuild": "^0.24.0", "esbuild-plugin-polyfill-node": "^0.3.0", - "eslint": "^9.10.0", - "eslint-plugin-import-x": "^4.2.1", - "eslint-plugin-vitest": "^0.5.4", + "eslint": "^9.12.0", + "eslint-plugin-import-x": "^4.3.1", + "@vitest/eslint-plugin": "^1.0.1", "estree-walker": "catalog:", "jsdom": "^25.0.0", "lint-staged": "^15.2.10", @@ -105,7 +105,7 @@ "todomvc-app-css": "^2.4.3", "tslib": "^2.7.0", "typescript": "~5.6.2", - "typescript-eslint": "^8.5.0", + "typescript-eslint": "^8.8.0", "vite": "catalog:", "vitest": "^2.1.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11746669dfe..5ba6522bf39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -71,6 +71,9 @@ importers: '@vitest/coverage-v8': specifier: ^2.1.1 version: 2.1.1(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)) + '@vitest/eslint-plugin': + specifier: ^1.0.1 + version: 1.1.6(@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -87,14 +90,11 @@ importers: specifier: ^0.3.0 version: 0.3.0(esbuild@0.24.0) eslint: - specifier: ^9.10.0 - version: 9.10.0 + specifier: ^9.12.0 + version: 9.12.0 eslint-plugin-import-x: - specifier: ^4.2.1 - version: 4.2.1(eslint@9.10.0)(typescript@5.6.2) - eslint-plugin-vitest: - specifier: ^0.5.4 - version: 0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)) + specifier: ^4.3.1 + version: 4.3.1(eslint@9.12.0)(typescript@5.6.2) estree-walker: specifier: 'catalog:' version: 2.0.2 @@ -171,8 +171,8 @@ importers: specifier: ~5.6.2 version: 5.6.2 typescript-eslint: - specifier: ^8.5.0 - version: 8.5.0(eslint@9.10.0)(typescript@5.6.2) + specifier: ^8.8.0 + version: 8.8.0(eslint@9.12.0)(typescript@5.6.2) vite: specifier: 'catalog:' version: 5.4.0(@types/node@20.16.10)(sass@1.79.4) @@ -780,28 +780,40 @@ packages: resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.10.0': - resolution: {integrity: sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==} + '@eslint/js@9.12.0': + resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.1.0': - resolution: {integrity: sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==} + '@eslint/plugin-kit@0.2.0': + resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@humanfs/core@0.19.0': + resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.5': + resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + engines: {node: '>=18.18.0'} + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} '@hutson/parse-repository-url@5.0.0': @@ -1168,6 +1180,9 @@ packages: '@types/hash-sum@1.0.2': resolution: {integrity: sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node@20.16.10': resolution: {integrity: sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==} @@ -1189,8 +1204,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.5.0': - resolution: {integrity: sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==} + '@typescript-eslint/eslint-plugin@8.8.0': + resolution: {integrity: sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1200,8 +1215,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.5.0': - resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==} + '@typescript-eslint/parser@8.8.0': + resolution: {integrity: sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1210,16 +1225,16 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.18.0': - resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@8.5.0': resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.5.0': - resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==} + '@typescript-eslint/scope-manager@8.8.0': + resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.8.0': + resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1227,25 +1242,25 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.18.0': - resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@8.5.0': resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@7.18.0': - resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@8.8.0': + resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.5.0': + resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/typescript-estree@8.5.0': - resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==} + '@typescript-eslint/typescript-estree@8.8.0': + resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1253,26 +1268,26 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.18.0': - resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - '@typescript-eslint/utils@8.5.0': resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@7.18.0': - resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==} - engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/utils@8.8.0': + resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 '@typescript-eslint/visitor-keys@8.5.0': resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.8.0': + resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@vitejs/plugin-vue@5.1.2': resolution: {integrity: sha512-nY9IwH12qeiJqumTCLJLE7IiNx7HZ39cbHaysEUd+Myvbz9KAqd2yq+U01Kab1R/H1BmiyM2ShTYlNH32Fzo3A==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1289,6 +1304,17 @@ packages: '@vitest/browser': optional: true + '@vitest/eslint-plugin@1.1.6': + resolution: {integrity: sha512-sFuAnD9iycnOzLHHhNCULXeb6ejOSo5Lcq/ODhdlUOoUrXkQPcVeYqXurZMA3neOqf+wNCQ6YuU1zyoYH/WEcg==} + peerDependencies: + '@typescript-eslint/utils': '>= 8.0' + eslint: '>= 8.57.0' + typescript: '>= 5.0.0' + vitest: '*' + peerDependenciesMeta: + typescript: + optional: true + '@vitest/expect@2.1.1': resolution: {integrity: sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==} @@ -1404,10 +1430,6 @@ packages: array-ify@1.0.0: resolution: {integrity: sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==} - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} @@ -1766,10 +1788,6 @@ packages: devtools-protocol@0.0.1330662: resolution: {integrity: sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw==} - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -1861,39 +1879,26 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-plugin-import-x@4.2.1: - resolution: {integrity: sha512-WWi2GedccIJa0zXxx3WDnTgouGQTtdYK1nhXMwywbqqAgB0Ov+p1pYBsWh3VaB0bvBOwLse6OfVII7jZD9xo5Q==} + eslint-plugin-import-x@4.3.1: + resolution: {integrity: sha512-5TriWkXulDl486XnYYRgsL+VQoS/7mhN/2ci02iLCuL7gdhbiWxnsuL/NTcaKY9fpMgsMFjWZBtIGW7pb+RX0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - eslint-plugin-vitest@0.5.4: - resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} - engines: {node: ^18.0.0 || >= 20.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': '*' - eslint: ^8.57.0 || ^9.0.0 - vitest: '*' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - vitest: - optional: true - - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + eslint-scope@8.1.0: + resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.10.0: - resolution: {integrity: sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==} + eslint@9.12.0: + resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -1902,8 +1907,8 @@ packages: jiti: optional: true - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} esprima@4.0.1: @@ -2096,10 +2101,6 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} @@ -2265,10 +2266,6 @@ packages: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - is-port-reachable@4.0.0: resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2683,10 +2680,6 @@ packages: path-to-regexp@2.2.1: resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==} - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -3026,10 +3019,6 @@ packages: resolution: {integrity: sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==} hasBin: true - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - slice-ansi@5.0.0: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} engines: {node: '>=12'} @@ -3242,8 +3231,8 @@ packages: typed-query-selector@2.12.0: resolution: {integrity: sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==} - typescript-eslint@8.5.0: - resolution: {integrity: sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==} + typescript-eslint@8.8.0: + resolution: {integrity: sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3692,9 +3681,9 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.10.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.12.0)': dependencies: - eslint: 9.10.0 + eslint: 9.12.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} @@ -3707,11 +3696,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/core@0.6.0': {} + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.6 - espree: 10.1.0 + espree: 10.2.0 globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 @@ -3721,17 +3712,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.10.0': {} + '@eslint/js@9.12.0': {} '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.1.0': + '@eslint/plugin-kit@0.2.0': dependencies: levn: 0.4.1 + '@humanfs/core@0.19.0': {} + + '@humanfs/node@0.16.5': + dependencies: + '@humanfs/core': 0.19.0 + '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/retry@0.3.1': {} '@hutson/parse-repository-url@5.0.0': {} @@ -4004,6 +4002,8 @@ snapshots: '@types/hash-sum@1.0.2': {} + '@types/json-schema@7.0.15': {} + '@types/node@20.16.10': dependencies: undici-types: 6.19.6 @@ -4025,15 +4025,15 @@ snapshots: '@types/node': 20.16.10 optional: true - '@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/type-utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 - eslint: 9.10.0 + '@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/type-utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 + eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -4043,33 +4043,33 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.6 - eslint: 9.10.0 + eslint: 9.12.0 optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.18.0': - dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 - '@typescript-eslint/scope-manager@8.5.0': dependencies: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 - '@typescript-eslint/type-utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': + '@typescript-eslint/scope-manager@8.8.0': dependencies: - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 + + '@typescript-eslint/type-utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) debug: 4.3.6 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -4078,16 +4078,16 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@7.18.0': {} - '@typescript-eslint/types@8.5.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': + '@typescript-eslint/types@8.8.0': {} + + '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/visitor-keys': 7.18.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/visitor-keys': 8.5.0 debug: 4.3.6 - globby: 11.1.0 + fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 @@ -4097,10 +4097,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/visitor-keys': 8.5.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.6 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -4112,36 +4112,36 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@9.10.0)(typescript@5.6.2)': + '@typescript-eslint/utils@8.5.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) - '@typescript-eslint/scope-manager': 7.18.0 - '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) - eslint: 9.10.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@typescript-eslint/scope-manager': 8.5.0 + '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) + eslint: 9.12.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.5.0(eslint@9.10.0)(typescript@5.6.2)': + '@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) - '@typescript-eslint/scope-manager': 8.5.0 - '@typescript-eslint/types': 8.5.0 - '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) - eslint: 9.10.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + eslint: 9.12.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.18.0': + '@typescript-eslint/visitor-keys@8.5.0': dependencies: - '@typescript-eslint/types': 7.18.0 + '@typescript-eslint/types': 8.5.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.5.0': + '@typescript-eslint/visitor-keys@8.8.0': dependencies: - '@typescript-eslint/types': 8.5.0 + '@typescript-eslint/types': 8.8.0 eslint-visitor-keys: 3.4.3 '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@20.16.10)(sass@1.79.4))(vue@packages+vue)': @@ -4167,6 +4167,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/eslint-plugin@1.1.6(@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4))': + dependencies: + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + eslint: 9.12.0 + vitest: 2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4) + optionalDependencies: + typescript: 5.6.2 + '@vitest/expect@2.1.1': dependencies: '@vitest/spy': 2.1.1 @@ -4280,8 +4288,6 @@ snapshots: array-ify@1.0.0: {} - array-union@2.1.0: {} - asap@2.0.6: {} assert-never@1.3.0: {} @@ -4645,10 +4651,6 @@ snapshots: devtools-protocol@0.0.1330662: {} - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -4775,12 +4777,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@4.2.1(eslint@9.10.0)(typescript@5.6.2): + eslint-plugin-import-x@4.3.1(eslint@9.12.0)(typescript@5.6.2): dependencies: - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.5.0(eslint@9.12.0)(typescript@5.6.2) debug: 4.3.6 doctrine: 3.0.0 - eslint: 9.10.0 + eslint: 9.12.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.6 is-glob: 4.0.3 @@ -4792,44 +4794,37 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.10.0)(typescript@5.6.2)(vitest@2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4)): - dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@9.10.0)(typescript@5.6.2) - eslint: 9.10.0 - optionalDependencies: - vitest: 2.1.1(@types/node@20.16.10)(jsdom@25.0.0)(sass@1.79.4) - transitivePeerDependencies: - - supports-color - - typescript - - eslint-scope@8.0.2: + eslint-scope@8.1.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.1.0: {} - eslint@9.10.0: + eslint@9.12.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) '@eslint-community/regexpp': 4.11.0 '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.10.0 - '@eslint/plugin-kit': 0.1.0 + '@eslint/js': 9.12.0 + '@eslint/plugin-kit': 0.2.0 + '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 - '@nodelib/fs.walk': 1.2.8 + '@humanwhocodes/retry': 0.3.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.6 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -4839,22 +4834,20 @@ snapshots: ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 - is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color - espree@10.1.0: + espree@10.2.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 4.1.0 esprima@4.0.1: {} @@ -5073,15 +5066,6 @@ snapshots: globals@14.0.0: {} - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.1 - merge2: 1.4.1 - slash: 3.0.0 - gopd@1.0.1: dependencies: get-intrinsic: 1.2.4 @@ -5218,8 +5202,6 @@ snapshots: is-obj@2.0.0: {} - is-path-inside@3.0.3: {} - is-port-reachable@4.0.0: {} is-potential-custom-element-name@1.0.1: {} @@ -5642,8 +5624,6 @@ snapshots: path-to-regexp@2.2.1: {} - path-type@4.0.0: {} - pathe@1.1.2: {} pathval@2.0.0: {} @@ -6077,8 +6057,6 @@ snapshots: simple-git-hooks@2.11.1: {} - slash@3.0.0: {} - slice-ansi@5.0.0: dependencies: ansi-styles: 6.2.1 @@ -6275,11 +6253,11 @@ snapshots: typed-query-selector@2.12.0: {} - typescript-eslint@8.5.0(eslint@9.10.0)(typescript@5.6.2): + typescript-eslint@8.8.0(eslint@9.12.0)(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0)(typescript@5.6.2))(eslint@9.10.0)(typescript@5.6.2) - '@typescript-eslint/parser': 8.5.0(eslint@9.10.0)(typescript@5.6.2) - '@typescript-eslint/utils': 8.5.0(eslint@9.10.0)(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: From e16e9a7341e7cfb3c443da4e5e5b06e8158712c3 Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 11 Oct 2024 09:52:06 +0800 Subject: [PATCH 016/222] fix(custom-element): properly remove hyphenated attribute (#12143) close #12139 --- .../__tests__/customElement.spec.ts | 35 +++++++++++++++++++ packages/runtime-dom/src/modules/props.ts | 3 +- packages/runtime-dom/src/patchProp.ts | 2 +- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/runtime-dom/__tests__/customElement.spec.ts b/packages/runtime-dom/__tests__/customElement.spec.ts index ef5051f42f7..6b9f7d1391e 100644 --- a/packages/runtime-dom/__tests__/customElement.spec.ts +++ b/packages/runtime-dom/__tests__/customElement.spec.ts @@ -1386,4 +1386,39 @@ describe('defineCustomElement', () => { await nextTick() expect(e.shadowRoot!.innerHTML).toBe(`false,boolean`) }) + + test('hyphenated attr removal', async () => { + const E = defineCustomElement({ + props: { + fooBar: { + type: Boolean, + }, + }, + render() { + return this.fooBar + }, + }) + customElements.define('el-hyphenated-attr-removal', E) + const toggle = ref(true) + const Comp = { + render() { + return h('el-hyphenated-attr-removal', { + 'foo-bar': toggle.value ? '' : null, + }) + }, + } + render(h(Comp), container) + const el = container.children[0] + expect(el.hasAttribute('foo-bar')).toBe(true) + expect((el as any).outerHTML).toBe( + ``, + ) + + toggle.value = false + await nextTick() + expect(el.hasAttribute('foo-bar')).toBe(false) + expect((el as any).outerHTML).toBe( + ``, + ) + }) }) diff --git a/packages/runtime-dom/src/modules/props.ts b/packages/runtime-dom/src/modules/props.ts index 93d45c9e160..98608831a9a 100644 --- a/packages/runtime-dom/src/modules/props.ts +++ b/packages/runtime-dom/src/modules/props.ts @@ -8,6 +8,7 @@ export function patchDOMProp( key: string, value: any, parentComponent: any, + attrName?: string, ): void { // __UNSAFE__ // Reason: potentially setting innerHTML. @@ -106,5 +107,5 @@ export function patchDOMProp( ) } } - needRemove && el.removeAttribute(key) + needRemove && el.removeAttribute(attrName || key) } diff --git a/packages/runtime-dom/src/patchProp.ts b/packages/runtime-dom/src/patchProp.ts index 5814e77c4f8..b6af8997112 100644 --- a/packages/runtime-dom/src/patchProp.ts +++ b/packages/runtime-dom/src/patchProp.ts @@ -62,7 +62,7 @@ export const patchProp: DOMRendererOptions['patchProp'] = ( (el as VueElement)._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue)) ) { - patchDOMProp(el, camelize(key), nextValue, parentComponent) + patchDOMProp(el, camelize(key), nextValue, parentComponent, key) } else { // special case for with // :true-value & :false-value From d9d4d4e158cd51a9ddda249f29de8467f60b2792 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 11 Oct 2024 10:28:54 +0800 Subject: [PATCH 017/222] fix(runtime-core): allow symbol values for slot prop key (#12069) close #12068 --- .../__tests__/helpers/renderSlot.spec.ts | 6 ++++++ packages/runtime-core/src/helpers/renderSlot.ts | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/runtime-core/__tests__/helpers/renderSlot.spec.ts b/packages/runtime-core/__tests__/helpers/renderSlot.spec.ts index c4ae077ba34..bc0678b51c9 100644 --- a/packages/runtime-core/__tests__/helpers/renderSlot.spec.ts +++ b/packages/runtime-core/__tests__/helpers/renderSlot.spec.ts @@ -32,6 +32,12 @@ describe('renderSlot', () => { expect(vnode.key).toBe('foo') }) + it('should allow symbol values for slot prop key', () => { + const key = Symbol() + const vnode = renderSlot({ default: () => [h('div')] }, 'default', { key }) + expect(vnode.key).toBe('_default') + }) + it('should render slot fallback', () => { const vnode = renderSlot({}, 'default', { key: 'foo' }, () => ['fallback']) expect(vnode.children).toEqual(['fallback']) diff --git a/packages/runtime-core/src/helpers/renderSlot.ts b/packages/runtime-core/src/helpers/renderSlot.ts index 2cb266ef1c4..92f7dab36b6 100644 --- a/packages/runtime-core/src/helpers/renderSlot.ts +++ b/packages/runtime-core/src/helpers/renderSlot.ts @@ -14,7 +14,7 @@ import { isVNode, openBlock, } from '../vnode' -import { PatchFlags, SlotFlags } from '@vue/shared' +import { PatchFlags, SlotFlags, isSymbol } from '@vue/shared' import { warn } from '../warning' import { isAsyncWrapper } from '../apiAsyncComponent' @@ -72,15 +72,16 @@ export function renderSlot( } openBlock() const validSlotContent = slot && ensureValidVNode(slot(props)) + const slotKey = + props.key || + // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + (validSlotContent && (validSlotContent as any).key) const rendered = createBlock( Fragment, { key: - (props.key || - // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - (validSlotContent && (validSlotContent as any).key) || - `_${name}`) + + (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content (!validSlotContent && fallback ? '_fb' : ''), }, From 704173e24276706de672cca6c9507e4dd9651197 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 11 Oct 2024 10:30:09 +0800 Subject: [PATCH 018/222] fix(types): ensure `this.$props` type does not include `string` (#12123) close #12122 --- packages-private/dts-test/defineComponent.test-d.tsx | 10 ++++++++++ packages/runtime-core/src/apiDefineComponent.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages-private/dts-test/defineComponent.test-d.tsx b/packages-private/dts-test/defineComponent.test-d.tsx index 9b4c184719c..fda3ca4856c 100644 --- a/packages-private/dts-test/defineComponent.test-d.tsx +++ b/packages-private/dts-test/defineComponent.test-d.tsx @@ -2068,3 +2068,13 @@ expectString(instance.actionText) // public prop on $props should be optional // @ts-expect-error expectString(instance.$props.actionText) + +// #12122 +defineComponent({ + props: { foo: String }, + render() { + expectType<{ readonly foo?: string }>(this.$props) + // @ts-expect-error + expectType(this.$props) + }, +}) diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 9ae6b41a4da..2ce870f0141 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -265,7 +265,7 @@ export function defineComponent< Mixin, Extends, ResolvedEmits, - RuntimeEmitsKeys, + {}, {}, false, InjectOptions, From e0a591e1cdf842631104f16ce5753e487c08e439 Mon Sep 17 00:00:00 2001 From: w2xi <57785259+w2xi@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:31:01 +0800 Subject: [PATCH 019/222] chore(sfc-playground): adjust the tooltip text for toggling the theme (#12116) * chore(sfc-playground): adjust the tooltip text for toggling the theme * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- packages-private/sfc-playground/src/App.vue | 1 + packages-private/sfc-playground/src/Header.vue | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages-private/sfc-playground/src/App.vue b/packages-private/sfc-playground/src/App.vue index c9295d41b08..d163b1a3ee6 100644 --- a/packages-private/sfc-playground/src/App.vue +++ b/packages-private/sfc-playground/src/App.vue @@ -123,6 +123,7 @@ onMounted(() => { :prod="productionMode" :ssr="useSSRMode" :autoSave="autoSave" + :theme="theme" @toggle-theme="toggleTheme" @toggle-prod="toggleProdMode" @toggle-ssr="toggleSSR" diff --git a/packages-private/sfc-playground/src/Header.vue b/packages-private/sfc-playground/src/Header.vue index 2778724b0ab..aea6c022a3e 100644 --- a/packages-private/sfc-playground/src/Header.vue +++ b/packages-private/sfc-playground/src/Header.vue @@ -15,6 +15,7 @@ const props = defineProps<{ prod: boolean ssr: boolean autoSave: boolean + theme: 'dark' | 'light' }>() const emit = defineEmits([ 'toggle-theme', @@ -117,7 +118,11 @@ function toggleDark() { > {{ autoSave ? 'AutoSave ON' : 'AutoSave OFF' }} - From f1a4f67aedfe83e440c54222213f070774faa421 Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 11 Oct 2024 10:34:28 +0800 Subject: [PATCH 020/222] fix(transition/ssr): make transition appear work with Suspense in SSR (#12047) close #12046 --- .../runtime-core/__tests__/hydration.spec.ts | 30 +++++++++++++++++++ packages/runtime-core/src/hydration.ts | 5 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index c98f1f473bd..a1fb8cde33f 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -1613,6 +1613,36 @@ describe('SSR hydration', () => { `) }) + test('Suspense + transition appear', async () => { + const { vnode, container } = mountWithHydration( + ``, + () => + h(Suspense, {}, () => + h( + Transition, + { appear: true }, + { + default: () => h('div', 'foo'), + }, + ), + ), + ) + + expect(vnode.el).toBe(container.firstChild) + // wait for hydration to finish + await new Promise(r => setTimeout(r)) + + expect(container.firstChild).toMatchInlineSnapshot(` +
+ foo +
+ `) + await nextTick() + expect(vnode.el).toBe(container.firstChild) + }) + // #10607 test('update component stable slot (prod + optimized mode)', async () => { __DEV__ = false diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index 82972e17174..c49db529c38 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -385,7 +385,10 @@ export function createHydrationFunctions( let needCallTransitionHooks = false if (isTemplateNode(el)) { needCallTransitionHooks = - needTransition(parentSuspense, transition) && + needTransition( + null, // no need check parentSuspense in hydration + transition, + ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear From c0418a3b8fa96a0b108ab71b7aab5d3388f90557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:35:57 +0800 Subject: [PATCH 021/222] fix(defineModel): handle kebab-case model correctly (#12063) close #12060 --- .../runtime-core/__tests__/helpers/useModel.spec.ts | 12 ++++++------ packages/runtime-core/src/helpers/useModel.ts | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/runtime-core/__tests__/helpers/useModel.spec.ts b/packages/runtime-core/__tests__/helpers/useModel.spec.ts index 3c724b0ba00..8d31848e1bc 100644 --- a/packages/runtime-core/__tests__/helpers/useModel.spec.ts +++ b/packages/runtime-core/__tests__/helpers/useModel.spec.ts @@ -153,10 +153,10 @@ describe('useModel', () => { const compRender = vi.fn() const Comp = defineComponent({ - props: ['fooBar'], - emits: ['update:fooBar'], + props: ['foo-bar'], + emits: ['update:foo-bar'], setup(props) { - foo = useModel(props, 'fooBar') + foo = useModel(props, 'foo-bar') return () => { compRender() return foo.value @@ -192,10 +192,10 @@ describe('useModel', () => { const compRender = vi.fn() const Comp = defineComponent({ - props: ['fooBar'], - emits: ['update:fooBar'], + props: ['foo-bar'], + emits: ['update:foo-bar'], setup(props) { - foo = useModel(props, 'fooBar') + foo = useModel(props, 'foo-bar') return () => { compRender() return foo.value diff --git a/packages/runtime-core/src/helpers/useModel.ts b/packages/runtime-core/src/helpers/useModel.ts index 37fd1d719b0..c40938ead3c 100644 --- a/packages/runtime-core/src/helpers/useModel.ts +++ b/packages/runtime-core/src/helpers/useModel.ts @@ -28,14 +28,14 @@ export function useModel( return ref() as any } - if (__DEV__ && !(i.propsOptions[0] as NormalizedProps)[name]) { + const camelizedName = camelize(name) + if (__DEV__ && !(i.propsOptions[0] as NormalizedProps)[camelizedName]) { warn(`useModel() called with prop "${name}" which is not declared.`) return ref() as any } - const camelizedName = camelize(name) const hyphenatedName = hyphenate(name) - const modifiers = getModelModifiers(props, name) + const modifiers = getModelModifiers(props, camelizedName) const res = customRef((track, trigger) => { let localValue: any @@ -43,7 +43,7 @@ export function useModel( let prevEmittedValue: any watchSyncEffect(() => { - const propValue = props[name] + const propValue = props[camelizedName] if (hasChanged(localValue, propValue)) { localValue = propValue trigger() From 7ad289e1e7fea654524008ff91e43a8b8a55ef22 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 11 Oct 2024 10:39:08 +0800 Subject: [PATCH 022/222] fix(reactivity): trigger reactivity for Map key `undefined` (#12055) close #12054 --- packages/reactivity/__tests__/reactive.spec.ts | 10 ++++++++++ packages/reactivity/src/dep.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/reactivity/__tests__/reactive.spec.ts b/packages/reactivity/__tests__/reactive.spec.ts index 47f6aa297ec..aabd954568a 100644 --- a/packages/reactivity/__tests__/reactive.spec.ts +++ b/packages/reactivity/__tests__/reactive.spec.ts @@ -409,4 +409,14 @@ describe('reactivity/reactive', () => { e.effect.stop() expect(targetMap.get(obj)?.get('x')).toBeFalsy() }) + + test('should trigger reactivity when Map key is undefined', () => { + const map = reactive(new Map()) + const c = computed(() => map.get(void 0)) + + expect(c.value).toBe(void 0) + + map.set(void 0, 1) + expect(c.value).toBe(1) + }) }) diff --git a/packages/reactivity/src/dep.ts b/packages/reactivity/src/dep.ts index 7e404874348..196c2aaf98e 100644 --- a/packages/reactivity/src/dep.ts +++ b/packages/reactivity/src/dep.ts @@ -340,7 +340,7 @@ export function trigger( }) } else { // schedule runs for SET | ADD | DELETE - if (key !== void 0) { + if (key !== void 0 || depsMap.has(void 0)) { run(depsMap.get(key)) } From f6d99262364b7444ebab8742158599e8cdd79eaa Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 11 Oct 2024 10:41:55 +0800 Subject: [PATCH 023/222] fix(compiler-dom): avoid stringify option with null value (#12096) close #12093 --- .../__snapshots__/stringifyStatic.spec.ts.snap | 17 +++++++++++++++++ .../transforms/stringifyStatic.spec.ts | 11 +++++++++++ .../src/transforms/stringifyStatic.ts | 3 +-- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap b/packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap index 78b576af5c7..a863eb32e61 100644 --- a/packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap +++ b/packages/compiler-dom/__tests__/transforms/__snapshots__/stringifyStatic.spec.ts.snap @@ -32,6 +32,23 @@ return function render(_ctx, _cache) { }" `; +exports[`stringify static html > should bail for