From 05eb4e0fefd585125dd60b7f8fe9c36928d921aa Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 25 Feb 2024 16:51:49 +0800 Subject: [PATCH 001/924] Refactor reactivity system to use version counting and doubly-linked list tracking (#10397) Bug fixes close #10236 close #10069 PRs made stale by this one close #10290 close #10354 close #10189 close #9480 --- .../__benchmarks__/computed.bench.ts | 200 +++++++ .../reactivity/__benchmarks__/effect.bench.ts | 111 ++++ .../reactiveArray.bench.ts | 8 +- .../reactiveMap.bench.ts | 4 +- .../__benchmarks__/reactiveObject.bench.ts | 21 + .../ref.bench.ts | 1 - .../reactivity/__tests__/computed.bench.ts | 126 ---- .../reactivity/__tests__/computed.spec.ts | 396 ++++++++++--- .../__tests__/deferredComputed.spec.ts | 155 ----- packages/reactivity/__tests__/effect.spec.ts | 105 ++-- .../reactivity/__tests__/effectScope.spec.ts | 4 +- packages/reactivity/__tests__/gc.spec.ts | 2 +- .../__tests__/reactiveObject.bench.ts | 114 ---- .../reactivity/__tests__/readonly.spec.ts | 2 +- packages/reactivity/__tests__/ref.spec.ts | 11 + .../__tests__/shallowReactive.spec.ts | 1 + packages/reactivity/src/baseHandlers.ts | 22 +- packages/reactivity/src/collectionHandlers.ts | 7 +- packages/reactivity/src/computed.ts | 152 ++--- packages/reactivity/src/deferredComputed.ts | 6 - packages/reactivity/src/dep.ts | 302 +++++++++- packages/reactivity/src/effect.ts | 549 +++++++++++------- packages/reactivity/src/index.ts | 6 +- packages/reactivity/src/reactiveEffect.ts | 150 ----- packages/reactivity/src/ref.ts | 130 ++--- .../__tests__/apiSetupHelpers.spec.ts | 17 +- .../runtime-core/__tests__/apiWatch.spec.ts | 45 +- .../runtime-core/src/apiAsyncComponent.ts | 1 - packages/runtime-core/src/apiWatch.ts | 16 +- packages/runtime-core/src/component.ts | 9 +- .../src/componentPublicInstance.ts | 1 - .../src/components/BaseTransition.ts | 3 +- packages/runtime-core/src/customFormatter.ts | 3 +- packages/runtime-core/src/hmr.ts | 2 - packages/runtime-core/src/renderer.ts | 37 +- packages/runtime-core/src/scheduler.ts | 1 - .../__tests__/ssrComputed.spec.ts | 22 +- packages/server-renderer/src/render.ts | 9 - 38 files changed, 1629 insertions(+), 1122 deletions(-) create mode 100644 packages/reactivity/__benchmarks__/computed.bench.ts create mode 100644 packages/reactivity/__benchmarks__/effect.bench.ts rename packages/reactivity/{__tests__ => __benchmarks__}/reactiveArray.bench.ts (94%) rename packages/reactivity/{__tests__ => __benchmarks__}/reactiveMap.bench.ts (97%) create mode 100644 packages/reactivity/__benchmarks__/reactiveObject.bench.ts rename packages/reactivity/{__tests__ => __benchmarks__}/ref.bench.ts (99%) delete mode 100644 packages/reactivity/__tests__/computed.bench.ts delete mode 100644 packages/reactivity/__tests__/deferredComputed.spec.ts delete mode 100644 packages/reactivity/__tests__/reactiveObject.bench.ts delete mode 100644 packages/reactivity/src/deferredComputed.ts delete mode 100644 packages/reactivity/src/reactiveEffect.ts diff --git a/packages/reactivity/__benchmarks__/computed.bench.ts b/packages/reactivity/__benchmarks__/computed.bench.ts new file mode 100644 index 00000000000..d9757501f81 --- /dev/null +++ b/packages/reactivity/__benchmarks__/computed.bench.ts @@ -0,0 +1,200 @@ +import { bench, describe } from 'vitest' +import { type ComputedRef, type Ref, computed, effect, ref } from '../src' + +describe('computed', () => { + bench('create computed', () => { + computed(() => 100) + }) + + { + const v = ref(100) + computed(() => v.value * 2) + let i = 0 + bench("write ref, don't read computed (without effect)", () => { + v.value = i++ + }) + } + + { + const v = ref(100) + const c = computed(() => { + return v.value * 2 + }) + effect(() => c.value) + let i = 0 + bench("write ref, don't read computed (with effect)", () => { + v.value = i++ + }) + } + + { + const v = ref(100) + const c = computed(() => { + return v.value * 2 + }) + let i = 0 + bench('write ref, read computed (without effect)', () => { + v.value = i++ + c.value + }) + } + + { + const v = ref(100) + const c = computed(() => { + return v.value * 2 + }) + effect(() => c.value) + let i = 0 + bench('write ref, read computed (with effect)', () => { + v.value = i++ + c.value + }) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + computeds.push(c) + } + let i = 0 + bench("write ref, don't read 1000 computeds (without effect)", () => { + v.value = i++ + }) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + effect(() => c.value) + computeds.push(c) + } + let i = 0 + bench( + "write ref, don't read 1000 computeds (with multiple effects)", + () => { + v.value = i++ + }, + ) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + computeds.push(c) + } + effect(() => { + for (let i = 0; i < 1000; i++) { + computeds[i].value + } + }) + let i = 0 + bench("write ref, don't read 1000 computeds (with single effect)", () => { + v.value = i++ + }) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + computeds.push(c) + } + let i = 0 + bench('write ref, read 1000 computeds (no effect)', () => { + v.value = i++ + computeds.forEach(c => c.value) + }) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + effect(() => c.value) + computeds.push(c) + } + let i = 0 + bench('write ref, read 1000 computeds (with multiple effects)', () => { + v.value = i++ + computeds.forEach(c => c.value) + }) + } + + { + const v = ref(100) + const computeds: ComputedRef[] = [] + for (let i = 0, n = 1000; i < n; i++) { + const c = computed(() => { + return v.value * 2 + }) + effect(() => c.value) + computeds.push(c) + } + effect(() => { + for (let i = 0; i < 1000; i++) { + computeds[i].value + } + }) + let i = 0 + bench('write ref, read 1000 computeds (with single effect)', () => { + v.value = i++ + computeds.forEach(c => c.value) + }) + } + + { + const refs: Ref[] = [] + for (let i = 0, n = 1000; i < n; i++) { + refs.push(ref(i)) + } + const c = computed(() => { + let total = 0 + refs.forEach(ref => (total += ref.value)) + return total + }) + let i = 0 + const n = refs.length + bench('1000 refs, read 1 computed (without effect)', () => { + refs[i++ % n].value++ + c.value + }) + } + + { + const refs: Ref[] = [] + for (let i = 0, n = 1000; i < n; i++) { + refs.push(ref(i)) + } + const c = computed(() => { + let total = 0 + refs.forEach(ref => (total += ref.value)) + return total + }) + effect(() => c.value) + let i = 0 + const n = refs.length + bench('1000 refs, read 1 computed (with effect)', () => { + refs[i++ % n].value++ + c.value + }) + } +}) diff --git a/packages/reactivity/__benchmarks__/effect.bench.ts b/packages/reactivity/__benchmarks__/effect.bench.ts new file mode 100644 index 00000000000..8d3d6ecfbfc --- /dev/null +++ b/packages/reactivity/__benchmarks__/effect.bench.ts @@ -0,0 +1,111 @@ +import { bench, describe } from 'vitest' +import { type Ref, effect, ref } from '../src' + +describe('effect', () => { + { + let i = 0 + const n = ref(0) + effect(() => n.value) + bench('single ref invoke', () => { + n.value = i++ + }) + } + + function benchEffectCreate(size: number) { + bench(`create an effect that tracks ${size} refs`, () => { + const refs: Ref[] = [] + for (let i = 0; i < size; i++) { + refs.push(ref(i)) + } + effect(() => { + for (let i = 0; i < size; i++) { + refs[i].value + } + }) + }) + } + + benchEffectCreate(1) + benchEffectCreate(10) + benchEffectCreate(100) + benchEffectCreate(1000) + + function benchEffectCreateAndStop(size: number) { + bench(`create and stop an effect that tracks ${size} refs`, () => { + const refs: Ref[] = [] + for (let i = 0; i < size; i++) { + refs.push(ref(i)) + } + const e = effect(() => { + for (let i = 0; i < size; i++) { + refs[i].value + } + }) + e.effect.stop() + }) + } + + benchEffectCreateAndStop(1) + benchEffectCreateAndStop(10) + benchEffectCreateAndStop(100) + benchEffectCreateAndStop(1000) + + function benchWithRefs(size: number) { + let j = 0 + const refs: Ref[] = [] + for (let i = 0; i < size; i++) { + refs.push(ref(i)) + } + effect(() => { + for (let i = 0; i < size; i++) { + refs[i].value + } + }) + bench(`1 effect, mutate ${size} refs`, () => { + for (let i = 0; i < size; i++) { + refs[i].value = i + j++ + } + }) + } + + benchWithRefs(10) + benchWithRefs(100) + benchWithRefs(1000) + + function benchWithBranches(size: number) { + const toggle = ref(true) + const refs: Ref[] = [] + for (let i = 0; i < size; i++) { + refs.push(ref(i)) + } + effect(() => { + if (toggle.value) { + for (let i = 0; i < size; i++) { + refs[i].value + } + } + }) + bench(`${size} refs branch toggle`, () => { + toggle.value = !toggle.value + }) + } + + benchWithBranches(10) + benchWithBranches(100) + benchWithBranches(1000) + + function benchMultipleEffects(size: number) { + let i = 0 + const n = ref(0) + for (let i = 0; i < size; i++) { + effect(() => n.value) + } + bench(`1 ref invoking ${size} effects`, () => { + n.value = i++ + }) + } + + benchMultipleEffects(10) + benchMultipleEffects(100) + benchMultipleEffects(1000) +}) diff --git a/packages/reactivity/__tests__/reactiveArray.bench.ts b/packages/reactivity/__benchmarks__/reactiveArray.bench.ts similarity index 94% rename from packages/reactivity/__tests__/reactiveArray.bench.ts rename to packages/reactivity/__benchmarks__/reactiveArray.bench.ts index 9ce0dc531d1..6726cccfd89 100644 --- a/packages/reactivity/__tests__/reactiveArray.bench.ts +++ b/packages/reactivity/__benchmarks__/reactiveArray.bench.ts @@ -3,7 +3,7 @@ import { computed, reactive, readonly, shallowRef, triggerRef } from '../src' for (let amount = 1e1; amount < 1e4; amount *= 10) { { - const rawArray = [] + const rawArray: any[] = [] for (let i = 0, n = amount; i < n; i++) { rawArray.push(i) } @@ -21,7 +21,7 @@ for (let amount = 1e1; amount < 1e4; amount *= 10) { } { - const rawArray = [] + const rawArray: any[] = [] for (let i = 0, n = amount; i < n; i++) { rawArray.push(i) } @@ -40,7 +40,7 @@ for (let amount = 1e1; amount < 1e4; amount *= 10) { } { - const rawArray = [] + const rawArray: any[] = [] for (let i = 0, n = amount; i < n; i++) { rawArray.push(i) } @@ -56,7 +56,7 @@ for (let amount = 1e1; amount < 1e4; amount *= 10) { } { - const rawArray = [] + const rawArray: any[] = [] for (let i = 0, n = amount; i < n; i++) { rawArray.push(i) } diff --git a/packages/reactivity/__tests__/reactiveMap.bench.ts b/packages/reactivity/__benchmarks__/reactiveMap.bench.ts similarity index 97% rename from packages/reactivity/__tests__/reactiveMap.bench.ts rename to packages/reactivity/__benchmarks__/reactiveMap.bench.ts index 70a034e96c3..f8b4611153e 100644 --- a/packages/reactivity/__tests__/reactiveMap.bench.ts +++ b/packages/reactivity/__benchmarks__/reactiveMap.bench.ts @@ -79,7 +79,7 @@ bench('create reactive map', () => { { const r = reactive(createMap({ a: 1 })) - const computeds = [] + const computeds: any[] = [] for (let i = 0, n = 1000; i < n; i++) { const c = computed(() => { return r.get('a') * 2 @@ -94,7 +94,7 @@ bench('create reactive map', () => { { const r = reactive(createMap({ a: 1 })) - const computeds = [] + const computeds: any[] = [] for (let i = 0, n = 1000; i < n; i++) { const c = computed(() => { return r.get('a') * 2 diff --git a/packages/reactivity/__benchmarks__/reactiveObject.bench.ts b/packages/reactivity/__benchmarks__/reactiveObject.bench.ts new file mode 100644 index 00000000000..a326a111b49 --- /dev/null +++ b/packages/reactivity/__benchmarks__/reactiveObject.bench.ts @@ -0,0 +1,21 @@ +import { bench } from 'vitest' +import { reactive } from '../src' + +bench('create reactive obj', () => { + reactive({ a: 1 }) +}) + +{ + const r = reactive({ a: 1 }) + bench('read reactive obj property', () => { + r.a + }) +} + +{ + let i = 0 + const r = reactive({ a: 1 }) + bench('write reactive obj property', () => { + r.a = i++ + }) +} diff --git a/packages/reactivity/__tests__/ref.bench.ts b/packages/reactivity/__benchmarks__/ref.bench.ts similarity index 99% rename from packages/reactivity/__tests__/ref.bench.ts rename to packages/reactivity/__benchmarks__/ref.bench.ts index 286d53e8840..0c05890179b 100644 --- a/packages/reactivity/__tests__/ref.bench.ts +++ b/packages/reactivity/__benchmarks__/ref.bench.ts @@ -26,7 +26,6 @@ describe('ref', () => { const v = ref(100) bench('write/read ref', () => { v.value = i++ - v.value }) } diff --git a/packages/reactivity/__tests__/computed.bench.ts b/packages/reactivity/__tests__/computed.bench.ts deleted file mode 100644 index 0ffa288ff1e..00000000000 --- a/packages/reactivity/__tests__/computed.bench.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { bench, describe } from 'vitest' -import { type ComputedRef, type Ref, computed, ref } from '../src/index' - -describe('computed', () => { - bench('create computed', () => { - computed(() => 100) - }) - - { - let i = 0 - const o = ref(100) - bench('write independent ref dep', () => { - o.value = i++ - }) - } - - { - const v = ref(100) - computed(() => v.value * 2) - let i = 0 - bench("write ref, don't read computed (never invoked)", () => { - v.value = i++ - }) - } - - { - const v = ref(100) - computed(() => { - return v.value * 2 - }) - let i = 0 - bench("write ref, don't read computed (never invoked)", () => { - v.value = i++ - }) - } - - { - const v = ref(100) - const c = computed(() => { - return v.value * 2 - }) - c.value - let i = 0 - bench("write ref, don't read computed (invoked)", () => { - v.value = i++ - }) - } - - { - const v = ref(100) - const c = computed(() => { - return v.value * 2 - }) - let i = 0 - bench('write ref, read computed', () => { - v.value = i++ - c.value - }) - } - - { - const v = ref(100) - const computeds = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return v.value * 2 - }) - computeds.push(c) - } - let i = 0 - bench("write ref, don't read 1000 computeds (never invoked)", () => { - v.value = i++ - }) - } - - { - const v = ref(100) - const computeds = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return v.value * 2 - }) - c.value - computeds.push(c) - } - let i = 0 - bench("write ref, don't read 1000 computeds (invoked)", () => { - v.value = i++ - }) - } - - { - const v = ref(100) - const computeds: ComputedRef[] = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return v.value * 2 - }) - c.value - computeds.push(c) - } - let i = 0 - bench('write ref, read 1000 computeds', () => { - v.value = i++ - computeds.forEach(c => c.value) - }) - } - - { - const refs: Ref[] = [] - for (let i = 0, n = 1000; i < n; i++) { - refs.push(ref(i)) - } - const c = computed(() => { - let total = 0 - refs.forEach(ref => (total += ref.value)) - return total - }) - let i = 0 - const n = refs.length - bench('1000 refs, 1 computed', () => { - refs[i++ % n].value++ - c.value - }) - } -}) diff --git a/packages/reactivity/__tests__/computed.spec.ts b/packages/reactivity/__tests__/computed.spec.ts index c9f47720edd..e2325be54d2 100644 --- a/packages/reactivity/__tests__/computed.spec.ts +++ b/packages/reactivity/__tests__/computed.spec.ts @@ -1,4 +1,12 @@ -import { h, nextTick, nodeOps, render, serializeInner } from '@vue/runtime-test' +import { + h, + nextTick, + nodeOps, + onMounted, + onUnmounted, + render, + serializeInner, +} from '@vue/runtime-test' import { type DebuggerEvent, ITERATE_KEY, @@ -13,8 +21,8 @@ import { shallowRef, toRaw, } from '../src' -import { DirtyLevels } from '../src/constants' -import { COMPUTED_SIDE_EFFECT_WARN } from '../src/computed' +import { EffectFlags, pauseTracking, resetTracking } from '../src/effect' +import type { ComputedRef, ComputedRefImpl } from '../src/computed' describe('reactivity/computed', () => { it('should return updated value', () => { @@ -123,21 +131,6 @@ describe('reactivity/computed', () => { expect(getter2).toHaveBeenCalledTimes(2) }) - it('should no longer update when stopped', () => { - const value = reactive<{ foo?: number }>({}) - const cValue = computed(() => value.foo) - let dummy - effect(() => { - dummy = cValue.value - }) - expect(dummy).toBe(undefined) - value.foo = 1 - expect(dummy).toBe(1) - cValue.effect.stop() - value.foo = 2 - expect(dummy).toBe(1) - }) - it('should support setter', () => { const n = ref(1) const plusOne = computed({ @@ -219,12 +212,6 @@ describe('reactivity/computed', () => { expect(isReadonly(z.value.a)).toBe(false) }) - it('should expose value when stopped', () => { - const x = computed(() => 1) - x.effect.stop() - expect(x.value).toBe(1) - }) - it('debug: onTrack', () => { let events: DebuggerEvent[] = [] const onTrack = vi.fn((e: DebuggerEvent) => { @@ -238,19 +225,19 @@ describe('reactivity/computed', () => { expect(onTrack).toHaveBeenCalledTimes(3) expect(events).toEqual([ { - effect: c.effect, + effect: c, target: toRaw(obj), type: TrackOpTypes.GET, key: 'foo', }, { - effect: c.effect, + effect: c, target: toRaw(obj), type: TrackOpTypes.HAS, key: 'bar', }, { - effect: c.effect, + effect: c, target: toRaw(obj), type: TrackOpTypes.ITERATE, key: ITERATE_KEY, @@ -266,14 +253,14 @@ describe('reactivity/computed', () => { const obj = reactive<{ foo?: number }>({ foo: 1 }) const c = computed(() => obj.foo, { onTrigger }) - // computed won't trigger compute until accessed - c.value + // computed won't track until it has a subscriber + effect(() => c.value) obj.foo!++ expect(c.value).toBe(2) expect(onTrigger).toHaveBeenCalledTimes(1) expect(events[0]).toEqual({ - effect: c.effect, + effect: c, target: toRaw(obj), type: TriggerOpTypes.SET, key: 'foo', @@ -285,7 +272,7 @@ describe('reactivity/computed', () => { expect(c.value).toBeUndefined() expect(onTrigger).toHaveBeenCalledTimes(2) expect(events[1]).toEqual({ - effect: c.effect, + effect: c, target: toRaw(obj), type: TriggerOpTypes.DELETE, key: 'foo', @@ -380,17 +367,17 @@ describe('reactivity/computed', () => { const a = ref(0) const b = computed(() => { return a.value % 3 !== 0 - }) + }) as unknown as ComputedRefImpl const c = computed(() => { cSpy() if (a.value % 3 === 2) { return 'expensive' } return 'cheap' - }) + }) as unknown as ComputedRefImpl const d = computed(() => { return a.value % 3 === 2 - }) + }) as unknown as ComputedRefImpl const e = computed(() => { if (b.value) { if (d.value) { @@ -398,16 +385,15 @@ describe('reactivity/computed', () => { } } return c.value - }) + }) as unknown as ComputedRefImpl e.value a.value++ e.value - expect(e.effect.deps.length).toBe(3) - expect(e.effect.deps.indexOf((b as any).dep)).toBe(0) - expect(e.effect.deps.indexOf((d as any).dep)).toBe(1) - expect(e.effect.deps.indexOf((c as any).dep)).toBe(2) + expect(e.deps!.dep).toBe(b.dep) + expect(e.deps!.nextDep!.dep).toBe(d.dep) + expect(e.deps!.nextDep!.nextDep!.dep).toBe(c.dep) expect(cSpy).toHaveBeenCalledTimes(2) a.value++ @@ -456,17 +442,14 @@ describe('reactivity/computed', () => { expect(fnSpy).toBeCalledTimes(2) }) - it('should chained recurse effects clear dirty after trigger', () => { + it('should chained recursive effects clear dirty after trigger', () => { const v = ref(1) - const c1 = computed(() => v.value) - const c2 = computed(() => c1.value) + const c1 = computed(() => v.value) as unknown as ComputedRefImpl + const c2 = computed(() => c1.value) as unknown as ComputedRefImpl - c1.effect.allowRecurse = true - c2.effect.allowRecurse = true c2.value - - expect(c1.effect._dirtyLevel).toBe(DirtyLevels.NotDirty) - expect(c2.effect._dirtyLevel).toBe(DirtyLevels.NotDirty) + expect(c1.flags & EffectFlags.DIRTY).toBeFalsy() + expect(c2.flags & EffectFlags.DIRTY).toBeFalsy() }) it('should chained computeds dirtyLevel update with first computed effect', () => { @@ -481,15 +464,7 @@ describe('reactivity/computed', () => { const c3 = computed(() => c2.value) c3.value - - expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) - expect(c2.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) - expect(c3.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) it('should work when chained(ref+computed)', () => { @@ -502,9 +477,8 @@ describe('reactivity/computed', () => { }) const c2 = computed(() => v.value + c1.value) expect(c2.value).toBe('0foo') - expect(c2.effect._dirtyLevel).toBe(DirtyLevels.Dirty) expect(c2.value).toBe('1foo') - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) it('should trigger effect even computed already dirty', () => { @@ -519,15 +493,16 @@ describe('reactivity/computed', () => { const c2 = computed(() => v.value + c1.value) effect(() => { - fnSpy() - c2.value + fnSpy(c2.value) }) expect(fnSpy).toBeCalledTimes(1) - expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) - expect(c2.effect._dirtyLevel).toBe(DirtyLevels.Dirty) + expect(fnSpy.mock.calls).toMatchObject([['0foo']]) + expect(v.value).toBe(1) v.value = 2 expect(fnSpy).toBeCalledTimes(2) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + expect(fnSpy.mock.calls).toMatchObject([['0foo'], ['2foo']]) + expect(v.value).toBe(2) + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) // #10185 @@ -553,25 +528,12 @@ describe('reactivity/computed', () => { c3.value v2.value = true - expect(c2.effect._dirtyLevel).toBe(DirtyLevels.Dirty) - expect(c3.effect._dirtyLevel).toBe(DirtyLevels.MaybeDirty) c3.value - expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) - expect(c2.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) - expect(c3.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) - v1.value.v.value = 999 - expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) - expect(c2.effect._dirtyLevel).toBe(DirtyLevels.MaybeDirty) - expect(c3.effect._dirtyLevel).toBe(DirtyLevels.MaybeDirty) expect(c3.value).toBe('yes') - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) it('should be not dirty after deps mutate (mutate deps in computed)', async () => { @@ -593,10 +555,10 @@ describe('reactivity/computed', () => { await nextTick() await nextTick() expect(serializeInner(root)).toBe(`2`) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) - it('should not trigger effect scheduler by recurse computed effect', async () => { + it('should not trigger effect scheduler by recursive computed effect', async () => { const v = ref('Hello') const c = computed(() => { v.value += ' World' @@ -615,7 +577,279 @@ describe('reactivity/computed', () => { v.value += ' World' await nextTick() - expect(serializeInner(root)).toBe('Hello World World World World') - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + expect(serializeInner(root)).toBe('Hello World World World') + // expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + }) + + test('should not trigger if value did not change', () => { + const src = ref(0) + const c = computed(() => src.value % 2) + const spy = vi.fn() + effect(() => { + spy(c.value) + }) + expect(spy).toHaveBeenCalledTimes(1) + src.value = 2 + + // should not trigger + expect(spy).toHaveBeenCalledTimes(1) + + src.value = 3 + src.value = 5 + // should trigger because latest value changes + expect(spy).toHaveBeenCalledTimes(2) + }) + + test('chained computed trigger', () => { + const effectSpy = vi.fn() + const c1Spy = vi.fn() + const c2Spy = vi.fn() + + const src = ref(0) + const c1 = computed(() => { + c1Spy() + return src.value % 2 + }) + const c2 = computed(() => { + c2Spy() + return c1.value + 1 + }) + + effect(() => { + effectSpy(c2.value) + }) + + expect(c1Spy).toHaveBeenCalledTimes(1) + expect(c2Spy).toHaveBeenCalledTimes(1) + expect(effectSpy).toHaveBeenCalledTimes(1) + + src.value = 1 + expect(c1Spy).toHaveBeenCalledTimes(2) + expect(c2Spy).toHaveBeenCalledTimes(2) + expect(effectSpy).toHaveBeenCalledTimes(2) + }) + + test('chained computed avoid re-compute', () => { + const effectSpy = vi.fn() + const c1Spy = vi.fn() + const c2Spy = vi.fn() + + const src = ref(0) + const c1 = computed(() => { + c1Spy() + return src.value % 2 + }) + const c2 = computed(() => { + c2Spy() + return c1.value + 1 + }) + + effect(() => { + effectSpy(c2.value) + }) + + expect(effectSpy).toHaveBeenCalledTimes(1) + src.value = 2 + src.value = 4 + src.value = 6 + expect(c1Spy).toHaveBeenCalledTimes(4) + // c2 should not have to re-compute because c1 did not change. + expect(c2Spy).toHaveBeenCalledTimes(1) + // effect should not trigger because c2 did not change. + expect(effectSpy).toHaveBeenCalledTimes(1) + }) + + test('chained computed value invalidation', () => { + const effectSpy = vi.fn() + const c1Spy = vi.fn() + const c2Spy = vi.fn() + + const src = ref(0) + const c1 = computed(() => { + c1Spy() + return src.value % 2 + }) + const c2 = computed(() => { + c2Spy() + return c1.value + 1 + }) + + effect(() => { + effectSpy(c2.value) + }) + + expect(effectSpy).toHaveBeenCalledTimes(1) + expect(effectSpy).toHaveBeenCalledWith(1) + expect(c2.value).toBe(1) + + expect(c1Spy).toHaveBeenCalledTimes(1) + expect(c2Spy).toHaveBeenCalledTimes(1) + + src.value = 1 + // value should be available sync + expect(c2.value).toBe(2) + expect(c2Spy).toHaveBeenCalledTimes(2) + }) + + test('sync access of invalidated chained computed should not prevent final effect from running', () => { + const effectSpy = vi.fn() + const c1Spy = vi.fn() + const c2Spy = vi.fn() + + const src = ref(0) + const c1 = computed(() => { + c1Spy() + return src.value % 2 + }) + const c2 = computed(() => { + c2Spy() + return c1.value + 1 + }) + + effect(() => { + effectSpy(c2.value) + }) + expect(effectSpy).toHaveBeenCalledTimes(1) + + src.value = 1 + // sync access c2 + c2.value + expect(effectSpy).toHaveBeenCalledTimes(2) + }) + + it('computed should force track in untracked zone', () => { + const n = ref(0) + const spy1 = vi.fn() + const spy2 = vi.fn() + + let c: ComputedRef + effect(() => { + spy1() + pauseTracking() + n.value + c = computed(() => n.value + 1) + // access computed now to force refresh + c.value + effect(() => spy2(c.value)) + n.value + resetTracking() + }) + + expect(spy1).toHaveBeenCalledTimes(1) + expect(spy2).toHaveBeenCalledTimes(1) + + n.value++ + // outer effect should not trigger + expect(spy1).toHaveBeenCalledTimes(1) + // inner effect should trigger + expect(spy2).toHaveBeenCalledTimes(2) + }) + + // not recommended behavior, but needed for backwards compatibility + // used in VueUse asyncComputed + it('computed side effect should be able trigger', () => { + const a = ref(false) + const b = ref(false) + const c = computed(() => { + a.value = true + return b.value + }) + effect(() => { + if (a.value) { + b.value = true + } + }) + expect(b.value).toBe(false) + // accessing c triggers change + c.value + expect(b.value).toBe(true) + expect(c.value).toBe(true) + }) + + it('chained computed should work when accessed before having subs', () => { + const n = ref(0) + const c = computed(() => n.value) + const d = computed(() => c.value + 1) + const spy = vi.fn() + + // access + d.value + + let dummy + effect(() => { + spy() + dummy = d.value + }) + expect(spy).toHaveBeenCalledTimes(1) + expect(dummy).toBe(1) + + n.value++ + expect(spy).toHaveBeenCalledTimes(2) + expect(dummy).toBe(2) + }) + + // #10236 + it('chained computed should still refresh after owner component unmount', async () => { + const a = ref(0) + const spy = vi.fn() + + const Child = { + setup() { + const b = computed(() => a.value + 1) + const c = computed(() => b.value + 1) + // access + c.value + onUnmounted(() => spy(c.value)) + return () => {} + }, + } + + const show = ref(true) + const Parent = { + setup() { + return () => (show.value ? h(Child) : null) + }, + } + + render(h(Parent), nodeOps.createElement('div')) + + a.value++ + show.value = false + + await nextTick() + expect(spy).toHaveBeenCalledWith(3) + }) + + // case: radix-vue `useForwardExpose` sets a template ref during mount, + // and checks for the element's closest form element in a computed. + // the computed is expected to only evaluate after mount. + it('computed deps should only be refreshed when the subscribing effect is run, not when scheduled', async () => { + const calls: string[] = [] + const a = ref(0) + const b = computed(() => { + calls.push('b eval') + return a.value + 1 + }) + + const App = { + setup() { + onMounted(() => { + calls.push('mounted') + }) + return () => + h( + 'div', + { + ref: () => (a.value = 1), + }, + b.value, + ) + }, + } + + render(h(App), nodeOps.createElement('div')) + + await nextTick() + expect(calls).toMatchObject(['b eval', 'mounted', 'b eval']) }) }) diff --git a/packages/reactivity/__tests__/deferredComputed.spec.ts b/packages/reactivity/__tests__/deferredComputed.spec.ts deleted file mode 100644 index 8e78ba959c3..00000000000 --- a/packages/reactivity/__tests__/deferredComputed.spec.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { computed, effect, ref } from '../src' - -describe('deferred computed', () => { - test('should not trigger if value did not change', () => { - const src = ref(0) - const c = computed(() => src.value % 2) - const spy = vi.fn() - effect(() => { - spy(c.value) - }) - expect(spy).toHaveBeenCalledTimes(1) - src.value = 2 - - // should not trigger - expect(spy).toHaveBeenCalledTimes(1) - - src.value = 3 - src.value = 5 - // should trigger because latest value changes - expect(spy).toHaveBeenCalledTimes(2) - }) - - test('chained computed trigger', () => { - const effectSpy = vi.fn() - const c1Spy = vi.fn() - const c2Spy = vi.fn() - - const src = ref(0) - const c1 = computed(() => { - c1Spy() - return src.value % 2 - }) - const c2 = computed(() => { - c2Spy() - return c1.value + 1 - }) - - effect(() => { - effectSpy(c2.value) - }) - - expect(c1Spy).toHaveBeenCalledTimes(1) - expect(c2Spy).toHaveBeenCalledTimes(1) - expect(effectSpy).toHaveBeenCalledTimes(1) - - src.value = 1 - expect(c1Spy).toHaveBeenCalledTimes(2) - expect(c2Spy).toHaveBeenCalledTimes(2) - expect(effectSpy).toHaveBeenCalledTimes(2) - }) - - test('chained computed avoid re-compute', () => { - const effectSpy = vi.fn() - const c1Spy = vi.fn() - const c2Spy = vi.fn() - - const src = ref(0) - const c1 = computed(() => { - c1Spy() - return src.value % 2 - }) - const c2 = computed(() => { - c2Spy() - return c1.value + 1 - }) - - effect(() => { - effectSpy(c2.value) - }) - - expect(effectSpy).toHaveBeenCalledTimes(1) - src.value = 2 - src.value = 4 - src.value = 6 - expect(c1Spy).toHaveBeenCalledTimes(4) - // c2 should not have to re-compute because c1 did not change. - expect(c2Spy).toHaveBeenCalledTimes(1) - // effect should not trigger because c2 did not change. - expect(effectSpy).toHaveBeenCalledTimes(1) - }) - - test('chained computed value invalidation', () => { - const effectSpy = vi.fn() - const c1Spy = vi.fn() - const c2Spy = vi.fn() - - const src = ref(0) - const c1 = computed(() => { - c1Spy() - return src.value % 2 - }) - const c2 = computed(() => { - c2Spy() - return c1.value + 1 - }) - - effect(() => { - effectSpy(c2.value) - }) - - expect(effectSpy).toHaveBeenCalledTimes(1) - expect(effectSpy).toHaveBeenCalledWith(1) - expect(c2.value).toBe(1) - - expect(c1Spy).toHaveBeenCalledTimes(1) - expect(c2Spy).toHaveBeenCalledTimes(1) - - src.value = 1 - // value should be available sync - expect(c2.value).toBe(2) - expect(c2Spy).toHaveBeenCalledTimes(2) - }) - - test('sync access of invalidated chained computed should not prevent final effect from running', () => { - const effectSpy = vi.fn() - const c1Spy = vi.fn() - const c2Spy = vi.fn() - - const src = ref(0) - const c1 = computed(() => { - c1Spy() - return src.value % 2 - }) - const c2 = computed(() => { - c2Spy() - return c1.value + 1 - }) - - effect(() => { - effectSpy(c2.value) - }) - expect(effectSpy).toHaveBeenCalledTimes(1) - - src.value = 1 - // sync access c2 - c2.value - expect(effectSpy).toHaveBeenCalledTimes(2) - }) - - test('should not compute if deactivated before scheduler is called', () => { - const c1Spy = vi.fn() - const src = ref(0) - const c1 = computed(() => { - c1Spy() - return src.value % 2 - }) - effect(() => c1.value) - expect(c1Spy).toHaveBeenCalledTimes(1) - - c1.effect.stop() - // trigger - src.value++ - expect(c1Spy).toHaveBeenCalledTimes(1) - }) -}) diff --git a/packages/reactivity/__tests__/effect.spec.ts b/packages/reactivity/__tests__/effect.spec.ts index bd26934f1ce..99453d35d87 100644 --- a/packages/reactivity/__tests__/effect.spec.ts +++ b/packages/reactivity/__tests__/effect.spec.ts @@ -11,8 +11,7 @@ import { stop, toRaw, } from '../src/index' -import { pauseScheduling, resetScheduling } from '../src/effect' -import { ITERATE_KEY, getDepFromReactive } from '../src/reactiveEffect' +import { type Dep, ITERATE_KEY, getDepFromReactive } from '../src/dep' import { computed, h, @@ -22,6 +21,12 @@ import { render, serializeInner, } from '@vue/runtime-test' +import { + endBatch, + pauseTracking, + resetTracking, + startBatch, +} from '../src/effect' describe('reactivity/effect', () => { it('should run the passed function once (wrapped by a effect)', () => { @@ -698,18 +703,6 @@ describe('reactivity/effect', () => { expect(dummy).toBe(1) }) - it('lazy', () => { - const obj = reactive({ foo: 1 }) - let dummy - const runner = effect(() => (dummy = obj.foo), { lazy: true }) - expect(dummy).toBe(undefined) - - expect(runner()).toBe(1) - expect(dummy).toBe(1) - obj.foo = 2 - expect(dummy).toBe(2) - }) - it('scheduler', () => { let dummy let run: any @@ -1005,7 +998,7 @@ describe('reactivity/effect', () => { }) }) - it('should be triggered once with pauseScheduling', () => { + it('should be triggered once with batching', () => { const counter = reactive({ num: 0 }) const counterSpy = vi.fn(() => counter.num) @@ -1013,10 +1006,10 @@ describe('reactivity/effect', () => { counterSpy.mockClear() - pauseScheduling() + startBatch() counter.num++ counter.num++ - resetScheduling() + endBatch() expect(counterSpy).toHaveBeenCalledTimes(1) }) @@ -1049,47 +1042,76 @@ describe('reactivity/effect', () => { expect(renderSpy).toHaveBeenCalledTimes(2) }) - describe('empty dep cleanup', () => { + it('nested effect should force track in untracked zone', () => { + const n = ref(0) + const spy1 = vi.fn() + const spy2 = vi.fn() + + effect(() => { + spy1() + pauseTracking() + n.value + effect(() => { + n.value + spy2() + }) + n.value + resetTracking() + }) + + expect(spy1).toHaveBeenCalledTimes(1) + expect(spy2).toHaveBeenCalledTimes(1) + + n.value++ + // outer effect should not trigger + expect(spy1).toHaveBeenCalledTimes(1) + // inner effect should trigger + expect(spy2).toHaveBeenCalledTimes(2) + }) + + describe('dep unsubscribe', () => { + function getSubCount(dep: Dep | undefined) { + let count = 0 + let sub = dep!.subs + while (sub) { + count++ + sub = sub.prevSub + } + return count + } + it('should remove the dep when the effect is stopped', () => { const obj = reactive({ prop: 1 }) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() const runner = effect(() => obj.prop) const dep = getDepFromReactive(toRaw(obj), 'prop') - expect(dep).toHaveLength(1) + expect(getSubCount(dep)).toBe(1) obj.prop = 2 - expect(getDepFromReactive(toRaw(obj), 'prop')).toBe(dep) - expect(dep).toHaveLength(1) + expect(getSubCount(dep)).toBe(1) stop(runner) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() + expect(getSubCount(dep)).toBe(0) obj.prop = 3 runner() - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() + expect(getSubCount(dep)).toBe(0) }) it('should only remove the dep when the last effect is stopped', () => { const obj = reactive({ prop: 1 }) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() const runner1 = effect(() => obj.prop) const dep = getDepFromReactive(toRaw(obj), 'prop') - expect(dep).toHaveLength(1) + expect(getSubCount(dep)).toBe(1) const runner2 = effect(() => obj.prop) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBe(dep) - expect(dep).toHaveLength(2) + expect(getSubCount(dep)).toBe(2) obj.prop = 2 - expect(getDepFromReactive(toRaw(obj), 'prop')).toBe(dep) - expect(dep).toHaveLength(2) + expect(getSubCount(dep)).toBe(2) stop(runner1) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBe(dep) - expect(dep).toHaveLength(1) + expect(getSubCount(dep)).toBe(1) obj.prop = 3 - expect(getDepFromReactive(toRaw(obj), 'prop')).toBe(dep) - expect(dep).toHaveLength(1) + expect(getSubCount(dep)).toBe(1) stop(runner2) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() obj.prop = 4 runner1() runner2() - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() + expect(getSubCount(dep)).toBe(0) }) it('should remove the dep when it is no longer used by the effect', () => { @@ -1098,18 +1120,15 @@ describe('reactivity/effect', () => { b: 2, c: 'a', }) - expect(getDepFromReactive(toRaw(obj), 'prop')).toBeUndefined() effect(() => obj[obj.c]) const depC = getDepFromReactive(toRaw(obj), 'c') - expect(getDepFromReactive(toRaw(obj), 'a')).toHaveLength(1) - expect(getDepFromReactive(toRaw(obj), 'b')).toBeUndefined() - expect(depC).toHaveLength(1) + expect(getSubCount(getDepFromReactive(toRaw(obj), 'a'))).toBe(1) + expect(getSubCount(depC)).toBe(1) obj.c = 'b' obj.a = 4 - expect(getDepFromReactive(toRaw(obj), 'a')).toBeUndefined() - expect(getDepFromReactive(toRaw(obj), 'b')).toHaveLength(1) + expect(getSubCount(getDepFromReactive(toRaw(obj), 'b'))).toBe(1) expect(getDepFromReactive(toRaw(obj), 'c')).toBe(depC) - expect(depC).toHaveLength(1) + expect(getSubCount(depC)).toBe(1) }) }) }) diff --git a/packages/reactivity/__tests__/effectScope.spec.ts b/packages/reactivity/__tests__/effectScope.spec.ts index f7e3241ccd6..8a7f26dbb2d 100644 --- a/packages/reactivity/__tests__/effectScope.spec.ts +++ b/packages/reactivity/__tests__/effectScope.spec.ts @@ -247,16 +247,15 @@ describe('reactivity/effect/scope', () => { watchEffect(() => { watchEffectSpy() r.value + c.value }) }) - c!.value // computed is lazy so trigger collection expect(computedSpy).toHaveBeenCalledTimes(1) expect(watchSpy).toHaveBeenCalledTimes(0) expect(watchEffectSpy).toHaveBeenCalledTimes(1) r.value++ - c!.value await nextTick() expect(computedSpy).toHaveBeenCalledTimes(2) expect(watchSpy).toHaveBeenCalledTimes(1) @@ -265,7 +264,6 @@ describe('reactivity/effect/scope', () => { scope.stop() r.value++ - c!.value await nextTick() // should not trigger anymore expect(computedSpy).toHaveBeenCalledTimes(2) diff --git a/packages/reactivity/__tests__/gc.spec.ts b/packages/reactivity/__tests__/gc.spec.ts index 953765dd1d9..678600751a9 100644 --- a/packages/reactivity/__tests__/gc.spec.ts +++ b/packages/reactivity/__tests__/gc.spec.ts @@ -6,7 +6,7 @@ import { shallowRef as ref, toRaw, } from '../src/index' -import { getDepFromReactive } from '../src/reactiveEffect' +import { getDepFromReactive } from '../src/dep' describe.skipIf(!global.gc)('reactivity/gc', () => { const gc = () => { diff --git a/packages/reactivity/__tests__/reactiveObject.bench.ts b/packages/reactivity/__tests__/reactiveObject.bench.ts deleted file mode 100644 index 71632283f69..00000000000 --- a/packages/reactivity/__tests__/reactiveObject.bench.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { bench } from 'vitest' -import { type ComputedRef, computed, reactive } from '../src' - -bench('create reactive obj', () => { - reactive({ a: 1 }) -}) - -{ - let i = 0 - const r = reactive({ a: 1 }) - bench('write reactive obj property', () => { - r.a = i++ - }) -} - -{ - const r = reactive({ a: 1 }) - computed(() => { - return r.a * 2 - }) - let i = 0 - bench("write reactive obj, don't read computed (never invoked)", () => { - r.a = i++ - }) -} - -{ - const r = reactive({ a: 1 }) - const c = computed(() => { - return r.a * 2 - }) - c.value - let i = 0 - bench("write reactive obj, don't read computed (invoked)", () => { - r.a = i++ - }) -} - -{ - const r = reactive({ a: 1 }) - const c = computed(() => { - return r.a * 2 - }) - let i = 0 - bench('write reactive obj, read computed', () => { - r.a = i++ - c.value - }) -} - -{ - const r = reactive({ a: 1 }) - const computeds = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return r.a * 2 - }) - computeds.push(c) - } - let i = 0 - bench("write reactive obj, don't read 1000 computeds (never invoked)", () => { - r.a = i++ - }) -} - -{ - const r = reactive({ a: 1 }) - const computeds = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return r.a * 2 - }) - c.value - computeds.push(c) - } - let i = 0 - bench("write reactive obj, don't read 1000 computeds (invoked)", () => { - r.a = i++ - }) -} - -{ - const r = reactive({ a: 1 }) - const computeds: ComputedRef[] = [] - for (let i = 0, n = 1000; i < n; i++) { - const c = computed(() => { - return r.a * 2 - }) - computeds.push(c) - } - let i = 0 - bench('write reactive obj, read 1000 computeds', () => { - r.a = i++ - computeds.forEach(c => c.value) - }) -} - -{ - const reactives: Record[] = [] - for (let i = 0, n = 1000; i < n; i++) { - reactives.push(reactive({ a: i })) - } - const c = computed(() => { - let total = 0 - reactives.forEach(r => (total += r.a)) - return total - }) - let i = 0 - const n = reactives.length - bench('1000 reactive objs, 1 computed', () => { - reactives[i++ % n].a++ - c.value - }) -} diff --git a/packages/reactivity/__tests__/readonly.spec.ts b/packages/reactivity/__tests__/readonly.spec.ts index 66da71a8c9e..e86c7fa5b50 100644 --- a/packages/reactivity/__tests__/readonly.spec.ts +++ b/packages/reactivity/__tests__/readonly.spec.ts @@ -409,7 +409,7 @@ describe('reactivity/readonly', () => { const eff = effect(() => { roArr.includes(2) }) - expect(eff.effect.deps.length).toBe(0) + expect(eff.effect.deps).toBeUndefined() }) test('readonly should track and trigger if wrapping reactive original (collection)', () => { diff --git a/packages/reactivity/__tests__/ref.spec.ts b/packages/reactivity/__tests__/ref.spec.ts index 2b2024d9723..ed917dbdd92 100644 --- a/packages/reactivity/__tests__/ref.spec.ts +++ b/packages/reactivity/__tests__/ref.spec.ts @@ -442,4 +442,15 @@ describe('reactivity/ref', () => { expect(a.value).toBe(rr) expect(a.value).not.toBe(r) }) + + test('should not trigger when setting the same raw object', () => { + const obj = {} + const r = ref(obj) + const spy = vi.fn() + effect(() => spy(r.value)) + expect(spy).toHaveBeenCalledTimes(1) + + r.value = obj + expect(spy).toHaveBeenCalledTimes(1) + }) }) diff --git a/packages/reactivity/__tests__/shallowReactive.spec.ts b/packages/reactivity/__tests__/shallowReactive.spec.ts index e9b64d39b36..a5218658a27 100644 --- a/packages/reactivity/__tests__/shallowReactive.spec.ts +++ b/packages/reactivity/__tests__/shallowReactive.spec.ts @@ -160,6 +160,7 @@ describe('shallowReactive', () => { shallowArray.pop() expect(size).toBe(0) }) + test('should not observe when iterating', () => { const shallowArray = shallowReactive([]) const a = {} diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index a1b3003a5e7..ab2ed378129 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -11,13 +11,7 @@ import { toRaw, } from './reactive' import { ReactiveFlags, TrackOpTypes, TriggerOpTypes } from './constants' -import { - pauseScheduling, - pauseTracking, - resetScheduling, - resetTracking, -} from './effect' -import { ITERATE_KEY, track, trigger } from './reactiveEffect' +import { ITERATE_KEY, track, trigger } from './dep' import { hasChanged, hasOwn, @@ -29,6 +23,7 @@ import { } from '@vue/shared' import { isRef } from './ref' import { warn } from './warning' +import { endBatch, pauseTracking, resetTracking, startBatch } from './effect' const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`) @@ -69,11 +64,11 @@ function createArrayInstrumentations() { // which leads to infinite loops in some cases (#2137) ;(['push', 'pop', 'shift', 'unshift', 'splice'] as const).forEach(key => { instrumentations[key] = function (this: unknown[], ...args: unknown[]) { + startBatch() pauseTracking() - pauseScheduling() const res = (toRaw(this) as any)[key].apply(this, args) - resetScheduling() resetTracking() + endBatch() return res } }) @@ -133,7 +128,14 @@ class BaseReactiveHandler implements ProxyHandler { } } - const res = Reflect.get(target, key, receiver) + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver, + ) if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res diff --git a/packages/reactivity/src/collectionHandlers.ts b/packages/reactivity/src/collectionHandlers.ts index 58e69b1cc62..2636287b610 100644 --- a/packages/reactivity/src/collectionHandlers.ts +++ b/packages/reactivity/src/collectionHandlers.ts @@ -1,10 +1,5 @@ import { toRaw, toReactive, toReadonly } from './reactive' -import { - ITERATE_KEY, - MAP_KEY_ITERATE_KEY, - track, - trigger, -} from './reactiveEffect' +import { ITERATE_KEY, MAP_KEY_ITERATE_KEY, track, trigger } from './dep' import { ReactiveFlags, TrackOpTypes, TriggerOpTypes } from './constants' import { capitalize, hasChanged, hasOwn, isMap, toRawType } from '@vue/shared' diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index a4b74172fcf..3e0fce6ec02 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -1,10 +1,18 @@ -import { type DebuggerOptions, ReactiveEffect } from './effect' -import { type Ref, trackRefValue, triggerRefValue } from './ref' -import { NOOP, hasChanged, isFunction } from '@vue/shared' -import { toRaw } from './reactive' -import type { Dep } from './dep' -import { DirtyLevels, ReactiveFlags } from './constants' +import { isFunction } from '@vue/shared' +import { + type DebuggerEvent, + type DebuggerOptions, + EffectFlags, + type Link, + type ReactiveEffect, + type Subscriber, + activeSub, + refreshComputed, +} from './effect' +import type { Ref } from './ref' import { warn } from './warning' +import { Dep, globalVersion } from './dep' +import { ReactiveFlags, TrackOpTypes } from './constants' declare const ComputedRefSymbol: unique symbol @@ -14,7 +22,10 @@ export interface ComputedRef extends WritableComputedRef { } export interface WritableComputedRef extends Ref { - readonly effect: ReactiveEffect + /** + * @deprecated computed no longer uses effect + */ + effect: ReactiveEffect } export type ComputedGetter = (oldValue?: T) => T @@ -25,74 +36,71 @@ export interface WritableComputedOptions { set: ComputedSetter } -export const COMPUTED_SIDE_EFFECT_WARN = - `Computed is still dirty after getter evaluation,` + - ` likely because a computed is mutating its own dependency in its getter.` + - ` State mutations in computed getters should be avoided. ` + - ` Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free` - -export class ComputedRefImpl { - public dep?: Dep = undefined - - private _value!: T - public readonly effect: ReactiveEffect - - public readonly __v_isRef = true - public readonly [ReactiveFlags.IS_READONLY]: boolean = false - - public _cacheable: boolean +/** + * @internal + */ +export class ComputedRefImpl implements Subscriber { + // A computed is a ref + _value: any = undefined + readonly dep = new Dep(this) + readonly __v_isRef = true; + readonly [ReactiveFlags.IS_READONLY]: boolean + // A computed is also a subscriber that tracks other deps + deps?: Link = undefined + depsTail?: Link = undefined + // track variaous states + flags = EffectFlags.DIRTY + // last seen global version + globalVersion = globalVersion - 1 + // for backwards compat + effect = this + + // dev only + onTrack?: (event: DebuggerEvent) => void + // dev only + onTrigger?: (event: DebuggerEvent) => void constructor( - getter: ComputedGetter, - private readonly _setter: ComputedSetter, - isReadonly: boolean, - isSSR: boolean, + public fn: ComputedGetter, + private readonly setter: ComputedSetter | undefined, + public isSSR: boolean, ) { - this.effect = new ReactiveEffect( - () => getter(this._value), - () => - triggerRefValue( - this, - this.effect._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect - ? DirtyLevels.MaybeDirty_ComputedSideEffect - : DirtyLevels.MaybeDirty, - ), - ) - this.effect.computed = this - this.effect.active = this._cacheable = !isSSR - this[ReactiveFlags.IS_READONLY] = isReadonly + this.__v_isReadonly = !setter } - get value() { - // the computed ref may get wrapped by other proxies e.g. readonly() #3376 - const self = toRaw(this) - if ( - (!self._cacheable || self.effect.dirty) && - hasChanged(self._value, (self._value = self.effect.run()!)) - ) { - triggerRefValue(self, DirtyLevels.Dirty) + notify() { + // avoid infinite self recursion + if (activeSub !== this) { + this.flags |= EffectFlags.DIRTY + this.dep.notify() + } else if (__DEV__) { + // TODO warn } - trackRefValue(self) - if (self.effect._dirtyLevel >= DirtyLevels.MaybeDirty_ComputedSideEffect) { - __DEV__ && warn(COMPUTED_SIDE_EFFECT_WARN) - triggerRefValue(self, DirtyLevels.MaybeDirty_ComputedSideEffect) - } - return self._value - } - - set value(newValue: T) { - this._setter(newValue) } - // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x - get _dirty() { - return this.effect.dirty + get value() { + const link = __DEV__ + ? this.dep.track({ + target: this, + type: TrackOpTypes.GET, + key: 'value', + }) + : this.dep.track() + refreshComputed(this) + // sync version after evaluation + if (link) { + link.version = this.dep.version + } + return this._value } - set _dirty(v) { - this.effect.dirty = v + set value(newValue) { + if (this.setter) { + this.setter(newValue) + } else if (__DEV__) { + warn('Write operation failed: computed value is readonly') + } } - // #endregion } /** @@ -142,26 +150,20 @@ export function computed( isSSR = false, ) { let getter: ComputedGetter - let setter: ComputedSetter + let setter: ComputedSetter | undefined - const onlyGetter = isFunction(getterOrOptions) - if (onlyGetter) { + if (isFunction(getterOrOptions)) { getter = getterOrOptions - setter = __DEV__ - ? () => { - warn('Write operation failed: computed value is readonly') - } - : NOOP } else { getter = getterOrOptions.get setter = getterOrOptions.set } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR) + const cRef = new ComputedRefImpl(getter, setter, isSSR) if (__DEV__ && debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack - cRef.effect.onTrigger = debugOptions.onTrigger + cRef.onTrack = debugOptions.onTrack + cRef.onTrigger = debugOptions.onTrigger } return cRef as any diff --git a/packages/reactivity/src/deferredComputed.ts b/packages/reactivity/src/deferredComputed.ts deleted file mode 100644 index 1dbba1f3f03..00000000000 --- a/packages/reactivity/src/deferredComputed.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { computed } from './computed' - -/** - * @deprecated use `computed` instead. See #5912 - */ -export const deferredComputed = computed diff --git a/packages/reactivity/src/dep.ts b/packages/reactivity/src/dep.ts index c8e8a130dc9..5ba61d3a03f 100644 --- a/packages/reactivity/src/dep.ts +++ b/packages/reactivity/src/dep.ts @@ -1,17 +1,295 @@ -import type { ReactiveEffect } from './effect' +import { extend, isArray, isIntegerKey, isMap, isSymbol } from '@vue/shared' import type { ComputedRefImpl } from './computed' +import { type TrackOpTypes, TriggerOpTypes } from './constants' +import { + type DebuggerEventExtraInfo, + EffectFlags, + type Link, + activeSub, + endBatch, + shouldTrack, + startBatch, +} from './effect' -export type Dep = Map & { - cleanup: () => void - computed?: ComputedRefImpl +/** + * Incremented every time a reactive change happens + * This is used to give computed a fast path to avoid re-compute when nothing + * has changed. + */ +export let globalVersion = 0 + +/** + * @internal + */ +export class Dep { + version = 0 + /** + * Link between this dep and the current active effect + */ + activeLink?: Link = undefined + /** + * Doubly linked list representing the subscribing effects (tail) + */ + subs?: Link = undefined + + constructor(public computed?: ComputedRefImpl) {} + + track(debugInfo?: DebuggerEventExtraInfo): Link | undefined { + if (!activeSub || !shouldTrack) { + return + } + + let link = this.activeLink + if (link === undefined || link.sub !== activeSub) { + link = this.activeLink = { + dep: this, + sub: activeSub, + version: this.version, + nextDep: undefined, + prevDep: undefined, + nextSub: undefined, + prevSub: undefined, + prevActiveLink: undefined, + } + + // add the link to the activeEffect as a dep (as tail) + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link + } else { + link.prevDep = activeSub.depsTail + activeSub.depsTail!.nextDep = link + activeSub.depsTail = link + } + + if (activeSub.flags & EffectFlags.TRACKING) { + addSub(link) + } + } else if (link.version === -1) { + // reused from last run - already a sub, just sync version + link.version = this.version + + // If this dep has a next, it means it's not at the tail - move it to the + // tail. This ensures the effect's dep list is in the order they are + // accessed during evaluation. + if (link.nextDep) { + const next = link.nextDep + next.prevDep = link.prevDep + if (link.prevDep) { + link.prevDep.nextDep = next + } + + link.prevDep = activeSub.depsTail + link.nextDep = undefined + activeSub.depsTail!.nextDep = link + activeSub.depsTail = link + + // this was the head - point to the new head + if (activeSub.deps === link) { + activeSub.deps = next + } + } + } + + if (__DEV__ && activeSub.onTrack) { + activeSub.onTrack( + extend( + { + effect: activeSub, + }, + debugInfo, + ), + ) + } + + return link + } + + trigger(debugInfo?: DebuggerEventExtraInfo) { + this.version++ + globalVersion++ + this.notify(debugInfo) + } + + notify(debugInfo?: DebuggerEventExtraInfo) { + startBatch() + try { + for (let link = this.subs; link; link = link.prevSub) { + if ( + __DEV__ && + link.sub.onTrigger && + !(link.sub.flags & EffectFlags.NOTIFIED) + ) { + link.sub.onTrigger( + extend( + { + effect: link.sub, + }, + debugInfo, + ), + ) + } + link.sub.notify() + } + } finally { + endBatch() + } + } +} + +function addSub(link: Link) { + const computed = link.dep.computed + // computed getting its first subscriber + // enable tracking + lazily subscribe to all its deps + if (computed && !link.dep.subs) { + computed.flags |= EffectFlags.TRACKING | EffectFlags.DIRTY + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l) + } + } + + const currentTail = link.dep.subs + if (currentTail !== link) { + link.prevSub = currentTail + if (currentTail) currentTail.nextSub = link + } + link.dep.subs = link +} + +// The main WeakMap that stores {target -> key -> dep} connections. +// Conceptually, it's easier to think of a dependency as a Dep class +// which maintains a Set of subscribers, but we simply store them as +// raw Maps to reduce memory overhead. +type KeyToDepMap = Map +const targetMap = new WeakMap() + +export const ITERATE_KEY = Symbol(__DEV__ ? 'iterate' : '') +export const MAP_KEY_ITERATE_KEY = Symbol(__DEV__ ? 'Map iterate' : '') + +/** + * Tracks access to a reactive property. + * + * This will check which effect is running at the moment and record it as dep + * which records all effects that depend on the reactive property. + * + * @param target - Object holding the reactive property. + * @param type - Defines the type of access to the reactive property. + * @param key - Identifier of the reactive property to track. + */ +export function track(target: object, type: TrackOpTypes, key: unknown) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target) + if (!depsMap) { + targetMap.set(target, (depsMap = new Map())) + } + let dep = depsMap.get(key) + if (!dep) { + depsMap.set(key, (dep = new Dep())) + } + if (__DEV__) { + dep.track({ + target, + type, + key, + }) + } else { + dep.track() + } + } +} + +/** + * Finds all deps associated with the target (or a specific property) and + * triggers the effects stored within. + * + * @param target - The reactive object. + * @param type - Defines the type of the operation that needs to trigger effects. + * @param key - Can be used to target a specific reactive property in the target object. + */ +export function trigger( + target: object, + type: TriggerOpTypes, + key?: unknown, + newValue?: unknown, + oldValue?: unknown, + oldTarget?: Map | Set, +) { + const depsMap = targetMap.get(target) + if (!depsMap) { + // never been tracked + globalVersion++ + return + } + + let deps: Dep[] = [] + if (type === TriggerOpTypes.CLEAR) { + // collection being cleared + // trigger all effects for target + deps = [...depsMap.values()] + } else if (key === 'length' && isArray(target)) { + const newLength = Number(newValue) + depsMap.forEach((dep, key) => { + if (key === 'length' || (!isSymbol(key) && key >= newLength)) { + deps.push(dep) + } + }) + } else { + const push = (dep: Dep | undefined) => dep && deps.push(dep) + + // schedule runs for SET | ADD | DELETE + if (key !== void 0) { + push(depsMap.get(key)) + } + + // also run for iteration key on ADD | DELETE | Map.SET + switch (type) { + case TriggerOpTypes.ADD: + if (!isArray(target)) { + push(depsMap.get(ITERATE_KEY)) + if (isMap(target)) { + push(depsMap.get(MAP_KEY_ITERATE_KEY)) + } + } else if (isIntegerKey(key)) { + // new index added to array -> length changes + push(depsMap.get('length')) + } + break + case TriggerOpTypes.DELETE: + if (!isArray(target)) { + push(depsMap.get(ITERATE_KEY)) + if (isMap(target)) { + push(depsMap.get(MAP_KEY_ITERATE_KEY)) + } + } + break + case TriggerOpTypes.SET: + if (isMap(target)) { + push(depsMap.get(ITERATE_KEY)) + } + break + } + } + + startBatch() + for (const dep of deps) { + if (__DEV__) { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget, + }) + } else { + dep.trigger() + } + } + endBatch() } -export const createDep = ( - cleanup: () => void, - computed?: ComputedRefImpl, -): Dep => { - const dep = new Map() as Dep - dep.cleanup = cleanup - dep.computed = computed - return dep +/** + * Test only + */ +export function getDepFromReactive(object: any, key: string | number | symbol) { + return targetMap.get(object)?.get(key) } diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index ca90544c0de..5a4d05268dc 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -1,17 +1,14 @@ -import { NOOP, extend } from '@vue/shared' +import { extend, hasChanged } from '@vue/shared' import type { ComputedRefImpl } from './computed' -import { - DirtyLevels, - type TrackOpTypes, - type TriggerOpTypes, -} from './constants' -import type { Dep } from './dep' -import { type EffectScope, recordEffectScope } from './effectScope' +import type { TrackOpTypes, TriggerOpTypes } from './constants' +import { type Dep, globalVersion } from './dep' +import { recordEffectScope } from './effectScope' +import { warn } from './warning' export type EffectScheduler = (...args: any[]) => any export type DebuggerEvent = { - effect: ReactiveEffect + effect: Subscriber } & DebuggerEventExtraInfo export type DebuggerEventExtraInfo = { @@ -23,156 +20,398 @@ export type DebuggerEventExtraInfo = { oldTarget?: Map | Set } -export let activeEffect: ReactiveEffect | undefined +export interface DebuggerOptions { + onTrack?: (event: DebuggerEvent) => void + onTrigger?: (event: DebuggerEvent) => void +} -export class ReactiveEffect { - active = true - deps: Dep[] = [] +export interface ReactiveEffectOptions extends DebuggerOptions { + scheduler?: EffectScheduler + allowRecurse?: boolean + onStop?: () => void +} +export interface ReactiveEffectRunner { + (): T + effect: ReactiveEffect +} + +export let activeSub: Subscriber | undefined + +export enum EffectFlags { + ACTIVE = 1 << 0, + RUNNING = 1 << 1, + TRACKING = 1 << 2, + NOTIFIED = 1 << 3, + DIRTY = 1 << 4, + ALLOW_RECURSE = 1 << 5, + NO_BATCH = 1 << 6, +} + +/** + * Subscriber is a type that tracks (or subscribes to) a list of deps. + */ +export interface Subscriber extends DebuggerOptions { /** - * Can be attached after creation + * Head of the doubly linked list representing the deps * @internal */ - computed?: ComputedRefImpl + deps?: Link /** + * Tail of the same list * @internal */ - allowRecurse?: boolean + depsTail?: Link + /** + * @internal + */ + flags: EffectFlags + /** + * @internal + */ + notify(): void +} - onStop?: () => void - // dev only - onTrack?: (event: DebuggerEvent) => void - // dev only - onTrigger?: (event: DebuggerEvent) => void +/** + * Represents a link between a source (Dep) and a subscriber (Effect or Computed). + * Deps and subs have a many-to-many relationship - each link between a + * dep and a sub is represented by a Link instance. + * + * A Link is also a node in two doubly-linked lists - one for the associated + * sub to track all its deps, and one for the associated dep to track all its + * subs. + * + * @internal + */ +export interface Link { + dep: Dep + sub: Subscriber + + /** + * - Before each effect run, all previous dep links' version are reset to -1 + * - During the run, a link's version is synced with the source dep on access + * - After the run, links with version -1 (that were never used) are cleaned + * up + */ + version: number + /** + * Pointers for doubly-linked lists + */ + nextDep?: Link + prevDep?: Link + + nextSub?: Link + prevSub?: Link + + prevActiveLink?: Link +} + +export class ReactiveEffect + implements Subscriber, ReactiveEffectOptions +{ /** * @internal */ - _dirtyLevel = DirtyLevels.Dirty + deps?: Link = undefined /** * @internal */ - _trackId = 0 + depsTail?: Link = undefined /** * @internal */ - _runnings = 0 + flags: EffectFlags = EffectFlags.ACTIVE | EffectFlags.TRACKING /** * @internal */ - _shouldSchedule = false + nextEffect?: ReactiveEffect = undefined /** * @internal */ - _depsLength = 0 + allowRecurse?: boolean - constructor( - public fn: () => T, - public trigger: () => void, - public scheduler?: EffectScheduler, - scope?: EffectScope, - ) { - recordEffectScope(this, scope) - } + scheduler?: EffectScheduler = undefined + onStop?: () => void + onTrack?: (event: DebuggerEvent) => void + onTrigger?: (event: DebuggerEvent) => void - public get dirty() { - if ( - this._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect || - this._dirtyLevel === DirtyLevels.MaybeDirty - ) { - this._dirtyLevel = DirtyLevels.QueryingDirty - pauseTracking() - for (let i = 0; i < this._depsLength; i++) { - const dep = this.deps[i] - if (dep.computed) { - triggerComputed(dep.computed) - if (this._dirtyLevel >= DirtyLevels.Dirty) { - break - } - } - } - if (this._dirtyLevel === DirtyLevels.QueryingDirty) { - this._dirtyLevel = DirtyLevels.NotDirty - } - resetTracking() - } - return this._dirtyLevel >= DirtyLevels.Dirty + constructor(public fn: () => T) { + recordEffectScope(this) } - public set dirty(v) { - this._dirtyLevel = v ? DirtyLevels.Dirty : DirtyLevels.NotDirty + /** + * @internal + */ + notify() { + if (this.flags & EffectFlags.RUNNING && !this.allowRecurse) { + return + } + if (this.flags & EffectFlags.NO_BATCH) { + return this.trigger() + } + if (!(this.flags & EffectFlags.NOTIFIED)) { + this.flags |= EffectFlags.NOTIFIED + this.nextEffect = batchedEffect + batchedEffect = this + } } run() { - this._dirtyLevel = DirtyLevels.NotDirty - if (!this.active) { + // TODO cleanupEffect + + if (!(this.flags & EffectFlags.ACTIVE)) { + // stopped during cleanup return this.fn() } - let lastShouldTrack = shouldTrack - let lastEffect = activeEffect + + this.flags |= EffectFlags.RUNNING + prepareDeps(this) + const prevEffect = activeSub + const prevShouldTrack = shouldTrack + activeSub = this + shouldTrack = true + try { - shouldTrack = true - activeEffect = this - this._runnings++ - preCleanupEffect(this) return this.fn() } finally { - postCleanupEffect(this) - this._runnings-- - activeEffect = lastEffect - shouldTrack = lastShouldTrack + if (__DEV__ && activeSub !== this) { + warn( + 'Active effect was not restored correctly - ' + + 'this is likely a Vue internal bug.', + ) + } + cleanupDeps(this) + activeSub = prevEffect + shouldTrack = prevShouldTrack + this.flags &= ~EffectFlags.RUNNING } } stop() { - if (this.active) { - preCleanupEffect(this) - postCleanupEffect(this) - this.onStop?.() - this.active = false + if (this.flags & EffectFlags.ACTIVE) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link) + } + this.deps = this.depsTail = undefined + this.onStop && this.onStop() + this.flags &= ~EffectFlags.ACTIVE + } + } + + trigger() { + if (this.scheduler) { + this.scheduler() + } else { + this.runIfDirty() + } + } + + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run() + } + } + + get dirty() { + return isDirty(this) + } +} + +let batchDepth = 0 +let batchedEffect: ReactiveEffect | undefined + +/** + * @internal + */ +export function startBatch() { + batchDepth++ +} + +/** + * Run batched effects when all batches have ended + * @internal + */ +export function endBatch() { + if (batchDepth > 1) { + batchDepth-- + return + } + + let error: unknown + while (batchedEffect) { + let e: ReactiveEffect | undefined = batchedEffect + batchedEffect = undefined + while (e) { + const next: ReactiveEffect | undefined = e.nextEffect + e.nextEffect = undefined + e.flags &= ~EffectFlags.NOTIFIED + if (e.flags & EffectFlags.ACTIVE) { + try { + e.trigger() + } catch (err) { + if (!error) error = err + } + } + e = next } } + + batchDepth-- + if (error) throw error } -function triggerComputed(computed: ComputedRefImpl) { - return computed.value +function prepareDeps(sub: Subscriber) { + // Prepare deps for tracking, starting from the head + for (let link = sub.deps; link; link = link.nextDep) { + // set all previous deps' (if any) version to -1 so that we can track + // which ones are unused after the run + link.version = -1 + // store previous active sub if link was being used in another context + link.prevActiveLink = link.dep.activeLink + link.dep.activeLink = link + } } -function preCleanupEffect(effect: ReactiveEffect) { - effect._trackId++ - effect._depsLength = 0 +function cleanupDeps(sub: Subscriber) { + // Cleanup unsued deps + let head + let tail = sub.depsTail + for (let link = tail; link; link = link.prevDep) { + if (link.version === -1) { + if (link === tail) tail = link.prevDep + // unused - remove it from the dep's subscribing effect list + removeSub(link) + // also remove it from this effect's dep list + removeDep(link) + } else { + // The new head is the last node seen which wasn't removed + // from the doubly-linked list + head = link + } + + // restore previous active link if any + link.dep.activeLink = link.prevActiveLink + link.prevActiveLink = undefined + } + // set the new head & tail + sub.deps = head + sub.depsTail = tail } -function postCleanupEffect(effect: ReactiveEffect) { - if (effect.deps.length > effect._depsLength) { - for (let i = effect._depsLength; i < effect.deps.length; i++) { - cleanupDepEffect(effect.deps[i], effect) +function isDirty(sub: Subscriber): boolean { + for (let link = sub.deps; link; link = link.nextDep) { + if ( + link.dep.version !== link.version || + (link.dep.computed && refreshComputed(link.dep.computed) === false) || + link.dep.version !== link.version + ) { + return true } - effect.deps.length = effect._depsLength } + // @ts-expect-error only for backwards compatibility where libs manually set + // this flag - e.g. Pinia's testing module + if (sub._dirty) { + return true + } + return false } -function cleanupDepEffect(dep: Dep, effect: ReactiveEffect) { - const trackId = dep.get(effect) - if (trackId !== undefined && effect._trackId !== trackId) { - dep.delete(effect) - if (dep.size === 0) { - dep.cleanup() +/** + * Returning false indicates the refresh failed + * @internal + */ +export function refreshComputed(computed: ComputedRefImpl) { + if (computed.flags & EffectFlags.RUNNING) { + return false + } + if ( + computed.flags & EffectFlags.TRACKING && + !(computed.flags & EffectFlags.DIRTY) + ) { + return + } + computed.flags &= ~EffectFlags.DIRTY + + // Global version fast path when no reactive changes has happened since + // last refresh. + if (computed.globalVersion === globalVersion) { + return + } + computed.globalVersion = globalVersion + + const dep = computed.dep + computed.flags |= EffectFlags.RUNNING + // In SSR there will be no render effect, so the computed has no subscriber + // and therefore tracks no deps, thus we cannot rely on the dirty check. + // Instead, computed always re-evaluate and relies on the globalVersion + // fast path above for caching. + if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) { + computed.flags &= ~EffectFlags.RUNNING + return + } + + const prevSub = activeSub + const prevShouldTrack = shouldTrack + activeSub = computed + shouldTrack = true + + try { + prepareDeps(computed) + const value = computed.fn() + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value + dep.version++ } + } catch (err) { + dep.version++ } + + activeSub = prevSub + shouldTrack = prevShouldTrack + cleanupDeps(computed) + computed.flags &= ~EffectFlags.RUNNING } -export interface DebuggerOptions { - onTrack?: (event: DebuggerEvent) => void - onTrigger?: (event: DebuggerEvent) => void +function removeSub(link: Link) { + const { dep, prevSub, nextSub } = link + if (prevSub) { + prevSub.nextSub = nextSub + link.prevSub = undefined + } + if (nextSub) { + nextSub.prevSub = prevSub + link.nextSub = undefined + } + if (dep.subs === link) { + // was previous tail, point new tail to prev + dep.subs = prevSub + } + + if (!dep.subs && dep.computed) { + // last subscriber removed + // if computed, unsubscribe it from all its deps so this computed and its + // value can be GCed + dep.computed.flags &= ~EffectFlags.TRACKING + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l) + } + } } -export interface ReactiveEffectOptions extends DebuggerOptions { - lazy?: boolean - scheduler?: EffectScheduler - scope?: EffectScope - allowRecurse?: boolean - onStop?: () => void +function removeDep(link: Link) { + const { prevDep, nextDep } = link + if (prevDep) { + prevDep.nextDep = nextDep + link.prevDep = undefined + } + if (nextDep) { + nextDep.prevDep = prevDep + link.nextDep = undefined + } } export interface ReactiveEffectRunner { @@ -180,38 +419,26 @@ export interface ReactiveEffectRunner { effect: ReactiveEffect } -/** - * Registers the given function to track reactive updates. - * - * The given function will be run once immediately. Every time any reactive - * property that's accessed within it gets updated, the function will run again. - * - * @param fn - The function that will track reactive updates. - * @param options - Allows to control the effect's behaviour. - * @returns A runner that can be used to control the effect after creation. - */ export function effect( fn: () => T, options?: ReactiveEffectOptions, -): ReactiveEffectRunner { +): ReactiveEffectRunner { if ((fn as ReactiveEffectRunner).effect instanceof ReactiveEffect) { fn = (fn as ReactiveEffectRunner).effect.fn } - const _effect = new ReactiveEffect(fn, NOOP, () => { - if (_effect.dirty) { - _effect.run() - } - }) + const e = new ReactiveEffect(fn) if (options) { - extend(_effect, options) - if (options.scope) recordEffectScope(_effect, options.scope) + extend(e, options) } - if (!options || !options.lazy) { - _effect.run() + try { + e.run() + } catch (err) { + e.stop() + throw err } - const runner = _effect.run.bind(_effect) as ReactiveEffectRunner - runner.effect = _effect + const runner = e.run.bind(e) as ReactiveEffectRunner + runner.effect = e return runner } @@ -224,9 +451,10 @@ export function stop(runner: ReactiveEffectRunner) { runner.effect.stop() } +/** + * @internal + */ export let shouldTrack = true -export let pauseScheduleStack = 0 - const trackStack: boolean[] = [] /** @@ -252,76 +480,3 @@ export function resetTracking() { const last = trackStack.pop() shouldTrack = last === undefined ? true : last } - -export function pauseScheduling() { - pauseScheduleStack++ -} - -export function resetScheduling() { - pauseScheduleStack-- - while (!pauseScheduleStack && queueEffectSchedulers.length) { - queueEffectSchedulers.shift()!() - } -} - -export function trackEffect( - effect: ReactiveEffect, - dep: Dep, - debuggerEventExtraInfo?: DebuggerEventExtraInfo, -) { - if (dep.get(effect) !== effect._trackId) { - dep.set(effect, effect._trackId) - const oldDep = effect.deps[effect._depsLength] - if (oldDep !== dep) { - if (oldDep) { - cleanupDepEffect(oldDep, effect) - } - effect.deps[effect._depsLength++] = dep - } else { - effect._depsLength++ - } - if (__DEV__) { - effect.onTrack?.(extend({ effect }, debuggerEventExtraInfo!)) - } - } -} - -const queueEffectSchedulers: EffectScheduler[] = [] - -export function triggerEffects( - dep: Dep, - dirtyLevel: DirtyLevels, - debuggerEventExtraInfo?: DebuggerEventExtraInfo, -) { - pauseScheduling() - for (const effect of dep.keys()) { - // dep.get(effect) is very expensive, we need to calculate it lazily and reuse the result - let tracking: boolean | undefined - if ( - effect._dirtyLevel < dirtyLevel && - (tracking ??= dep.get(effect) === effect._trackId) - ) { - effect._shouldSchedule ||= effect._dirtyLevel === DirtyLevels.NotDirty - effect._dirtyLevel = dirtyLevel - } - if ( - effect._shouldSchedule && - (tracking ??= dep.get(effect) === effect._trackId) - ) { - if (__DEV__) { - effect.onTrigger?.(extend({ effect }, debuggerEventExtraInfo)) - } - effect.trigger() - if ( - (!effect._runnings || effect.allowRecurse) && - effect._dirtyLevel !== DirtyLevels.MaybeDirty_ComputedSideEffect - ) { - effect._shouldSchedule = false - if (effect.scheduler) { - queueEffectSchedulers.push(effect.scheduler) - } - } - } - } - resetScheduling() -} diff --git a/packages/reactivity/src/index.ts b/packages/reactivity/src/index.ts index 1c80fbc752b..40bdf7b1b04 100644 --- a/packages/reactivity/src/index.ts +++ b/packages/reactivity/src/index.ts @@ -44,16 +44,14 @@ export { type ComputedGetter, type ComputedSetter, } from './computed' -export { deferredComputed } from './deferredComputed' export { effect, stop, enableTracking, pauseTracking, resetTracking, - pauseScheduling, - resetScheduling, ReactiveEffect, + EffectFlags, type ReactiveEffectRunner, type ReactiveEffectOptions, type EffectScheduler, @@ -61,7 +59,7 @@ export { type DebuggerEvent, type DebuggerEventExtraInfo, } from './effect' -export { trigger, track, ITERATE_KEY } from './reactiveEffect' +export { trigger, track, ITERATE_KEY } from './dep' export { effectScope, EffectScope, diff --git a/packages/reactivity/src/reactiveEffect.ts b/packages/reactivity/src/reactiveEffect.ts deleted file mode 100644 index 6bf0e75115a..00000000000 --- a/packages/reactivity/src/reactiveEffect.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { isArray, isIntegerKey, isMap, isSymbol } from '@vue/shared' -import { DirtyLevels, type TrackOpTypes, TriggerOpTypes } from './constants' -import { type Dep, createDep } from './dep' -import { - activeEffect, - pauseScheduling, - resetScheduling, - shouldTrack, - trackEffect, - triggerEffects, -} from './effect' - -// The main WeakMap that stores {target -> key -> dep} connections. -// Conceptually, it's easier to think of a dependency as a Dep class -// which maintains a Set of subscribers, but we simply store them as -// raw Maps to reduce memory overhead. -type KeyToDepMap = Map -const targetMap = new WeakMap() - -export const ITERATE_KEY = Symbol(__DEV__ ? 'iterate' : '') -export const MAP_KEY_ITERATE_KEY = Symbol(__DEV__ ? 'Map key iterate' : '') - -/** - * Tracks access to a reactive property. - * - * This will check which effect is running at the moment and record it as dep - * which records all effects that depend on the reactive property. - * - * @param target - Object holding the reactive property. - * @param type - Defines the type of access to the reactive property. - * @param key - Identifier of the reactive property to track. - */ -export function track(target: object, type: TrackOpTypes, key: unknown) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target) - if (!depsMap) { - targetMap.set(target, (depsMap = new Map())) - } - let dep = depsMap.get(key) - if (!dep) { - depsMap.set(key, (dep = createDep(() => depsMap!.delete(key)))) - } - trackEffect( - activeEffect, - dep, - __DEV__ - ? { - target, - type, - key, - } - : void 0, - ) - } -} - -/** - * Finds all deps associated with the target (or a specific property) and - * triggers the effects stored within. - * - * @param target - The reactive object. - * @param type - Defines the type of the operation that needs to trigger effects. - * @param key - Can be used to target a specific reactive property in the target object. - */ -export function trigger( - target: object, - type: TriggerOpTypes, - key?: unknown, - newValue?: unknown, - oldValue?: unknown, - oldTarget?: Map | Set, -) { - const depsMap = targetMap.get(target) - if (!depsMap) { - // never been tracked - return - } - - let deps: (Dep | undefined)[] = [] - if (type === TriggerOpTypes.CLEAR) { - // collection being cleared - // trigger all effects for target - deps = [...depsMap.values()] - } else if (key === 'length' && isArray(target)) { - const newLength = Number(newValue) - depsMap.forEach((dep, key) => { - if (key === 'length' || (!isSymbol(key) && key >= newLength)) { - deps.push(dep) - } - }) - } else { - // schedule runs for SET | ADD | DELETE - if (key !== void 0) { - deps.push(depsMap.get(key)) - } - - // also run for iteration key on ADD | DELETE | Map.SET - switch (type) { - case TriggerOpTypes.ADD: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)) - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)) - } - } else if (isIntegerKey(key)) { - // new index added to array -> length changes - deps.push(depsMap.get('length')) - } - break - case TriggerOpTypes.DELETE: - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)) - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)) - } - } - break - case TriggerOpTypes.SET: - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)) - } - break - } - } - - pauseScheduling() - for (const dep of deps) { - if (dep) { - triggerEffects( - dep, - DirtyLevels.Dirty, - __DEV__ - ? { - target, - type, - key, - newValue, - oldValue, - oldTarget, - } - : void 0, - ) - } - } - resetScheduling() -} - -export function getDepFromReactive(object: any, key: string | number | symbol) { - return targetMap.get(object)?.get(key) -} diff --git a/packages/reactivity/src/ref.ts b/packages/reactivity/src/ref.ts index 1b9d60ef06b..bfde3b787e3 100644 --- a/packages/reactivity/src/ref.ts +++ b/packages/reactivity/src/ref.ts @@ -1,11 +1,3 @@ -import type { ComputedRef } from './computed' -import { - activeEffect, - shouldTrack, - trackEffect, - triggerEffects, -} from './effect' -import { DirtyLevels, TrackOpTypes, TriggerOpTypes } from './constants' import { type IfAny, hasChanged, @@ -13,7 +5,9 @@ import { isFunction, isObject, } from '@vue/shared' +import { Dep, getDepFromReactive } from './dep' import { + type ShallowReactiveMarker, isProxy, isReactive, isReadonly, @@ -21,10 +15,8 @@ import { toRaw, toReactive, } from './reactive' -import type { ShallowReactiveMarker } from './reactive' -import { type Dep, createDep } from './dep' -import { ComputedRefImpl } from './computed' -import { getDepFromReactive } from './reactiveEffect' +import type { ComputedRef } from './computed' +import { TrackOpTypes, TriggerOpTypes } from './constants' declare const RefSymbol: unique symbol export declare const RawSymbol: unique symbol @@ -39,54 +31,6 @@ export interface Ref { [RefSymbol]: true } -type RefBase = { - dep?: Dep - value: T -} - -export function trackRefValue(ref: RefBase) { - if (shouldTrack && activeEffect) { - ref = toRaw(ref) - trackEffect( - activeEffect, - (ref.dep ??= createDep( - () => (ref.dep = undefined), - ref instanceof ComputedRefImpl ? ref : undefined, - )), - __DEV__ - ? { - target: ref, - type: TrackOpTypes.GET, - key: 'value', - } - : void 0, - ) - } -} - -export function triggerRefValue( - ref: RefBase, - dirtyLevel: DirtyLevels = DirtyLevels.Dirty, - newVal?: any, -) { - ref = toRaw(ref) - const dep = ref.dep - if (dep) { - triggerEffects( - dep, - dirtyLevel, - __DEV__ - ? { - target: ref, - type: TriggerOpTypes.SET, - key: 'value', - newValue: newVal, - } - : void 0, - ) - } -} - /** * Checks if a value is a ref object. * @@ -95,7 +39,7 @@ export function triggerRefValue( */ export function isRef(r: Ref | unknown): r is Ref export function isRef(r: any): r is Ref { - return !!(r && r.__v_isRef === true) + return r ? r.__v_isRef === true : false } /** @@ -151,11 +95,15 @@ function createRef(rawValue: unknown, shallow: boolean) { return new RefImpl(rawValue, shallow) } -class RefImpl { - private _value: T +/** + * @internal + */ +class RefImpl { + _value: T private _rawValue: T - public dep?: Dep = undefined + dep: Dep = new Dep() + public readonly __v_isRef = true constructor( @@ -167,18 +115,37 @@ class RefImpl { } get value() { - trackRefValue(this) + if (__DEV__) { + this.dep.track({ + target: this, + type: TrackOpTypes.GET, + key: 'value', + }) + } else { + this.dep.track() + } return this._value } - set value(newVal) { + set value(newValue) { + const oldValue = this._rawValue const useDirectValue = - this.__v_isShallow || isShallow(newVal) || isReadonly(newVal) - newVal = useDirectValue ? newVal : toRaw(newVal) - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal - this._value = useDirectValue ? newVal : toReactive(newVal) - triggerRefValue(this, DirtyLevels.Dirty, newVal) + this.__v_isShallow || isShallow(newValue) || isReadonly(newValue) + newValue = useDirectValue ? newValue : toRaw(newValue) + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue + this._value = useDirectValue ? newValue : toReactive(newValue) + if (__DEV__) { + this.dep.trigger({ + target: this, + type: TriggerOpTypes.SET, + key: 'value', + newValue, + oldValue, + }) + } else { + this.dep.trigger() + } } } } @@ -209,7 +176,16 @@ class RefImpl { * @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref} */ export function triggerRef(ref: Ref) { - triggerRefValue(ref, DirtyLevels.Dirty, __DEV__ ? ref.value : void 0) + if (__DEV__) { + ;(ref as unknown as RefImpl).dep.trigger({ + target: ref, + type: TriggerOpTypes.SET, + key: 'value', + newValue: (ref as unknown as RefImpl)._value, + }) + } else { + ;(ref as unknown as RefImpl).dep.trigger() + } } export type MaybeRef = T | Ref @@ -295,7 +271,7 @@ export type CustomRefFactory = ( } class CustomRefImpl { - public dep?: Dep = undefined + public dep: Dep private readonly _get: ReturnType>['get'] private readonly _set: ReturnType>['set'] @@ -303,10 +279,8 @@ class CustomRefImpl { public readonly __v_isRef = true constructor(factory: CustomRefFactory) { - const { get, set } = factory( - () => trackRefValue(this), - () => triggerRefValue(this), - ) + const dep = (this.dep = new Dep()) + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)) this._get = get this._set = set } diff --git a/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts b/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts index 04e9c1c86db..30c8951f405 100644 --- a/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts +++ b/packages/runtime-core/__tests__/apiSetupHelpers.spec.ts @@ -1,6 +1,5 @@ import { type ComponentInternalInstance, - type ComputedRef, type SetupContext, Suspense, computed, @@ -26,6 +25,8 @@ import { withAsyncContext, withDefaults, } from '../src/apiSetupHelpers' +import type { ComputedRefImpl } from '../../reactivity/src/computed' +import { EffectFlags, type ReactiveEffectRunner, effect } from '@vue/reactivity' describe('SFC `, + { + propsDestructure: false, + }, ) expect(content).toMatch(`const { foo } = __props`) assertCode(content) }) + test('prohibiting reactive destructure', () => { + expect(() => + compile( + ``, + { + propsDestructure: 'error', + }, + ), + ).toThrow() + }) + describe('errors', () => { test('w/ both type and non-type args', () => { expect(() => { diff --git a/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts b/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts index 3843ef92190..20f2c432d94 100644 --- a/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts +++ b/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts @@ -6,7 +6,6 @@ describe('sfc reactive props destructure', () => { function compile(src: string, options?: Partial) { return compileSFCScript(src, { inlineTemplate: true, - propsDestructure: true, ...options, }) } diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index d4131d5c61d..41f083155d6 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -106,10 +106,11 @@ export interface SFCScriptCompileOptions { */ hoistStatic?: boolean /** - * (**Experimental**) Enable reactive destructure for `defineProps` - * @default false + * Set to `false` to disable reactive destructure for `defineProps` (pre-3.5 + * behavior), or set to `'error'` to throw hard error on props destructures. + * @default true */ - propsDestructure?: boolean + propsDestructure?: boolean | 'error' /** * File system access methods to be used when resolving types * imported in SFC macros. Defaults to ts.sys in Node.js, can be overwritten diff --git a/packages/compiler-sfc/src/script/definePropsDestructure.ts b/packages/compiler-sfc/src/script/definePropsDestructure.ts index e4a59aca7d5..34bc7a42818 100644 --- a/packages/compiler-sfc/src/script/definePropsDestructure.ts +++ b/packages/compiler-sfc/src/script/definePropsDestructure.ts @@ -22,23 +22,17 @@ import { genPropsAccessExp } from '@vue/shared' import { isCallOf, resolveObjectKey } from './utils' import type { ScriptCompileContext } from './context' import { DEFINE_PROPS } from './defineProps' -import { warnOnce } from '../warn' export function processPropsDestructure( ctx: ScriptCompileContext, declId: ObjectPattern, ) { - if (!ctx.options.propsDestructure) { + if (ctx.options.propsDestructure === 'error') { + ctx.error(`Props destructure is explicitly prohibited via config.`, declId) + } else if (ctx.options.propsDestructure === false) { return } - warnOnce( - `This project is using reactive props destructure, which is an experimental ` + - `feature. It may receive breaking changes or be removed in the future, so ` + - `use at your own risk.\n` + - `To stay updated, follow the RFC at https://github.com/vuejs/rfcs/discussions/502.`, - ) - ctx.propsDestructureDecl = declId const registerBinding = ( @@ -104,7 +98,7 @@ export function transformDestructuredProps( ctx: ScriptCompileContext, vueImportAliases: Record, ) { - if (!ctx.options.propsDestructure) { + if (ctx.options.propsDestructure === false) { return } From 5590ca3694fc98858951bcfa027fc92f899b05ae Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 29 Apr 2024 10:49:53 +0800 Subject: [PATCH 016/924] release: v3.5.0-alpha.1 --- CHANGELOG.md | 23 +++++++++++++++++++++++ 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, 35 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe351268a40..032a5f3a0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ +# [3.5.0-alpha.1](https://github.com/vuejs/core/compare/v3.4.25...v3.5.0-alpha.1) (2024-04-29) + + +### Bug Fixes + +* **reactivity:** fix call sequence of ontrigger in effect ([#10501](https://github.com/vuejs/core/issues/10501)) ([28841fe](https://github.com/vuejs/core/commit/28841fee43a45c37905c2c1ed9ace23067539045)) + + +### Features + +* **compiler-sfc:** enable reactive props destructure by default ([d2dac0e](https://github.com/vuejs/core/commit/d2dac0e359c47d1ed0aa77eda488e76fd6466d2d)) +* **reactivity:** `onEffectCleanup` API ([2cc5615](https://github.com/vuejs/core/commit/2cc5615590de77126e8df46136de0240dbde5004)), closes [#10173](https://github.com/vuejs/core/issues/10173) +* **reactivity:** add failSilently argument for onScopeDispose ([9a936aa](https://github.com/vuejs/core/commit/9a936aaec489c79433a32791ecf5ddb1739a62bd)) +* **transition:** support directly nesting Teleport inside Transition ([#6548](https://github.com/vuejs/core/issues/6548)) ([0e6e3c7](https://github.com/vuejs/core/commit/0e6e3c7eb0e5320b7c1818e025cb4a490fede9c0)), closes [#5836](https://github.com/vuejs/core/issues/5836) +* **types:** provide internal options for directly using user types in language tools ([#10801](https://github.com/vuejs/core/issues/10801)) ([75c8cf6](https://github.com/vuejs/core/commit/75c8cf63a1ef30ac84f91282d66ad3f57c6612e9)) + + +### Performance Improvements + +* **reactivity:** optimize array tracking ([#9511](https://github.com/vuejs/core/issues/9511)) ([70196a4](https://github.com/vuejs/core/commit/70196a40cc078f50fcc1110c38c06fbcc70b205e)), closes [#4318](https://github.com/vuejs/core/issues/4318) + + + ## [3.4.25](https://github.com/vuejs/core/compare/v3.4.24...v3.4.25) (2024-04-24) diff --git a/package.json b/package.json index a91136c80d7..7bf2a2c147b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.4.25", + "version": "3.5.0-alpha.1", "packageManager": "pnpm@9.0.5", "type": "module", "scripts": { diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 5a4b7f65331..97a11c37346 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 113dc583c57..25581867157 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 58564d43603..141123eb9fb 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 cb20b174338..90c1941d381 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 e0e789cf10d..eeca0e0809b 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 ccdca5888d4..c4d9682e99c 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 152243cf34c..77df975e388 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 e8929a1af4c..f9d9690deef 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 51b192193b9..ef920cf105d 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 6426431251d..e5276c93844 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "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 413b523b121..12b7e570f33 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.4.25", + "version": "3.5.0-alpha.1", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", From 582a3a382b1adda565bac576b913a88d9e8d7a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Mon, 29 Apr 2024 12:47:56 +0200 Subject: [PATCH 017/924] feat(runtime-core): add app.onUnmount() for registering cleanup functions (#4619) close #4516 --- .../__tests__/apiCreateApp.spec.ts | 30 +++++++++++++++++++ packages/runtime-core/src/apiCreateApp.ts | 18 +++++++++++ packages/runtime-core/src/errorHandling.ts | 2 ++ 3 files changed, 50 insertions(+) diff --git a/packages/runtime-core/__tests__/apiCreateApp.spec.ts b/packages/runtime-core/__tests__/apiCreateApp.spec.ts index f6386339741..0d7c3380311 100644 --- a/packages/runtime-core/__tests__/apiCreateApp.spec.ts +++ b/packages/runtime-core/__tests__/apiCreateApp.spec.ts @@ -344,6 +344,36 @@ describe('api: createApp', () => { ).toHaveBeenWarnedTimes(1) }) + test('onUnmount', () => { + const cleanup = vi.fn().mockName('plugin cleanup') + const PluginA: Plugin = app => { + app.provide('foo', 1) + app.onUnmount(cleanup) + } + const PluginB: Plugin = { + install: (app, arg1, arg2) => { + app.provide('bar', arg1 + arg2) + app.onUnmount(cleanup) + }, + } + + const app = createApp({ + render: () => `Test`, + }) + app.use(PluginA) + app.use(PluginB) + + const root = nodeOps.createElement('div') + app.mount(root) + + //also can be added after mount + app.onUnmount(cleanup) + + app.unmount() + + expect(cleanup).toHaveBeenCalledTimes(3) + }) + test('config.errorHandler', () => { const error = new Error() const count = ref(0) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 65c10166de7..286eb2bcc8e 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -27,6 +27,7 @@ import { version } from '.' import { installAppCompatProperties } from './compat/global' import type { NormalizedPropsOptions } from './componentProps' import type { ObjectEmitsOptions } from './componentEmits' +import { ErrorCodes, callWithAsyncErrorHandling } from './errorHandling' import type { DefineComponent } from './apiDefineComponent' export interface App { @@ -50,6 +51,7 @@ export interface App { namespace?: boolean | ElementNamespace, ): ComponentPublicInstance unmount(): void + onUnmount(cb: () => void): void provide(key: InjectionKey | string, value: T): this /** @@ -214,6 +216,7 @@ export function createAppAPI( const context = createAppContext() const installedPlugins = new WeakSet() + const pluginCleanupFns: Array<() => any> = [] let isMounted = false @@ -366,8 +369,23 @@ export function createAppAPI( } }, + onUnmount(cleanupFn: () => void) { + if (__DEV__ && typeof cleanupFn !== 'function') { + warn( + `Expected function as first argument to app.onUnmount(), ` + + `but got ${typeof cleanupFn}`, + ) + } + pluginCleanupFns.push(cleanupFn) + }, + unmount() { if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + ErrorCodes.APP_UNMOUNT_CLEANUP, + ) render(null, app._container) if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) { app._instance = null diff --git a/packages/runtime-core/src/errorHandling.ts b/packages/runtime-core/src/errorHandling.ts index 41c92cbd34a..beddea5f644 100644 --- a/packages/runtime-core/src/errorHandling.ts +++ b/packages/runtime-core/src/errorHandling.ts @@ -23,6 +23,7 @@ export enum ErrorCodes { FUNCTION_REF, ASYNC_COMPONENT_LOADER, SCHEDULER, + APP_UNMOUNT_CLEANUP, } export const ErrorTypeStrings: Record = { @@ -57,6 +58,7 @@ export const ErrorTypeStrings: Record = { [ErrorCodes.SCHEDULER]: 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://github.com/vuejs/core .', + [ErrorCodes.APP_UNMOUNT_CLEANUP]: 'app unmount cleanup function', } export type ErrorTypes = LifecycleHooks | ErrorCodes From 124c4cac833a28ae9bc8edc576c1d0c7c41f5985 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 30 Apr 2024 08:26:39 -0700 Subject: [PATCH 018/924] fix(types): props in defineOptions type should be optional close #10841 --- packages/runtime-core/src/apiSetupHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/apiSetupHelpers.ts b/packages/runtime-core/src/apiSetupHelpers.ts index dbe27dde48e..71254d37171 100644 --- a/packages/runtime-core/src/apiSetupHelpers.ts +++ b/packages/runtime-core/src/apiSetupHelpers.ts @@ -210,7 +210,7 @@ export function defineOptions< /** * props should be defined via defineProps(). */ - props: never + props?: never /** * emits should be defined via defineEmits(). */ From c146186396d0c1a65423b8c9a21251c5a6467336 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 30 Apr 2024 10:09:06 -0700 Subject: [PATCH 019/924] fix(types): fix compat with generated types that rely on CreateComponentPublicInstance close #10842 --- packages/dts-test/defineComponent.test-d.tsx | 193 ++++++++++++++++++ .../runtime-core/src/apiDefineComponent.ts | 8 +- packages/runtime-core/src/componentOptions.ts | 14 +- .../src/componentPublicInstance.ts | 67 +++++- packages/runtime-core/src/index.ts | 1 + packages/runtime-dom/src/apiCustomElement.ts | 4 +- 6 files changed, 273 insertions(+), 14 deletions(-) diff --git a/packages/dts-test/defineComponent.test-d.tsx b/packages/dts-test/defineComponent.test-d.tsx index 077f1abc075..aa0cfb0ebab 100644 --- a/packages/dts-test/defineComponent.test-d.tsx +++ b/packages/dts-test/defineComponent.test-d.tsx @@ -1766,3 +1766,196 @@ defineComponent({ expectType(props.foo) }, }) + +import type * as vue from 'vue' + +interface ErrorMessageSlotProps { + message: string | undefined +} +/** + * #10842 + * component types generated by vue-tsc + * relying on legacy CreateComponentPublicInstance signature + */ +declare const ErrorMessage: { + new (...args: any[]): vue.CreateComponentPublicInstance< + Readonly< + vue.ExtractPropTypes<{ + as: { + type: StringConstructor + default: any + } + name: { + type: StringConstructor + required: true + } + }> + >, + () => + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + > + | vue.Slot + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + | { + default: () => VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + }, + unknown, + {}, + {}, + vue.ComponentOptionsMixin, + vue.ComponentOptionsMixin, + {}, + vue.VNodeProps & + vue.AllowedComponentProps & + vue.ComponentCustomProps & + Readonly< + vue.ExtractPropTypes<{ + as: { + type: StringConstructor + default: any + } + name: { + type: StringConstructor + required: true + } + }> + >, + { + as: string + }, + true, + {}, + {}, + { + P: {} + B: {} + D: {} + C: {} + M: {} + Defaults: {} + }, + Readonly< + vue.ExtractPropTypes<{ + as: { + type: StringConstructor + default: any + } + name: { + type: StringConstructor + required: true + } + }> + >, + () => + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + > + | vue.Slot + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + | { + default: () => VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + }, + {}, + {}, + {}, + { + as: string + } + > + __isFragment?: never + __isTeleport?: never + __isSuspense?: never +} & vue.ComponentOptionsBase< + Readonly< + vue.ExtractPropTypes<{ + as: { + type: StringConstructor + default: any + } + name: { + type: StringConstructor + required: true + } + }> + >, + () => + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + > + | vue.Slot + | VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + | { + default: () => VNode< + vue.RendererNode, + vue.RendererElement, + { + [key: string]: any + } + >[] + }, + unknown, + {}, + {}, + vue.ComponentOptionsMixin, + vue.ComponentOptionsMixin, + {}, + string, + { + as: string + }, + {}, + string, + {} +> & + vue.VNodeProps & + vue.AllowedComponentProps & + vue.ComponentCustomProps & + (new () => { + $slots: { + default: (arg: ErrorMessageSlotProps) => VNode[] + } + }) +; diff --git a/packages/runtime-core/src/apiDefineComponent.ts b/packages/runtime-core/src/apiDefineComponent.ts index 7fce96586da..98e9ae7952c 100644 --- a/packages/runtime-core/src/apiDefineComponent.ts +++ b/packages/runtime-core/src/apiDefineComponent.ts @@ -31,7 +31,7 @@ import { extend, isFunction } from '@vue/shared' import type { VNodeProps } from './vnode' import type { ComponentPublicInstanceConstructor, - CreateComponentPublicInstance, + CreateComponentPublicInstanceWithMixins, } from './componentPublicInstance' import type { SlotsType } from './componentSlots' import type { Directive } from './directives' @@ -68,7 +68,7 @@ export type DefineComponent< Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, > = ComponentPublicInstanceConstructor< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< Props, RawBindings, D, @@ -116,7 +116,7 @@ export type DefineSetupFnComponent< PP = PublicProps, > = new ( props: Props & PP, -) => CreateComponentPublicInstance< +) => CreateComponentPublicInstanceWithMixins< Props, {}, {}, @@ -240,7 +240,7 @@ export function defineComponent< Provide > & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< ResolvedProps, SetupBindings, Data, diff --git a/packages/runtime-core/src/componentOptions.ts b/packages/runtime-core/src/componentOptions.ts index ac1841edee9..2ede4404266 100644 --- a/packages/runtime-core/src/componentOptions.ts +++ b/packages/runtime-core/src/componentOptions.ts @@ -62,7 +62,7 @@ import type { import type { Directive } from './directives' import { type ComponentPublicInstance, - type CreateComponentPublicInstance, + type CreateComponentPublicInstanceWithMixins, type IntersectionMixin, type UnwrapMixinsType, isReservedPrefix, @@ -263,7 +263,7 @@ export type ComponentOptions< Provide > & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< {}, RawBindings, D, @@ -372,7 +372,7 @@ interface LegacyOptions< // since that leads to some sort of circular inference and breaks ThisType // for the entire component. data?: ( - this: CreateComponentPublicInstance< + this: CreateComponentPublicInstanceWithMixins< Props, {}, {}, @@ -381,7 +381,7 @@ interface LegacyOptions< Mixin, Extends >, - vm: CreateComponentPublicInstance< + vm: CreateComponentPublicInstanceWithMixins< Props, {}, {}, @@ -1125,7 +1125,7 @@ export type ComponentOptionsWithoutProps< */ __typeEmits?: TE } & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< PE, RawBindings, D, @@ -1187,7 +1187,7 @@ export type ComponentOptionsWithArrayProps< > & { props: PropNames[] } & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< Props, RawBindings, D, @@ -1250,7 +1250,7 @@ export type ComponentOptionsWithObjectProps< > & { props: PropsOptions & ThisType } & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< Props, RawBindings, D, diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 864b9786efe..91a7ae8d6d0 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -150,7 +150,71 @@ export type ComponentPublicInstanceConstructor< new (...args: any[]): T } +/** + * @deprecated This is no longer used internally, but exported and relied on by + * existing library types generated by vue-tsc. + */ export type CreateComponentPublicInstance< + P = {}, + B = {}, + D = {}, + C extends ComputedOptions = {}, + M extends MethodOptions = {}, + Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, + Extends extends ComponentOptionsMixin = ComponentOptionsMixin, + E extends EmitsOptions = {}, + PublicProps = P, + Defaults = {}, + MakeDefaultsOptional extends boolean = false, + I extends ComponentInjectOptions = {}, + S extends SlotsType = {}, + PublicMixin = IntersectionMixin & IntersectionMixin, + PublicP = UnwrapMixinsType & EnsureNonVoid

, + PublicB = UnwrapMixinsType & EnsureNonVoid, + PublicD = UnwrapMixinsType & EnsureNonVoid, + PublicC extends ComputedOptions = UnwrapMixinsType & + EnsureNonVoid, + PublicM extends MethodOptions = UnwrapMixinsType & + EnsureNonVoid, + PublicDefaults = UnwrapMixinsType & + EnsureNonVoid, +> = ComponentPublicInstance< + PublicP, + PublicB, + PublicD, + PublicC, + PublicM, + E, + PublicProps, + PublicDefaults, + MakeDefaultsOptional, + ComponentOptionsBase< + P, + B, + D, + C, + M, + Mixin, + Extends, + E, + string, + Defaults, + {}, + string, + S + >, + I, + S +> + +/** + * This is the same as `CreateComponentPublicInstance` but adds local components, + * global directives, exposed, and provide inference. + * It changes the arguments order so that we don't need to repeat mixin + * inference everywhere internally, but it has to be a new type to avoid + * breaking types that relies on previous arguments order (#10842) + */ +export type CreateComponentPublicInstanceWithMixins< P = {}, B = {}, D = {}, @@ -167,6 +231,8 @@ export type CreateComponentPublicInstance< LC extends Record = {}, Directives extends Record = {}, Exposed extends string = string, + Provide extends ComponentProvideOptions = ComponentProvideOptions, + // mixin inference PublicMixin = IntersectionMixin & IntersectionMixin, PublicP = UnwrapMixinsType & EnsureNonVoid

, PublicB = UnwrapMixinsType & EnsureNonVoid, @@ -177,7 +243,6 @@ export type CreateComponentPublicInstance< EnsureNonVoid, PublicDefaults = UnwrapMixinsType & EnsureNonVoid, - Provide extends ComponentProvideOptions = ComponentProvideOptions, > = ComponentPublicInstance< PublicP, PublicB, diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index e4a9e53f29c..abdd39a9cd1 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -279,6 +279,7 @@ export type { ComponentPublicInstance, ComponentCustomProperties, CreateComponentPublicInstance, + CreateComponentPublicInstanceWithMixins, } from './componentPublicInstance' export type { Renderer, diff --git a/packages/runtime-dom/src/apiCustomElement.ts b/packages/runtime-dom/src/apiCustomElement.ts index 01728466241..6363f16de7c 100644 --- a/packages/runtime-dom/src/apiCustomElement.ts +++ b/packages/runtime-dom/src/apiCustomElement.ts @@ -9,7 +9,7 @@ import { type ComponentProvideOptions, type ComputedOptions, type ConcreteComponent, - type CreateComponentPublicInstance, + type CreateComponentPublicInstanceWithMixins, type DefineComponent, type Directive, type EmitsOptions, @@ -97,7 +97,7 @@ export function defineCustomElement< Provide > & ThisType< - CreateComponentPublicInstance< + CreateComponentPublicInstanceWithMixins< Readonly, SetupBindings, Data, From 9b82005bf36150662f4802bd1260766b0254816b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Fri, 3 May 2024 22:27:23 +0200 Subject: [PATCH 020/924] test: defineOptions dts tests (#10849) --- packages/dts-test/README.md | 2 +- packages/dts-test/setupHelpers.test-d.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/dts-test/README.md b/packages/dts-test/README.md index 6f1b1da1d0e..f75cc8b8d5a 100644 --- a/packages/dts-test/README.md +++ b/packages/dts-test/README.md @@ -4,4 +4,4 @@ Tests TypeScript types to ensure the types remain as expected. - This directory is included in the root `tsconfig.json`, where package imports are aliased to `src` directories, so in IDEs and the `pnpm check` script the types are validated against source code. -- When running `tsc` with `packages/dts-test/tsconfig.test.json`, packages are resolved using normal `node` resolution, so the types are validated against actual **built** types. This requires the types to be built first via `pnpm build-types`. +- When running `tsc` with `packages/dts-test/tsconfig.test.json`, packages are resolved using normal `node` resolution, so the types are validated against actual **built** types. This requires the types to be built first via `pnpm build-dts`. diff --git a/packages/dts-test/setupHelpers.test-d.ts b/packages/dts-test/setupHelpers.test-d.ts index 883ebe6b254..2cfc04bad1d 100644 --- a/packages/dts-test/setupHelpers.test-d.ts +++ b/packages/dts-test/setupHelpers.test-d.ts @@ -5,6 +5,7 @@ import { defineComponent, defineEmits, defineModel, + defineOptions, defineProps, defineSlots, toRefs, @@ -501,3 +502,21 @@ describe('toRefs w/ type declaration', () => { }>() expectType>(toRefs(props).file) }) + +describe('defineOptions', () => { + defineOptions({ + name: 'MyComponent', + inheritAttrs: true, + }) + + defineOptions({ + // @ts-expect-error props should be defined via defineProps() + props: ['props'], + // @ts-expect-error emits should be defined via defineEmits() + emits: ['emits'], + // @ts-expect-error slots should be defined via defineSlots() + slots: { default: 'default' }, + // @ts-expect-error expose should be defined via defineExpose() + expose: ['expose'], + }) +}) From eae0ccb8e0d2772e34e9f6c48ce8be9e9e990452 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 3 May 2024 16:22:13 -0700 Subject: [PATCH 021/924] chore: re-export deprecated component options types --- packages/runtime-core/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/runtime-core/src/index.ts b/packages/runtime-core/src/index.ts index abdd39a9cd1..fd36136dc75 100644 --- a/packages/runtime-core/src/index.ts +++ b/packages/runtime-core/src/index.ts @@ -269,6 +269,10 @@ export type { ComputedOptions, RuntimeCompilerOptions, ComponentInjectOptions, + // deprecated + ComponentOptionsWithoutProps, + ComponentOptionsWithArrayProps, + ComponentOptionsWithObjectProps, } from './componentOptions' export type { EmitsOptions, From 908f70adc06038d1ea253d96f4024367f4a7545d Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 3 May 2024 16:29:23 -0700 Subject: [PATCH 022/924] fix(types): fix app.component() typing with inline defineComponent close #10843 --- packages/dts-test/defineComponent.test-d.tsx | 14 ++++++++++++++ packages/runtime-core/src/apiCreateApp.ts | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/dts-test/defineComponent.test-d.tsx b/packages/dts-test/defineComponent.test-d.tsx index aa0cfb0ebab..4af81be1dec 100644 --- a/packages/dts-test/defineComponent.test-d.tsx +++ b/packages/dts-test/defineComponent.test-d.tsx @@ -1959,3 +1959,17 @@ declare const ErrorMessage: { } }) ; + +// #10843 +createApp({}).component( + 'SomeComponent', + defineComponent({ + props: { + title: String, + }, + setup(props) { + expectType(props.title) + return {} + }, + }), +) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 286eb2bcc8e..12e63211a49 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -42,7 +42,10 @@ export interface App { mixin(mixin: ComponentOptions): this component(name: string): Component | undefined - component(name: string, component: Component | DefineComponent): this + component( + name: string, + component: T, + ): this directive(name: string): Directive | undefined directive(name: string, directive: Directive): this mount( From 801666fdade7632716474147599ac65595109fb8 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 3 May 2024 16:57:47 -0700 Subject: [PATCH 023/924] chore: add internal flag to work around ts issue --- packages/runtime-core/src/directives.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/directives.ts b/packages/runtime-core/src/directives.ts index c6dce57c1b6..afc7d3c1d28 100644 --- a/packages/runtime-core/src/directives.ts +++ b/packages/runtime-core/src/directives.ts @@ -52,8 +52,12 @@ export type DirectiveHook< prevVNode: Prev, ) => void -export type SSRDirectiveHook = ( - binding: DirectiveBinding, +export type SSRDirectiveHook< + Value = any, + Modifiers extends string = string, + Arg extends string = string, +> = ( + binding: DirectiveBinding, vnode: VNode, ) => Data | undefined @@ -63,6 +67,12 @@ export interface ObjectDirective< Modifiers extends string = string, Arg extends string = string, > { + /** + * @internal without this, ts-expect-error in directives.test-d.ts somehow + * fails when running tsc, but passes in IDE and when testing against built + * dts. Could be a TS bug. + */ + __mod?: Modifiers created?: DirectiveHook beforeMount?: DirectiveHook mounted?: DirectiveHook @@ -82,7 +92,7 @@ export interface ObjectDirective< > beforeUnmount?: DirectiveHook unmounted?: DirectiveHook - getSSRProps?: SSRDirectiveHook + getSSRProps?: SSRDirectiveHook deep?: boolean } From b295cdf4e9c79573a937c21c62fd02bc722087fc Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 3 May 2024 17:03:13 -0700 Subject: [PATCH 024/924] release: v3.5.0-alpha.2 --- CHANGELOG.md | 16 ++++++++++++++++ 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, 28 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbeb2bfc8cb..46840721807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# [3.5.0-alpha.2](https://github.com/vuejs/core/compare/v3.4.26...v3.5.0-alpha.2) (2024-05-04) + + +### Bug Fixes + +* **types:** fix app.component() typing with inline defineComponent ([908f70a](https://github.com/vuejs/core/commit/908f70adc06038d1ea253d96f4024367f4a7545d)), closes [#10843](https://github.com/vuejs/core/issues/10843) +* **types:** fix compat with generated types that rely on CreateComponentPublicInstance ([c146186](https://github.com/vuejs/core/commit/c146186396d0c1a65423b8c9a21251c5a6467336)), closes [#10842](https://github.com/vuejs/core/issues/10842) +* **types:** props in defineOptions type should be optional ([124c4ca](https://github.com/vuejs/core/commit/124c4cac833a28ae9bc8edc576c1d0c7c41f5985)), closes [#10841](https://github.com/vuejs/core/issues/10841) + + +### Features + +* **runtime-core:** add app.onUnmount() for registering cleanup functions ([#4619](https://github.com/vuejs/core/issues/4619)) ([582a3a3](https://github.com/vuejs/core/commit/582a3a382b1adda565bac576b913a88d9e8d7a9e)), closes [#4516](https://github.com/vuejs/core/issues/4516) + + + ## [3.4.26](https://github.com/vuejs/core/compare/v3.4.25...v3.4.26) (2024-04-29) diff --git a/package.json b/package.json index 38510be0b21..23282e991b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "packageManager": "pnpm@9.0.6", "type": "module", "scripts": { diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 97a11c37346..d139d92c34a 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 25581867157..7969a3df19d 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 141123eb9fb..148c51cf266 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 90c1941d381..4445399db82 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 eeca0e0809b..7b50a205c2f 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 c4d9682e99c..9a07e5c54bf 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 77df975e388..28c2f60f81b 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 f9d9690deef..f0d2efde4a7 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 ef920cf105d..2c95128a8e9 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 e5276c93844..3f4a042edcc 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "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 12b7e570f33..bb3660ef040 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.5.0-alpha.1", + "version": "3.5.0-alpha.2", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", From bead21a2f6a9fe094d5e856a898ba916c83422bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 06:14:19 +0800 Subject: [PATCH 025/924] chore(deps): update all non-major dependencies (#10866) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 322 ++++------------------------- 3 files changed, 46 insertions(+), 284 deletions(-) diff --git a/package.json b/package.json index 2972671a0fb..9021ae469bb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.4.26", - "packageManager": "pnpm@9.0.6", + "packageManager": "pnpm@9.1.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -70,7 +70,7 @@ "@rollup/plugin-terser": "^0.4.4", "@types/hash-sum": "^1.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.12.7", + "@types/node": "^20.12.10", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.5.2", "@vue/consolidate": "1.0.0", @@ -107,7 +107,7 @@ "terser": "^5.30.4", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^4.7.3", + "tsx": "^4.9.3", "typescript": "~5.4.5", "typescript-eslint": "^7.7.1", "vite": "^5.2.10", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f463ed13719..266785e16fb 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.0.16", "pug": "^3.0.2", - "sass": "^1.75.0" + "sass": "^1.76.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83f1c6c8c13..405bd9a93df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 7.24.0 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4)) + version: 3.1.0(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.17.1) @@ -42,14 +42,14 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@types/node': - specifier: ^20.12.7 - version: 20.12.7 + specifier: ^20.12.10 + version: 20.12.10 '@types/semver': specifier: ^7.5.8 version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.5.2 - version: 1.5.2(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4)) + version: 1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -73,7 +73,7 @@ importers: version: 0.5.0(eslint@9.1.1)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4)) + version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -153,8 +153,8 @@ importers: specifier: ^2.6.2 version: 2.6.2 tsx: - specifier: ^4.7.3 - version: 4.7.3 + specifier: ^4.9.3 + version: 4.9.3 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -163,10 +163,10 @@ importers: version: 7.7.1(eslint@9.1.1)(typescript@5.4.5) vite: specifier: ^5.2.10 - version: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) + version: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) vitest: specifier: ^1.5.2 - version: 1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4) + version: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) packages/compiler-core: dependencies: @@ -257,8 +257,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 sass: - specifier: ^1.75.0 - version: 1.75.0 + specifier: ^1.76.0 + version: 1.76.0 packages/compiler-ssr: dependencies: @@ -355,10 +355,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4))(vue@packages+vue) + version: 5.0.4(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vue@packages+vue) vite: specifier: ^5.2.10 - version: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) + version: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) packages/shared: {} @@ -513,276 +513,138 @@ packages: vite: ^4.2.0 || ^5.0.0 vitest: '>=1.2.2' - '@esbuild/aix-ppc64@0.19.12': - resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.20.2': resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.19.12': - resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.20.2': resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.19.12': - resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.20.2': resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.19.12': - resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.20.2': resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.19.12': - resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.20.2': resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.19.12': - resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.20.2': resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.19.12': - resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.20.2': resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.12': - resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.20.2': resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.19.12': - resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.20.2': resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.19.12': - resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.20.2': resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.19.12': - resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.20.2': resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.19.12': - resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.20.2': resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.19.12': - resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.20.2': resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.19.12': - resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.20.2': resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.19.12': - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.20.2': resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.19.12': - resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.20.2': resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.19.12': - resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.20.2': resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.19.12': - resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.20.2': resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.19.12': - resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.20.2': resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.19.12': - resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.20.2': resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.19.12': - resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.20.2': resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.19.12': - resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.20.2': resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.19.12': - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.20.2': resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} engines: {node: '>=12'} @@ -1133,8 +995,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@20.12.7': - resolution: {integrity: sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==} + '@types/node@20.12.10': + resolution: {integrity: sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1818,11 +1680,6 @@ packages: peerDependencies: esbuild: '*' - esbuild@0.19.12: - resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.20.2: resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} engines: {node: '>=12'} @@ -3036,8 +2893,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.75.0: - resolution: {integrity: sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw==} + sass@1.76.0: + resolution: {integrity: sha512-nc3LeqvF2FNW5xGF1zxZifdW3ffIz5aBb7I7tSvOoNu7z1RQ6pFt9MBuiPtjgaI62YWrM/txjWlOCFiGtf2xpw==} engines: {node: '>=14.0.0'} hasBin: true @@ -3307,8 +3164,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsx@4.7.3: - resolution: {integrity: sha512-+fQnMqIp/jxZEXLcj6WzYy9FhcS5/Dfk8y4AtzJ6ejKcKqmfTF8Gso/jtrzDggCF2zTU20gJa6n8XqPYwDAUYQ==} + tsx@4.9.3: + resolution: {integrity: sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==} engines: {node: '>=18.0.0'} hasBin: true @@ -3714,149 +3571,80 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4))': + '@codspeed/vitest-plugin@3.1.0(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) - vitest: 1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4) + vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) transitivePeerDependencies: - debug - '@esbuild/aix-ppc64@0.19.12': - optional: true - '@esbuild/aix-ppc64@0.20.2': optional: true - '@esbuild/android-arm64@0.19.12': - optional: true - '@esbuild/android-arm64@0.20.2': optional: true - '@esbuild/android-arm@0.19.12': - optional: true - '@esbuild/android-arm@0.20.2': optional: true - '@esbuild/android-x64@0.19.12': - optional: true - '@esbuild/android-x64@0.20.2': optional: true - '@esbuild/darwin-arm64@0.19.12': - optional: true - '@esbuild/darwin-arm64@0.20.2': optional: true - '@esbuild/darwin-x64@0.19.12': - optional: true - '@esbuild/darwin-x64@0.20.2': optional: true - '@esbuild/freebsd-arm64@0.19.12': - optional: true - '@esbuild/freebsd-arm64@0.20.2': optional: true - '@esbuild/freebsd-x64@0.19.12': - optional: true - '@esbuild/freebsd-x64@0.20.2': optional: true - '@esbuild/linux-arm64@0.19.12': - optional: true - '@esbuild/linux-arm64@0.20.2': optional: true - '@esbuild/linux-arm@0.19.12': - optional: true - '@esbuild/linux-arm@0.20.2': optional: true - '@esbuild/linux-ia32@0.19.12': - optional: true - '@esbuild/linux-ia32@0.20.2': optional: true - '@esbuild/linux-loong64@0.19.12': - optional: true - '@esbuild/linux-loong64@0.20.2': optional: true - '@esbuild/linux-mips64el@0.19.12': - optional: true - '@esbuild/linux-mips64el@0.20.2': optional: true - '@esbuild/linux-ppc64@0.19.12': - optional: true - '@esbuild/linux-ppc64@0.20.2': optional: true - '@esbuild/linux-riscv64@0.19.12': - optional: true - '@esbuild/linux-riscv64@0.20.2': optional: true - '@esbuild/linux-s390x@0.19.12': - optional: true - '@esbuild/linux-s390x@0.20.2': optional: true - '@esbuild/linux-x64@0.19.12': - optional: true - '@esbuild/linux-x64@0.20.2': optional: true - '@esbuild/netbsd-x64@0.19.12': - optional: true - '@esbuild/netbsd-x64@0.20.2': optional: true - '@esbuild/openbsd-x64@0.19.12': - optional: true - '@esbuild/openbsd-x64@0.20.2': optional: true - '@esbuild/sunos-x64@0.19.12': - optional: true - '@esbuild/sunos-x64@0.20.2': optional: true - '@esbuild/win32-arm64@0.19.12': - optional: true - '@esbuild/win32-arm64@0.20.2': optional: true - '@esbuild/win32-ia32@0.19.12': - optional: true - '@esbuild/win32-ia32@0.20.2': optional: true - '@esbuild/win32-x64@0.19.12': - optional: true - '@esbuild/win32-x64@0.20.2': optional: true @@ -4139,7 +3927,7 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@20.12.7': + '@types/node@20.12.10': dependencies: undici-types: 5.26.5 @@ -4151,7 +3939,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.12.7 + '@types/node': 20.12.10 optional: true '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5)': @@ -4281,12 +4069,12 @@ snapshots: '@typescript-eslint/types': 7.7.1 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.4(vite@5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.4(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vue@packages+vue)': dependencies: - vite: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) + vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) vue: link:packages/vue - '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4))': + '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -4297,7 +4085,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) transitivePeerDependencies: - supports-color @@ -4873,32 +4661,6 @@ snapshots: esbuild: 0.20.2 import-meta-resolve: 3.1.1 - esbuild@0.19.12: - optionalDependencies: - '@esbuild/aix-ppc64': 0.19.12 - '@esbuild/android-arm': 0.19.12 - '@esbuild/android-arm64': 0.19.12 - '@esbuild/android-x64': 0.19.12 - '@esbuild/darwin-arm64': 0.19.12 - '@esbuild/darwin-x64': 0.19.12 - '@esbuild/freebsd-arm64': 0.19.12 - '@esbuild/freebsd-x64': 0.19.12 - '@esbuild/linux-arm': 0.19.12 - '@esbuild/linux-arm64': 0.19.12 - '@esbuild/linux-ia32': 0.19.12 - '@esbuild/linux-loong64': 0.19.12 - '@esbuild/linux-mips64el': 0.19.12 - '@esbuild/linux-ppc64': 0.19.12 - '@esbuild/linux-riscv64': 0.19.12 - '@esbuild/linux-s390x': 0.19.12 - '@esbuild/linux-x64': 0.19.12 - '@esbuild/netbsd-x64': 0.19.12 - '@esbuild/openbsd-x64': 0.19.12 - '@esbuild/sunos-x64': 0.19.12 - '@esbuild/win32-arm64': 0.19.12 - '@esbuild/win32-ia32': 0.19.12 - '@esbuild/win32-x64': 0.19.12 - esbuild@0.20.2: optionalDependencies: '@esbuild/aix-ppc64': 0.20.2 @@ -4962,12 +4724,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4)): + eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)): dependencies: '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) eslint: 9.1.1 optionalDependencies: - vitest: 1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) transitivePeerDependencies: - supports-color - typescript @@ -6260,7 +6022,7 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.75.0: + sass@1.76.0: dependencies: chokidar: 3.6.0 immutable: 4.3.5 @@ -6533,9 +6295,9 @@ snapshots: tslib@2.6.2: {} - tsx@4.7.3: + tsx@4.9.3: dependencies: - esbuild: 0.19.12 + esbuild: 0.20.2 get-tsconfig: 4.7.3 optionalDependencies: fsevents: 2.3.3 @@ -6612,13 +6374,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.5.2(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4): + vite-node@1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) + vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) transitivePeerDependencies: - '@types/node' - less @@ -6629,18 +6391,18 @@ snapshots: - supports-color - terser - vite@5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4): + vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.16.1 optionalDependencies: - '@types/node': 20.12.7 + '@types/node': 20.12.10 fsevents: 2.3.3 - sass: 1.75.0 + sass: 1.76.0 terser: 5.30.4 - vitest@1.5.2(@types/node@20.12.7)(jsdom@24.0.0)(sass@1.75.0)(terser@5.30.4): + vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4): dependencies: '@vitest/expect': 1.5.2 '@vitest/runner': 1.5.2 @@ -6659,11 +6421,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.2.10(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) - vite-node: 1.5.2(@types/node@20.12.7)(sass@1.75.0)(terser@5.30.4) + vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + vite-node: 1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.12.7 + '@types/node': 20.12.10 jsdom: 24.0.0 transitivePeerDependencies: - less From 8373350ce5ff1bcb23ca615da78d6b07e6820874 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 7 May 2024 06:22:14 +0800 Subject: [PATCH 026/924] chore(deps): update build (#10867) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +- packages/sfc-playground/package.json | 2 +- .../src/download/template/package.json | 2 +- pnpm-lock.yaml | 437 ++++++------------ 4 files changed, 146 insertions(+), 301 deletions(-) diff --git a/package.json b/package.json index 9021ae469bb..a867849c70f 100644 --- a/package.json +++ b/package.json @@ -97,20 +97,20 @@ "pug": "^3.0.2", "puppeteer": "~22.7.1", "rimraf": "^5.0.5", - "rollup": "^4.17.1", + "rollup": "^4.17.2", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-esbuild": "^6.1.1", "rollup-plugin-polyfill-node": "^0.13.0", "semver": "^7.6.0", "serve": "^14.2.3", "simple-git-hooks": "^2.11.1", - "terser": "^5.30.4", + "terser": "^5.31.0", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", "tsx": "^4.9.3", "typescript": "~5.4.5", "typescript-eslint": "^7.7.1", - "vite": "^5.2.10", + "vite": "^5.2.11", "vitest": "^1.5.2" }, "pnpm": { diff --git a/packages/sfc-playground/package.json b/packages/sfc-playground/package.json index 72b042dbe76..3bedad56d2e 100644 --- a/packages/sfc-playground/package.json +++ b/packages/sfc-playground/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", - "vite": "^5.2.10" + "vite": "^5.2.11" }, "dependencies": { "@vue/repl": "^4.1.2", diff --git a/packages/sfc-playground/src/download/template/package.json b/packages/sfc-playground/src/download/template/package.json index 84475d4608c..452e28bb4e1 100644 --- a/packages/sfc-playground/src/download/template/package.json +++ b/packages/sfc-playground/src/download/template/package.json @@ -12,6 +12,6 @@ }, "devDependencies": { "@vitejs/plugin-vue": "^5.0.4", - "vite": "^5.2.10" + "vite": "^5.2.11" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 405bd9a93df..9ff860408a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,25 +16,25 @@ importers: version: 7.24.0 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) + version: 3.1.0(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) '@rollup/plugin-alias': specifier: ^5.1.0 - version: 5.1.0(rollup@4.17.1) + version: 5.1.0(rollup@4.17.2) '@rollup/plugin-commonjs': specifier: ^25.0.7 - version: 25.0.7(rollup@4.17.1) + version: 25.0.7(rollup@4.17.2) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.17.1) + version: 6.1.0(rollup@4.17.2) '@rollup/plugin-node-resolve': specifier: ^15.2.3 - version: 15.2.3(rollup@4.17.1) + version: 15.2.3(rollup@4.17.2) '@rollup/plugin-replace': specifier: 5.0.4 - version: 5.0.4(rollup@4.17.1) + version: 5.0.4(rollup@4.17.2) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.17.1) + version: 0.4.4(rollup@4.17.2) '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 @@ -49,7 +49,7 @@ importers: version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.5.2 - version: 1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) + version: 1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -73,7 +73,7 @@ importers: version: 0.5.0(eslint@9.1.1)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)) + version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -123,17 +123,17 @@ importers: specifier: ^5.0.5 version: 5.0.5 rollup: - specifier: ^4.17.1 - version: 4.17.1 + specifier: ^4.17.2 + version: 4.17.2 rollup-plugin-dts: specifier: ^6.1.0 - version: 6.1.0(rollup@4.17.1)(typescript@5.4.5) + version: 6.1.0(rollup@4.17.2)(typescript@5.4.5) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.20.2)(rollup@4.17.1) + version: 6.1.1(esbuild@0.20.2)(rollup@4.17.2) rollup-plugin-polyfill-node: specifier: ^0.13.0 - version: 0.13.0(rollup@4.17.1) + version: 0.13.0(rollup@4.17.2) semver: specifier: ^7.6.0 version: 7.6.0 @@ -144,8 +144,8 @@ importers: specifier: ^2.11.1 version: 2.11.1 terser: - specifier: ^5.30.4 - version: 5.30.4 + specifier: ^5.31.0 + version: 5.31.0 todomvc-app-css: specifier: ^2.4.3 version: 2.4.3 @@ -162,11 +162,11 @@ importers: specifier: ^7.7.1 version: 7.7.1(eslint@9.1.1)(typescript@5.4.5) vite: - specifier: ^5.2.10 - version: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) vitest: specifier: ^1.5.2 - version: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) + version: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) packages/compiler-core: dependencies: @@ -355,10 +355,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vue@packages+vue) + version: 5.0.4(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vue@packages+vue) vite: - specifier: ^5.2.10 - version: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + specifier: ^5.2.11 + version: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) packages/shared: {} @@ -817,163 +817,83 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.16.1': - resolution: {integrity: sha512-92/y0TqNLRYOTXpm6Z7mnpvKAG9P7qmK7yJeRJSdzElNCUnsgbpAsGqerUboYRIQKzgfq4pWu9xVkgpWLfmNsw==} + '@rollup/rollup-android-arm-eabi@4.17.2': + resolution: {integrity: sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm-eabi@4.17.1': - resolution: {integrity: sha512-P6Wg856Ou/DLpR+O0ZLneNmrv7QpqBg+hK4wE05ijbC/t349BRfMfx+UFj5Ha3fCFopIa6iSZlpdaB4agkWp2Q==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.16.1': - resolution: {integrity: sha512-ttWB6ZCfRLuDIUiE0yiu5gcqOsYjA5F7kEV1ggHMj20FwLZ8A1FMeahZJFl/pnOmcnD2QL0z4AcDuo27utGU8A==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-android-arm64@4.17.1': - resolution: {integrity: sha512-piwZDjuW2WiHr05djVdUkrG5JbjnGbtx8BXQchYCMfib/nhjzWoiScelZ+s5IJI7lecrwSxHCzW026MWBL+oJQ==} + '@rollup/rollup-android-arm64@4.17.2': + resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.16.1': - resolution: {integrity: sha512-QLDvPLetbqjHojTGFw9+nuSP3YY/iz2k1cep6crYlr97sS+ZJ0W43b8Z0zC00+lnFZj6JSNxiA4DjboNQMuh1A==} + '@rollup/rollup-darwin-arm64@4.17.2': + resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-arm64@4.17.1': - resolution: {integrity: sha512-LsZXXIsN5Q460cKDT4Y+bzoPDhBmO5DTr7wP80d+2EnYlxSgkwdPfE3hbE+Fk8dtya+8092N9srjBTJ0di8RIA==} - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.16.1': - resolution: {integrity: sha512-TAUK/D8khRrRIa1KwRzo8JNKk3tcqaeXWdtsiLgA8zmACWwlWLjPCJ4DULGHQrMkeBjp1Cd3Yuwx04lZgFx5Vg==} - cpu: [x64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.17.1': - resolution: {integrity: sha512-S7TYNQpWXB9APkxu/SLmYHezWwCoZRA9QLgrDeml+SR2A1LLPD2DBUdUlvmCF7FUpRMKvbeeWky+iizQj65Etw==} + '@rollup/rollup-darwin-x64@4.17.2': + resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.16.1': - resolution: {integrity: sha512-KO+WGZjrh6zyFTD1alIFkfdtxf8B4BC+hqd3kBZHscPLvE5FR/6QKsyuCT0JlERxxYBSUKNUQ/UHyX5uwO1x2A==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-gnueabihf@4.17.1': - resolution: {integrity: sha512-Lq2JR5a5jsA5um2ZoLiXXEaOagnVyCpCW7xvlcqHC7y46tLwTEgUSTM3a2TfmmTMmdqv+jknUioWXlmxYxE9Yw==} + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': + resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.16.1': - resolution: {integrity: sha512-NqxbllzIB1WoAo4ThUXVtd21iiM5IHMTTXmXySKBLVcZvkU0HIZmatlP7hLzb5yQubcmdIeWmncd2NdsjocEiw==} + '@rollup/rollup-linux-arm-musleabihf@4.17.2': + resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.17.1': - resolution: {integrity: sha512-9BfzwyPNV0IizQoR+5HTNBGkh1KXE8BqU0DBkqMngmyFW7BfuIZyMjQ0s6igJEiPSBvT3ZcnIFohZ19OqjhDPg==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.16.1': - resolution: {integrity: sha512-snma5NvV8y7IECQ5rq0sr0f3UUu+92NVmG/913JXJMcXo84h9ak9TA5UI9Cl2XRM9j3m37QwDBtEYnJzRkSmxA==} - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.17.1': - resolution: {integrity: sha512-e2uWaoxo/rtzA52OifrTSXTvJhAXb0XeRkz4CdHBK2KtxrFmuU/uNd544Ogkpu938BzEfvmWs8NZ8Axhw33FDw==} - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-arm64-musl@4.16.1': - resolution: {integrity: sha512-KOvqGprlD84ueivhCi2flvcUwDRD20mAsE3vxQNVEI2Di9tnPGAfEu6UcrSPZbM+jG2w1oSr43hrPo0RNg6GGg==} + '@rollup/rollup-linux-arm64-gnu@4.17.2': + resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.17.1': - resolution: {integrity: sha512-ekggix/Bc/d/60H1Mi4YeYb/7dbal1kEDZ6sIFVAE8pUSx7PiWeEh+NWbL7bGu0X68BBIkgF3ibRJe1oFTksQQ==} + '@rollup/rollup-linux-arm64-musl@4.17.2': + resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.16.1': - resolution: {integrity: sha512-/gsNwtiGLqYwN4vP+EIdUC6Q6LTlpupWqokqIndvZcjn9ig/5P01WyaYCU2wvfL/2Z82jp5kX8c1mDBOvCP3zg==} - cpu: [ppc64] - os: [linux] - - '@rollup/rollup-linux-powerpc64le-gnu@4.17.1': - resolution: {integrity: sha512-UGV0dUo/xCv4pkr/C8KY7XLFwBNnvladt8q+VmdKrw/3RUd3rD0TptwjisvE2TTnnlENtuY4/PZuoOYRiGp8Gw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': + resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.16.1': - resolution: {integrity: sha512-uU8zuGkQfGqfD9w6VRJZI4IuG4JIfNxxJgEmLMAmPVHREKGsxFVfgHy5c6CexQF2vOfgjB33OsET3Vdn2lln9A==} + '@rollup/rollup-linux-riscv64-gnu@4.17.2': + resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.17.1': - resolution: {integrity: sha512-gEYmYYHaehdvX46mwXrU49vD6Euf1Bxhq9pPb82cbUU9UT2NV+RSckQ5tKWOnNXZixKsy8/cPGtiUWqzPuAcXQ==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.16.1': - resolution: {integrity: sha512-lsjLtDgtcGFEuBP6yrXwkRN5/wKlvUZtfbKZZu0yaoNpiBL4epgnO21osAALIspVRnl4qZgyLFd8xjCYYWgwfw==} - cpu: [s390x] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.17.1': - resolution: {integrity: sha512-xeae5pMAxHFp6yX5vajInG2toST5lsCTrckSRUFwNgzYqnUjNBcQyqk1bXUxX5yhjWFl2Mnz3F8vQjl+2FRIcw==} + '@rollup/rollup-linux-s390x-gnu@4.17.2': + resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.16.1': - resolution: {integrity: sha512-N2ZizKhUryqqrMfdCnjhJhZRgv61C6gK+hwVtCIKC8ts8J+go+vqENnGexwg21nHIOvLN5mBM8a7DI2vlyIOPg==} + '@rollup/rollup-linux-x64-gnu@4.17.2': + resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.17.1': - resolution: {integrity: sha512-AsdnINQoDWfKpBzCPqQWxSPdAWzSgnYbrJYtn6W0H2E9It5bZss99PiLA8CgmDRfvKygt20UpZ3xkhFlIfX9zQ==} + '@rollup/rollup-linux-x64-musl@4.17.2': + resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.16.1': - resolution: {integrity: sha512-5ICeMxqg66FrOA2AbnBQ2TJVxfvZsKLxmof0ibvPLaYtbsJqnTUtJOofgWb46Gjd4uZcA4rdsp4JCxegzQPqCg==} - cpu: [x64] - os: [linux] - - '@rollup/rollup-linux-x64-musl@4.17.1': - resolution: {integrity: sha512-KoB4fyKXTR+wYENkIG3fFF+5G6N4GFvzYx8Jax8BR4vmddtuqSb5oQmYu2Uu067vT/Fod7gxeQYKupm8gAcMSQ==} - cpu: [x64] - os: [linux] - - '@rollup/rollup-win32-arm64-msvc@4.16.1': - resolution: {integrity: sha512-1vIP6Ce02L+qWD7uZYRiFiuAJo3m9kARatWmFSnss0gZnVj2Id7OPUU9gm49JPGasgcR3xMqiH3fqBJ8t00yVg==} + '@rollup/rollup-win32-arm64-msvc@4.17.2': + resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-arm64-msvc@4.17.1': - resolution: {integrity: sha512-J0d3NVNf7wBL9t4blCNat+d0PYqAx8wOoY+/9Q5cujnafbX7BmtYk3XvzkqLmFECaWvXGLuHmKj/wrILUinmQg==} - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.16.1': - resolution: {integrity: sha512-Y3M92DcVsT6LoP+wrKpoUWPaazaP1fzbNkp0a0ZSj5Y//+pQVfVe/tQdsYQQy7dwXR30ZfALUIc9PCh9Izir6w==} - cpu: [ia32] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.17.1': - resolution: {integrity: sha512-xjgkWUwlq7IbgJSIxvl516FJ2iuC/7ttjsAxSPpC9kkI5iQQFHKyEN5BjbhvJ/IXIZ3yIBcW5QDlWAyrA+TFag==} + '@rollup/rollup-win32-ia32-msvc@4.17.2': + resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.16.1': - resolution: {integrity: sha512-x0fvpHMuF7fK5r8oZxSi8VYXkrVmRgubXpO/wcf15Lk3xZ4Jvvh5oG+u7Su1776A7XzVKZhD2eRc4t7H50gL3w==} - cpu: [x64] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.17.1': - resolution: {integrity: sha512-0QbCkfk6cnnVKWqqlC0cUrrUMDMfu5ffvYMTUHf+qMN2uAb3MKP31LPcwiMXBNsvoFGs/kYdFOsuLmvppCopXA==} + '@rollup/rollup-win32-x64-msvc@4.17.2': + resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==} cpu: [x64] os: [win32] @@ -2868,13 +2788,8 @@ packages: peerDependencies: rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 - rollup@4.16.1: - resolution: {integrity: sha512-5CaD3MPDlPKfhqzRvWXK96G6ELJfPZNb3LHiZxTHgDdC6jvwfGz2E8nY+9g1ONk4ttHsK1WaFP19Js4PSr1E3g==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - - rollup@4.17.1: - resolution: {integrity: sha512-0gG94inrUtg25sB2V/pApwiv1lUb0bQ25FPNuzO89Baa+B+c0ccaaBKM5zkZV/12pUUdH+lWCSm9wmHqyocuVQ==} + rollup@4.17.2: + resolution: {integrity: sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -3102,8 +3017,8 @@ packages: resolution: {integrity: sha512-bX655WZI/F7EoTDw9JvQURqAXiPHi8o8+yFxPF2lWYyz1aHnmMRuXWqL6YB6GmeO0o4DIYWHLgGNi/X64T+X4Q==} engines: {node: '>=14.18'} - terser@5.30.4: - resolution: {integrity: sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ==} + terser@5.31.0: + resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} engines: {node: '>=10'} hasBin: true @@ -3259,8 +3174,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@5.2.10: - resolution: {integrity: sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==} + vite@5.2.11: + resolution: {integrity: sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3571,11 +3486,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4))': + '@codspeed/vitest-plugin@3.1.0(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) + vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) transitivePeerDependencies: - debug @@ -3754,165 +3669,117 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-alias@5.1.0(rollup@4.17.1)': + '@rollup/plugin-alias@5.1.0(rollup@4.17.2)': dependencies: slash: 4.0.0 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-commonjs@25.0.7(rollup@4.17.1)': + '@rollup/plugin-commonjs@25.0.7(rollup@4.17.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-inject@5.0.5(rollup@4.17.1)': + '@rollup/plugin-inject@5.0.5(rollup@4.17.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) estree-walker: 2.0.2 magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-json@6.1.0(rollup@4.17.1)': + '@rollup/plugin-json@6.1.0(rollup@4.17.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-node-resolve@15.2.3(rollup@4.17.1)': + '@rollup/plugin-node-resolve@15.2.3(rollup@4.17.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-replace@5.0.4(rollup@4.17.1)': + '@rollup/plugin-replace@5.0.4(rollup@4.17.2)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/plugin-terser@0.4.4(rollup@4.17.1)': + '@rollup/plugin-terser@0.4.4(rollup@4.17.2)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 - terser: 5.30.4 + terser: 5.31.0 optionalDependencies: - rollup: 4.17.1 + rollup: 4.17.2 - '@rollup/pluginutils@5.1.0(rollup@4.17.1)': + '@rollup/pluginutils@5.1.0(rollup@4.17.2)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.17.1 - - '@rollup/rollup-android-arm-eabi@4.16.1': - optional: true - - '@rollup/rollup-android-arm-eabi@4.17.1': - optional: true - - '@rollup/rollup-android-arm64@4.16.1': - optional: true - - '@rollup/rollup-android-arm64@4.17.1': - optional: true - - '@rollup/rollup-darwin-arm64@4.16.1': - optional: true - - '@rollup/rollup-darwin-arm64@4.17.1': - optional: true - - '@rollup/rollup-darwin-x64@4.16.1': - optional: true - - '@rollup/rollup-darwin-x64@4.17.1': - optional: true - - '@rollup/rollup-linux-arm-gnueabihf@4.16.1': - optional: true - - '@rollup/rollup-linux-arm-gnueabihf@4.17.1': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.16.1': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.17.1': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.16.1': - optional: true + rollup: 4.17.2 - '@rollup/rollup-linux-arm64-gnu@4.17.1': + '@rollup/rollup-android-arm-eabi@4.17.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.16.1': + '@rollup/rollup-android-arm64@4.17.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.17.1': + '@rollup/rollup-darwin-arm64@4.17.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.16.1': + '@rollup/rollup-darwin-x64@4.17.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.17.1': + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.16.1': + '@rollup/rollup-linux-arm-musleabihf@4.17.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.17.1': + '@rollup/rollup-linux-arm64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.16.1': + '@rollup/rollup-linux-arm64-musl@4.17.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.17.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.16.1': + '@rollup/rollup-linux-riscv64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.17.1': + '@rollup/rollup-linux-s390x-gnu@4.17.2': optional: true - '@rollup/rollup-linux-x64-musl@4.16.1': + '@rollup/rollup-linux-x64-gnu@4.17.2': optional: true - '@rollup/rollup-linux-x64-musl@4.17.1': + '@rollup/rollup-linux-x64-musl@4.17.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.16.1': + '@rollup/rollup-win32-arm64-msvc@4.17.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.17.1': + '@rollup/rollup-win32-ia32-msvc@4.17.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.16.1': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.17.1': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.16.1': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.17.1': + '@rollup/rollup-win32-x64-msvc@4.17.2': optional: true '@sinclair/typebox@0.27.8': {} @@ -4069,12 +3936,12 @@ snapshots: '@typescript-eslint/types': 7.7.1 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.4(vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vue@packages+vue)': dependencies: - vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) vue: link:packages/vue - '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4))': + '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -4085,7 +3952,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -4724,12 +4591,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4)): + eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)): dependencies: '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) eslint: 9.1.1 optionalDependencies: - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4) + vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) transitivePeerDependencies: - supports-color - typescript @@ -5942,72 +5809,50 @@ snapshots: dependencies: glob: 10.3.12 - rollup-plugin-dts@6.1.0(rollup@4.17.1)(typescript@5.4.5): + rollup-plugin-dts@6.1.0(rollup@4.17.2)(typescript@5.4.5): dependencies: magic-string: 0.30.10 - rollup: 4.17.1 + rollup: 4.17.2 typescript: 5.4.5 optionalDependencies: '@babel/code-frame': 7.24.2 - rollup-plugin-esbuild@6.1.1(esbuild@0.20.2)(rollup@4.17.1): + rollup-plugin-esbuild@6.1.1(esbuild@0.20.2)(rollup@4.17.2): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.1) + '@rollup/pluginutils': 5.1.0(rollup@4.17.2) debug: 4.3.4 es-module-lexer: 1.5.0 esbuild: 0.20.2 get-tsconfig: 4.7.3 - rollup: 4.17.1 + rollup: 4.17.2 transitivePeerDependencies: - supports-color - rollup-plugin-polyfill-node@0.13.0(rollup@4.17.1): + rollup-plugin-polyfill-node@0.13.0(rollup@4.17.2): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.17.1) - rollup: 4.17.1 - - rollup@4.16.1: - dependencies: - '@types/estree': 1.0.5 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.16.1 - '@rollup/rollup-android-arm64': 4.16.1 - '@rollup/rollup-darwin-arm64': 4.16.1 - '@rollup/rollup-darwin-x64': 4.16.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.16.1 - '@rollup/rollup-linux-arm-musleabihf': 4.16.1 - '@rollup/rollup-linux-arm64-gnu': 4.16.1 - '@rollup/rollup-linux-arm64-musl': 4.16.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.16.1 - '@rollup/rollup-linux-riscv64-gnu': 4.16.1 - '@rollup/rollup-linux-s390x-gnu': 4.16.1 - '@rollup/rollup-linux-x64-gnu': 4.16.1 - '@rollup/rollup-linux-x64-musl': 4.16.1 - '@rollup/rollup-win32-arm64-msvc': 4.16.1 - '@rollup/rollup-win32-ia32-msvc': 4.16.1 - '@rollup/rollup-win32-x64-msvc': 4.16.1 - fsevents: 2.3.3 + '@rollup/plugin-inject': 5.0.5(rollup@4.17.2) + rollup: 4.17.2 - rollup@4.17.1: + rollup@4.17.2: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.17.1 - '@rollup/rollup-android-arm64': 4.17.1 - '@rollup/rollup-darwin-arm64': 4.17.1 - '@rollup/rollup-darwin-x64': 4.17.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.17.1 - '@rollup/rollup-linux-arm-musleabihf': 4.17.1 - '@rollup/rollup-linux-arm64-gnu': 4.17.1 - '@rollup/rollup-linux-arm64-musl': 4.17.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.17.1 - '@rollup/rollup-linux-riscv64-gnu': 4.17.1 - '@rollup/rollup-linux-s390x-gnu': 4.17.1 - '@rollup/rollup-linux-x64-gnu': 4.17.1 - '@rollup/rollup-linux-x64-musl': 4.17.1 - '@rollup/rollup-win32-arm64-msvc': 4.17.1 - '@rollup/rollup-win32-ia32-msvc': 4.17.1 - '@rollup/rollup-win32-x64-msvc': 4.17.1 + '@rollup/rollup-android-arm-eabi': 4.17.2 + '@rollup/rollup-android-arm64': 4.17.2 + '@rollup/rollup-darwin-arm64': 4.17.2 + '@rollup/rollup-darwin-x64': 4.17.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.17.2 + '@rollup/rollup-linux-arm-musleabihf': 4.17.2 + '@rollup/rollup-linux-arm64-gnu': 4.17.2 + '@rollup/rollup-linux-arm64-musl': 4.17.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.17.2 + '@rollup/rollup-linux-riscv64-gnu': 4.17.2 + '@rollup/rollup-linux-s390x-gnu': 4.17.2 + '@rollup/rollup-linux-x64-gnu': 4.17.2 + '@rollup/rollup-linux-x64-musl': 4.17.2 + '@rollup/rollup-win32-arm64-msvc': 4.17.2 + '@rollup/rollup-win32-ia32-msvc': 4.17.2 + '@rollup/rollup-win32-x64-msvc': 4.17.2 fsevents: 2.3.3 rrweb-cssom@0.6.0: {} @@ -6243,7 +6088,7 @@ snapshots: dependencies: temp-dir: 3.0.0 - terser@5.30.4: + terser@5.31.0: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.11.3 @@ -6374,13 +6219,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4): + vite-node@1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less @@ -6391,18 +6236,18 @@ snapshots: - supports-color - terser - vite@5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4): + vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 - rollup: 4.16.1 + rollup: 4.17.2 optionalDependencies: '@types/node': 20.12.10 fsevents: 2.3.3 sass: 1.76.0 - terser: 5.30.4 + terser: 5.31.0 - vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.30.4): + vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0): dependencies: '@vitest/expect': 1.5.2 '@vitest/runner': 1.5.2 @@ -6421,8 +6266,8 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.2.10(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) - vite-node: 1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.30.4) + vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + vite-node: 1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.12.10 From 481b1b6f38a00231ad38ea5a86758ffdd8cb04a0 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Tue, 7 May 2024 06:23:04 +0800 Subject: [PATCH 027/924] refactor(types): use explicit modifiers type (#10856) --- packages/dts-test/defineComponent.test-d.tsx | 2 +- .../runtime-dom/__tests__/directives/vOn.spec.ts | 2 +- packages/runtime-dom/src/directives/vOn.ts | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/dts-test/defineComponent.test-d.tsx b/packages/dts-test/defineComponent.test-d.tsx index 41646751b8b..d2a39be2621 100644 --- a/packages/dts-test/defineComponent.test-d.tsx +++ b/packages/dts-test/defineComponent.test-d.tsx @@ -1501,7 +1501,7 @@ describe('should work when props type is incompatible with setup returned type ' describe('withKeys and withModifiers as pro', () => { const onKeydown = withKeys(e => {}, ['']) - const onClick = withModifiers(e => {}, ['']) + const onClick = withModifiers(e => {}, []) ; }) diff --git a/packages/runtime-dom/__tests__/directives/vOn.spec.ts b/packages/runtime-dom/__tests__/directives/vOn.spec.ts index 03620f747e7..ef7ee346ba8 100644 --- a/packages/runtime-dom/__tests__/directives/vOn.spec.ts +++ b/packages/runtime-dom/__tests__/directives/vOn.spec.ts @@ -43,7 +43,7 @@ describe('runtime-dom: v-on directive', () => { }) test('it should support key modifiers and system modifiers', () => { - const keyNames = ['ctrl', 'shift', 'meta', 'alt'] + const keyNames = ['ctrl', 'shift', 'meta', 'alt'] as const keyNames.forEach(keyName => { const el = document.createElement('div') diff --git a/packages/runtime-dom/src/directives/vOn.ts b/packages/runtime-dom/src/directives/vOn.ts index 5a7d9e4af4a..fd4010868ce 100644 --- a/packages/runtime-dom/src/directives/vOn.ts +++ b/packages/runtime-dom/src/directives/vOn.ts @@ -10,9 +10,21 @@ import { hyphenate, isArray } from '@vue/shared' const systemModifiers = ['ctrl', 'shift', 'alt', 'meta'] type KeyedEvent = KeyboardEvent | MouseEvent | TouchEvent +type ModifierGuardsKeys = + | 'stop' + | 'prevent' + | 'self' + | 'ctrl' + | 'shift' + | 'alt' + | 'meta' + | 'left' + | 'middle' + | 'right' + | 'exact' const modifierGuards: Record< - string, + ModifierGuardsKeys, (e: Event, modifiers: string[]) => void | boolean > = { stop: e => e.stopPropagation(), @@ -36,7 +48,7 @@ export const withModifiers = < T extends (event: Event, ...args: unknown[]) => any, >( fn: T & { _withMods?: { [key: string]: T } }, - modifiers: string[], + modifiers: ModifierGuardsKeys[], ) => { const cache = fn._withMods || (fn._withMods = {}) const cacheKey = modifiers.join('.') From f2c1412e46a8fad3e13403bfa78335c4f704f21c Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 6 May 2024 15:38:16 -0700 Subject: [PATCH 028/924] fix(hydration): handle edge case of style mismatch without style attribute ref #10786 --- packages/runtime-core/__tests__/hydration.spec.ts | 7 +++++++ packages/runtime-core/src/hydration.ts | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index e0277622c13..ec9613c9571 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -1527,6 +1527,13 @@ describe('SSR hydration', () => { expect(`Hydration style mismatch`).toHaveBeenWarnedTimes(1) }) + test('style mismatch when no style attribute is present', () => { + mountWithHydration(`

`, () => + h('div', { style: { color: 'red' } }), + ) + expect(`Hydration style mismatch`).toHaveBeenWarnedTimes(1) + }) + test('style mismatch w/ v-show', () => { mountWithHydration(`
`, () => withDirectives(createVNode('div', { style: 'color: red' }, ''), [ diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index a7832ac3d57..dd3da56a624 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -727,8 +727,8 @@ function propHasMismatch( ): boolean { let mismatchType: string | undefined let mismatchKey: string | undefined - let actual: any - let expected: any + let actual: string | boolean | null | undefined + let expected: string | boolean | null | undefined if (key === 'class') { // classes might be in different order, but that doesn't affect cascade // so we just need to check if the class lists contain the same classes. @@ -739,7 +739,7 @@ function propHasMismatch( } } else if (key === 'style') { // style might be in different order, but that doesn't affect cascade - actual = el.getAttribute('style') + actual = el.getAttribute('style') || '' expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)) From 83661264a4ced3cb2ff6800904a86dd9e82bbfe2 Mon Sep 17 00:00:00 2001 From: Stanislav Lashmanov Date: Tue, 7 May 2024 03:05:55 +0400 Subject: [PATCH 029/924] fix(compat): include legacy scoped slots (#10868) close #8869 --- packages/runtime-core/src/compat/instance.ts | 12 ++---------- packages/vue-compat/__tests__/instance.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/runtime-core/src/compat/instance.ts b/packages/runtime-core/src/compat/instance.ts index d310de49ae6..18e745ca4e8 100644 --- a/packages/runtime-core/src/compat/instance.ts +++ b/packages/runtime-core/src/compat/instance.ts @@ -36,8 +36,7 @@ import { legacyresolveScopedSlots, } from './renderHelpers' import { resolveFilter } from '../helpers/resolveAssets' -import type { InternalSlots, Slots } from '../componentSlots' -import type { ContextualRenderFn } from '../componentRenderContext' +import type { Slots } from '../componentSlots' import { resolveMergedOptions } from '../componentOptions' export type LegacyPublicInstance = ComponentPublicInstance & @@ -106,14 +105,7 @@ export function installCompatInstanceProperties(map: PublicPropertiesMap) { $scopedSlots: i => { assertCompatEnabled(DeprecationTypes.INSTANCE_SCOPED_SLOTS, i) - const res: InternalSlots = {} - for (const key in i.slots) { - const fn = i.slots[key]! - if (!(fn as ContextualRenderFn)._ns /* non-scoped slot */) { - res[key] = fn - } - } - return res + return __DEV__ ? shallowReadonly(i.slots) : i.slots }, $on: i => on.bind(null, i), diff --git a/packages/vue-compat/__tests__/instance.spec.ts b/packages/vue-compat/__tests__/instance.spec.ts index 1feccabd8f8..75f1ea1334c 100644 --- a/packages/vue-compat/__tests__/instance.spec.ts +++ b/packages/vue-compat/__tests__/instance.spec.ts @@ -284,7 +284,7 @@ describe('INSTANCE_SCOPED_SLOTS', () => { ).toHaveBeenWarned() }) - test('should not include legacy slot usage in $scopedSlots', () => { + test('should include legacy slot usage in $scopedSlots', () => { let normalSlots: Slots let scopedSlots: Slots new Vue({ @@ -301,7 +301,7 @@ describe('INSTANCE_SCOPED_SLOTS', () => { }).$mount() expect('default' in normalSlots!).toBe(true) - expect('default' in scopedSlots!).toBe(false) + expect('default' in scopedSlots!).toBe(true) expect( deprecationData[DeprecationTypes.INSTANCE_SCOPED_SLOTS].message, From 10d34a5624775f20437ccad074a97270ef74c3fb Mon Sep 17 00:00:00 2001 From: Tycho Date: Tue, 7 May 2024 07:16:14 +0800 Subject: [PATCH 030/924] fix(compiler-sfc): handle keyof operator (#10874) close #10871 --- .../compileScript/resolveType.spec.ts | 36 ++++++++++++++++++ .../compiler-sfc/src/script/resolveType.ts | 38 +++++++++++++++++-- 2 files changed, 70 insertions(+), 4 deletions(-) diff --git a/packages/compiler-sfc/__tests__/compileScript/resolveType.spec.ts b/packages/compiler-sfc/__tests__/compileScript/resolveType.spec.ts index dc95a9dc643..98f5019a03d 100644 --- a/packages/compiler-sfc/__tests__/compileScript/resolveType.spec.ts +++ b/packages/compiler-sfc/__tests__/compileScript/resolveType.spec.ts @@ -447,6 +447,42 @@ describe('resolveType', () => { }) }) + test('keyof', () => { + const files = { + '/foo.ts': `export type IMP = { ${1}: 1 };`, + } + + const { props } = resolve( + ` + import { IMP } from './foo' + interface Foo { foo: 1, ${1}: 1 } + type Bar = { bar: 1 } + declare const obj: Bar + declare const set: Set + declare const arr: Array + + defineProps<{ + imp: keyof IMP, + foo: keyof Foo, + bar: keyof Bar, + obj: keyof typeof obj, + set: keyof typeof set, + arr: keyof typeof arr + }>() + `, + files, + ) + + expect(props).toStrictEqual({ + imp: ['Number'], + foo: ['String', 'Number'], + bar: ['String'], + obj: ['String'], + set: ['String'], + arr: ['String', 'Number'], + }) + }) + test('ExtractPropTypes (element-plus)', () => { const { props, raw } = resolve( ` diff --git a/packages/compiler-sfc/src/script/resolveType.ts b/packages/compiler-sfc/src/script/resolveType.ts index 54b207e7e91..bbed11baffe 100644 --- a/packages/compiler-sfc/src/script/resolveType.ts +++ b/packages/compiler-sfc/src/script/resolveType.ts @@ -1448,6 +1448,7 @@ export function inferRuntimeType( ctx: TypeResolveContext, node: Node & MaybeWithScope, scope = node._ownerScope || ctxToScope(ctx), + isKeyOf = false, ): string[] { try { switch (node.type) { @@ -1467,8 +1468,18 @@ export function inferRuntimeType( const types = new Set() const members = node.type === 'TSTypeLiteral' ? node.members : node.body.body + for (const m of members) { - if ( + if (isKeyOf) { + if ( + m.type === 'TSPropertySignature' && + m.key.type === 'NumericLiteral' + ) { + types.add('Number') + } else { + types.add('String') + } + } else if ( m.type === 'TSCallSignatureDeclaration' || m.type === 'TSConstructSignatureDeclaration' ) { @@ -1477,6 +1488,7 @@ export function inferRuntimeType( types.add('Object') } } + return types.size ? Array.from(types) : ['Object'] } case 'TSPropertySignature': @@ -1512,9 +1524,22 @@ export function inferRuntimeType( case 'TSTypeReference': { const resolved = resolveTypeReference(ctx, node, scope) if (resolved) { - return inferRuntimeType(ctx, resolved, resolved._ownerScope) + return inferRuntimeType(ctx, resolved, resolved._ownerScope, isKeyOf) } + if (node.typeName.type === 'Identifier') { + if (isKeyOf) { + switch (node.typeName.name) { + case 'String': + case 'Array': + case 'ArrayLike': + case 'ReadonlyArray': + return ['String', 'Number'] + default: + return ['String'] + } + } + switch (node.typeName.name) { case 'Array': case 'Function': @@ -1634,7 +1659,7 @@ export function inferRuntimeType( // typeof only support identifier in local scope const matched = scope.declares[id.name] if (matched) { - return inferRuntimeType(ctx, matched, matched._ownerScope) + return inferRuntimeType(ctx, matched, matched._ownerScope, isKeyOf) } } break @@ -1642,7 +1667,12 @@ export function inferRuntimeType( // e.g. readonly case 'TSTypeOperator': { - return inferRuntimeType(ctx, node.typeAnnotation, scope) + return inferRuntimeType( + ctx, + node.typeAnnotation, + scope, + node.operator === 'keyof', + ) } } } catch (e) { From 461946175df95932986cbd7b07bb9598ab3318cd Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 6 May 2024 16:59:48 -0700 Subject: [PATCH 031/924] release: v3.4.27 --- CHANGELOG.md | 13 +++++++++++++ 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, 25 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18dd7b23719..a390f9b0c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [3.4.27](https://github.com/vuejs/core/compare/v3.4.26...v3.4.27) (2024-05-06) + + +### Bug Fixes + +* **compat:** include legacy scoped slots ([#10868](https://github.com/vuejs/core/issues/10868)) ([8366126](https://github.com/vuejs/core/commit/83661264a4ced3cb2ff6800904a86dd9e82bbfe2)), closes [#8869](https://github.com/vuejs/core/issues/8869) +* **compiler-core:** add support for arrow aysnc function with unbracketed ([#5789](https://github.com/vuejs/core/issues/5789)) ([ca7d421](https://github.com/vuejs/core/commit/ca7d421e8775f6813f8943d32ab485e0c542f98b)), closes [#5788](https://github.com/vuejs/core/issues/5788) +* **compiler-dom:** restrict createStaticVNode usage with option elements ([#10846](https://github.com/vuejs/core/issues/10846)) ([0e3d617](https://github.com/vuejs/core/commit/0e3d6178b02d0386d779720ae2cc4eac1d1ec990)), closes [#6568](https://github.com/vuejs/core/issues/6568) [#7434](https://github.com/vuejs/core/issues/7434) +* **compiler-sfc:** handle keyof operator ([#10874](https://github.com/vuejs/core/issues/10874)) ([10d34a5](https://github.com/vuejs/core/commit/10d34a5624775f20437ccad074a97270ef74c3fb)), closes [#10871](https://github.com/vuejs/core/issues/10871) +* **hydration:** handle edge case of style mismatch without style attribute ([f2c1412](https://github.com/vuejs/core/commit/f2c1412e46a8fad3e13403bfa78335c4f704f21c)), closes [#10786](https://github.com/vuejs/core/issues/10786) + + + ## [3.4.26](https://github.com/vuejs/core/compare/v3.4.25...v3.4.26) (2024-04-29) diff --git a/package.json b/package.json index a867849c70f..bdd4c19c1f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.4.26", + "version": "3.4.27", "packageManager": "pnpm@9.1.0", "type": "module", "scripts": { diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 75654939cf9..d339bd5c79a 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.4.26", + "version": "3.4.27", "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 99115f4251b..e66817d4519 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.4.26", + "version": "3.4.27", "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 266785e16fb..06da96c7931 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.4.26", + "version": "3.4.27", "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 f6b1ae1a645..3289301a98b 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.4.26", + "version": "3.4.27", "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 42be73ff3de..99e9c03a1c3 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.4.26", + "version": "3.4.27", "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 c90ab698295..8c32732706b 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.4.26", + "version": "3.4.27", "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 1b8668ccd56..adf598a23a7 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.4.26", + "version": "3.4.27", "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 d1a41a7d83b..7e6c4f3252e 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.4.26", + "version": "3.4.27", "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 609e3f2729c..d0358a2b1fc 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.4.26", + "version": "3.4.27", "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 7d01559e705..899bc5f625c 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.4.26", + "version": "3.4.27", "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 76ede116221..5fe392443c9 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.4.26", + "version": "3.4.27", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", From b2b5f57c2c945edd0eebc1b545ec1b7568e51484 Mon Sep 17 00:00:00 2001 From: edison Date: Thu, 9 May 2024 07:43:17 +0800 Subject: [PATCH 032/924] fix(compile-sfc): register props destructure rest id as setup bindings (#10888) close #10885 --- .../definePropsDestructure.spec.ts.snap | 16 ++++++++++++++ .../definePropsDestructure.spec.ts | 21 +++++++++++++++++++ packages/compiler-sfc/src/compileScript.ts | 8 ++++++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/packages/compiler-sfc/__tests__/compileScript/__snapshots__/definePropsDestructure.spec.ts.snap b/packages/compiler-sfc/__tests__/compileScript/__snapshots__/definePropsDestructure.spec.ts.snap index 8b5325cc3c5..7bf0597cc39 100644 --- a/packages/compiler-sfc/__tests__/compileScript/__snapshots__/definePropsDestructure.spec.ts.snap +++ b/packages/compiler-sfc/__tests__/compileScript/__snapshots__/definePropsDestructure.spec.ts.snap @@ -304,3 +304,19 @@ return () => {} }" `; + +exports[`sfc reactive props destructure > rest spread non-inline 1`] = ` +"import { createPropsRestProxy as _createPropsRestProxy } from 'vue' + +export default { + props: ['foo', 'bar'], + setup(__props, { expose: __expose }) { + __expose(); + + const rest = _createPropsRestProxy(__props, ["foo"]) + +return { rest } +} + +}" +`; diff --git a/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts b/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts index 3843ef92190..ecc7a09d011 100644 --- a/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts +++ b/packages/compiler-sfc/__tests__/compileScript/definePropsDestructure.spec.ts @@ -265,6 +265,27 @@ describe('sfc reactive props destructure', () => { }) }) + test('rest spread non-inline', () => { + const { content, bindings } = compile( + ` + + + `, + { inlineTemplate: false }, + ) + expect(content).toMatch( + `const rest = _createPropsRestProxy(__props, ["foo"])`, + ) + assertCode(content) + expect(bindings).toStrictEqual({ + foo: BindingTypes.PROPS, + bar: BindingTypes.PROPS, + rest: BindingTypes.SETUP_REACTIVE_CONST, + }) + }) + // #6960 test('computed static key', () => { const { content, bindings } = compile(` diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index d4131d5c61d..31bee3af74d 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -523,8 +523,14 @@ export function compileScript( ) } - // defineProps / defineEmits + // defineProps const isDefineProps = processDefineProps(ctx, init, decl.id) + if (ctx.propsDestructureRestId) { + setupBindings[ctx.propsDestructureRestId] = + BindingTypes.SETUP_REACTIVE_CONST + } + + // defineEmits const isDefineEmits = !isDefineProps && processDefineEmits(ctx, init, decl.id) !isDefineEmits && From 7cb3db6faf103557f1887033c47574f63066e351 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:09:13 +0800 Subject: [PATCH 033/924] chore(deps): update all non-major dependencies (#10923) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 10 +-- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 127 +++++++++++++++-------------- 3 files changed, 73 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index bdd4c19c1f3..16d9996c68a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.4.27", - "packageManager": "pnpm@9.1.0", + "packageManager": "pnpm@9.1.1", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -70,7 +70,7 @@ "@rollup/plugin-terser": "^0.4.4", "@types/hash-sum": "^1.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.12.10", + "@types/node": "^20.12.11", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.5.2", "@vue/consolidate": "1.0.0", @@ -96,18 +96,18 @@ "pretty-bytes": "^6.1.1", "pug": "^3.0.2", "puppeteer": "~22.7.1", - "rimraf": "^5.0.5", + "rimraf": "^5.0.7", "rollup": "^4.17.2", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-esbuild": "^6.1.1", "rollup-plugin-polyfill-node": "^0.13.0", - "semver": "^7.6.0", + "semver": "^7.6.2", "serve": "^14.2.3", "simple-git-hooks": "^2.11.1", "terser": "^5.31.0", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^4.9.3", + "tsx": "^4.10.1", "typescript": "~5.4.5", "typescript-eslint": "^7.7.1", "vite": "^5.2.11", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 06da96c7931..d818319b935 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.0.16", "pug": "^3.0.2", - "sass": "^1.76.0" + "sass": "^1.77.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ff860408a5..864e89927cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 7.24.0 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) + version: 3.1.0(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.17.2) @@ -42,14 +42,14 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@types/node': - specifier: ^20.12.10 - version: 20.12.10 + specifier: ^20.12.11 + version: 20.12.11 '@types/semver': specifier: ^7.5.8 version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.5.2 - version: 1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) + version: 1.5.2(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -73,7 +73,7 @@ importers: version: 0.5.0(eslint@9.1.1)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)) + version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -120,8 +120,8 @@ importers: specifier: ~22.7.1 version: 22.7.1(typescript@5.4.5) rimraf: - specifier: ^5.0.5 - version: 5.0.5 + specifier: ^5.0.7 + version: 5.0.7 rollup: specifier: ^4.17.2 version: 4.17.2 @@ -135,8 +135,8 @@ importers: specifier: ^0.13.0 version: 0.13.0(rollup@4.17.2) semver: - specifier: ^7.6.0 - version: 7.6.0 + specifier: ^7.6.2 + version: 7.6.2 serve: specifier: ^14.2.3 version: 14.2.3 @@ -153,8 +153,8 @@ importers: specifier: ^2.6.2 version: 2.6.2 tsx: - specifier: ^4.9.3 - version: 4.9.3 + specifier: ^4.10.1 + version: 4.10.1 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -163,10 +163,10 @@ importers: version: 7.7.1(eslint@9.1.1)(typescript@5.4.5) vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + version: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) vitest: specifier: ^1.5.2 - version: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) + version: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) packages/compiler-core: dependencies: @@ -257,8 +257,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 sass: - specifier: ^1.76.0 - version: 1.76.0 + specifier: ^1.77.1 + version: 1.77.1 packages/compiler-ssr: dependencies: @@ -355,10 +355,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vue@packages+vue) + version: 5.0.4(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vue@packages+vue) vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + version: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) packages/shared: {} @@ -915,8 +915,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@20.12.10': - resolution: {integrity: sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw==} + '@types/node@20.12.11': + resolution: {integrity: sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -2764,9 +2764,9 @@ packages: rfdc@1.3.1: resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} - rimraf@5.0.5: - resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} - engines: {node: '>=14'} + rimraf@5.0.7: + resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} + engines: {node: '>=14.18'} hasBin: true rollup-plugin-dts@6.1.0: @@ -2808,8 +2808,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.76.0: - resolution: {integrity: sha512-nc3LeqvF2FNW5xGF1zxZifdW3ffIz5aBb7I7tSvOoNu7z1RQ6pFt9MBuiPtjgaI62YWrM/txjWlOCFiGtf2xpw==} + sass@1.77.1: + resolution: {integrity: sha512-OMEyfirt9XEfyvocduUIOlUSkWOXS/LAt6oblR/ISXCTukyavjex+zQNm51pPCOiFKY1QpWvEH1EeCkgyV3I6w==} engines: {node: '>=14.0.0'} hasBin: true @@ -2826,6 +2826,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -3079,8 +3084,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsx@4.9.3: - resolution: {integrity: sha512-czVbetlILiyJZI5zGlj2kw9vFiSeyra9liPD4nG+Thh4pKTi0AmMEQ8zdV/L2xbIVKrIqif4sUNrsMAOksx9Zg==} + tsx@4.10.1: + resolution: {integrity: sha512-G+CcyTOopwhuI81FU+KpzGN5UBhHgGEDlGt8mHAXKxv8pDGr6WI7hI7aRjTRol5WzFVsSNuzl3ekCZ0eLIJlEQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -3486,11 +3491,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0))': + '@codspeed/vitest-plugin@3.1.0(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) transitivePeerDependencies: - debug @@ -3794,7 +3799,7 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@20.12.10': + '@types/node@20.12.11': dependencies: undici-types: 5.26.5 @@ -3806,7 +3811,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.12.10 + '@types/node': 20.12.11 optional: true '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5)': @@ -3822,7 +3827,7 @@ snapshots: graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.6.0 + semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -3876,7 +3881,7 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 - semver: 7.6.0 + semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -3891,7 +3896,7 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.4 - semver: 7.6.0 + semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -3907,7 +3912,7 @@ snapshots: '@typescript-eslint/types': 7.7.0 '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) eslint: 9.1.1 - semver: 7.6.0 + semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript @@ -3921,7 +3926,7 @@ snapshots: '@typescript-eslint/types': 7.7.1 '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) eslint: 9.1.1 - semver: 7.6.0 + semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript @@ -3936,12 +3941,12 @@ snapshots: '@typescript-eslint/types': 7.7.1 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vue@packages+vue)': dependencies: - vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) vue: link:packages/vue - '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0))': + '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -3952,7 +3957,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -4369,7 +4374,7 @@ snapshots: handlebars: 4.7.8 json-stringify-safe: 5.0.1 meow: 12.1.1 - semver: 7.6.0 + semver: 7.6.2 split2: 4.2.0 conventional-changelog@5.1.0: @@ -4586,17 +4591,17 @@ snapshots: get-tsconfig: 4.7.3 is-glob: 4.0.3 minimatch: 9.0.4 - semver: 7.6.0 + semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0)): + eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)): dependencies: '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) eslint: 9.1.1 optionalDependencies: - vitest: 1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) transitivePeerDependencies: - supports-color - typescript @@ -4842,7 +4847,7 @@ snapshots: git-semver-tags@7.0.1: dependencies: meow: 12.1.1 - semver: 7.6.0 + semver: 7.6.2 glob-parent@5.1.2: dependencies: @@ -5078,7 +5083,7 @@ snapshots: '@babel/parser': 7.24.4 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 - semver: 7.6.0 + semver: 7.6.2 transitivePeerDependencies: - supports-color @@ -5289,7 +5294,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.6.0 + semver: 7.6.2 markdown-table@3.0.3: {} @@ -5379,7 +5384,7 @@ snapshots: dependencies: hosted-git-info: 7.0.1 is-core-module: 2.13.1 - semver: 7.6.0 + semver: 7.6.2 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -5805,7 +5810,7 @@ snapshots: rfdc@1.3.1: {} - rimraf@5.0.5: + rimraf@5.0.7: dependencies: glob: 10.3.12 @@ -5867,7 +5872,7 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.76.0: + sass@1.77.1: dependencies: chokidar: 3.6.0 immutable: 4.3.5 @@ -5883,6 +5888,8 @@ snapshots: dependencies: lru-cache: 6.0.0 + semver@7.6.2: {} + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 @@ -6140,7 +6147,7 @@ snapshots: tslib@2.6.2: {} - tsx@4.9.3: + tsx@4.10.1: dependencies: esbuild: 0.20.2 get-tsconfig: 4.7.3 @@ -6219,13 +6226,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0): + vite-node@1.5.2(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less @@ -6236,18 +6243,18 @@ snapshots: - supports-color - terser - vite@5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0): + vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.17.2 optionalDependencies: - '@types/node': 20.12.10 + '@types/node': 20.12.11 fsevents: 2.3.3 - sass: 1.76.0 + sass: 1.77.1 terser: 5.31.0 - vitest@1.5.2(@types/node@20.12.10)(jsdom@24.0.0)(sass@1.76.0)(terser@5.31.0): + vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0): dependencies: '@vitest/expect': 1.5.2 '@vitest/runner': 1.5.2 @@ -6266,11 +6273,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.2.11(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) - vite-node: 1.5.2(@types/node@20.12.10)(sass@1.76.0)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + vite-node: 1.5.2(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.12.10 + '@types/node': 20.12.11 jsdom: 24.0.0 transitivePeerDependencies: - less From 7cef876afad5d4094066ad4ff67c08d32d87128e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:10:34 +0800 Subject: [PATCH 034/924] fix(deps): update compiler to ^7.24.5 (#10924) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- packages/compiler-core/package.json | 4 +- packages/compiler-sfc/package.json | 4 +- packages/vue-compat/package.json | 2 +- pnpm-lock.yaml | 92 +++++++++++++++-------------- 5 files changed, 56 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 16d9996c68a..65665261392 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,8 @@ "node": ">=18.12.0" }, "devDependencies": { - "@babel/parser": "^7.24.4", - "@babel/types": "^7.24.0", + "@babel/parser": "^7.24.5", + "@babel/types": "^7.24.5", "@codspeed/vitest-plugin": "^3.1.0", "@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-commonjs": "^25.0.7", diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index d339bd5c79a..bc5849b437b 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -46,13 +46,13 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", "dependencies": { - "@babel/parser": "^7.24.4", + "@babel/parser": "^7.24.5", "@vue/shared": "workspace:*", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" }, "devDependencies": { - "@babel/types": "^7.24.0" + "@babel/types": "^7.24.5" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index d818319b935..f8d2272efd1 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", "dependencies": { - "@babel/parser": "^7.24.4", + "@babel/parser": "^7.24.5", "@vue/compiler-core": "workspace:*", "@vue/compiler-dom": "workspace:*", "@vue/compiler-ssr": "workspace:*", @@ -53,7 +53,7 @@ "source-map-js": "^1.2.0" }, "devDependencies": { - "@babel/types": "^7.24.0", + "@babel/types": "^7.24.5", "@vue/consolidate": "^1.0.0", "hash-sum": "^2.0.0", "lru-cache": "10.1.0", diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index 899bc5f625c..c9c7466f8ac 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -52,7 +52,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/vue-compat#readme", "dependencies": { - "@babel/parser": "^7.24.4", + "@babel/parser": "^7.24.5", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 864e89927cc..9fc91eb2cac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: devDependencies: '@babel/parser': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@babel/types': - specifier: ^7.24.0 - version: 7.24.0 + specifier: ^7.24.5 + version: 7.24.5 '@codspeed/vitest-plugin': specifier: ^3.1.0 version: 3.1.0(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) @@ -171,8 +171,8 @@ importers: packages/compiler-core: dependencies: '@babel/parser': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@vue/shared': specifier: workspace:* version: link:../shared @@ -187,8 +187,8 @@ importers: version: 1.2.0 devDependencies: '@babel/types': - specifier: ^7.24.0 - version: 7.24.0 + specifier: ^7.24.5 + version: 7.24.5 packages/compiler-dom: dependencies: @@ -202,8 +202,8 @@ importers: packages/compiler-sfc: dependencies: '@babel/parser': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 '@vue/compiler-core': specifier: workspace:* version: link:../compiler-core @@ -230,8 +230,8 @@ importers: version: 1.2.0 devDependencies: '@babel/types': - specifier: ^7.24.0 - version: 7.24.0 + specifier: ^7.24.5 + version: 7.24.5 '@vue/consolidate': specifier: ^1.0.0 version: 1.0.0 @@ -395,8 +395,8 @@ importers: packages/vue-compat: dependencies: '@babel/parser': - specifier: ^7.24.4 - version: 7.24.4 + specifier: ^7.24.5 + version: 7.24.5 estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -475,6 +475,10 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.5': + resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} @@ -487,8 +491,8 @@ packages: resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.4': - resolution: {integrity: sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==} + '@babel/parser@7.24.5': + resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} engines: {node: '>=6.0.0'} hasBin: true @@ -500,8 +504,8 @@ packages: resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.0': - resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} + '@babel/types@7.24.5': + resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} engines: {node: '>=6.9.0'} '@codspeed/core@3.1.0': @@ -3371,10 +3375,10 @@ snapshots: '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helpers': 7.24.4 - '@babel/parser': 7.24.4 + '@babel/parser': 7.24.5 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 convert-source-map: 2.0.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -3385,7 +3389,7 @@ snapshots: '@babel/generator@7.24.4': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -3403,15 +3407,15 @@ snapshots: '@babel/helper-function-name@7.23.0': dependencies: '@babel/template': 7.24.0 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/helper-hoist-variables@7.22.5': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/helper-module-imports@7.24.3': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4)': dependencies: @@ -3424,23 +3428,25 @@ snapshots: '@babel/helper-simple-access@7.22.5': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/helper-split-export-declaration@7.22.6': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/helper-string-parser@7.24.1': {} '@babel/helper-validator-identifier@7.22.20': {} + '@babel/helper-validator-identifier@7.24.5': {} + '@babel/helper-validator-option@7.23.5': {} '@babel/helpers@7.24.4': dependencies: '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 transitivePeerDependencies: - supports-color @@ -3451,15 +3457,15 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.0 - '@babel/parser@7.24.4': + '@babel/parser@7.24.5': dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 '@babel/template@7.24.0': dependencies: '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 '@babel/traverse@7.24.1': dependencies: @@ -3469,17 +3475,17 @@ snapshots: '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.0': + '@babel/types@7.24.5': dependencies: '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 to-fast-properties: 2.0.0 '@codspeed/core@3.1.0': @@ -4101,7 +4107,7 @@ snapshots: babel-walk@3.0.0-canary-5: dependencies: - '@babel/types': 7.24.0 + '@babel/types': 7.24.5 balanced-match@1.0.2: {} @@ -4317,8 +4323,8 @@ snapshots: constantinople@4.0.1: dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 content-disposition@0.5.2: {} @@ -5080,7 +5086,7 @@ snapshots: istanbul-lib-instrument@6.0.2: dependencies: '@babel/core': 7.24.4 - '@babel/parser': 7.24.4 + '@babel/parser': 7.24.5 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.2 @@ -5288,8 +5294,8 @@ snapshots: magicast@0.3.4: dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 source-map-js: 1.2.0 make-dir@4.0.0: @@ -6322,8 +6328,8 @@ snapshots: with@7.0.2: dependencies: - '@babel/parser': 7.24.4 - '@babel/types': 7.24.0 + '@babel/parser': 7.24.5 + '@babel/types': 7.24.5 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 From 2f8cd664f7db4a46af726a46bb29e309021eadfa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 17:13:46 +0800 Subject: [PATCH 035/924] chore(deps): update lint (#10926) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 184 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 128 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 65665261392..7f91c550a4e 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "enquirer": "^2.4.1", "esbuild": "^0.20.2", "esbuild-plugin-polyfill-node": "^0.3.0", - "eslint": "^9.1.1", + "eslint": "^9.2.0", "eslint-plugin-import-x": "^0.5.0", "eslint-plugin-vitest": "^0.5.4", "estree-walker": "^2.0.2", @@ -109,7 +109,7 @@ "tslib": "^2.6.2", "tsx": "^4.10.1", "typescript": "~5.4.5", - "typescript-eslint": "^7.7.1", + "typescript-eslint": "^7.8.0", "vite": "^5.2.11", "vitest": "^1.5.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9fc91eb2cac..57fdd2ab98a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,14 +66,14 @@ importers: specifier: ^0.3.0 version: 0.3.0(esbuild@0.20.2) eslint: - specifier: ^9.1.1 - version: 9.1.1 + specifier: ^9.2.0 + version: 9.2.0 eslint-plugin-import-x: specifier: ^0.5.0 - version: 0.5.0(eslint@9.1.1)(typescript@5.4.5) + version: 0.5.0(eslint@9.2.0)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) + version: 0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -159,8 +159,8 @@ importers: specifier: ~5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.7.1 - version: 7.7.1(eslint@9.1.1)(typescript@5.4.5) + specifier: ^7.8.0 + version: 7.8.0(eslint@9.2.0)(typescript@5.4.5) vite: specifier: ^5.2.11 version: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) @@ -669,8 +669,8 @@ packages: resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.1.1': - resolution: {integrity: sha512-5WoDz3Y19Bg2BnErkZTp0en+c/i9PvgFS7MBe1+m60HjFr0hrphlAGp4yzI7pxpt4xShln4ZyYp4neJm8hmOkQ==} + '@eslint/js@9.2.0': + resolution: {integrity: sha512-ESiIudvhoYni+MdsI8oD7skpprZ89qKocwRM2KEvhhBJ9nl5MRh7BXU5GTod7Mdygq+AUl+QzId6iWJKR/wABA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/config-array@0.13.0': @@ -934,8 +934,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@7.7.1': - resolution: {integrity: sha512-KwfdWXJBOviaBVhxO3p5TJiLpNuh2iyXyjmWN0f1nU87pwyvfS0EmjC6ukQVYVFJd/K1+0NWGPDXiyEyQorn0Q==} + '@typescript-eslint/eslint-plugin@7.8.0': + resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -945,8 +945,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.7.1': - resolution: {integrity: sha512-vmPzBOOtz48F6JAGVS/kZYk4EkXao6iGrD838sp1w3NQQC0W8ry/q641KU4PrG7AKNAf56NOcR8GOpH8l9FPCw==} + '@typescript-eslint/parser@7.8.0': + resolution: {integrity: sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -963,8 +963,12 @@ packages: resolution: {integrity: sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.7.1': - resolution: {integrity: sha512-ZksJLW3WF7o75zaBPScdW1Gbkwhd/lyeXGf1kQCxJaOeITscoSl0MjynVvCzuV5boUz/3fOI06Lz8La55mu29Q==} + '@typescript-eslint/scope-manager@7.8.0': + resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@7.8.0': + resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -981,6 +985,10 @@ packages: resolution: {integrity: sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@7.8.0': + resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@7.7.0': resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} engines: {node: ^18.18.0 || >=20.0.0} @@ -999,6 +1007,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@7.8.0': + resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@7.7.0': resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1011,6 +1028,12 @@ packages: peerDependencies: eslint: ^8.56.0 + '@typescript-eslint/utils@7.8.0': + resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + '@typescript-eslint/visitor-keys@7.7.0': resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1019,6 +1042,10 @@ packages: resolution: {integrity: sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@7.8.0': + resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} + engines: {node: ^18.18.0 || >=20.0.0} + '@vitejs/plugin-vue@5.0.4': resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -1660,8 +1687,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.1.1: - resolution: {integrity: sha512-b4cRQ0BeZcSEzPpY2PjFY70VbO32K7BStTGtBsnIGdTSEEQzBi8hPBcGQmTG2zUvFr9uLe0TK42bw8YszuHEqg==} + eslint@9.2.0: + resolution: {integrity: sha512-0n/I88vZpCOzO+PQpt0lbsqmn9AsnsJAQseIqhZFI8ibQT0U1AkEKRxA3EVMos0BoHSXDQvCXY25TUjB5tr8Og==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -3113,8 +3140,8 @@ packages: resolution: {integrity: sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==} engines: {node: '>=16'} - typescript-eslint@7.7.1: - resolution: {integrity: sha512-ykEBfa3xx3odjZy6GRED4SCPrjo0rgHwstLlEgLX4EMEuv7QeIDSmfV+S6Kk+XkbsYn4BDEcPvsci1X26lRpMQ==} + typescript-eslint@7.8.0: + resolution: {integrity: sha512-sheFG+/D8N/L7gC3WT0Q8sB97Nm573Yfr+vZFzl/4nBdYcmviBPtwGSX9TJ7wpVg28ocerKVOt+k2eGmHzcgVA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -3574,9 +3601,9 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.1.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.2.0)': dependencies: - eslint: 9.1.1 + eslint: 9.2.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} @@ -3595,7 +3622,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.1.1': {} + '@eslint/js@9.2.0': {} '@humanwhocodes/config-array@0.13.0': dependencies: @@ -3820,16 +3847,16 @@ snapshots: '@types/node': 20.12.11 optional: true - '@typescript-eslint/eslint-plugin@7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5))(eslint@9.2.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/type-utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.1 + '@typescript-eslint/parser': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/type-utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4 - eslint: 9.1.1 + eslint: 9.2.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -3840,14 +3867,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5)': + '@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.7.1 + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.8.0 debug: 4.3.4 - eslint: 9.1.1 + eslint: 9.2.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -3863,12 +3890,17 @@ snapshots: '@typescript-eslint/types': 7.7.1 '@typescript-eslint/visitor-keys': 7.7.1 - '@typescript-eslint/type-utils@7.7.1(eslint@9.1.1)(typescript@5.4.5)': + '@typescript-eslint/scope-manager@7.8.0': dependencies: - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 + + '@typescript-eslint/type-utils@7.8.0(eslint@9.2.0)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) debug: 4.3.4 - eslint: 9.1.1 + eslint: 9.2.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 @@ -3879,6 +3911,8 @@ snapshots: '@typescript-eslint/types@7.7.1': {} + '@typescript-eslint/types@7.8.0': {} + '@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.7.0 @@ -3909,29 +3943,58 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.7.0(eslint@9.1.1)(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/visitor-keys': 7.8.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@7.7.0(eslint@9.2.0)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.7.0 '@typescript-eslint/types': 7.7.0 '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - eslint: 9.1.1 + eslint: 9.2.0 semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.7.1(eslint@9.1.1)(typescript@5.4.5)': + '@typescript-eslint/utils@7.7.1(eslint@9.2.0)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.7.1 '@typescript-eslint/types': 7.7.1 '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - eslint: 9.1.1 + eslint: 9.2.0 + semver: 7.6.2 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@7.8.0(eslint@9.2.0)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.8.0 + '@typescript-eslint/types': 7.8.0 + '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) + eslint: 9.2.0 semver: 7.6.2 transitivePeerDependencies: - supports-color @@ -3947,6 +4010,11 @@ snapshots: '@typescript-eslint/types': 7.7.1 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.8.0': + dependencies: + '@typescript-eslint/types': 7.8.0 + eslint-visitor-keys: 3.4.3 + '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vue@packages+vue)': dependencies: vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) @@ -4587,12 +4655,12 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@0.5.0(eslint@9.1.1)(typescript@5.4.5): + eslint-plugin-import-x@0.5.0(eslint@9.2.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/utils': 7.7.0(eslint@9.1.1)(typescript@5.4.5) + '@typescript-eslint/utils': 7.7.0(eslint@9.2.0)(typescript@5.4.5) debug: 4.3.4 doctrine: 3.0.0 - eslint: 9.1.1 + eslint: 9.2.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.3 is-glob: 4.0.3 @@ -4602,10 +4670,10 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.1.1)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)): + eslint-plugin-vitest@0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)): dependencies: - '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - eslint: 9.1.1 + '@typescript-eslint/utils': 7.7.1(eslint@9.2.0)(typescript@5.4.5) + eslint: 9.2.0 optionalDependencies: vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) transitivePeerDependencies: @@ -4621,12 +4689,12 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.1.1: + eslint@9.2.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.1.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 3.0.2 - '@eslint/js': 9.1.1 + '@eslint/js': 9.2.0 '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.2.3 @@ -6172,12 +6240,12 @@ snapshots: type-fest@4.15.0: {} - typescript-eslint@7.7.1(eslint@9.1.1)(typescript@5.4.5): + typescript-eslint@7.8.0(eslint@9.2.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.7.1(@typescript-eslint/parser@7.7.1(eslint@9.1.1)(typescript@5.4.5))(eslint@9.1.1)(typescript@5.4.5) - '@typescript-eslint/parser': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - '@typescript-eslint/utils': 7.7.1(eslint@9.1.1)(typescript@5.4.5) - eslint: 9.1.1 + '@typescript-eslint/eslint-plugin': 7.8.0(@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5))(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + eslint: 9.2.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: From 107e6143e716986269fc7c1d96733cb59dfadc53 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 23:34:53 +0800 Subject: [PATCH 036/924] chore(deps): update dependency esbuild to ^0.21.2 (#10925) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 254 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 247 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7f91c550a4e..56dcb635ccc 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@vue/consolidate": "1.0.0", "conventional-changelog-cli": "^4.1.0", "enquirer": "^2.4.1", - "esbuild": "^0.20.2", + "esbuild": "^0.21.2", "esbuild-plugin-polyfill-node": "^0.3.0", "eslint": "^9.2.0", "eslint-plugin-import-x": "^0.5.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57fdd2ab98a..c498fb90eea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,11 +60,11 @@ importers: specifier: ^2.4.1 version: 2.4.1 esbuild: - specifier: ^0.20.2 - version: 0.20.2 + specifier: ^0.21.2 + version: 0.21.2 esbuild-plugin-polyfill-node: specifier: ^0.3.0 - version: 0.3.0(esbuild@0.20.2) + version: 0.3.0(esbuild@0.21.2) eslint: specifier: ^9.2.0 version: 9.2.0 @@ -130,7 +130,7 @@ importers: version: 6.1.0(rollup@4.17.2)(typescript@5.4.5) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.20.2)(rollup@4.17.2) + version: 6.1.1(esbuild@0.21.2)(rollup@4.17.2) rollup-plugin-polyfill-node: specifier: ^0.13.0 version: 0.13.0(rollup@4.17.2) @@ -523,138 +523,276 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.21.2': + resolution: {integrity: sha512-/c7hocx0pm14bHQlqUVKmxwdT/e5/KkyoY1W8F9lk/8CkE037STDDz8PXUP/LE6faj2HqchvDs9GcShxFhI78Q==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.20.2': resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.21.2': + resolution: {integrity: sha512-SGZKngoTWVUriO5bDjI4WDGsNx2VKZoXcds+ita/kVYB+8IkSCKDRDaK+5yu0b5S0eq6B3S7fpiEvpsa2ammlQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.20.2': resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.21.2': + resolution: {integrity: sha512-G1ve3b4FeyJeyCjB4MX1CiWyTaIJwT9wAYE+8+IRA53YoN/reC/Bf2GDRXAzDTnh69Fpl+1uIKg76DiB3U6vwQ==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.20.2': resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.21.2': + resolution: {integrity: sha512-1wzzNoj2QtNkAYwIcWJ66UTRA80+RTQ/kuPMtEuP0X6dp5Ar23Dn566q3aV61h4EYrrgGlOgl/HdcqN/2S/2vg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.20.2': resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.21.2': + resolution: {integrity: sha512-ZyMkPWc5eTROcLOA10lEqdDSTc6ds6nuh3DeHgKip/XJrYjZDfnkCVSty8svWdy+SC1f77ULtVeIqymTzaB6/Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.20.2': resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.21.2': + resolution: {integrity: sha512-K4ZdVq1zP9v51h/cKVna7im7G0zGTKKB6bP2yJiSmHjjOykbd8DdhrSi8V978sF69rkwrn8zCyL2t6I3ei6j9A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.20.2': resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.21.2': + resolution: {integrity: sha512-4kbOGdpA61CXqadD+Gb/Pw3YXamQGiz9mal/h93rFVSjr5cgMnmJd/gbfPRm+3BMifvnaOfS1gNWaIDxkE2A3A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.20.2': resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.21.2': + resolution: {integrity: sha512-ShS+R09nuHzDBfPeMUliKZX27Wrmr8UFp93aFf/S8p+++x5BZ+D344CLKXxmY6qzgTL3mILSImPCNJOzD6+RRg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.20.2': resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.21.2': + resolution: {integrity: sha512-Hdu8BL+AmO+eCDvvT6kz/fPQhvuHL8YK4ExKZfANWsNe1kFGOHw7VJvS/FKSLFqheXmB3rTF3xFQIgUWPYsGnA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.20.2': resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.21.2': + resolution: {integrity: sha512-nnGXjOAv+7cM3LYRx4tJsYdgy8dGDGkAzF06oIDGppWbUkUKN9SmgQA8H0KukpU0Pjrj9XmgbWqMVSX/U7eeTA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.20.2': resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.21.2': + resolution: {integrity: sha512-m73BOCW2V9lcj7RtEMi+gBfHC6n3+VHpwQXP5offtQMPLDkpVolYn1YGXxOZ9hp4h3UPRKuezL7WkBsw+3EB3Q==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.20.2': resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.21.2': + resolution: {integrity: sha512-84eYHwwWHq3myIY/6ikALMcnwkf6Qo7NIq++xH0x+cJuUNpdwh8mlpUtRY+JiGUc60yu7ElWBbVHGWTABTclGw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.20.2': resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.21.2': + resolution: {integrity: sha512-9siSZngT0/ZKG+AH+/agwKF29LdCxw4ODi/PiE0F52B2rtLozlDP92umf8G2GPoVV611LN4pZ+nSTckebOscUA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.20.2': resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.21.2': + resolution: {integrity: sha512-y0T4aV2CA+ic04ULya1A/8M2RDpDSK2ckgTj6jzHKFJvCq0jQg8afQQIn4EM0G8u2neyOiNHgSF9YKPfuqKOVw==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.20.2': resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.21.2': + resolution: {integrity: sha512-x5ssCdXmZC86L2Li1qQPF/VaC4VP20u/Zm8jlAu9IiVOVi79YsSz6cpPDYZl1rfKSHYCJW9XBfFCo66S5gVPSA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.20.2': resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.21.2': + resolution: {integrity: sha512-NP7fTpGSFWdXyvp8iAFU04uFh9ARoplFVM/m+8lTRpaYG+2ytHPZWyscSsMM6cvObSIK2KoPHXiZD4l99WaxbQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.20.2': resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.21.2': + resolution: {integrity: sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.20.2': resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.21.2': + resolution: {integrity: sha512-IeFMfGFSQfIj1d4XU+6lkbFzMR+mFELUUVYrZ+jvWzG4NGvs6o53ReEHLHpYkjRbdEjJy2W3lTekTxrFHW7YJg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-x64@0.20.2': resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.21.2': + resolution: {integrity: sha512-48QhWD6WxcebNNaE4FCwgvQVUnAycuTd+BdvA/oZu+/MmbpU8pY2dMEYlYzj5uNHWIG5jvdDmFXu0naQeOWUoA==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.20.2': resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.21.2': + resolution: {integrity: sha512-90r3nTBLgdIgD4FCVV9+cR6Hq2Dzs319icVsln+NTmTVwffWcCqXGml8rAoocHuJ85kZK36DCteii96ba/PX8g==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.20.2': resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.21.2': + resolution: {integrity: sha512-sNndlsBT8OeE/MZDSGpRDJlWuhjuUz/dn80nH0EP4ZzDUYvMDVa7G87DVpweBrn4xdJYyXS/y4CQNrf7R2ODXg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.20.2': resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.21.2': + resolution: {integrity: sha512-Ti2QChGNFzWhUNNVuU4w21YkYTErsNh3h+CzvlEhzgRbwsJ7TrWQqRzW3bllLKKvTppuF3DJ3XP1GEg11AfrEQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.20.2': resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.21.2': + resolution: {integrity: sha512-VEfTCZicoZnZ6sGkjFPGRFFJuL2fZn2bLhsekZl1CJslflp2cJS/VoKs1jMk+3pDfsGW6CfQVUckP707HwbXeQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.0': resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1636,6 +1774,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.21.2: + resolution: {integrity: sha512-LmHPAa5h4tSxz+g/D8IHY6wCjtIiFx8I7/Q0Aq+NmvtoYvyMnJU0KQJcqB6QH30X9x/W4CemgUtPgQDZFca5SA==} + engines: {node: '>=12'} + hasBin: true + escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -3535,72 +3678,141 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true + '@esbuild/aix-ppc64@0.21.2': + optional: true + '@esbuild/android-arm64@0.20.2': optional: true + '@esbuild/android-arm64@0.21.2': + optional: true + '@esbuild/android-arm@0.20.2': optional: true + '@esbuild/android-arm@0.21.2': + optional: true + '@esbuild/android-x64@0.20.2': optional: true + '@esbuild/android-x64@0.21.2': + optional: true + '@esbuild/darwin-arm64@0.20.2': optional: true + '@esbuild/darwin-arm64@0.21.2': + optional: true + '@esbuild/darwin-x64@0.20.2': optional: true + '@esbuild/darwin-x64@0.21.2': + optional: true + '@esbuild/freebsd-arm64@0.20.2': optional: true + '@esbuild/freebsd-arm64@0.21.2': + optional: true + '@esbuild/freebsd-x64@0.20.2': optional: true + '@esbuild/freebsd-x64@0.21.2': + optional: true + '@esbuild/linux-arm64@0.20.2': optional: true + '@esbuild/linux-arm64@0.21.2': + optional: true + '@esbuild/linux-arm@0.20.2': optional: true + '@esbuild/linux-arm@0.21.2': + optional: true + '@esbuild/linux-ia32@0.20.2': optional: true + '@esbuild/linux-ia32@0.21.2': + optional: true + '@esbuild/linux-loong64@0.20.2': optional: true + '@esbuild/linux-loong64@0.21.2': + optional: true + '@esbuild/linux-mips64el@0.20.2': optional: true + '@esbuild/linux-mips64el@0.21.2': + optional: true + '@esbuild/linux-ppc64@0.20.2': optional: true + '@esbuild/linux-ppc64@0.21.2': + optional: true + '@esbuild/linux-riscv64@0.20.2': optional: true + '@esbuild/linux-riscv64@0.21.2': + optional: true + '@esbuild/linux-s390x@0.20.2': optional: true + '@esbuild/linux-s390x@0.21.2': + optional: true + '@esbuild/linux-x64@0.20.2': optional: true + '@esbuild/linux-x64@0.21.2': + optional: true + '@esbuild/netbsd-x64@0.20.2': optional: true + '@esbuild/netbsd-x64@0.21.2': + optional: true + '@esbuild/openbsd-x64@0.20.2': optional: true + '@esbuild/openbsd-x64@0.21.2': + optional: true + '@esbuild/sunos-x64@0.20.2': optional: true + '@esbuild/sunos-x64@0.21.2': + optional: true + '@esbuild/win32-arm64@0.20.2': optional: true + '@esbuild/win32-arm64@0.21.2': + optional: true + '@esbuild/win32-ia32@0.20.2': optional: true + '@esbuild/win32-ia32@0.21.2': + optional: true + '@esbuild/win32-x64@0.20.2': optional: true + '@esbuild/win32-x64@0.21.2': + optional: true + '@eslint-community/eslint-utils@4.4.0(eslint@9.2.0)': dependencies: eslint: 9.2.0 @@ -4601,10 +4813,10 @@ snapshots: es-module-lexer@1.5.0: {} - esbuild-plugin-polyfill-node@0.3.0(esbuild@0.20.2): + esbuild-plugin-polyfill-node@0.3.0(esbuild@0.21.2): dependencies: '@jspm/core': 2.0.1 - esbuild: 0.20.2 + esbuild: 0.21.2 import-meta-resolve: 3.1.1 esbuild@0.20.2: @@ -4633,6 +4845,32 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 + esbuild@0.21.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.2 + '@esbuild/android-arm': 0.21.2 + '@esbuild/android-arm64': 0.21.2 + '@esbuild/android-x64': 0.21.2 + '@esbuild/darwin-arm64': 0.21.2 + '@esbuild/darwin-x64': 0.21.2 + '@esbuild/freebsd-arm64': 0.21.2 + '@esbuild/freebsd-x64': 0.21.2 + '@esbuild/linux-arm': 0.21.2 + '@esbuild/linux-arm64': 0.21.2 + '@esbuild/linux-ia32': 0.21.2 + '@esbuild/linux-loong64': 0.21.2 + '@esbuild/linux-mips64el': 0.21.2 + '@esbuild/linux-ppc64': 0.21.2 + '@esbuild/linux-riscv64': 0.21.2 + '@esbuild/linux-s390x': 0.21.2 + '@esbuild/linux-x64': 0.21.2 + '@esbuild/netbsd-x64': 0.21.2 + '@esbuild/openbsd-x64': 0.21.2 + '@esbuild/sunos-x64': 0.21.2 + '@esbuild/win32-arm64': 0.21.2 + '@esbuild/win32-ia32': 0.21.2 + '@esbuild/win32-x64': 0.21.2 + escalade@3.1.2: {} escape-string-regexp@1.0.5: {} @@ -5896,12 +6134,12 @@ snapshots: optionalDependencies: '@babel/code-frame': 7.24.2 - rollup-plugin-esbuild@6.1.1(esbuild@0.20.2)(rollup@4.17.2): + rollup-plugin-esbuild@6.1.1(esbuild@0.21.2)(rollup@4.17.2): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) debug: 4.3.4 es-module-lexer: 1.5.0 - esbuild: 0.20.2 + esbuild: 0.21.2 get-tsconfig: 4.7.3 rollup: 4.17.2 transitivePeerDependencies: From 6a8d54850610b65091b52c825b66e3510f4b9fe8 Mon Sep 17 00:00:00 2001 From: OrbisK <37191683+OrbisK@users.noreply.github.com> Date: Wed, 15 May 2024 12:03:54 +0200 Subject: [PATCH 037/924] docs: set propper highlighting for commit convention regex (#10949) [skip ci] --- .github/commit-convention.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/commit-convention.md b/.github/commit-convention.md index a8522fa210a..d17a8bd4fc9 100644 --- a/.github/commit-convention.md +++ b/.github/commit-convention.md @@ -6,7 +6,7 @@ Messages must be matched by the following regex: -``` js +```regexp /^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/ ``` From 9b40d0f25da868a83b0d6bf99dbbdb3ca68bb700 Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 20 May 2024 19:28:22 +0800 Subject: [PATCH 038/924] fix(shared): ensure invokeArrayFns handles undefined arguments (#10869) Co-authored-by: Haoqun Jiang Close #10863 --- packages/runtime-core/__tests__/apiLifecycle.spec.ts | 2 ++ packages/shared/src/general.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/__tests__/apiLifecycle.spec.ts b/packages/runtime-core/__tests__/apiLifecycle.spec.ts index 5da57ab32bf..43054800afe 100644 --- a/packages/runtime-core/__tests__/apiLifecycle.spec.ts +++ b/packages/runtime-core/__tests__/apiLifecycle.spec.ts @@ -40,6 +40,8 @@ describe('api: lifecycle hooks', () => { } render(h(Comp), root) expect(fn).toHaveBeenCalledTimes(1) + // #10863 + expect(fn).toHaveBeenCalledWith() }) it('onMounted', () => { diff --git a/packages/shared/src/general.ts b/packages/shared/src/general.ts index fb884695d33..d2add125502 100644 --- a/packages/shared/src/general.ts +++ b/packages/shared/src/general.ts @@ -133,9 +133,9 @@ export const toHandlerKey = cacheStringFunction((str: T) => { export const hasChanged = (value: any, oldValue: any): boolean => !Object.is(value, oldValue) -export const invokeArrayFns = (fns: Function[], arg?: any) => { +export const invokeArrayFns = (fns: Function[], ...arg: any[]) => { for (let i = 0; i < fns.length; i++) { - fns[i](arg) + fns[i](...arg) } } From 9fead5234320848f8be82275c6b5dd0a290f2cca Mon Sep 17 00:00:00 2001 From: Alexandre Ferrera Date: Mon, 20 May 2024 13:33:18 +0200 Subject: [PATCH 039/924] fix(compiler-core): change v-for key type to match Object.keys (#10963) close #8819 --- packages/runtime-core/src/helpers/renderList.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/helpers/renderList.ts b/packages/runtime-core/src/helpers/renderList.ts index 655435fdd7a..e4302fcc3b1 100644 --- a/packages/runtime-core/src/helpers/renderList.ts +++ b/packages/runtime-core/src/helpers/renderList.ts @@ -42,7 +42,7 @@ export function renderList( source: T, renderItem: ( value: T[K], - key: K, + key: string, index: number, ) => VNodeChild, ): VNodeChild[] From fd18ce70b1a260a2485c9cd7faa30193da4b79f5 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Mon, 20 May 2024 19:42:34 +0800 Subject: [PATCH 040/924] fix: correct the type of `
`'s `onToggle` event handler (#10938) Fixes #10928 --- packages/runtime-dom/src/jsx.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-dom/src/jsx.ts b/packages/runtime-dom/src/jsx.ts index 5ba9b948849..964d5481d4b 100644 --- a/packages/runtime-dom/src/jsx.ts +++ b/packages/runtime-dom/src/jsx.ts @@ -406,7 +406,7 @@ export interface DataHTMLAttributes extends HTMLAttributes { export interface DetailsHTMLAttributes extends HTMLAttributes { open?: Booleanish - onToggle?: Event + onToggle?: (payload: ToggleEvent) => void } export interface DelHTMLAttributes extends HTMLAttributes { From 90cbcfefd1f178447756df07bb1a7b48cf18d4a9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 21:40:41 +0800 Subject: [PATCH 041/924] chore(deps): update all non-major dependencies (#10980) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 8 +- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 122 ++++++++++++++++------------- 3 files changed, 72 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 56dcb635ccc..9124e3f1938 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@rollup/plugin-terser": "^0.4.4", "@types/hash-sum": "^1.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.12.11", + "@types/node": "^20.12.12", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.5.2", "@vue/consolidate": "1.0.0", @@ -90,8 +90,8 @@ "markdown-table": "^3.0.3", "marked": "^12.0.2", "minimist": "^1.2.8", - "npm-run-all2": "^6.1.2", - "picocolors": "^1.0.0", + "npm-run-all2": "^6.2.0", + "picocolors": "^1.0.1", "prettier": "^3.2.5", "pretty-bytes": "^6.1.1", "pug": "^3.0.2", @@ -107,7 +107,7 @@ "terser": "^5.31.0", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^4.10.1", + "tsx": "^4.10.5", "typescript": "~5.4.5", "typescript-eslint": "^7.8.0", "vite": "^5.2.11", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f8d2272efd1..f91e9596d20 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.0.16", "pug": "^3.0.2", - "sass": "^1.77.1" + "sass": "^1.77.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c498fb90eea..ce7d4849b03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 7.24.5 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) + version: 3.1.0(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.17.2) @@ -42,14 +42,14 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@types/node': - specifier: ^20.12.11 - version: 20.12.11 + specifier: ^20.12.12 + version: 20.12.12 '@types/semver': specifier: ^7.5.8 version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.5.2 - version: 1.5.2(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) + version: 1.5.2(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -73,7 +73,7 @@ importers: version: 0.5.0(eslint@9.2.0)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)) + version: 0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -102,11 +102,11 @@ importers: specifier: ^1.2.8 version: 1.2.8 npm-run-all2: - specifier: ^6.1.2 - version: 6.1.2 + specifier: ^6.2.0 + version: 6.2.0 picocolors: - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.0.1 + version: 1.0.1 prettier: specifier: ^3.2.5 version: 3.2.5 @@ -153,8 +153,8 @@ importers: specifier: ^2.6.2 version: 2.6.2 tsx: - specifier: ^4.10.1 - version: 4.10.1 + specifier: ^4.10.5 + version: 4.10.5 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -163,10 +163,10 @@ importers: version: 7.8.0(eslint@9.2.0)(typescript@5.4.5) vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + version: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) vitest: specifier: ^1.5.2 - version: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) + version: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) packages/compiler-core: dependencies: @@ -257,8 +257,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 sass: - specifier: ^1.77.1 - version: 1.77.1 + specifier: ^1.77.2 + version: 1.77.2 packages/compiler-ssr: dependencies: @@ -355,10 +355,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.4 - version: 5.0.4(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vue@packages+vue) + version: 5.0.4(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vue@packages+vue) vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + version: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) packages/shared: {} @@ -1057,8 +1057,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@20.12.11': - resolution: {integrity: sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==} + '@types/node@20.12.12': + resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -2002,6 +2002,9 @@ packages: get-tsconfig@4.7.3: resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} + get-tsconfig@4.7.5: + resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + get-uri@6.0.3: resolution: {integrity: sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==} engines: {node: '>= 14'} @@ -2578,8 +2581,8 @@ packages: resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-run-all2@6.1.2: - resolution: {integrity: sha512-WwwnS8Ft+RpXve6T2EIEVpFLSqN+ORHRvgNk3H9N62SZXjmzKoRhMFg3I17TK3oMaAEr+XFbRirWS2Fn3BCPSg==} + npm-run-all2@6.2.0: + resolution: {integrity: sha512-wA7yVIkthe6qJBfiJ2g6aweaaRlw72itsFGF6HuwCHKwtwAx/4BY1vVpk6bw6lS8RLMsexoasOkd0aYOmsFG7Q==} engines: {node: ^14.18.0 || >=16.0.0, npm: '>= 8'} hasBin: true @@ -2712,6 +2715,9 @@ packages: picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.0.1: + resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -2982,8 +2988,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.77.1: - resolution: {integrity: sha512-OMEyfirt9XEfyvocduUIOlUSkWOXS/LAt6oblR/ISXCTukyavjex+zQNm51pPCOiFKY1QpWvEH1EeCkgyV3I6w==} + sass@1.77.2: + resolution: {integrity: sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==} engines: {node: '>=14.0.0'} hasBin: true @@ -3258,8 +3264,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsx@4.10.1: - resolution: {integrity: sha512-G+CcyTOopwhuI81FU+KpzGN5UBhHgGEDlGt8mHAXKxv8pDGr6WI7hI7aRjTRol5WzFVsSNuzl3ekCZ0eLIJlEQ==} + tsx@4.10.5: + resolution: {integrity: sha512-twDSbf7Gtea4I2copqovUiNTEDrT8XNFXsuHpfGbdpW/z9ZW4fTghzzhAG0WfrCuJmJiOEY1nLIjq4u3oujRWQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -3533,7 +3539,7 @@ snapshots: '@babel/code-frame@7.24.2': dependencies: '@babel/highlight': 7.24.2 - picocolors: 1.0.0 + picocolors: 1.0.1 '@babel/compat-data@7.24.4': {} @@ -3625,7 +3631,7 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.0.0 + picocolors: 1.0.1 '@babel/parser@7.24.5': dependencies: @@ -3667,11 +3673,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0))': + '@codspeed/vitest-plugin@3.1.0(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) - vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) transitivePeerDependencies: - debug @@ -4044,7 +4050,7 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@20.12.11': + '@types/node@20.12.12': dependencies: undici-types: 5.26.5 @@ -4056,7 +4062,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.12.11 + '@types/node': 20.12.12 optional: true '@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5))(eslint@9.2.0)(typescript@5.4.5)': @@ -4227,12 +4233,12 @@ snapshots: '@typescript-eslint/types': 7.8.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.4(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vue@packages+vue)': dependencies: - vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) vue: link:packages/vue - '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0))': + '@vitest/coverage-istanbul@1.5.2(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -4241,9 +4247,9 @@ snapshots: istanbul-lib-source-maps: 5.0.4 istanbul-reports: 3.1.7 magicast: 0.3.4 - picocolors: 1.0.0 + picocolors: 1.0.1 test-exclude: 6.0.0 - vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) transitivePeerDependencies: - supports-color @@ -4908,12 +4914,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0)): + eslint-plugin-vitest@0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)): dependencies: '@typescript-eslint/utils': 7.7.1(eslint@9.2.0)(typescript@5.4.5) eslint: 9.2.0 optionalDependencies: - vitest: 1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0) + vitest: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) transitivePeerDependencies: - supports-color - typescript @@ -5141,6 +5147,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@4.7.5: + dependencies: + resolve-pkg-maps: 1.0.0 + get-uri@6.0.3: dependencies: basic-ftp: 5.0.5 @@ -5703,7 +5713,7 @@ snapshots: npm-normalize-package-bin@3.0.1: {} - npm-run-all2@6.1.2: + npm-run-all2@6.2.0: dependencies: ansi-styles: 6.2.1 cross-spawn: 7.0.3 @@ -5842,6 +5852,8 @@ snapshots: picocolors@1.0.0: {} + picocolors@1.0.1: {} + picomatch@2.3.1: {} pidtree@0.6.0: {} @@ -6184,7 +6196,7 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.77.1: + sass@1.77.2: dependencies: chokidar: 3.6.0 immutable: 4.3.5 @@ -6459,10 +6471,10 @@ snapshots: tslib@2.6.2: {} - tsx@4.10.1: + tsx@4.10.5: dependencies: esbuild: 0.20.2 - get-tsconfig: 4.7.3 + get-tsconfig: 4.7.5 optionalDependencies: fsevents: 2.3.3 @@ -6511,7 +6523,7 @@ snapshots: dependencies: browserslist: 4.23.0 escalade: 3.1.2 - picocolors: 1.0.0 + picocolors: 1.0.1 update-check@1.5.4: dependencies: @@ -6538,13 +6550,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.5.2(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0): + vite-node@1.5.2(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 - picocolors: 1.0.0 - vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + picocolors: 1.0.1 + vite: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) transitivePeerDependencies: - '@types/node' - less @@ -6555,18 +6567,18 @@ snapshots: - supports-color - terser - vite@5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0): + vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.17.2 optionalDependencies: - '@types/node': 20.12.11 + '@types/node': 20.12.12 fsevents: 2.3.3 - sass: 1.77.1 + sass: 1.77.2 terser: 5.31.0 - vitest@1.5.2(@types/node@20.12.11)(jsdom@24.0.0)(sass@1.77.1)(terser@5.31.0): + vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0): dependencies: '@vitest/expect': 1.5.2 '@vitest/runner': 1.5.2 @@ -6580,16 +6592,16 @@ snapshots: local-pkg: 0.5.0 magic-string: 0.30.10 pathe: 1.1.2 - picocolors: 1.0.0 + picocolors: 1.0.1 std-env: 3.7.0 strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.2.11(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) - vite-node: 1.5.2(@types/node@20.12.11)(sass@1.77.1)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) + vite-node: 1.5.2(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.12.11 + '@types/node': 20.12.12 jsdom: 24.0.0 transitivePeerDependencies: - less From cc1139a08d6a1c1d99772f3a505bd3083ea3dc3c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 21:42:35 +0800 Subject: [PATCH 042/924] chore(deps): update build (#10981) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 218 ++++++++++++++++++++++++------------------------- 2 files changed, 111 insertions(+), 111 deletions(-) diff --git a/package.json b/package.json index 9124e3f1938..2180f23593f 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "@vue/consolidate": "1.0.0", "conventional-changelog-cli": "^4.1.0", "enquirer": "^2.4.1", - "esbuild": "^0.21.2", + "esbuild": "^0.21.3", "esbuild-plugin-polyfill-node": "^0.3.0", "eslint": "^9.2.0", "eslint-plugin-import-x": "^0.5.0", @@ -98,7 +98,7 @@ "puppeteer": "~22.7.1", "rimraf": "^5.0.7", "rollup": "^4.17.2", - "rollup-plugin-dts": "^6.1.0", + "rollup-plugin-dts": "^6.1.1", "rollup-plugin-esbuild": "^6.1.1", "rollup-plugin-polyfill-node": "^0.13.0", "semver": "^7.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce7d4849b03..56cbfdb5183 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,11 +60,11 @@ importers: specifier: ^2.4.1 version: 2.4.1 esbuild: - specifier: ^0.21.2 - version: 0.21.2 + specifier: ^0.21.3 + version: 0.21.3 esbuild-plugin-polyfill-node: specifier: ^0.3.0 - version: 0.3.0(esbuild@0.21.2) + version: 0.3.0(esbuild@0.21.3) eslint: specifier: ^9.2.0 version: 9.2.0 @@ -126,11 +126,11 @@ importers: specifier: ^4.17.2 version: 4.17.2 rollup-plugin-dts: - specifier: ^6.1.0 - version: 6.1.0(rollup@4.17.2)(typescript@5.4.5) + specifier: ^6.1.1 + version: 6.1.1(rollup@4.17.2)(typescript@5.4.5) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.21.2)(rollup@4.17.2) + version: 6.1.1(esbuild@0.21.3)(rollup@4.17.2) rollup-plugin-polyfill-node: specifier: ^0.13.0 version: 0.13.0(rollup@4.17.2) @@ -523,8 +523,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.21.2': - resolution: {integrity: sha512-/c7hocx0pm14bHQlqUVKmxwdT/e5/KkyoY1W8F9lk/8CkE037STDDz8PXUP/LE6faj2HqchvDs9GcShxFhI78Q==} + '@esbuild/aix-ppc64@0.21.3': + resolution: {integrity: sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -535,8 +535,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.21.2': - resolution: {integrity: sha512-SGZKngoTWVUriO5bDjI4WDGsNx2VKZoXcds+ita/kVYB+8IkSCKDRDaK+5yu0b5S0eq6B3S7fpiEvpsa2ammlQ==} + '@esbuild/android-arm64@0.21.3': + resolution: {integrity: sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -547,8 +547,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.21.2': - resolution: {integrity: sha512-G1ve3b4FeyJeyCjB4MX1CiWyTaIJwT9wAYE+8+IRA53YoN/reC/Bf2GDRXAzDTnh69Fpl+1uIKg76DiB3U6vwQ==} + '@esbuild/android-arm@0.21.3': + resolution: {integrity: sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -559,8 +559,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.21.2': - resolution: {integrity: sha512-1wzzNoj2QtNkAYwIcWJ66UTRA80+RTQ/kuPMtEuP0X6dp5Ar23Dn566q3aV61h4EYrrgGlOgl/HdcqN/2S/2vg==} + '@esbuild/android-x64@0.21.3': + resolution: {integrity: sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -571,8 +571,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.21.2': - resolution: {integrity: sha512-ZyMkPWc5eTROcLOA10lEqdDSTc6ds6nuh3DeHgKip/XJrYjZDfnkCVSty8svWdy+SC1f77ULtVeIqymTzaB6/Q==} + '@esbuild/darwin-arm64@0.21.3': + resolution: {integrity: sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -583,8 +583,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.21.2': - resolution: {integrity: sha512-K4ZdVq1zP9v51h/cKVna7im7G0zGTKKB6bP2yJiSmHjjOykbd8DdhrSi8V978sF69rkwrn8zCyL2t6I3ei6j9A==} + '@esbuild/darwin-x64@0.21.3': + resolution: {integrity: sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -595,8 +595,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.21.2': - resolution: {integrity: sha512-4kbOGdpA61CXqadD+Gb/Pw3YXamQGiz9mal/h93rFVSjr5cgMnmJd/gbfPRm+3BMifvnaOfS1gNWaIDxkE2A3A==} + '@esbuild/freebsd-arm64@0.21.3': + resolution: {integrity: sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -607,8 +607,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.2': - resolution: {integrity: sha512-ShS+R09nuHzDBfPeMUliKZX27Wrmr8UFp93aFf/S8p+++x5BZ+D344CLKXxmY6qzgTL3mILSImPCNJOzD6+RRg==} + '@esbuild/freebsd-x64@0.21.3': + resolution: {integrity: sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -619,8 +619,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.21.2': - resolution: {integrity: sha512-Hdu8BL+AmO+eCDvvT6kz/fPQhvuHL8YK4ExKZfANWsNe1kFGOHw7VJvS/FKSLFqheXmB3rTF3xFQIgUWPYsGnA==} + '@esbuild/linux-arm64@0.21.3': + resolution: {integrity: sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -631,8 +631,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.21.2': - resolution: {integrity: sha512-nnGXjOAv+7cM3LYRx4tJsYdgy8dGDGkAzF06oIDGppWbUkUKN9SmgQA8H0KukpU0Pjrj9XmgbWqMVSX/U7eeTA==} + '@esbuild/linux-arm@0.21.3': + resolution: {integrity: sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -643,8 +643,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.21.2': - resolution: {integrity: sha512-m73BOCW2V9lcj7RtEMi+gBfHC6n3+VHpwQXP5offtQMPLDkpVolYn1YGXxOZ9hp4h3UPRKuezL7WkBsw+3EB3Q==} + '@esbuild/linux-ia32@0.21.3': + resolution: {integrity: sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -655,8 +655,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.21.2': - resolution: {integrity: sha512-84eYHwwWHq3myIY/6ikALMcnwkf6Qo7NIq++xH0x+cJuUNpdwh8mlpUtRY+JiGUc60yu7ElWBbVHGWTABTclGw==} + '@esbuild/linux-loong64@0.21.3': + resolution: {integrity: sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -667,8 +667,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.21.2': - resolution: {integrity: sha512-9siSZngT0/ZKG+AH+/agwKF29LdCxw4ODi/PiE0F52B2rtLozlDP92umf8G2GPoVV611LN4pZ+nSTckebOscUA==} + '@esbuild/linux-mips64el@0.21.3': + resolution: {integrity: sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -679,8 +679,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.21.2': - resolution: {integrity: sha512-y0T4aV2CA+ic04ULya1A/8M2RDpDSK2ckgTj6jzHKFJvCq0jQg8afQQIn4EM0G8u2neyOiNHgSF9YKPfuqKOVw==} + '@esbuild/linux-ppc64@0.21.3': + resolution: {integrity: sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -691,8 +691,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.21.2': - resolution: {integrity: sha512-x5ssCdXmZC86L2Li1qQPF/VaC4VP20u/Zm8jlAu9IiVOVi79YsSz6cpPDYZl1rfKSHYCJW9XBfFCo66S5gVPSA==} + '@esbuild/linux-riscv64@0.21.3': + resolution: {integrity: sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -703,8 +703,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.21.2': - resolution: {integrity: sha512-NP7fTpGSFWdXyvp8iAFU04uFh9ARoplFVM/m+8lTRpaYG+2ytHPZWyscSsMM6cvObSIK2KoPHXiZD4l99WaxbQ==} + '@esbuild/linux-s390x@0.21.3': + resolution: {integrity: sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -715,8 +715,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.21.2': - resolution: {integrity: sha512-giZ/uOxWDKda44ZuyfKbykeXznfuVNkTgXOUOPJIjbayJV6FRpQ4zxUy9JMBPLaK9IJcdWtaoeQrYBMh3Rr4vQ==} + '@esbuild/linux-x64@0.21.3': + resolution: {integrity: sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -727,8 +727,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.21.2': - resolution: {integrity: sha512-IeFMfGFSQfIj1d4XU+6lkbFzMR+mFELUUVYrZ+jvWzG4NGvs6o53ReEHLHpYkjRbdEjJy2W3lTekTxrFHW7YJg==} + '@esbuild/netbsd-x64@0.21.3': + resolution: {integrity: sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -739,8 +739,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.21.2': - resolution: {integrity: sha512-48QhWD6WxcebNNaE4FCwgvQVUnAycuTd+BdvA/oZu+/MmbpU8pY2dMEYlYzj5uNHWIG5jvdDmFXu0naQeOWUoA==} + '@esbuild/openbsd-x64@0.21.3': + resolution: {integrity: sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -751,8 +751,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.21.2': - resolution: {integrity: sha512-90r3nTBLgdIgD4FCVV9+cR6Hq2Dzs319icVsln+NTmTVwffWcCqXGml8rAoocHuJ85kZK36DCteii96ba/PX8g==} + '@esbuild/sunos-x64@0.21.3': + resolution: {integrity: sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -763,8 +763,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.21.2': - resolution: {integrity: sha512-sNndlsBT8OeE/MZDSGpRDJlWuhjuUz/dn80nH0EP4ZzDUYvMDVa7G87DVpweBrn4xdJYyXS/y4CQNrf7R2ODXg==} + '@esbuild/win32-arm64@0.21.3': + resolution: {integrity: sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -775,8 +775,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.21.2': - resolution: {integrity: sha512-Ti2QChGNFzWhUNNVuU4w21YkYTErsNh3h+CzvlEhzgRbwsJ7TrWQqRzW3bllLKKvTppuF3DJ3XP1GEg11AfrEQ==} + '@esbuild/win32-ia32@0.21.3': + resolution: {integrity: sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -787,8 +787,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.2': - resolution: {integrity: sha512-VEfTCZicoZnZ6sGkjFPGRFFJuL2fZn2bLhsekZl1CJslflp2cJS/VoKs1jMk+3pDfsGW6CfQVUckP707HwbXeQ==} + '@esbuild/win32-x64@0.21.3': + resolution: {integrity: sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1774,8 +1774,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.21.2: - resolution: {integrity: sha512-LmHPAa5h4tSxz+g/D8IHY6wCjtIiFx8I7/Q0Aq+NmvtoYvyMnJU0KQJcqB6QH30X9x/W4CemgUtPgQDZFca5SA==} + esbuild@0.21.3: + resolution: {integrity: sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==} engines: {node: '>=12'} hasBin: true @@ -2949,8 +2949,8 @@ packages: engines: {node: '>=14.18'} hasBin: true - rollup-plugin-dts@6.1.0: - resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} + rollup-plugin-dts@6.1.1: + resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} engines: {node: '>=16'} peerDependencies: rollup: ^3.29.4 || ^4 @@ -3628,7 +3628,7 @@ snapshots: '@babel/highlight@7.24.2': dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.0.1 @@ -3684,139 +3684,139 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true - '@esbuild/aix-ppc64@0.21.2': + '@esbuild/aix-ppc64@0.21.3': optional: true '@esbuild/android-arm64@0.20.2': optional: true - '@esbuild/android-arm64@0.21.2': + '@esbuild/android-arm64@0.21.3': optional: true '@esbuild/android-arm@0.20.2': optional: true - '@esbuild/android-arm@0.21.2': + '@esbuild/android-arm@0.21.3': optional: true '@esbuild/android-x64@0.20.2': optional: true - '@esbuild/android-x64@0.21.2': + '@esbuild/android-x64@0.21.3': optional: true '@esbuild/darwin-arm64@0.20.2': optional: true - '@esbuild/darwin-arm64@0.21.2': + '@esbuild/darwin-arm64@0.21.3': optional: true '@esbuild/darwin-x64@0.20.2': optional: true - '@esbuild/darwin-x64@0.21.2': + '@esbuild/darwin-x64@0.21.3': optional: true '@esbuild/freebsd-arm64@0.20.2': optional: true - '@esbuild/freebsd-arm64@0.21.2': + '@esbuild/freebsd-arm64@0.21.3': optional: true '@esbuild/freebsd-x64@0.20.2': optional: true - '@esbuild/freebsd-x64@0.21.2': + '@esbuild/freebsd-x64@0.21.3': optional: true '@esbuild/linux-arm64@0.20.2': optional: true - '@esbuild/linux-arm64@0.21.2': + '@esbuild/linux-arm64@0.21.3': optional: true '@esbuild/linux-arm@0.20.2': optional: true - '@esbuild/linux-arm@0.21.2': + '@esbuild/linux-arm@0.21.3': optional: true '@esbuild/linux-ia32@0.20.2': optional: true - '@esbuild/linux-ia32@0.21.2': + '@esbuild/linux-ia32@0.21.3': optional: true '@esbuild/linux-loong64@0.20.2': optional: true - '@esbuild/linux-loong64@0.21.2': + '@esbuild/linux-loong64@0.21.3': optional: true '@esbuild/linux-mips64el@0.20.2': optional: true - '@esbuild/linux-mips64el@0.21.2': + '@esbuild/linux-mips64el@0.21.3': optional: true '@esbuild/linux-ppc64@0.20.2': optional: true - '@esbuild/linux-ppc64@0.21.2': + '@esbuild/linux-ppc64@0.21.3': optional: true '@esbuild/linux-riscv64@0.20.2': optional: true - '@esbuild/linux-riscv64@0.21.2': + '@esbuild/linux-riscv64@0.21.3': optional: true '@esbuild/linux-s390x@0.20.2': optional: true - '@esbuild/linux-s390x@0.21.2': + '@esbuild/linux-s390x@0.21.3': optional: true '@esbuild/linux-x64@0.20.2': optional: true - '@esbuild/linux-x64@0.21.2': + '@esbuild/linux-x64@0.21.3': optional: true '@esbuild/netbsd-x64@0.20.2': optional: true - '@esbuild/netbsd-x64@0.21.2': + '@esbuild/netbsd-x64@0.21.3': optional: true '@esbuild/openbsd-x64@0.20.2': optional: true - '@esbuild/openbsd-x64@0.21.2': + '@esbuild/openbsd-x64@0.21.3': optional: true '@esbuild/sunos-x64@0.20.2': optional: true - '@esbuild/sunos-x64@0.21.2': + '@esbuild/sunos-x64@0.21.3': optional: true '@esbuild/win32-arm64@0.20.2': optional: true - '@esbuild/win32-arm64@0.21.2': + '@esbuild/win32-arm64@0.21.3': optional: true '@esbuild/win32-ia32@0.20.2': optional: true - '@esbuild/win32-ia32@0.21.2': + '@esbuild/win32-ia32@0.21.3': optional: true '@esbuild/win32-x64@0.20.2': optional: true - '@esbuild/win32-x64@0.21.2': + '@esbuild/win32-x64@0.21.3': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@9.2.0)': @@ -4819,10 +4819,10 @@ snapshots: es-module-lexer@1.5.0: {} - esbuild-plugin-polyfill-node@0.3.0(esbuild@0.21.2): + esbuild-plugin-polyfill-node@0.3.0(esbuild@0.21.3): dependencies: '@jspm/core': 2.0.1 - esbuild: 0.21.2 + esbuild: 0.21.3 import-meta-resolve: 3.1.1 esbuild@0.20.2: @@ -4851,31 +4851,31 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - esbuild@0.21.2: + esbuild@0.21.3: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.2 - '@esbuild/android-arm': 0.21.2 - '@esbuild/android-arm64': 0.21.2 - '@esbuild/android-x64': 0.21.2 - '@esbuild/darwin-arm64': 0.21.2 - '@esbuild/darwin-x64': 0.21.2 - '@esbuild/freebsd-arm64': 0.21.2 - '@esbuild/freebsd-x64': 0.21.2 - '@esbuild/linux-arm': 0.21.2 - '@esbuild/linux-arm64': 0.21.2 - '@esbuild/linux-ia32': 0.21.2 - '@esbuild/linux-loong64': 0.21.2 - '@esbuild/linux-mips64el': 0.21.2 - '@esbuild/linux-ppc64': 0.21.2 - '@esbuild/linux-riscv64': 0.21.2 - '@esbuild/linux-s390x': 0.21.2 - '@esbuild/linux-x64': 0.21.2 - '@esbuild/netbsd-x64': 0.21.2 - '@esbuild/openbsd-x64': 0.21.2 - '@esbuild/sunos-x64': 0.21.2 - '@esbuild/win32-arm64': 0.21.2 - '@esbuild/win32-ia32': 0.21.2 - '@esbuild/win32-x64': 0.21.2 + '@esbuild/aix-ppc64': 0.21.3 + '@esbuild/android-arm': 0.21.3 + '@esbuild/android-arm64': 0.21.3 + '@esbuild/android-x64': 0.21.3 + '@esbuild/darwin-arm64': 0.21.3 + '@esbuild/darwin-x64': 0.21.3 + '@esbuild/freebsd-arm64': 0.21.3 + '@esbuild/freebsd-x64': 0.21.3 + '@esbuild/linux-arm': 0.21.3 + '@esbuild/linux-arm64': 0.21.3 + '@esbuild/linux-ia32': 0.21.3 + '@esbuild/linux-loong64': 0.21.3 + '@esbuild/linux-mips64el': 0.21.3 + '@esbuild/linux-ppc64': 0.21.3 + '@esbuild/linux-riscv64': 0.21.3 + '@esbuild/linux-s390x': 0.21.3 + '@esbuild/linux-x64': 0.21.3 + '@esbuild/netbsd-x64': 0.21.3 + '@esbuild/openbsd-x64': 0.21.3 + '@esbuild/sunos-x64': 0.21.3 + '@esbuild/win32-arm64': 0.21.3 + '@esbuild/win32-ia32': 0.21.3 + '@esbuild/win32-x64': 0.21.3 escalade@3.1.2: {} @@ -6138,7 +6138,7 @@ snapshots: dependencies: glob: 10.3.12 - rollup-plugin-dts@6.1.0(rollup@4.17.2)(typescript@5.4.5): + rollup-plugin-dts@6.1.1(rollup@4.17.2)(typescript@5.4.5): dependencies: magic-string: 0.30.10 rollup: 4.17.2 @@ -6146,12 +6146,12 @@ snapshots: optionalDependencies: '@babel/code-frame': 7.24.2 - rollup-plugin-esbuild@6.1.1(esbuild@0.21.2)(rollup@4.17.2): + rollup-plugin-esbuild@6.1.1(esbuild@0.21.3)(rollup@4.17.2): dependencies: '@rollup/pluginutils': 5.1.0(rollup@4.17.2) debug: 4.3.4 es-module-lexer: 1.5.0 - esbuild: 0.21.2 + esbuild: 0.21.3 get-tsconfig: 4.7.3 rollup: 4.17.2 transitivePeerDependencies: From efd090b50f4e507bd95fdbd15f1e5439511b4213 Mon Sep 17 00:00:00 2001 From: btea <2356281422@qq.com> Date: Tue, 21 May 2024 00:38:15 +0800 Subject: [PATCH 043/924] test: update coverage exclude (#10915) --- vitest.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vitest.config.ts b/vitest.config.ts index e6436408adb..ae14f3fb76e 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -41,6 +41,8 @@ export default defineConfig({ 'packages/runtime-dom/src/components/Transition*', // mostly entries 'packages/vue-compat/**', + 'packages/sfc-playground/**', + 'scripts/**', ], }, }, From 8bf1469df168f5b72e1fbb24752a6a4692e35b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Deng=20=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Tue, 21 May 2024 07:05:08 +0800 Subject: [PATCH 044/924] ci: fix RCE vulnerability in file overwrite (#10985) Special thanks to @RedYetiDev --- .github/workflows/size-report.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index 59023720679..766462d6da9 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -40,12 +40,13 @@ jobs: with: name: pr-number run_id: ${{ github.event.workflow_run.id }} + path: /tmp/pr-number - name: Read PR Number id: pr-number uses: juliangruber/read-file-action@v1 with: - path: ./pr.txt + path: /tmp/pr-number/pr.txt - name: Download Size Data uses: dawidd6/action-download-artifact@v3 From 392bd9baa1254846392798a806041b5d99af70cc Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 21 May 2024 16:32:58 +0800 Subject: [PATCH 045/924] chore: dedupe deps --- pnpm-lock.yaml | 166 ++----------------------------------------------- 1 file changed, 6 insertions(+), 160 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 56cbfdb5183..15410f2931d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -471,10 +471,6 @@ packages: resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.22.20': - resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.5': resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} engines: {node: '>=6.9.0'} @@ -1093,14 +1089,6 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.7.0': - resolution: {integrity: sha512-/8INDn0YLInbe9Wt7dK4cXLDYp0fNHP5xKLHvZl3mOT5X17rK/YShXaiNmorl+/U4VKCVIjJnx4Ri5b0y+HClw==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/scope-manager@7.7.1': - resolution: {integrity: sha512-PytBif2SF+9SpEUKynYn5g1RHFddJUcyynGpztX3l/ik7KmZEv19WCMhUBkHXPU9es/VWGD3/zg3wg90+Dh2rA==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/scope-manager@7.8.0': resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1115,36 +1103,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.7.0': - resolution: {integrity: sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/types@7.7.1': - resolution: {integrity: sha512-AmPmnGW1ZLTpWa+/2omPrPfR7BcbUU4oha5VIbSbS1a1Tv966bklvLNXxp3mrbc+P2j4MNOTfDffNsk4o0c6/w==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/types@7.8.0': resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.7.0': - resolution: {integrity: sha512-8p71HQPE6CbxIBy2kWHqM1KGrC07pk6RJn40n0DSc6bMOBBREZxSDJ+BmRzc8B5OdaMh1ty3mkuWRg4sCFiDQQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/typescript-estree@7.7.1': - resolution: {integrity: sha512-CXe0JHCXru8Fa36dteXqmH2YxngKJjkQLjxzoj6LYwzZ7qZvgsLSc+eqItCrqIop8Vl2UKoAi0StVWu97FQZIQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@7.8.0': resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1154,32 +1116,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.7.0': - resolution: {integrity: sha512-LKGAXMPQs8U/zMRFXDZOzmMKgFv3COlxUQ+2NMPhbqgVm6R1w+nU1i4836Pmxu9jZAuIeyySNrN/6Rc657ggig==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - - '@typescript-eslint/utils@7.7.1': - resolution: {integrity: sha512-QUvBxPEaBXf41ZBbaidKICgVL8Hin0p6prQDu6bbetWo39BKbWJxRsErOzMNT1rXvTll+J7ChrbmMCXM9rsvOQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - '@typescript-eslint/utils@7.8.0': resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.7.0': - resolution: {integrity: sha512-h0WHOj8MhdhY8YWkzIF30R379y0NqyOHExI9N9KCzvmu05EgG4FumeYa3ccfKUSphyWkWQE1ybVrgz/Pbam6YA==} - engines: {node: ^18.18.0 || >=20.0.0} - - '@typescript-eslint/visitor-keys@7.7.1': - resolution: {integrity: sha512-gBL3Eq25uADw1LQ9kVpf3hRM+DWzs0uZknHYK3hq4jcTPqVCClHGDnB6UUUV2SFeBeA4KWHWbbLqmbGcZ4FYbw==} - engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/visitor-keys@7.8.0': resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1999,9 +1941,6 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-tsconfig@4.7.3: - resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} - get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} @@ -2712,9 +2651,6 @@ packages: pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} - picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - picocolors@1.0.1: resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==} @@ -3600,7 +3536,7 @@ snapshots: '@babel/helper-module-imports': 7.24.3 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 '@babel/helper-simple-access@7.22.5': dependencies: @@ -3612,8 +3548,6 @@ snapshots: '@babel/helper-string-parser@7.24.1': {} - '@babel/helper-validator-identifier@7.22.20': {} - '@babel/helper-validator-identifier@7.24.5': {} '@babel/helper-validator-option@7.23.5': {} @@ -4098,16 +4032,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.7.0': - dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 - - '@typescript-eslint/scope-manager@7.7.1': - dependencies: - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/visitor-keys': 7.7.1 - '@typescript-eslint/scope-manager@7.8.0': dependencies: '@typescript-eslint/types': 7.8.0 @@ -4125,42 +4049,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.7.0': {} - - '@typescript-eslint/types@7.7.1': {} - '@typescript-eslint/types@7.8.0': {} - '@typescript-eslint/typescript-estree@7.7.0(typescript@5.4.5)': - dependencies: - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/visitor-keys': 7.7.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@7.7.1(typescript@5.4.5)': - dependencies: - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/visitor-keys': 7.7.1 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.4 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.4.5) - optionalDependencies: - typescript: 5.4.5 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.8.0 @@ -4176,34 +4066,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.7.0(eslint@9.2.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.7.0 - '@typescript-eslint/types': 7.7.0 - '@typescript-eslint/typescript-estree': 7.7.0(typescript@5.4.5) - eslint: 9.2.0 - semver: 7.6.2 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/utils@7.7.1(eslint@9.2.0)(typescript@5.4.5)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.7.1 - '@typescript-eslint/types': 7.7.1 - '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) - eslint: 9.2.0 - semver: 7.6.2 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@7.8.0(eslint@9.2.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) @@ -4218,16 +4080,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.7.0': - dependencies: - '@typescript-eslint/types': 7.7.0 - eslint-visitor-keys: 3.4.3 - - '@typescript-eslint/visitor-keys@7.7.1': - dependencies: - '@typescript-eslint/types': 7.7.1 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@7.8.0': dependencies: '@typescript-eslint/types': 7.8.0 @@ -4901,12 +4753,12 @@ snapshots: eslint-plugin-import-x@0.5.0(eslint@9.2.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/utils': 7.7.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) debug: 4.3.4 doctrine: 3.0.0 eslint: 9.2.0 eslint-import-resolver-node: 0.3.9 - get-tsconfig: 4.7.3 + get-tsconfig: 4.7.5 is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.2 @@ -4916,7 +4768,7 @@ snapshots: eslint-plugin-vitest@0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)): dependencies: - '@typescript-eslint/utils': 7.7.1(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) eslint: 9.2.0 optionalDependencies: vitest: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) @@ -5143,10 +4995,6 @@ snapshots: get-stream@8.0.1: {} - get-tsconfig@4.7.3: - dependencies: - resolve-pkg-maps: 1.0.0 - get-tsconfig@4.7.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -5850,8 +5698,6 @@ snapshots: pend@1.2.0: {} - picocolors@1.0.0: {} - picocolors@1.0.1: {} picomatch@2.3.1: {} @@ -5907,7 +5753,7 @@ snapshots: postcss@8.4.38: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 + picocolors: 1.0.1 source-map-js: 1.2.0 prelude-ls@1.2.1: {} @@ -6152,7 +5998,7 @@ snapshots: debug: 4.3.4 es-module-lexer: 1.5.0 esbuild: 0.21.3 - get-tsconfig: 4.7.3 + get-tsconfig: 4.7.5 rollup: 4.17.2 transitivePeerDependencies: - supports-color From bbb5be299b500a00e60c757118c846c3b5ddd8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=9B=BE=E4=B8=89=E8=AF=AD?= <32354856+baiwusanyu-c@users.noreply.github.com> Date: Wed, 22 May 2024 00:14:02 +0800 Subject: [PATCH 046/924] fix(custom-element): disconnect MutationObserver in nextTick in case that custom elements are moved (#10613) Closes #10610 --- .../__tests__/customElement.spec.ts | 49 +++++++++++++++++++ packages/runtime-dom/src/apiCustomElement.ts | 8 +-- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/packages/runtime-dom/__tests__/customElement.spec.ts b/packages/runtime-dom/__tests__/customElement.spec.ts index fb746f72c4a..a8bdec77512 100644 --- a/packages/runtime-dom/__tests__/customElement.spec.ts +++ b/packages/runtime-dom/__tests__/customElement.spec.ts @@ -1,6 +1,7 @@ import { type Ref, type VueElement, + createApp, defineAsyncComponent, defineComponent, defineCustomElement, @@ -60,6 +61,54 @@ describe('defineCustomElement', () => { expect(e.shadowRoot!.innerHTML).toBe('') }) + // #10610 + test('When elements move, avoid prematurely disconnecting MutationObserver', async () => { + const CustomInput = defineCustomElement({ + props: ['value'], + emits: ['update'], + setup(props, { emit }) { + return () => + h('input', { + type: 'number', + value: props.value, + onInput: (e: InputEvent) => { + const num = (e.target! as HTMLInputElement).valueAsNumber + emit('update', Number.isNaN(num) ? null : num) + }, + }) + }, + }) + customElements.define('my-el-input', CustomInput) + const num = ref('12') + const containerComp = defineComponent({ + setup() { + return () => { + return h('div', [ + h('my-el-input', { + value: num.value, + onUpdate: ($event: CustomEvent) => { + num.value = $event.detail[0] + }, + }), + h('div', { id: 'move' }), + ]) + } + }, + }) + const app = createApp(containerComp) + app.mount(container) + const myInputEl = container.querySelector('my-el-input')! + const inputEl = myInputEl.shadowRoot!.querySelector('input')! + await nextTick() + expect(inputEl.value).toBe('12') + const moveEl = container.querySelector('#move')! + moveEl.append(myInputEl) + await nextTick() + myInputEl.removeAttribute('value') + await nextTick() + expect(inputEl.value).toBe('') + }) + test('should not unmount on move', async () => { container.innerHTML = `
` const e = container.childNodes[0].childNodes[0] as VueElement diff --git a/packages/runtime-dom/src/apiCustomElement.ts b/packages/runtime-dom/src/apiCustomElement.ts index 01ce2bad464..93823027707 100644 --- a/packages/runtime-dom/src/apiCustomElement.ts +++ b/packages/runtime-dom/src/apiCustomElement.ts @@ -215,12 +215,12 @@ export class VueElement extends BaseClass { disconnectedCallback() { this._connected = false - if (this._ob) { - this._ob.disconnect() - this._ob = null - } nextTick(() => { if (!this._connected) { + if (this._ob) { + this._ob.disconnect() + this._ob = null + } render(null, this.shadowRoot!) this._instance = null } From 07764fe330692fadf0fc9fb9e92cb5b111df33be Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 24 May 2024 16:37:38 +0800 Subject: [PATCH 047/924] fix(KeepAlive): properly cache nested Suspense subtree (#10912) * fix(KeepAlive): properly cache nested Suspense subtree * test: add test case * chore: add comments * Update KeepAlive.ts --- .../__tests__/components/Suspense.spec.ts | 52 ++++++++++++++++++- .../runtime-core/src/components/KeepAlive.ts | 10 +++- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/__tests__/components/Suspense.spec.ts b/packages/runtime-core/__tests__/components/Suspense.spec.ts index a448972e139..8de5b3182d0 100644 --- a/packages/runtime-core/__tests__/components/Suspense.spec.ts +++ b/packages/runtime-core/__tests__/components/Suspense.spec.ts @@ -2021,7 +2021,7 @@ describe('Suspense', () => { viewRef.value = 0 await nextTick() - expect(serializeInner(root)).toBe('') + expect(serializeInner(root)).toBe('
sync
') await Promise.all(deps) await nextTick() @@ -2035,6 +2035,56 @@ describe('Suspense', () => { expect(serializeInner(root)).toBe(`
sync
`) }) + // #10899 + test('KeepAlive + Suspense switch before branch resolves', async () => { + const Async1 = defineAsyncComponent({ + render() { + return h('div', 'async1') + }, + }) + const Async2 = defineAsyncComponent({ + render() { + return h('div', 'async2') + }, + }) + const components = [Async1, Async2] + const viewRef = ref(0) + const root = nodeOps.createElement('div') + const App = { + render() { + return h(KeepAlive, null, { + default: () => { + return h(Suspense, null, { + default: h(components[viewRef.value]), + fallback: h('div', 'loading'), + }) + }, + }) + }, + } + render(h(App), root) + expect(serializeInner(root)).toBe(`
loading
`) + + // switch to Async2 before Async1 resolves + viewRef.value = 1 + await nextTick() + expect(serializeInner(root)).toBe(`
loading
`) + + await Promise.all(deps) + await nextTick() + expect(serializeInner(root)).toBe('
async2
') + + viewRef.value = 0 + await nextTick() + await Promise.all(deps) + expect(serializeInner(root)).toBe(`
async1
`) + + viewRef.value = 1 + await nextTick() + await Promise.all(deps) + expect(serializeInner(root)).toBe(`
async2
`) + }) + // #6416 follow up / #10017 test('Suspense patched during HOC async component re-mount', async () => { const key = ref('k') diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index db6088cf5c6..37084d5f37a 100644 --- a/packages/runtime-core/src/components/KeepAlive.ts +++ b/packages/runtime-core/src/components/KeepAlive.ts @@ -228,7 +228,15 @@ const KeepAliveImpl: ComponentOptions = { const cacheSubtree = () => { // fix #1621, the pendingCacheKey could be 0 if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)) + // if KeepAlive child is a Suspense, it needs to be cached after Suspense resolves + // avoid caching vnode that not been mounted + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey!, getInnerChild(instance.subTree)) + }, instance.subTree.suspense) + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)) + } } } onMounted(cacheSubtree) From 530d9ec5f69a39246314183d942d37986c01dc46 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 24 May 2024 16:43:13 +0800 Subject: [PATCH 048/924] chore: correct the comments in KeepAlive.ts (#11005) --- packages/runtime-core/src/components/KeepAlive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index 37084d5f37a..e059b892841 100644 --- a/packages/runtime-core/src/components/KeepAlive.ts +++ b/packages/runtime-core/src/components/KeepAlive.ts @@ -313,11 +313,11 @@ const KeepAliveImpl: ComponentOptions = { rawVNode.ssContent = vnode } } - // #1513 it's possible for the returned vnode to be cloned due to attr + // #1511 it's possible for the returned vnode to be cloned due to attr // fallthrough or scopeId, so the vnode here may not be the final vnode // that is mounted. Instead of caching it directly, we store the pending // key and cache `instance.subTree` (the normalized vnode) in - // beforeMount/beforeUpdate hooks. + // mounted/updated hooks. pendingCacheKey = key if (cachedVNode) { From 5b8c1afb74e39045fcb53a011420d26e3f67eab4 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 27 May 2024 16:15:54 +0800 Subject: [PATCH 049/924] fix(compiler-core): make `ForIteratorExpression`'s `returns` property optional (#11011) --- packages/compiler-core/src/ast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/ast.ts b/packages/compiler-core/src/ast.ts index 3f92a99fcbb..91354b1b40b 100644 --- a/packages/compiler-core/src/ast.ts +++ b/packages/compiler-core/src/ast.ts @@ -571,7 +571,7 @@ export interface ForRenderListExpression extends CallExpression { } export interface ForIteratorExpression extends FunctionExpression { - returns: BlockCodegenNode + returns?: BlockCodegenNode } // AST Utilities --------------------------------------------------------------- From b487acdf4420fd874f2cf85f60a61f91b9d92668 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 16:27:59 +0800 Subject: [PATCH 050/924] chore(deps): update all non-major dependencies (#11020) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 ++--- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 42 ++++++++++++++++++------------ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 2180f23593f..4b1551eef8e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.4.27", - "packageManager": "pnpm@9.1.1", + "packageManager": "pnpm@9.1.2", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -94,7 +94,7 @@ "picocolors": "^1.0.1", "prettier": "^3.2.5", "pretty-bytes": "^6.1.1", - "pug": "^3.0.2", + "pug": "^3.0.3", "puppeteer": "~22.7.1", "rimraf": "^5.0.7", "rollup": "^4.17.2", @@ -107,7 +107,7 @@ "terser": "^5.31.0", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^4.10.5", + "tsx": "^4.11.0", "typescript": "~5.4.5", "typescript-eslint": "^7.8.0", "vite": "^5.2.11", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index f91e9596d20..5e7fed635d0 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -61,7 +61,7 @@ "minimatch": "^9.0.4", "postcss-modules": "^6.0.0", "postcss-selector-parser": "^6.0.16", - "pug": "^3.0.2", + "pug": "^3.0.3", "sass": "^1.77.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15410f2931d..1857b33ab40 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -114,8 +114,8 @@ importers: specifier: ^6.1.1 version: 6.1.1 pug: - specifier: ^3.0.2 - version: 3.0.2 + specifier: ^3.0.3 + version: 3.0.3 puppeteer: specifier: ~22.7.1 version: 22.7.1(typescript@5.4.5) @@ -153,8 +153,8 @@ importers: specifier: ^2.6.2 version: 2.6.2 tsx: - specifier: ^4.10.5 - version: 4.10.5 + specifier: ^4.11.0 + version: 4.11.0 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -254,8 +254,8 @@ importers: specifier: ^6.0.16 version: 6.0.16 pug: - specifier: ^3.0.2 - version: 3.0.2 + specifier: ^3.0.3 + version: 3.0.3 sass: specifier: ^1.77.2 version: 1.77.2 @@ -1973,10 +1973,12 @@ packages: glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -2097,6 +2099,7 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -2746,12 +2749,15 @@ packages: pug-attrs@3.0.0: resolution: {integrity: sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==} - pug-code-gen@3.0.2: - resolution: {integrity: sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==} + pug-code-gen@3.0.3: + resolution: {integrity: sha512-cYQg0JW0w32Ux+XTeZnBEeuWrAY7/HNE6TWnhiHGnnRYlCgyAUPoyh9KzCMa9WhcJlJ1AtQqpEYHc+vbCzA+Aw==} pug-error@2.0.0: resolution: {integrity: sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ==} + pug-error@2.1.0: + resolution: {integrity: sha512-lv7sU9e5Jk8IeUheHata6/UThZ7RK2jnaaNztxfPYUY+VxZyk/ePVaNZ/vwmH8WqGvDz3LrNYt/+gA55NDg6Pg==} + pug-filters@4.0.0: resolution: {integrity: sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==} @@ -2776,8 +2782,8 @@ packages: pug-walk@2.0.0: resolution: {integrity: sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ==} - pug@3.0.2: - resolution: {integrity: sha512-bp0I/hiK1D1vChHh6EfDxtndHji55XP/ZJKwsRqrz6lRia6ZC2OZbdAymlxdVFwd1L70ebrVJw4/eZ79skrIaw==} + pug@3.0.3: + resolution: {integrity: sha512-uBi6kmc9f3SZ3PXxqcHiUZLmIXgfgWooKWXcwSGwQd2Zi5Rb0bT14+8CJjJgI8AB+nndLaNgHGrcc6bPIB665g==} pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} @@ -3200,8 +3206,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsx@4.10.5: - resolution: {integrity: sha512-twDSbf7Gtea4I2copqovUiNTEDrT8XNFXsuHpfGbdpW/z9ZW4fTghzzhAG0WfrCuJmJiOEY1nLIjq4u3oujRWQ==} + tsx@4.11.0: + resolution: {integrity: sha512-vzGGELOgAupsNVssAmZjbUDfdm/pWP4R+Kg8TVdsonxbXk0bEpE1qh0yV6/QxUVXaVlNemgcPajGdJJ82n3stg==} engines: {node: '>=18.0.0'} hasBin: true @@ -5799,19 +5805,21 @@ snapshots: js-stringify: 1.0.2 pug-runtime: 3.0.1 - pug-code-gen@3.0.2: + pug-code-gen@3.0.3: dependencies: constantinople: 4.0.1 doctypes: 1.1.0 js-stringify: 1.0.2 pug-attrs: 3.0.0 - pug-error: 2.0.0 + pug-error: 2.1.0 pug-runtime: 3.0.1 void-elements: 3.1.0 with: 7.0.2 pug-error@2.0.0: {} + pug-error@2.1.0: {} + pug-filters@4.0.0: dependencies: constantinople: 4.0.1 @@ -5849,9 +5857,9 @@ snapshots: pug-walk@2.0.0: {} - pug@3.0.2: + pug@3.0.3: dependencies: - pug-code-gen: 3.0.2 + pug-code-gen: 3.0.3 pug-filters: 4.0.0 pug-lexer: 5.0.1 pug-linker: 4.0.0 @@ -6317,7 +6325,7 @@ snapshots: tslib@2.6.2: {} - tsx@4.10.5: + tsx@4.11.0: dependencies: esbuild: 0.20.2 get-tsconfig: 4.7.5 From d1011c07a957d858cb37725b13bc8e4d7a395490 Mon Sep 17 00:00:00 2001 From: edison Date: Mon, 27 May 2024 16:50:49 +0800 Subject: [PATCH 051/924] fix(ssr): fix hydration for node with empty text node (#7216) --- packages/runtime-core/__tests__/hydration.spec.ts | 15 +++++++++++++++ packages/runtime-core/src/hydration.ts | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index ec9613c9571..7d90ea9f331 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -1160,6 +1160,21 @@ describe('SSR hydration', () => { expect((vnode as any).component?.subTree.children[0].el).toBe(text) }) + // #7215 + test('empty text node', () => { + const Comp = { + render(this: any) { + return h('p', ['']) + } + } + const { container } = mountWithHydration('

', () => h(Comp)) + expect(container.childNodes.length).toBe(1) + const p = container.childNodes[0] + expect(p.childNodes.length).toBe(1) + const text = p.childNodes[0] + expect(text.nodeType).toBe(3) + }) + test('app.unmount()', async () => { const container = document.createElement('DIV') container.innerHTML = '' diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index dd3da56a624..87e4c60a253 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -541,7 +541,9 @@ export function createHydrationFunctions( optimized, ) } else if (vnode.type === Text && !vnode.children) { - continue + // #7215 create a TextNode for empty text node + // because server rendered HTML won't contain a text node + insert((vnode.el = createText('')), container) } else { hasMismatch = true if ( From b63566aaeb789067b146e918b50c7876bd73a19a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 16:51:43 +0800 Subject: [PATCH 052/924] fix(deps): update compiler (#11024) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 +- packages/compiler-core/package.json | 4 +- packages/compiler-sfc/package.json | 6 +- packages/vue-compat/package.json | 2 +- pnpm-lock.yaml | 114 +++++++++++++++------------- 5 files changed, 68 insertions(+), 62 deletions(-) diff --git a/package.json b/package.json index 4b1551eef8e..dc06d3ac2ad 100644 --- a/package.json +++ b/package.json @@ -59,8 +59,8 @@ "node": ">=18.12.0" }, "devDependencies": { - "@babel/parser": "^7.24.5", - "@babel/types": "^7.24.5", + "@babel/parser": "^7.24.6", + "@babel/types": "^7.24.6", "@codspeed/vitest-plugin": "^3.1.0", "@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-commonjs": "^25.0.7", diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index bc5849b437b..34c99e1ee91 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -46,13 +46,13 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", "dependencies": { - "@babel/parser": "^7.24.5", + "@babel/parser": "^7.24.6", "@vue/shared": "workspace:*", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" }, "devDependencies": { - "@babel/types": "^7.24.5" + "@babel/types": "^7.24.6" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 5e7fed635d0..33a87604995 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", "dependencies": { - "@babel/parser": "^7.24.5", + "@babel/parser": "^7.24.6", "@vue/compiler-core": "workspace:*", "@vue/compiler-dom": "workspace:*", "@vue/compiler-ssr": "workspace:*", @@ -53,14 +53,14 @@ "source-map-js": "^1.2.0" }, "devDependencies": { - "@babel/types": "^7.24.5", + "@babel/types": "^7.24.6", "@vue/consolidate": "^1.0.0", "hash-sum": "^2.0.0", "lru-cache": "10.1.0", "merge-source-map": "^1.1.0", "minimatch": "^9.0.4", "postcss-modules": "^6.0.0", - "postcss-selector-parser": "^6.0.16", + "postcss-selector-parser": "^6.1.0", "pug": "^3.0.3", "sass": "^1.77.2" } diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index c9c7466f8ac..3eccd8dfdd9 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -52,7 +52,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/vue-compat#readme", "dependencies": { - "@babel/parser": "^7.24.5", + "@babel/parser": "^7.24.6", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1857b33ab40..e3006385d69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: devDependencies: '@babel/parser': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 '@babel/types': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 '@codspeed/vitest-plugin': specifier: ^3.1.0 version: 3.1.0(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) @@ -171,8 +171,8 @@ importers: packages/compiler-core: dependencies: '@babel/parser': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 '@vue/shared': specifier: workspace:* version: link:../shared @@ -187,8 +187,8 @@ importers: version: 1.2.0 devDependencies: '@babel/types': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 packages/compiler-dom: dependencies: @@ -202,8 +202,8 @@ importers: packages/compiler-sfc: dependencies: '@babel/parser': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 '@vue/compiler-core': specifier: workspace:* version: link:../compiler-core @@ -230,8 +230,8 @@ importers: version: 1.2.0 devDependencies: '@babel/types': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 '@vue/consolidate': specifier: ^1.0.0 version: 1.0.0 @@ -251,8 +251,8 @@ importers: specifier: ^6.0.0 version: 6.0.0(postcss@8.4.38) postcss-selector-parser: - specifier: ^6.0.16 - version: 6.0.16 + specifier: ^6.1.0 + version: 6.1.0 pug: specifier: ^3.0.3 version: 3.0.3 @@ -395,8 +395,8 @@ importers: packages/vue-compat: dependencies: '@babel/parser': - specifier: ^7.24.5 - version: 7.24.5 + specifier: ^7.24.6 + version: 7.24.6 estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -467,14 +467,18 @@ packages: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.1': - resolution: {integrity: sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==} + '@babel/helper-string-parser@7.24.6': + resolution: {integrity: sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==} engines: {node: '>=6.9.0'} '@babel/helper-validator-identifier@7.24.5': resolution: {integrity: sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.6': + resolution: {integrity: sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} @@ -487,8 +491,8 @@ packages: resolution: {integrity: sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.5': - resolution: {integrity: sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==} + '@babel/parser@7.24.6': + resolution: {integrity: sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==} engines: {node: '>=6.0.0'} hasBin: true @@ -500,8 +504,8 @@ packages: resolution: {integrity: sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==} engines: {node: '>=6.9.0'} - '@babel/types@7.24.5': - resolution: {integrity: sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==} + '@babel/types@7.24.6': + resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} engines: {node: '>=6.9.0'} '@codspeed/core@3.1.0': @@ -2698,8 +2702,8 @@ packages: peerDependencies: postcss: ^8.0.0 - postcss-selector-parser@6.0.16: - resolution: {integrity: sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==} + postcss-selector-parser@6.1.0: + resolution: {integrity: sha512-UMz42UD0UY0EApS0ZL9o1XnLhSTtvvvLe5Dc2H2O56fvRZi+KulDyf5ctDhhtYJBGKStV2FL1fy6253cmLgqVQ==} engines: {node: '>=4'} postcss-value-parser@4.2.0: @@ -3493,10 +3497,10 @@ snapshots: '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.24.4) '@babel/helpers': 7.24.4 - '@babel/parser': 7.24.5 + '@babel/parser': 7.24.6 '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 convert-source-map: 2.0.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -3507,7 +3511,7 @@ snapshots: '@babel/generator@7.24.4': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 2.5.2 @@ -3525,15 +3529,15 @@ snapshots: '@babel/helper-function-name@7.23.0': dependencies: '@babel/template': 7.24.0 - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@babel/helper-hoist-variables@7.22.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@babel/helper-module-imports@7.24.3': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@babel/helper-module-transforms@7.23.3(@babel/core@7.24.4)': dependencies: @@ -3546,23 +3550,25 @@ snapshots: '@babel/helper-simple-access@7.22.5': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@babel/helper-split-export-declaration@7.22.6': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 - '@babel/helper-string-parser@7.24.1': {} + '@babel/helper-string-parser@7.24.6': {} '@babel/helper-validator-identifier@7.24.5': {} + '@babel/helper-validator-identifier@7.24.6': {} + '@babel/helper-validator-option@7.23.5': {} '@babel/helpers@7.24.4': dependencies: '@babel/template': 7.24.0 '@babel/traverse': 7.24.1 - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 transitivePeerDependencies: - supports-color @@ -3573,15 +3579,15 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.24.5': + '@babel/parser@7.24.6': dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 '@babel/template@7.24.0': dependencies: '@babel/code-frame': 7.24.2 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.24.6 + '@babel/types': 7.24.6 '@babel/traverse@7.24.1': dependencies: @@ -3591,17 +3597,17 @@ snapshots: '@babel/helper-function-name': 7.23.0 '@babel/helper-hoist-variables': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.24.6 + '@babel/types': 7.24.6 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.24.5': + '@babel/types@7.24.6': dependencies: - '@babel/helper-string-parser': 7.24.1 - '@babel/helper-validator-identifier': 7.24.5 + '@babel/helper-string-parser': 7.24.6 + '@babel/helper-validator-identifier': 7.24.6 to-fast-properties: 2.0.0 '@codspeed/core@3.1.0': @@ -4251,7 +4257,7 @@ snapshots: babel-walk@3.0.0-canary-5: dependencies: - '@babel/types': 7.24.5 + '@babel/types': 7.24.6 balanced-match@1.0.2: {} @@ -4467,8 +4473,8 @@ snapshots: constantinople@4.0.1: dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.24.6 + '@babel/types': 7.24.6 content-disposition@0.5.2: {} @@ -5256,7 +5262,7 @@ snapshots: istanbul-lib-instrument@6.0.2: dependencies: '@babel/core': 7.24.4 - '@babel/parser': 7.24.5 + '@babel/parser': 7.24.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 semver: 7.6.2 @@ -5464,8 +5470,8 @@ snapshots: magicast@0.3.4: dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.24.6 + '@babel/types': 7.24.6 source-map-js: 1.2.0 make-dir@4.0.0: @@ -5724,13 +5730,13 @@ snapshots: dependencies: icss-utils: 5.1.0(postcss@8.4.38) postcss: 8.4.38 - postcss-selector-parser: 6.0.16 + postcss-selector-parser: 6.1.0 postcss-value-parser: 4.2.0 postcss-modules-scope@3.2.0(postcss@8.4.38): dependencies: postcss: 8.4.38 - postcss-selector-parser: 6.0.16 + postcss-selector-parser: 6.1.0 postcss-modules-values@4.0.0(postcss@8.4.38): dependencies: @@ -5749,7 +5755,7 @@ snapshots: postcss-modules-values: 4.0.0(postcss@8.4.38) string-hash: 1.1.3 - postcss-selector-parser@6.0.16: + postcss-selector-parser@6.1.0: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 @@ -6500,8 +6506,8 @@ snapshots: with@7.0.2: dependencies: - '@babel/parser': 7.24.5 - '@babel/types': 7.24.5 + '@babel/parser': 7.24.6 + '@babel/types': 7.24.6 assert-never: 1.2.1 babel-walk: 3.0.0-canary-5 From 1ffd5a601b95354c6025648a1c8b8566e2084d54 Mon Sep 17 00:00:00 2001 From: nandi95 <41805560+nandi95@users.noreply.github.com> Date: Mon, 27 May 2024 09:56:59 +0100 Subject: [PATCH 053/924] chore(types): added `getSSRProps` type argument (#5691) --- packages/runtime-core/src/directives.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/directives.ts b/packages/runtime-core/src/directives.ts index daaf28b1518..feff9ad268d 100644 --- a/packages/runtime-core/src/directives.ts +++ b/packages/runtime-core/src/directives.ts @@ -42,8 +42,8 @@ export type DirectiveHook | null, V = any> = ( prevVNode: Prev, ) => void -export type SSRDirectiveHook = ( - binding: DirectiveBinding, +export type SSRDirectiveHook = ( + binding: DirectiveBinding, vnode: VNode, ) => Data | undefined @@ -55,7 +55,7 @@ export interface ObjectDirective { updated?: DirectiveHook, V> beforeUnmount?: DirectiveHook unmounted?: DirectiveHook - getSSRProps?: SSRDirectiveHook + getSSRProps?: SSRDirectiveHook deep?: boolean } From 37f9ef81746f917e0fe16e9f63c7d27c906627b4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 27 May 2024 17:03:03 +0800 Subject: [PATCH 054/924] chore: run prettier --- packages/runtime-core/__tests__/hydration.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/__tests__/hydration.spec.ts b/packages/runtime-core/__tests__/hydration.spec.ts index 7d90ea9f331..933542ab98d 100644 --- a/packages/runtime-core/__tests__/hydration.spec.ts +++ b/packages/runtime-core/__tests__/hydration.spec.ts @@ -1165,7 +1165,7 @@ describe('SSR hydration', () => { const Comp = { render(this: any) { return h('p', ['']) - } + }, } const { container } = mountWithHydration('

', () => h(Comp)) expect(container.childNodes.length).toBe(1) From 07b3c4b7860009e19446f3d78571556c5737d82a Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 27 May 2024 17:04:48 +0800 Subject: [PATCH 055/924] fix(compat): correctly transform non-identifier expressions in legacy filter syntax (#10896) close #10852 --- .../src/compat/transformFilter.ts | 2 ++ .../__tests__/compileTemplate.spec.ts | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/packages/compiler-core/src/compat/transformFilter.ts b/packages/compiler-core/src/compat/transformFilter.ts index 86d11f52a60..52b381567d5 100644 --- a/packages/compiler-core/src/compat/transformFilter.ts +++ b/packages/compiler-core/src/compat/transformFilter.ts @@ -168,6 +168,8 @@ function parseFilter(node: SimpleExpressionNode, context: TransformContext) { expression = wrapFilter(expression, filters[i], context) } node.content = expression + // reset ast since the content is replaced + node.ast = undefined } } diff --git a/packages/compiler-sfc/__tests__/compileTemplate.spec.ts b/packages/compiler-sfc/__tests__/compileTemplate.spec.ts index 45dc54a69db..2ea1eb9d378 100644 --- a/packages/compiler-sfc/__tests__/compileTemplate.spec.ts +++ b/packages/compiler-sfc/__tests__/compileTemplate.spec.ts @@ -1,4 +1,5 @@ import { type RawSourceMap, SourceMapConsumer } from 'source-map-js' +import { parse as babelParse } from '@babel/parser' import { type SFCTemplateCompileOptions, compileTemplate, @@ -452,6 +453,36 @@ test('prefixing edge case for reused AST ssr mode', () => { ).not.toThrowError() }) +// #10852 +test('non-identifier expression in legacy filter syntax', () => { + const src = ` + + ` + + const { descriptor } = parse(src) + const compilationResult = compileTemplate({ + id: 'xxx', + filename: 'test.vue', + ast: descriptor.template!.ast, + source: descriptor.template!.content, + ssr: false, + compilerOptions: { + compatConfig: { + MODE: 2, + }, + }, + }) + + expect(() => { + babelParse(compilationResult.code, { sourceType: 'module' }) + }).not.toThrow() +}) + interface Pos { line: number column: number From 0f66de910fb43c71c1da0575759e6d5a9f0e91b9 Mon Sep 17 00:00:00 2001 From: Travis Date: Mon, 27 May 2024 17:06:04 +0800 Subject: [PATCH 056/924] chore(sfc-playground): add pnpm usage to download template (#7815) --- packages/sfc-playground/src/download/template/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/sfc-playground/src/download/template/README.md b/packages/sfc-playground/src/download/template/README.md index 9c43370cb8a..91b21489fd5 100644 --- a/packages/sfc-playground/src/download/template/README.md +++ b/packages/sfc-playground/src/download/template/README.md @@ -1,6 +1,6 @@ # Vite Vue Starter -This is a project template using [Vite](https://vitejs.dev/). It requires [Node.js](https://nodejs.org) version 18+, 20+. +This is a project template using [Vite](https://vitejs.dev/). It requires [Node.js](https://nodejs.org) version 18+ or 20+. To start: @@ -11,4 +11,8 @@ npm run dev # if using yarn: yarn yarn dev + +# if using pnpm: +pnpm install +pnpm run dev ``` From a498b4ef15554689acc50c91a093758f1858d393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=9B=BE=E4=B8=89=E8=AF=AD?= <32354856+baiwusanyu-c@users.noreply.github.com> Date: Mon, 27 May 2024 17:06:48 +0800 Subject: [PATCH 057/924] refactor(server-renderer): slotScopeId scopeId uses optional argument syntax (#7891) --- packages/server-renderer/src/render.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server-renderer/src/render.ts b/packages/server-renderer/src/render.ts index 3029df6e540..28a78c66843 100644 --- a/packages/server-renderer/src/render.ts +++ b/packages/server-renderer/src/render.ts @@ -275,7 +275,7 @@ export function renderVNodeChildren( push: PushFn, children: VNodeArrayChildren, parentComponent: ComponentInternalInstance, - slotScopeId: string | undefined, + slotScopeId?: string, ) { for (let i = 0; i < children.length; i++) { renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId) @@ -286,7 +286,7 @@ function renderElementVNode( push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, - slotScopeId: string | undefined, + slotScopeId?: string, ) { const tag = vnode.type as string let { props, children, shapeFlag, scopeId, dirs } = vnode @@ -371,7 +371,7 @@ function renderTeleportVNode( push: PushFn, vnode: VNode, parentComponent: ComponentInternalInstance, - slotScopeId: string | undefined, + slotScopeId?: string, ) { const target = vnode.props && vnode.props.to const disabled = vnode.props && vnode.props.disabled From ae36b1a6642f59a218311c902d82c9c18eb3061d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9C=E6=96=B9os?= Date: Mon, 27 May 2024 17:07:38 +0800 Subject: [PATCH 058/924] refactor(runtime-core): prevent users from manually calling lifecycle hook function (#8731) --- packages/runtime-core/src/apiLifecycle.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/runtime-core/src/apiLifecycle.ts b/packages/runtime-core/src/apiLifecycle.ts index 741d43ec45c..cfaf7636e9a 100644 --- a/packages/runtime-core/src/apiLifecycle.ts +++ b/packages/runtime-core/src/apiLifecycle.ts @@ -68,10 +68,15 @@ export function injectHook( export const createHook = any>(lifecycle: LifecycleHooks) => - (hook: T, target: ComponentInternalInstance | null = currentInstance) => + (hook: T, target: ComponentInternalInstance | null = currentInstance) => { // post-create lifecycle registrations are noops during SSR (except for serverPrefetch) - (!isInSSRComponentSetup || lifecycle === LifecycleHooks.SERVER_PREFETCH) && - injectHook(lifecycle, (...args: unknown[]) => hook(...args), target) + if ( + !isInSSRComponentSetup || + lifecycle === LifecycleHooks.SERVER_PREFETCH + ) { + injectHook(lifecycle, (...args: unknown[]) => hook(...args), target) + } + } export const onBeforeMount = createHook(LifecycleHooks.BEFORE_MOUNT) export const onMounted = createHook(LifecycleHooks.MOUNTED) From 82458b22394993c5d5ef9c9d45981b2cc909c3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9C=E6=96=B9os?= Date: Mon, 27 May 2024 17:08:14 +0800 Subject: [PATCH 059/924] refactor: replace `Object.assign` with `extend` (#8988) --- packages/runtime-core/src/componentPublicInstance.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index b43accfa0a3..357ad280b9b 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -396,9 +396,7 @@ export const PublicInstanceProxyHandlers: ProxyHandler = { return desc.get.call(instance.proxy) } else { const val = globalProperties[key] - return isFunction(val) - ? Object.assign(val.bind(instance.proxy), val) - : val + return isFunction(val) ? extend(val.bind(instance.proxy), val) : val } } else { return globalProperties[key] From a501a85a7c910868e01a5c70a2abea4e9d9e87f3 Mon Sep 17 00:00:00 2001 From: 4xi-2000 <73146951+4xii@users.noreply.github.com> Date: Mon, 27 May 2024 17:21:54 +0800 Subject: [PATCH 060/924] feat(compiler-core): support `Symbol` global in template expressions (#9069) --- packages/shared/src/globalsAllowList.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/globalsAllowList.ts b/packages/shared/src/globalsAllowList.ts index 210650e3e2b..ca2cba60159 100644 --- a/packages/shared/src/globalsAllowList.ts +++ b/packages/shared/src/globalsAllowList.ts @@ -3,7 +3,7 @@ import { makeMap } from './makeMap' const GLOBALS_ALLOWED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' + 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' + - 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error' + 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol' export const isGloballyAllowed = /*#__PURE__*/ makeMap(GLOBALS_ALLOWED) From baa656ee417d80f3c497bf47a63dd764b371666e Mon Sep 17 00:00:00 2001 From: chenfan <83797583+chenfan0@users.noreply.github.com> Date: Mon, 27 May 2024 17:31:11 +0800 Subject: [PATCH 061/924] chore(reactivity): improve readonly/reactive warning message (#9095) --- packages/reactivity/src/reactive.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/reactivity/src/reactive.ts b/packages/reactivity/src/reactive.ts index f6fcbbdb98f..a3e7ecc7b56 100644 --- a/packages/reactivity/src/reactive.ts +++ b/packages/reactivity/src/reactive.ts @@ -248,7 +248,11 @@ function createReactiveObject( ) { if (!isObject(target)) { if (__DEV__) { - warn(`value cannot be made reactive: ${String(target)}`) + warn( + `value cannot be made ${isReadonly ? 'readonly' : 'reactive'}: ${String( + target, + )}`, + ) } return target } From 56f5692fb6f483a4f9b757dade7cd415bde82714 Mon Sep 17 00:00:00 2001 From: Simon He <57086651+Simon-He95@users.noreply.github.com> Date: Mon, 27 May 2024 17:59:29 +0800 Subject: [PATCH 062/924] refactor(compiler-sfc): defineOptions avoid redundant conditional judgments (#9453) --- .../compiler-sfc/src/script/defineOptions.ts | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/compiler-sfc/src/script/defineOptions.ts b/packages/compiler-sfc/src/script/defineOptions.ts index 8e32e0fba82..0ab6de3080b 100644 --- a/packages/compiler-sfc/src/script/defineOptions.ts +++ b/packages/compiler-sfc/src/script/defineOptions.ts @@ -37,10 +37,23 @@ export function processDefineOptions( (prop.type === 'ObjectProperty' || prop.type === 'ObjectMethod') && prop.key.type === 'Identifier' ) { - if (prop.key.name === 'props') propsOption = prop - if (prop.key.name === 'emits') emitsOption = prop - if (prop.key.name === 'expose') exposeOption = prop - if (prop.key.name === 'slots') slotsOption = prop + switch (prop.key.name) { + case 'props': + propsOption = prop + break + + case 'emits': + emitsOption = prop + break + + case 'expose': + exposeOption = prop + break + + case 'slots': + slotsOption = prop + break + } } } } From 7d4e5750ba577865ad4fab4f812a8339915fa08e Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Mon, 27 May 2024 11:01:25 +0100 Subject: [PATCH 063/924] dx(runtime-core): log the component object when warning about missing template/render function (#10263) --- packages/runtime-core/src/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 6f30053cfc2..3481fc3385c 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -1006,7 +1006,7 @@ export function finishComponentSetup( : ``) /* should not happen */, ) } else { - warn(`Component is missing template or render function.`) + warn(`Component is missing template or render function: `, Component) } } } From 78ed837e7d2e52b6b43594817eec09a48615ac6b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 18:01:56 +0800 Subject: [PATCH 064/924] chore(deps): update build (#11021) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 +- pnpm-lock.yaml | 443 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 302 insertions(+), 147 deletions(-) diff --git a/package.json b/package.json index dc06d3ac2ad..30f0c31d5eb 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@babel/types": "^7.24.6", "@codspeed/vitest-plugin": "^3.1.0", "@rollup/plugin-alias": "^5.1.0", - "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-commonjs": "^25.0.8", "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "5.0.4", @@ -76,7 +76,7 @@ "@vue/consolidate": "1.0.0", "conventional-changelog-cli": "^4.1.0", "enquirer": "^2.4.1", - "esbuild": "^0.21.3", + "esbuild": "^0.21.4", "esbuild-plugin-polyfill-node": "^0.3.0", "eslint": "^9.2.0", "eslint-plugin-import-x": "^0.5.0", @@ -97,7 +97,7 @@ "pug": "^3.0.3", "puppeteer": "~22.7.1", "rimraf": "^5.0.7", - "rollup": "^4.17.2", + "rollup": "^4.18.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 e3006385d69..ab632a5b62c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,22 +19,22 @@ importers: version: 3.1.0(vite@5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0))(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) '@rollup/plugin-alias': specifier: ^5.1.0 - version: 5.1.0(rollup@4.17.2) + version: 5.1.0(rollup@4.18.0) '@rollup/plugin-commonjs': - specifier: ^25.0.7 - version: 25.0.7(rollup@4.17.2) + specifier: ^25.0.8 + version: 25.0.8(rollup@4.18.0) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.17.2) + version: 6.1.0(rollup@4.18.0) '@rollup/plugin-node-resolve': specifier: ^15.2.3 - version: 15.2.3(rollup@4.17.2) + version: 15.2.3(rollup@4.18.0) '@rollup/plugin-replace': specifier: 5.0.4 - version: 5.0.4(rollup@4.17.2) + version: 5.0.4(rollup@4.18.0) '@rollup/plugin-terser': specifier: ^0.4.4 - version: 0.4.4(rollup@4.17.2) + version: 0.4.4(rollup@4.18.0) '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 @@ -60,11 +60,11 @@ importers: specifier: ^2.4.1 version: 2.4.1 esbuild: - specifier: ^0.21.3 - version: 0.21.3 + specifier: ^0.21.4 + version: 0.21.4 esbuild-plugin-polyfill-node: specifier: ^0.3.0 - version: 0.3.0(esbuild@0.21.3) + version: 0.3.0(esbuild@0.21.4) eslint: specifier: ^9.2.0 version: 9.2.0 @@ -123,17 +123,17 @@ importers: specifier: ^5.0.7 version: 5.0.7 rollup: - specifier: ^4.17.2 - version: 4.17.2 + specifier: ^4.18.0 + version: 4.18.0 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.17.2)(typescript@5.4.5) + version: 6.1.1(rollup@4.18.0)(typescript@5.4.5) rollup-plugin-esbuild: specifier: ^6.1.1 - version: 6.1.1(esbuild@0.21.3)(rollup@4.17.2) + version: 6.1.1(esbuild@0.21.4)(rollup@4.18.0) rollup-plugin-polyfill-node: specifier: ^0.13.0 - version: 0.13.0(rollup@4.17.2) + version: 0.13.0(rollup@4.18.0) semver: specifier: ^7.6.2 version: 7.6.2 @@ -523,8 +523,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.21.3': - resolution: {integrity: sha512-yTgnwQpFVYfvvo4SvRFB0SwrW8YjOxEoT7wfMT7Ol5v7v5LDNvSGo67aExmxOb87nQNeWPVvaGBNfQ7BXcrZ9w==} + '@esbuild/aix-ppc64@0.21.4': + resolution: {integrity: sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -535,8 +535,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.21.3': - resolution: {integrity: sha512-c+ty9necz3zB1Y+d/N+mC6KVVkGUUOcm4ZmT5i/Fk5arOaY3i6CA3P5wo/7+XzV8cb4GrI/Zjp8NuOQ9Lfsosw==} + '@esbuild/android-arm64@0.21.4': + resolution: {integrity: sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -547,8 +547,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.21.3': - resolution: {integrity: sha512-bviJOLMgurLJtF1/mAoJLxDZDL6oU5/ztMHnJQRejbJrSc9FFu0QoUoFhvi6qSKJEw9y5oGyvr9fuDtzJ30rNQ==} + '@esbuild/android-arm@0.21.4': + resolution: {integrity: sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -559,8 +559,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.21.3': - resolution: {integrity: sha512-JReHfYCRK3FVX4Ra+y5EBH1b9e16TV2OxrPAvzMsGeES0X2Ndm9ImQRI4Ket757vhc5XBOuGperw63upesclRw==} + '@esbuild/android-x64@0.21.4': + resolution: {integrity: sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -571,8 +571,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.21.3': - resolution: {integrity: sha512-U3fuQ0xNiAkXOmQ6w5dKpEvXQRSpHOnbw7gEfHCRXPeTKW9sBzVck6C5Yneb8LfJm0l6le4NQfkNPnWMSlTFUQ==} + '@esbuild/darwin-arm64@0.21.4': + resolution: {integrity: sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -583,8 +583,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.21.3': - resolution: {integrity: sha512-3m1CEB7F07s19wmaMNI2KANLcnaqryJxO1fXHUV5j1rWn+wMxdUYoPyO2TnAbfRZdi7ADRwJClmOwgT13qlP3Q==} + '@esbuild/darwin-x64@0.21.4': + resolution: {integrity: sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -595,8 +595,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.21.3': - resolution: {integrity: sha512-fsNAAl5pU6wmKHq91cHWQT0Fz0vtyE1JauMzKotrwqIKAswwP5cpHUCxZNSTuA/JlqtScq20/5KZ+TxQdovU/g==} + '@esbuild/freebsd-arm64@0.21.4': + resolution: {integrity: sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -607,8 +607,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.21.3': - resolution: {integrity: sha512-tci+UJ4zP5EGF4rp8XlZIdq1q1a/1h9XuronfxTMCNBslpCtmk97Q/5qqy1Mu4zIc0yswN/yP/BLX+NTUC1bXA==} + '@esbuild/freebsd-x64@0.21.4': + resolution: {integrity: sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -619,8 +619,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.21.3': - resolution: {integrity: sha512-vvG6R5g5ieB4eCJBQevyDMb31LMHthLpXTc2IGkFnPWS/GzIFDnaYFp558O+XybTmYrVjxnryru7QRleJvmZ6Q==} + '@esbuild/linux-arm64@0.21.4': + resolution: {integrity: sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -631,8 +631,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.21.3': - resolution: {integrity: sha512-f6kz2QpSuyHHg01cDawj0vkyMwuIvN62UAguQfnNVzbge2uWLhA7TCXOn83DT0ZvyJmBI943MItgTovUob36SQ==} + '@esbuild/linux-arm@0.21.4': + resolution: {integrity: sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -643,8 +643,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.21.3': - resolution: {integrity: sha512-HjCWhH7K96Na+66TacDLJmOI9R8iDWDDiqe17C7znGvvE4sW1ECt9ly0AJ3dJH62jHyVqW9xpxZEU1jKdt+29A==} + '@esbuild/linux-ia32@0.21.4': + resolution: {integrity: sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -655,8 +655,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.21.3': - resolution: {integrity: sha512-BGpimEccmHBZRcAhdlRIxMp7x9PyJxUtj7apL2IuoG9VxvU/l/v1z015nFs7Si7tXUwEsvjc1rOJdZCn4QTU+Q==} + '@esbuild/linux-loong64@0.21.4': + resolution: {integrity: sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -667,8 +667,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.21.3': - resolution: {integrity: sha512-5rMOWkp7FQGtAH3QJddP4w3s47iT20hwftqdm7b+loe95o8JU8ro3qZbhgMRy0VuFU0DizymF1pBKkn3YHWtsw==} + '@esbuild/linux-mips64el@0.21.4': + resolution: {integrity: sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -679,8 +679,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.21.3': - resolution: {integrity: sha512-h0zj1ldel89V5sjPLo5H1SyMzp4VrgN1tPkN29TmjvO1/r0MuMRwJxL8QY05SmfsZRs6TF0c/IDH3u7XYYmbAg==} + '@esbuild/linux-ppc64@0.21.4': + resolution: {integrity: sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -691,8 +691,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.21.3': - resolution: {integrity: sha512-dkAKcTsTJ+CRX6bnO17qDJbLoW37npd5gSNtSzjYQr0svghLJYGYB0NF1SNcU1vDcjXLYS5pO4qOW4YbFama4A==} + '@esbuild/linux-riscv64@0.21.4': + resolution: {integrity: sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -703,8 +703,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.21.3': - resolution: {integrity: sha512-vnD1YUkovEdnZWEuMmy2X2JmzsHQqPpZElXx6dxENcIwTu+Cu5ERax6+Ke1QsE814Zf3c6rxCfwQdCTQ7tPuXA==} + '@esbuild/linux-s390x@0.21.4': + resolution: {integrity: sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -715,8 +715,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.21.3': - resolution: {integrity: sha512-IOXOIm9WaK7plL2gMhsWJd+l2bfrhfilv0uPTptoRoSb2p09RghhQQp9YY6ZJhk/kqmeRt6siRdMSLLwzuT0KQ==} + '@esbuild/linux-x64@0.21.4': + resolution: {integrity: sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -727,8 +727,8 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.21.3': - resolution: {integrity: sha512-uTgCwsvQ5+vCQnqM//EfDSuomo2LhdWhFPS8VL8xKf+PKTCrcT/2kPPoWMTs22aB63MLdGMJiE3f1PHvCDmUOw==} + '@esbuild/netbsd-x64@0.21.4': + resolution: {integrity: sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -739,8 +739,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.21.3': - resolution: {integrity: sha512-vNAkR17Ub2MgEud2Wag/OE4HTSI6zlb291UYzHez/psiKarp0J8PKGDnAhMBcHFoOHMXHfExzmjMojJNbAStrQ==} + '@esbuild/openbsd-x64@0.21.4': + resolution: {integrity: sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -751,8 +751,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.21.3': - resolution: {integrity: sha512-W8H9jlGiSBomkgmouaRoTXo49j4w4Kfbl6I1bIdO/vT0+0u4f20ko3ELzV3hPI6XV6JNBVX+8BC+ajHkvffIJA==} + '@esbuild/sunos-x64@0.21.4': + resolution: {integrity: sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -763,8 +763,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.21.3': - resolution: {integrity: sha512-EjEomwyLSCg8Ag3LDILIqYCZAq/y3diJ04PnqGRgq8/4O3VNlXyMd54j/saShaN4h5o5mivOjAzmU6C3X4v0xw==} + '@esbuild/win32-arm64@0.21.4': + resolution: {integrity: sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -775,8 +775,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.21.3': - resolution: {integrity: sha512-WGiE/GgbsEwR33++5rzjiYsKyHywE8QSZPF7Rfx9EBfK3Qn3xyR6IjyCr5Uk38Kg8fG4/2phN7sXp4NPWd3fcw==} + '@esbuild/win32-ia32@0.21.4': + resolution: {integrity: sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -787,8 +787,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.3': - resolution: {integrity: sha512-xRxC0jaJWDLYvcUvjQmHCJSfMrgmUuvsoXgDeU/wTorQ1ngDdUBuFtgY3W1Pc5sprGAvZBtWdJX7RPg/iZZUqA==} + '@esbuild/win32-x64@0.21.4': + resolution: {integrity: sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -896,8 +896,8 @@ packages: rollup: optional: true - '@rollup/plugin-commonjs@25.0.7': - resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} + '@rollup/plugin-commonjs@25.0.8': + resolution: {integrity: sha512-ZEZWTK5n6Qde0to4vS9Mr5x/0UZoqCxPVR9KRUjU4kA2sO7GEUn1fop0DAwpO6z0Nw/kJON9bDmSxdWxO/TT1A==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.68.0||^3.0.0||^4.0.0 @@ -964,81 +964,161 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.18.0': + resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.17.2': resolution: {integrity: sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.18.0': + resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.17.2': resolution: {integrity: sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.18.0': + resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.17.2': resolution: {integrity: sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.18.0': + resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': resolution: {integrity: sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.17.2': resolution: {integrity: sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.18.0': + resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.17.2': resolution: {integrity: sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.18.0': + resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.17.2': resolution: {integrity: sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.18.0': + resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': resolution: {integrity: sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==} cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.17.2': resolution: {integrity: sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.18.0': + resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.17.2': resolution: {integrity: sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.18.0': + resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.17.2': resolution: {integrity: sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.18.0': + resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.17.2': resolution: {integrity: sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.18.0': + resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} + cpu: [x64] + os: [linux] + '@rollup/rollup-win32-arm64-msvc@4.17.2': resolution: {integrity: sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.18.0': + resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.17.2': resolution: {integrity: sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.18.0': + resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} + cpu: [ia32] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.17.2': resolution: {integrity: sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.18.0': + resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} + cpu: [x64] + os: [win32] + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -1720,8 +1800,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.21.3: - resolution: {integrity: sha512-Kgq0/ZsAPzKrbOjCQcjoSmPoWhlcVnGAUo7jvaLHoxW1Drto0KGkR1xBNg2Cp43b9ImvxmPEJZ9xkfcnqPsfBw==} + esbuild@0.21.4: + resolution: {integrity: sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==} engines: {node: '>=12'} hasBin: true @@ -2919,6 +2999,11 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.18.0: + resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} @@ -3630,139 +3715,139 @@ snapshots: '@esbuild/aix-ppc64@0.20.2': optional: true - '@esbuild/aix-ppc64@0.21.3': + '@esbuild/aix-ppc64@0.21.4': optional: true '@esbuild/android-arm64@0.20.2': optional: true - '@esbuild/android-arm64@0.21.3': + '@esbuild/android-arm64@0.21.4': optional: true '@esbuild/android-arm@0.20.2': optional: true - '@esbuild/android-arm@0.21.3': + '@esbuild/android-arm@0.21.4': optional: true '@esbuild/android-x64@0.20.2': optional: true - '@esbuild/android-x64@0.21.3': + '@esbuild/android-x64@0.21.4': optional: true '@esbuild/darwin-arm64@0.20.2': optional: true - '@esbuild/darwin-arm64@0.21.3': + '@esbuild/darwin-arm64@0.21.4': optional: true '@esbuild/darwin-x64@0.20.2': optional: true - '@esbuild/darwin-x64@0.21.3': + '@esbuild/darwin-x64@0.21.4': optional: true '@esbuild/freebsd-arm64@0.20.2': optional: true - '@esbuild/freebsd-arm64@0.21.3': + '@esbuild/freebsd-arm64@0.21.4': optional: true '@esbuild/freebsd-x64@0.20.2': optional: true - '@esbuild/freebsd-x64@0.21.3': + '@esbuild/freebsd-x64@0.21.4': optional: true '@esbuild/linux-arm64@0.20.2': optional: true - '@esbuild/linux-arm64@0.21.3': + '@esbuild/linux-arm64@0.21.4': optional: true '@esbuild/linux-arm@0.20.2': optional: true - '@esbuild/linux-arm@0.21.3': + '@esbuild/linux-arm@0.21.4': optional: true '@esbuild/linux-ia32@0.20.2': optional: true - '@esbuild/linux-ia32@0.21.3': + '@esbuild/linux-ia32@0.21.4': optional: true '@esbuild/linux-loong64@0.20.2': optional: true - '@esbuild/linux-loong64@0.21.3': + '@esbuild/linux-loong64@0.21.4': optional: true '@esbuild/linux-mips64el@0.20.2': optional: true - '@esbuild/linux-mips64el@0.21.3': + '@esbuild/linux-mips64el@0.21.4': optional: true '@esbuild/linux-ppc64@0.20.2': optional: true - '@esbuild/linux-ppc64@0.21.3': + '@esbuild/linux-ppc64@0.21.4': optional: true '@esbuild/linux-riscv64@0.20.2': optional: true - '@esbuild/linux-riscv64@0.21.3': + '@esbuild/linux-riscv64@0.21.4': optional: true '@esbuild/linux-s390x@0.20.2': optional: true - '@esbuild/linux-s390x@0.21.3': + '@esbuild/linux-s390x@0.21.4': optional: true '@esbuild/linux-x64@0.20.2': optional: true - '@esbuild/linux-x64@0.21.3': + '@esbuild/linux-x64@0.21.4': optional: true '@esbuild/netbsd-x64@0.20.2': optional: true - '@esbuild/netbsd-x64@0.21.3': + '@esbuild/netbsd-x64@0.21.4': optional: true '@esbuild/openbsd-x64@0.20.2': optional: true - '@esbuild/openbsd-x64@0.21.3': + '@esbuild/openbsd-x64@0.21.4': optional: true '@esbuild/sunos-x64@0.20.2': optional: true - '@esbuild/sunos-x64@0.21.3': + '@esbuild/sunos-x64@0.21.4': optional: true '@esbuild/win32-arm64@0.20.2': optional: true - '@esbuild/win32-arm64@0.21.3': + '@esbuild/win32-arm64@0.21.4': optional: true '@esbuild/win32-ia32@0.20.2': optional: true - '@esbuild/win32-ia32@0.21.3': + '@esbuild/win32-ia32@0.21.4': optional: true '@esbuild/win32-x64@0.20.2': optional: true - '@esbuild/win32-x64@0.21.3': + '@esbuild/win32-x64@0.21.4': optional: true '@eslint-community/eslint-utils@4.4.0(eslint@9.2.0)': @@ -3871,119 +3956,167 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/plugin-alias@5.1.0(rollup@4.17.2)': + '@rollup/plugin-alias@5.1.0(rollup@4.18.0)': dependencies: slash: 4.0.0 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-commonjs@25.0.7(rollup@4.17.2)': + '@rollup/plugin-commonjs@25.0.8(rollup@4.18.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-inject@5.0.5(rollup@4.17.2)': + '@rollup/plugin-inject@5.0.5(rollup@4.18.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) estree-walker: 2.0.2 magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-json@6.1.0(rollup@4.17.2)': + '@rollup/plugin-json@6.1.0(rollup@4.18.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-node-resolve@15.2.3(rollup@4.17.2)': + '@rollup/plugin-node-resolve@15.2.3(rollup@4.18.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-replace@5.0.4(rollup@4.17.2)': + '@rollup/plugin-replace@5.0.4(rollup@4.18.0)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) magic-string: 0.30.10 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/plugin-terser@0.4.4(rollup@4.17.2)': + '@rollup/plugin-terser@0.4.4(rollup@4.18.0)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 terser: 5.31.0 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 - '@rollup/pluginutils@5.1.0(rollup@4.17.2)': + '@rollup/pluginutils@5.1.0(rollup@4.18.0)': dependencies: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.17.2 + rollup: 4.18.0 '@rollup/rollup-android-arm-eabi@4.17.2': optional: true + '@rollup/rollup-android-arm-eabi@4.18.0': + optional: true + '@rollup/rollup-android-arm64@4.17.2': optional: true + '@rollup/rollup-android-arm64@4.18.0': + optional: true + '@rollup/rollup-darwin-arm64@4.17.2': optional: true + '@rollup/rollup-darwin-arm64@4.18.0': + optional: true + '@rollup/rollup-darwin-x64@4.17.2': optional: true + '@rollup/rollup-darwin-x64@4.18.0': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.17.2': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.17.2': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.18.0': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.17.2': optional: true + '@rollup/rollup-linux-arm64-gnu@4.18.0': + optional: true + '@rollup/rollup-linux-arm64-musl@4.17.2': optional: true + '@rollup/rollup-linux-arm64-musl@4.18.0': + optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.17.2': optional: true + '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.17.2': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.18.0': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.17.2': optional: true + '@rollup/rollup-linux-s390x-gnu@4.18.0': + optional: true + '@rollup/rollup-linux-x64-gnu@4.17.2': optional: true + '@rollup/rollup-linux-x64-gnu@4.18.0': + optional: true + '@rollup/rollup-linux-x64-musl@4.17.2': optional: true + '@rollup/rollup-linux-x64-musl@4.18.0': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.17.2': optional: true + '@rollup/rollup-win32-arm64-msvc@4.18.0': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.17.2': optional: true + '@rollup/rollup-win32-ia32-msvc@4.18.0': + optional: true + '@rollup/rollup-win32-x64-msvc@4.17.2': optional: true + '@rollup/rollup-win32-x64-msvc@4.18.0': + optional: true + '@sinclair/typebox@0.27.8': {} '@tootallnate/quickjs-emscripten@0.23.0': {} @@ -4683,10 +4816,10 @@ snapshots: es-module-lexer@1.5.0: {} - esbuild-plugin-polyfill-node@0.3.0(esbuild@0.21.3): + esbuild-plugin-polyfill-node@0.3.0(esbuild@0.21.4): dependencies: '@jspm/core': 2.0.1 - esbuild: 0.21.3 + esbuild: 0.21.4 import-meta-resolve: 3.1.1 esbuild@0.20.2: @@ -4715,31 +4848,31 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - esbuild@0.21.3: + esbuild@0.21.4: optionalDependencies: - '@esbuild/aix-ppc64': 0.21.3 - '@esbuild/android-arm': 0.21.3 - '@esbuild/android-arm64': 0.21.3 - '@esbuild/android-x64': 0.21.3 - '@esbuild/darwin-arm64': 0.21.3 - '@esbuild/darwin-x64': 0.21.3 - '@esbuild/freebsd-arm64': 0.21.3 - '@esbuild/freebsd-x64': 0.21.3 - '@esbuild/linux-arm': 0.21.3 - '@esbuild/linux-arm64': 0.21.3 - '@esbuild/linux-ia32': 0.21.3 - '@esbuild/linux-loong64': 0.21.3 - '@esbuild/linux-mips64el': 0.21.3 - '@esbuild/linux-ppc64': 0.21.3 - '@esbuild/linux-riscv64': 0.21.3 - '@esbuild/linux-s390x': 0.21.3 - '@esbuild/linux-x64': 0.21.3 - '@esbuild/netbsd-x64': 0.21.3 - '@esbuild/openbsd-x64': 0.21.3 - '@esbuild/sunos-x64': 0.21.3 - '@esbuild/win32-arm64': 0.21.3 - '@esbuild/win32-ia32': 0.21.3 - '@esbuild/win32-x64': 0.21.3 + '@esbuild/aix-ppc64': 0.21.4 + '@esbuild/android-arm': 0.21.4 + '@esbuild/android-arm64': 0.21.4 + '@esbuild/android-x64': 0.21.4 + '@esbuild/darwin-arm64': 0.21.4 + '@esbuild/darwin-x64': 0.21.4 + '@esbuild/freebsd-arm64': 0.21.4 + '@esbuild/freebsd-x64': 0.21.4 + '@esbuild/linux-arm': 0.21.4 + '@esbuild/linux-arm64': 0.21.4 + '@esbuild/linux-ia32': 0.21.4 + '@esbuild/linux-loong64': 0.21.4 + '@esbuild/linux-mips64el': 0.21.4 + '@esbuild/linux-ppc64': 0.21.4 + '@esbuild/linux-riscv64': 0.21.4 + '@esbuild/linux-s390x': 0.21.4 + '@esbuild/linux-x64': 0.21.4 + '@esbuild/netbsd-x64': 0.21.4 + '@esbuild/openbsd-x64': 0.21.4 + '@esbuild/sunos-x64': 0.21.4 + '@esbuild/win32-arm64': 0.21.4 + '@esbuild/win32-ia32': 0.21.4 + '@esbuild/win32-x64': 0.21.4 escalade@3.1.2: {} @@ -5998,29 +6131,29 @@ snapshots: dependencies: glob: 10.3.12 - rollup-plugin-dts@6.1.1(rollup@4.17.2)(typescript@5.4.5): + rollup-plugin-dts@6.1.1(rollup@4.18.0)(typescript@5.4.5): dependencies: magic-string: 0.30.10 - rollup: 4.17.2 + rollup: 4.18.0 typescript: 5.4.5 optionalDependencies: '@babel/code-frame': 7.24.2 - rollup-plugin-esbuild@6.1.1(esbuild@0.21.3)(rollup@4.17.2): + rollup-plugin-esbuild@6.1.1(esbuild@0.21.4)(rollup@4.18.0): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.17.2) + '@rollup/pluginutils': 5.1.0(rollup@4.18.0) debug: 4.3.4 es-module-lexer: 1.5.0 - esbuild: 0.21.3 + esbuild: 0.21.4 get-tsconfig: 4.7.5 - rollup: 4.17.2 + rollup: 4.18.0 transitivePeerDependencies: - supports-color - rollup-plugin-polyfill-node@0.13.0(rollup@4.17.2): + rollup-plugin-polyfill-node@0.13.0(rollup@4.18.0): dependencies: - '@rollup/plugin-inject': 5.0.5(rollup@4.17.2) - rollup: 4.17.2 + '@rollup/plugin-inject': 5.0.5(rollup@4.18.0) + rollup: 4.18.0 rollup@4.17.2: dependencies: @@ -6044,6 +6177,28 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.17.2 fsevents: 2.3.3 + rollup@4.18.0: + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.18.0 + '@rollup/rollup-android-arm64': 4.18.0 + '@rollup/rollup-darwin-arm64': 4.18.0 + '@rollup/rollup-darwin-x64': 4.18.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 + '@rollup/rollup-linux-arm-musleabihf': 4.18.0 + '@rollup/rollup-linux-arm64-gnu': 4.18.0 + '@rollup/rollup-linux-arm64-musl': 4.18.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 + '@rollup/rollup-linux-riscv64-gnu': 4.18.0 + '@rollup/rollup-linux-s390x-gnu': 4.18.0 + '@rollup/rollup-linux-x64-gnu': 4.18.0 + '@rollup/rollup-linux-x64-musl': 4.18.0 + '@rollup/rollup-win32-arm64-msvc': 4.18.0 + '@rollup/rollup-win32-ia32-msvc': 4.18.0 + '@rollup/rollup-win32-x64-msvc': 4.18.0 + fsevents: 2.3.3 + rrweb-cssom@0.6.0: {} run-parallel@1.2.0: From c6a4c08be9551d7b917611ff8a9d8f6160a1146c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 18:09:17 +0800 Subject: [PATCH 065/924] chore(deps): update lint (#11025) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 8 +- pnpm-lock.yaml | 272 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 185 insertions(+), 95 deletions(-) diff --git a/package.json b/package.json index 30f0c31d5eb..cb211ed4b69 100644 --- a/package.json +++ b/package.json @@ -78,13 +78,13 @@ "enquirer": "^2.4.1", "esbuild": "^0.21.4", "esbuild-plugin-polyfill-node": "^0.3.0", - "eslint": "^9.2.0", - "eslint-plugin-import-x": "^0.5.0", + "eslint": "^9.3.0", + "eslint-plugin-import-x": "^0.5.1", "eslint-plugin-vitest": "^0.5.4", "estree-walker": "^2.0.2", "execa": "^8.0.1", "jsdom": "^24.0.0", - "lint-staged": "^15.2.2", + "lint-staged": "^15.2.5", "lodash": "^4.17.21", "magic-string": "^0.30.10", "markdown-table": "^3.0.3", @@ -109,7 +109,7 @@ "tslib": "^2.6.2", "tsx": "^4.11.0", "typescript": "~5.4.5", - "typescript-eslint": "^7.8.0", + "typescript-eslint": "^7.10.0", "vite": "^5.2.11", "vitest": "^1.5.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ab632a5b62c..db9ebbdc939 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,14 +66,14 @@ importers: specifier: ^0.3.0 version: 0.3.0(esbuild@0.21.4) eslint: - specifier: ^9.2.0 - version: 9.2.0 + specifier: ^9.3.0 + version: 9.3.0 eslint-plugin-import-x: - specifier: ^0.5.0 - version: 0.5.0(eslint@9.2.0)(typescript@5.4.5) + specifier: ^0.5.1 + version: 0.5.1(eslint@9.3.0)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) + version: 0.5.4(eslint@9.3.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -84,8 +84,8 @@ importers: specifier: ^24.0.0 version: 24.0.0 lint-staged: - specifier: ^15.2.2 - version: 15.2.2 + specifier: ^15.2.5 + version: 15.2.5 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -159,8 +159,8 @@ importers: specifier: ~5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.8.0 - version: 7.8.0(eslint@9.2.0)(typescript@5.4.5) + specifier: ^7.10.0 + version: 7.10.0(eslint@9.3.0)(typescript@5.4.5) vite: specifier: ^5.2.11 version: 5.2.11(@types/node@20.12.12)(sass@1.77.2)(terser@5.31.0) @@ -803,12 +803,12 @@ packages: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@3.0.2': - resolution: {integrity: sha512-wV19ZEGEMAC1eHgrS7UQPqsdEiCIbTKTasEfcXAigzoXICcqZSjBZEHlZwNVvKg6UBCjSlos84XiLqsRJnIcIg==} + '@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.2.0': - resolution: {integrity: sha512-ESiIudvhoYni+MdsI8oD7skpprZ89qKocwRM2KEvhhBJ9nl5MRh7BXU5GTod7Mdygq+AUl+QzId6iWJKR/wABA==} + '@eslint/js@9.3.0': + resolution: {integrity: sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/config-array@0.13.0': @@ -822,8 +822,8 @@ packages: '@humanwhocodes/object-schema@2.0.3': resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - '@humanwhocodes/retry@0.2.3': - resolution: {integrity: sha512-X38nUbachlb01YMlvPFojKoiXq+LzZvuSce70KPMPdeM1Rj03k4dR7lDslhbqXn3Ang4EU3+EAmwEAsbrjHW3g==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} '@hutson/parse-repository-url@5.0.0': @@ -1152,8 +1152,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@7.8.0': - resolution: {integrity: sha512-gFTT+ezJmkwutUPmB0skOj3GZJtlEGnlssems4AjkVweUPGj7jRwwqg0Hhg7++kPGJqKtTYx+R05Ftww372aIg==} + '@typescript-eslint/eslint-plugin@7.10.0': + resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1163,8 +1163,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.8.0': - resolution: {integrity: sha512-KgKQly1pv0l4ltcftP59uQZCi4HUYswCLbTqVZEJu7uLX8CTLyswqMLqLN+2QFz4jCptqWVV4SB7vdxcH2+0kQ==} + '@typescript-eslint/parser@7.10.0': + resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1173,12 +1173,16 @@ packages: typescript: optional: true + '@typescript-eslint/scope-manager@7.10.0': + resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/scope-manager@7.8.0': resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.8.0': - resolution: {integrity: sha512-H70R3AefQDQpz9mGv13Uhi121FNMh+WEaRqcXTX09YEDky21km4dV1ZXJIp8QjXc4ZaVkXVdohvWDzbnbHDS+A==} + '@typescript-eslint/type-utils@7.10.0': + resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1187,10 +1191,23 @@ packages: typescript: optional: true + '@typescript-eslint/types@7.10.0': + resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/types@7.8.0': resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@7.10.0': + resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/typescript-estree@7.8.0': resolution: {integrity: sha512-5pfUCOwK5yjPaJQNy44prjCwtr981dO8Qo9J9PwYXZ0MosgAbfEMB008dJ5sNo3+/BN6ytBPuSvXUg9SAqB0dg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1200,12 +1217,22 @@ packages: typescript: optional: true + '@typescript-eslint/utils@7.10.0': + resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + '@typescript-eslint/utils@7.8.0': resolution: {integrity: sha512-L0yFqOCflVqXxiZyXrDr80lnahQfSOfc9ELAAZ75sqicqp2i36kEZZGuUymHNFoYOqxRT05up760b4iGsl02nQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 + '@typescript-eslint/visitor-keys@7.10.0': + resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/visitor-keys@7.8.0': resolution: {integrity: sha512-q4/gibTNBQNA0lGyYQCmWRS5D15n8rXh4QjK3KV+MBPlTYHpfBUT3D3PaPR/HeNiI9W6R7FvlkcGhNyAoP+caA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -1408,6 +1435,10 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + browserslist@4.23.0: resolution: {integrity: sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -1528,9 +1559,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - commander@11.1.0: - resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} - engines: {node: '>=16'} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} @@ -1825,8 +1856,8 @@ packages: eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-plugin-import-x@0.5.0: - resolution: {integrity: sha512-C7R8Z4IzxmsoOPMtSzwuOBW5FH6iRlxHR6iTks+MzVlrk3r3TUxokkWTx3ypdj9nGOEP+CG/5e6ebZzHbxgbbQ==} + eslint-plugin-import-x@0.5.1: + resolution: {integrity: sha512-2JK8bbFOLes+gG6tgdnM8safCxMAj4u2wjX8X1BRFPfnY7Ct2hFYESoIcVwABX/DDcdpQFLGtKmzbNEWJZD9iQ==} engines: {node: '>=16'} peerDependencies: eslint: ^8.56.0 || ^9.0.0-0 @@ -1856,8 +1887,8 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.2.0: - resolution: {integrity: sha512-0n/I88vZpCOzO+PQpt0lbsqmn9AsnsJAQseIqhZFI8ibQT0U1AkEKRxA3EVMos0BoHSXDQvCXY25TUjB5tr8Og==} + eslint@9.3.0: + resolution: {integrity: sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true @@ -1944,6 +1975,10 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2398,8 +2433,8 @@ packages: lie@3.3.0: resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} - lilconfig@3.0.0: - resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} + lilconfig@3.1.1: + resolution: {integrity: sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==} engines: {node: '>=14'} lines-and-columns@1.2.4: @@ -2409,13 +2444,13 @@ packages: resolution: {integrity: sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - lint-staged@15.2.2: - resolution: {integrity: sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==} + lint-staged@15.2.5: + resolution: {integrity: sha512-j+DfX7W9YUvdzEZl3Rk47FhDF6xwDBV5wwsCPw6BwWZVPYJemusQmvb9bRsW23Sqsaa+vRloAWogbK4BUuU2zA==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.0.1: - resolution: {integrity: sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==} + listr2@8.2.1: + resolution: {integrity: sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g==} engines: {node: '>=18.0.0'} loader-utils@3.2.1: @@ -2509,6 +2544,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.7: + resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + engines: {node: '>=8.6'} + mime-db@1.33.0: resolution: {integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==} engines: {node: '>= 0.6'} @@ -3320,8 +3359,8 @@ packages: resolution: {integrity: sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==} engines: {node: '>=16'} - typescript-eslint@7.8.0: - resolution: {integrity: sha512-sheFG+/D8N/L7gC3WT0Q8sB97Nm573Yfr+vZFzl/4nBdYcmviBPtwGSX9TJ7wpVg28ocerKVOt+k2eGmHzcgVA==} + typescript-eslint@7.10.0: + resolution: {integrity: sha512-thO8nyqptXdfWHQrMJJiJyftpW8aLmwRNs11xA8pSrXneoclFPstQZqXvDWuH1WNL4CHffqHvYUeCHTit6yfhQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -3532,9 +3571,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.3.4: - resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + yaml@2.4.2: + resolution: {integrity: sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==} engines: {node: '>= 14'} + hasBin: true yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} @@ -3850,14 +3890,14 @@ snapshots: '@esbuild/win32-x64@0.21.4': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.2.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.3.0)': dependencies: - eslint: 9.2.0 + eslint: 9.3.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} - '@eslint/eslintrc@3.0.2': + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.4 @@ -3871,7 +3911,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.2.0': {} + '@eslint/js@9.3.0': {} '@humanwhocodes/config-array@0.13.0': dependencies: @@ -3885,7 +3925,7 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@humanwhocodes/retry@0.2.3': {} + '@humanwhocodes/retry@0.3.0': {} '@hutson/parse-repository-url@5.0.0': {} @@ -4144,58 +4184,78 @@ snapshots: '@types/node': 20.12.12 optional: true - '@typescript-eslint/eslint-plugin@7.8.0(@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5))(eslint@9.2.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/type-utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.8.0 - debug: 4.3.4 - eslint: 9.2.0 + '@typescript-eslint/parser': 7.10.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.10.0 + '@typescript-eslint/type-utils': 7.10.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.10.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.10.0 + eslint: 9.3.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.10.0(eslint@9.3.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.8.0 - '@typescript-eslint/types': 7.8.0 - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.8.0 + '@typescript-eslint/scope-manager': 7.10.0 + '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.10.0 debug: 4.3.4 - eslint: 9.2.0 + eslint: 9.3.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color + '@typescript-eslint/scope-manager@7.10.0': + dependencies: + '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/scope-manager@7.8.0': dependencies: '@typescript-eslint/types': 7.8.0 '@typescript-eslint/visitor-keys': 7.8.0 - '@typescript-eslint/type-utils@7.8.0(eslint@9.2.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.10.0(eslint@9.3.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.10.0(eslint@9.3.0)(typescript@5.4.5) debug: 4.3.4 - eslint: 9.2.0 + eslint: 9.3.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color + '@typescript-eslint/types@7.10.0': {} + '@typescript-eslint/types@7.8.0': {} + '@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/visitor-keys': 7.10.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@7.8.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 7.8.0 @@ -4211,20 +4271,36 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.8.0(eslint@9.2.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.10.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) + '@typescript-eslint/scope-manager': 7.10.0 + '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) + eslint: 9.3.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@typescript-eslint/utils@7.8.0(eslint@9.3.0)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.8.0 '@typescript-eslint/types': 7.8.0 '@typescript-eslint/typescript-estree': 7.8.0(typescript@5.4.5) - eslint: 9.2.0 + eslint: 9.3.0 semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript + '@typescript-eslint/visitor-keys@7.10.0': + dependencies: + '@typescript-eslint/types': 7.10.0 + eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.8.0': dependencies: '@typescript-eslint/types': 7.8.0 @@ -4442,6 +4518,10 @@ snapshots: dependencies: fill-range: 7.0.1 + braces@3.0.3: + dependencies: + fill-range: 7.1.1 + browserslist@4.23.0: dependencies: caniuse-lite: 1.0.30001610 @@ -4575,7 +4655,7 @@ snapshots: dependencies: delayed-stream: 1.0.0 - commander@11.1.0: {} + commander@12.1.0: {} commander@2.20.3: {} @@ -4896,25 +4976,26 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@0.5.0(eslint@9.2.0)(typescript@5.4.5): + eslint-plugin-import-x@0.5.1(eslint@9.3.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.8.0(eslint@9.3.0)(typescript@5.4.5) debug: 4.3.4 doctrine: 3.0.0 - eslint: 9.2.0 + eslint: 9.3.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.5 is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.2 + tslib: 2.6.2 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.2.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)): + eslint-plugin-vitest@0.5.4(eslint@9.3.0)(typescript@5.4.5)(vitest@1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0)): dependencies: - '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - eslint: 9.2.0 + '@typescript-eslint/utils': 7.8.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 optionalDependencies: vitest: 1.5.2(@types/node@20.12.12)(jsdom@24.0.0)(sass@1.77.2)(terser@5.31.0) transitivePeerDependencies: @@ -4930,15 +5011,15 @@ snapshots: eslint-visitor-keys@4.0.0: {} - eslint@9.2.0: + eslint@9.3.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.2.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) '@eslint-community/regexpp': 4.10.0 - '@eslint/eslintrc': 3.0.2 - '@eslint/js': 9.2.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.3.0 '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.2.3 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 chalk: 4.1.2 @@ -5069,6 +5150,10 @@ snapshots: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -5520,28 +5605,28 @@ snapshots: dependencies: immediate: 3.0.6 - lilconfig@3.0.0: {} + lilconfig@3.1.1: {} lines-and-columns@1.2.4: {} lines-and-columns@2.0.4: {} - lint-staged@15.2.2: + lint-staged@15.2.5: dependencies: chalk: 5.3.0 - commander: 11.1.0 + commander: 12.1.0 debug: 4.3.4 execa: 8.0.1 - lilconfig: 3.0.0 - listr2: 8.0.1 - micromatch: 4.0.5 + lilconfig: 3.1.1 + listr2: 8.2.1 + micromatch: 4.0.7 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.3.4 + yaml: 2.4.2 transitivePeerDependencies: - supports-color - listr2@8.0.1: + listr2@8.2.1: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 @@ -5632,6 +5717,11 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.7: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.33.0: {} mime-db@1.52.0: {} @@ -6505,12 +6595,12 @@ snapshots: type-fest@4.15.0: {} - typescript-eslint@7.8.0(eslint@9.2.0)(typescript@5.4.5): + typescript-eslint@7.10.0(eslint@9.3.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.8.0(@typescript-eslint/parser@7.8.0(eslint@9.2.0)(typescript@5.4.5))(eslint@9.2.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.8.0(eslint@9.2.0)(typescript@5.4.5) - eslint: 9.2.0 + '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.10.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.10.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -6700,7 +6790,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.3.4: {} + yaml@2.4.2: {} yargs-parser@21.1.1: {} From 521988d7e118d9aa23fb0f4f6284bf892229eb75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BF=9C=E6=96=B9os?= Date: Tue, 28 May 2024 00:25:07 +0800 Subject: [PATCH 066/924] types(runtime-core): add `OnCleanup` parameter type in `this.$watch` (#9371) --- packages/dts-test/watch.test-d.ts | 8 ++++++-- packages/runtime-core/src/apiWatch.ts | 2 +- packages/runtime-core/src/componentPublicInstance.ts | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/dts-test/watch.test-d.ts b/packages/dts-test/watch.test-d.ts index 5986d3d30b1..507fb6f5dcd 100644 --- a/packages/dts-test/watch.test-d.ts +++ b/packages/dts-test/watch.test-d.ts @@ -12,10 +12,13 @@ const source = ref('foo') const source2 = computed(() => source.value) const source3 = () => 1 +type OnCleanup = (fn: () => void) => void + // lazy watcher will have consistent types for oldValue. -watch(source, (value, oldValue) => { +watch(source, (value, oldValue, onCleanup) => { expectType(value) expectType(oldValue) + expectType(onCleanup) }) watch([source, source2, source3], (values, oldValues) => { @@ -92,9 +95,10 @@ defineComponent({ created() { this.$watch( () => this.a, - (v, ov) => { + (v, ov, onCleanup) => { expectType(v) expectType(ov) + expectType(onCleanup) }, ) }, diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 0fd6b050cfa..ffad8ad5495 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -65,7 +65,7 @@ type MapSources = { : never } -type OnCleanup = (cleanupFn: () => void) => void +export type OnCleanup = (cleanupFn: () => void) => void export interface WatchOptionsBase extends DebuggerOptions { flush?: 'pre' | 'post' | 'sync' diff --git a/packages/runtime-core/src/componentPublicInstance.ts b/packages/runtime-core/src/componentPublicInstance.ts index 357ad280b9b..52801e172ab 100644 --- a/packages/runtime-core/src/componentPublicInstance.ts +++ b/packages/runtime-core/src/componentPublicInstance.ts @@ -6,6 +6,7 @@ import { } from './component' import { nextTick, queueJob } from './scheduler' import { + type OnCleanup, type WatchOptions, type WatchStopHandle, instanceWatch, @@ -229,8 +230,8 @@ export type ComponentPublicInstance< $watch any)>( source: T, cb: T extends (...args: any) => infer R - ? (...args: [R, R]) => any - : (...args: any) => any, + ? (...args: [R, R, OnCleanup]) => any + : (...args: [any, any, OnCleanup]) => any, options?: WatchOptions, ): WatchStopHandle } & IfAny>> & From 87c54430448005294c41803f07f517fef848f917 Mon Sep 17 00:00:00 2001 From: linzhe <40790268+linzhe141@users.noreply.github.com> Date: Tue, 28 May 2024 14:26:29 +0800 Subject: [PATCH 067/924] fix(compiler-core): should set `` tag as block to retain MathML namespace after patching (#10891) Co-authored-by: linzhe141 --- .../transforms/transformElement.spec.ts | 12 ++++++ .../src/transforms/hoistStatic.ts | 3 +- .../src/transforms/transformElement.ts | 2 +- .../runtime-dom/__tests__/nodeOps.spec.ts | 38 ++++++++++++++++++- 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/transformElement.spec.ts b/packages/compiler-core/__tests__/transforms/transformElement.spec.ts index 6c2dab9625f..10b9747d1ee 100644 --- a/packages/compiler-core/__tests__/transforms/transformElement.spec.ts +++ b/packages/compiler-core/__tests__/transforms/transformElement.spec.ts @@ -1284,6 +1284,18 @@ describe('compiler: element transform', () => { }) }) + test(' should be forced into blocks', () => { + const ast = parse(`
`) + transform(ast, { + nodeTransforms: [transformElement], + }) + expect((ast as any).children[0].children[0].codegenNode).toMatchObject({ + type: NodeTypes.VNODE_CALL, + tag: `"math"`, + isBlock: true, + }) + }) + test('force block for runtime custom directive w/ children', () => { const { node } = parseWithElementTransform(`
hello
`) expect(node.isBlock).toBe(true) diff --git a/packages/compiler-core/src/transforms/hoistStatic.ts b/packages/compiler-core/src/transforms/hoistStatic.ts index 70a0468e519..67bdaa887bf 100644 --- a/packages/compiler-core/src/transforms/hoistStatic.ts +++ b/packages/compiler-core/src/transforms/hoistStatic.ts @@ -174,7 +174,8 @@ export function getConstantType( if ( codegenNode.isBlock && node.tag !== 'svg' && - node.tag !== 'foreignObject' + node.tag !== 'foreignObject' && + node.tag !== 'math' ) { return ConstantTypes.NOT_CONSTANT } diff --git a/packages/compiler-core/src/transforms/transformElement.ts b/packages/compiler-core/src/transforms/transformElement.ts index 5c431f9d4da..b1be06db703 100644 --- a/packages/compiler-core/src/transforms/transformElement.ts +++ b/packages/compiler-core/src/transforms/transformElement.ts @@ -117,7 +117,7 @@ export const transformElement: NodeTransform = (node, context) => { // updates inside get proper isSVG flag at runtime. (#639, #643) // This is technically web-specific, but splitting the logic out of core // leads to too much unnecessary complexity. - (tag === 'svg' || tag === 'foreignObject')) + (tag === 'svg' || tag === 'foreignObject' || tag === 'math')) // props if (props.length > 0) { diff --git a/packages/runtime-dom/__tests__/nodeOps.spec.ts b/packages/runtime-dom/__tests__/nodeOps.spec.ts index e185f14d8dd..ed30e42adee 100644 --- a/packages/runtime-dom/__tests__/nodeOps.spec.ts +++ b/packages/runtime-dom/__tests__/nodeOps.spec.ts @@ -1,5 +1,6 @@ -import { nodeOps, svgNS } from '../src/nodeOps' - +import { defineComponent, h, nextTick, ref } from 'vue' +import { mathmlNS, nodeOps, svgNS } from '../src/nodeOps' +import { render } from '@vue/runtime-dom' describe('runtime-dom: node-ops', () => { test("the