diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index d8d0c416a67..f9d2052b69c 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -66,7 +66,7 @@ jobs: if_no_artifact_found: warn - name: Prepare report - run: pnpm tsx scripts/size-report.ts > size-report.md + run: node scripts/size-report.js > size-report.md - name: Read Size Report id: size-report diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f345f8fe75..727228838b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## [3.5.4](https://github.com/vuejs/core/compare/v3.5.3...v3.5.4) (2024-09-10) + + +### Bug Fixes + +* **compiler-sfc:** correct scoped injection for nesting selector ([#11854](https://github.com/vuejs/core/issues/11854)) ([b1de75e](https://github.com/vuejs/core/commit/b1de75ed04626b6423085dfde91fb0cb481a25e8)), closes [#10567](https://github.com/vuejs/core/issues/10567) +* **reactivity:** fix markRaw error on already marked object ([#11864](https://github.com/vuejs/core/issues/11864)) ([67d6596](https://github.com/vuejs/core/commit/67d6596d40b1807b9cd8eb0d9282932ea77be3c0)), closes [#11862](https://github.com/vuejs/core/issues/11862) +* Revert "fix: Revert "fix(reactivity): self-referencing computed should refresh"" ([e596378](https://github.com/vuejs/core/commit/e596378e0be728dad7d60938449f3fa557ca2ec9)) +* **runtime-core:** handle shallow reactive arrays in renderList correctly ([#11870](https://github.com/vuejs/core/issues/11870)) ([ced59ab](https://github.com/vuejs/core/commit/ced59ab8f2f2e89c13119bab3a0c25a1a1f1c3d6)), closes [#11869](https://github.com/vuejs/core/issues/11869) +* **types:** correctly infer `TypeEmits` with both tuple and function syntax ([#11840](https://github.com/vuejs/core/issues/11840)) ([dad6738](https://github.com/vuejs/core/commit/dad673809929c084dcb8e42640eb7daa675d4ea4)), closes [#11836](https://github.com/vuejs/core/issues/11836) + + +### Performance Improvements + +* **reactivity:** trigger deps directly instead of storing in an array first ([#11695](https://github.com/vuejs/core/issues/11695)) ([f80d447](https://github.com/vuejs/core/commit/f80d447c17662556e9e3f99f6d199967f4c8cf3d)) + + + ## [3.5.3](https://github.com/vuejs/core/compare/v3.5.2...v3.5.3) (2024-09-06) diff --git a/package.json b/package.json index 062fbdb23b4..0a5949940d1 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "private": true, - "version": "3.5.3", - "packageManager": "pnpm@9.9.0", + "version": "3.5.4", + "packageManager": "pnpm@9.10.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", "build": "node scripts/build.js", - "build-dts": "tsc -p tsconfig.build-browser.json && tsc -p tsconfig.build-node.json && rollup -c rollup.dts.config.js", + "build-dts": "tsc -p tsconfig.build.json --noCheck && rollup -c rollup.dts.config.js", "clean": "rimraf --glob packages/*/dist temp .eslintcache", - "size": "run-s \"size-*\" && tsx scripts/usage-size.ts", + "size": "run-s \"size-*\" && node scripts/usage-size.js", "size-global": "node scripts/build.js vue runtime-dom -f global -p --size", "size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime", "size-esm": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler", @@ -66,9 +66,9 @@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "5.0.4", - "@swc/core": "^1.7.23", + "@swc/core": "^1.7.24", "@types/hash-sum": "^1.0.2", - "@types/node": "^20.16.3", + "@types/node": "^20.16.5", "@types/semver": "^7.5.8", "@types/serve-handler": "^6.1.4", "@vitest/coverage-v8": "^2.0.5", @@ -104,8 +104,7 @@ "simple-git-hooks": "^2.11.1", "todomvc-app-css": "^2.4.3", "tslib": "^2.7.0", - "tsx": "^4.19.0", - "typescript": "~5.5.4", + "typescript": "~5.6.2", "typescript-eslint": "^8.4.0", "vite": "catalog:", "vitest": "^2.0.5" diff --git a/packages-private/sfc-playground/package.json b/packages-private/sfc-playground/package.json index b43247e9cb9..2d1db99fab2 100644 --- a/packages-private/sfc-playground/package.json +++ b/packages-private/sfc-playground/package.json @@ -13,7 +13,7 @@ "vite": "catalog:" }, "dependencies": { - "@vue/repl": "^4.3.1", + "@vue/repl": "^4.4.0", "file-saver": "^2.0.5", "jszip": "^3.10.1", "vue": "workspace:*" diff --git a/packages-private/sfc-playground/src/App.vue b/packages-private/sfc-playground/src/App.vue index 7cbe573f6e2..9ae0ecd9236 100644 --- a/packages-private/sfc-playground/src/App.vue +++ b/packages-private/sfc-playground/src/App.vue @@ -14,6 +14,12 @@ setVH() const useSSRMode = ref(false) +const AUTO_SAVE_STORAGE_KEY = 'vue-sfc-playground-auto-save' +const initAutoSave: boolean = JSON.parse( + localStorage.getItem(AUTO_SAVE_STORAGE_KEY) ?? 'true', +) +const autoSave = ref(initAutoSave) + const { productionMode, vueVersion, importMap } = useVueImportMap({ runtimeDev: import.meta.env.PROD ? `${location.origin}/vue.runtime.esm-browser.js` @@ -89,6 +95,11 @@ function toggleSSR() { useSSRMode.value = !useSSRMode.value } +function toggleAutoSave() { + autoSave.value = !autoSave.value + localStorage.setItem(AUTO_SAVE_STORAGE_KEY, String(autoSave.value)) +} + function reloadPage() { replRef.value?.reload() } @@ -111,9 +122,11 @@ onMounted(() => { :store="store" :prod="productionMode" :ssr="useSSRMode" + :autoSave="autoSave" @toggle-theme="toggleTheme" @toggle-prod="toggleProdMode" @toggle-ssr="toggleSSR" + @toggle-autosave="toggleAutoSave" @reload-page="reloadPage" /> { @keydown.ctrl.s.prevent @keydown.meta.s.prevent :ssr="useSSRMode" + :autoSave="autoSave" :store="store" :showCompileOutput="true" :autoResize="true" diff --git a/packages-private/sfc-playground/src/Header.vue b/packages-private/sfc-playground/src/Header.vue index 922a2b111ac..2778724b0ab 100644 --- a/packages-private/sfc-playground/src/Header.vue +++ b/packages-private/sfc-playground/src/Header.vue @@ -14,11 +14,13 @@ const props = defineProps<{ store: ReplStore prod: boolean ssr: boolean + autoSave: boolean }>() const emit = defineEmits([ 'toggle-theme', 'toggle-ssr', 'toggle-prod', + 'toggle-autosave', 'reload-page', ]) @@ -107,6 +109,14 @@ function toggleDark() { > {{ ssr ? 'SSR ON' : 'SSR OFF' }} +

`) + expect(serializeInner(root)).toBe(`

Step 1

`) triggerEvent(root.children[1] as TestElement, 'click') await nextTick() expect(serializeInner(root)).toBe(`

Step 2

`) diff --git a/packages/reactivity/__tests__/reactive.spec.ts b/packages/reactivity/__tests__/reactive.spec.ts index a90ea27f138..3b3baa1906c 100644 --- a/packages/reactivity/__tests__/reactive.spec.ts +++ b/packages/reactivity/__tests__/reactive.spec.ts @@ -293,6 +293,13 @@ describe('reactivity/reactive', () => { expect(() => markRaw(obj)).not.toThrowError() }) + test('markRaw should not redefine on an marked object', () => { + const obj = markRaw({ foo: 1 }) + const raw = markRaw(obj) + expect(raw).toBe(obj) + expect(() => markRaw(obj)).not.toThrowError() + }) + test('should not observe non-extensible objects', () => { const obj = reactive({ foo: Object.preventExtensions({ a: 1 }), diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index 8e6f64b4379..46bad312525 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.5.3", + "version": "3.5.4", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index aa5d2079061..d2dd67bf97c 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -111,9 +111,9 @@ export class ComputedRefImpl implements Subscriber { * @internal */ notify(): void { + this.flags |= EffectFlags.DIRTY // avoid infinite self recursion if (activeSub !== this) { - this.flags |= EffectFlags.DIRTY this.dep.notify() } else if (__DEV__) { // TODO warn diff --git a/packages/reactivity/src/dep.ts b/packages/reactivity/src/dep.ts index 6d938cbc25f..6e0d43cce35 100644 --- a/packages/reactivity/src/dep.ts +++ b/packages/reactivity/src/dep.ts @@ -250,11 +250,29 @@ export function trigger( return } - let deps: Dep[] = [] + const run = (dep: Dep | undefined) => { + if (dep) { + if (__DEV__) { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget, + }) + } else { + dep.trigger() + } + } + } + + startBatch() + if (type === TriggerOpTypes.CLEAR) { // collection being cleared // trigger all effects for target - deps = [...depsMap.values()] + depsMap.forEach(run) } else { const targetIsArray = isArray(target) const isArrayIndex = targetIsArray && isIntegerKey(key) @@ -267,67 +285,50 @@ export function trigger( key === ARRAY_ITERATE_KEY || (!isSymbol(key) && key >= newLength) ) { - deps.push(dep) + run(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)) + run(depsMap.get(key)) } // schedule ARRAY_ITERATE for any numeric key change (length is handled above) if (isArrayIndex) { - push(depsMap.get(ARRAY_ITERATE_KEY)) + run(depsMap.get(ARRAY_ITERATE_KEY)) } // also run for iteration key on ADD | DELETE | Map.SET switch (type) { case TriggerOpTypes.ADD: if (!targetIsArray) { - push(depsMap.get(ITERATE_KEY)) + run(depsMap.get(ITERATE_KEY)) if (isMap(target)) { - push(depsMap.get(MAP_KEY_ITERATE_KEY)) + run(depsMap.get(MAP_KEY_ITERATE_KEY)) } } else if (isArrayIndex) { // new index added to array -> length changes - push(depsMap.get('length')) + run(depsMap.get('length')) } break case TriggerOpTypes.DELETE: if (!targetIsArray) { - push(depsMap.get(ITERATE_KEY)) + run(depsMap.get(ITERATE_KEY)) if (isMap(target)) { - push(depsMap.get(MAP_KEY_ITERATE_KEY)) + run(depsMap.get(MAP_KEY_ITERATE_KEY)) } } break case TriggerOpTypes.SET: if (isMap(target)) { - push(depsMap.get(ITERATE_KEY)) + run(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() } diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index 88493e4e9a9..678ee1982fe 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -326,7 +326,7 @@ 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.computed && refreshComputed(link.dep.computed)) || link.dep.version !== link.version ) { return true @@ -344,10 +344,7 @@ function isDirty(sub: Subscriber): boolean { * Returning false indicates the refresh failed * @internal */ -export function refreshComputed(computed: ComputedRefImpl): false | undefined { - if (computed.flags & EffectFlags.RUNNING) { - return false - } +export function refreshComputed(computed: ComputedRefImpl): undefined { if ( computed.flags & EffectFlags.TRACKING && !(computed.flags & EffectFlags.DIRTY) diff --git a/packages/reactivity/src/reactive.ts b/packages/reactivity/src/reactive.ts index cdcc7759b76..7d9c33aa4d0 100644 --- a/packages/reactivity/src/reactive.ts +++ b/packages/reactivity/src/reactive.ts @@ -1,4 +1,4 @@ -import { def, isObject, toRawType } from '@vue/shared' +import { def, hasOwn, isObject, toRawType } from '@vue/shared' import { mutableHandlers, readonlyHandlers, @@ -405,7 +405,7 @@ export type Raw = T & { [RawSymbol]?: true } * @see {@link https://vuejs.org/api/reactivity-advanced.html#markraw} */ export function markRaw(value: T): Raw { - if (Object.isExtensible(value)) { + if (!hasOwn(value, ReactiveFlags.SKIP) && Object.isExtensible(value)) { def(value, ReactiveFlags.SKIP, true) } return value diff --git a/packages/runtime-core/__tests__/helpers/renderList.spec.ts b/packages/runtime-core/__tests__/helpers/renderList.spec.ts index d23a63cc08e..8dd04ff8a9b 100644 --- a/packages/runtime-core/__tests__/helpers/renderList.spec.ts +++ b/packages/runtime-core/__tests__/helpers/renderList.spec.ts @@ -1,3 +1,4 @@ +import { isReactive, reactive, shallowReactive } from '../../src/index' import { renderList } from '../../src/helpers/renderList' describe('renderList', () => { @@ -56,4 +57,12 @@ describe('renderList', () => { renderList(undefined, (item, index) => `node ${index}: ${item}`), ).toEqual([]) }) + + it('should render items in a reactive array correctly', () => { + const reactiveArray = reactive([{ foo: 1 }]) + expect(renderList(reactiveArray, isReactive)).toEqual([true]) + + const shallowReactiveArray = shallowReactive([{ foo: 1 }]) + expect(renderList(shallowReactiveArray, isReactive)).toEqual([false]) + }) }) diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index fb247fa7c25..61fb1a01b9f 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.5.3", + "version": "3.5.4", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index dd1d1f5a6e3..5976f3a4b33 100644 --- a/packages/runtime-core/src/components/KeepAlive.ts +++ b/packages/runtime-core/src/components/KeepAlive.ts @@ -350,7 +350,7 @@ const KeepAliveImpl: ComponentOptions = { keys.add(key) // prune oldest entry if (max && keys.size > parseInt(max as string, 10)) { - pruneCacheEntry(keys.values().next().value) + pruneCacheEntry(keys.values().next().value!) } } // avoid vnode being unmounted diff --git a/packages/runtime-core/src/helpers/renderList.ts b/packages/runtime-core/src/helpers/renderList.ts index 12b0317bdbd..bbcbcc13044 100644 --- a/packages/runtime-core/src/helpers/renderList.ts +++ b/packages/runtime-core/src/helpers/renderList.ts @@ -1,5 +1,10 @@ import type { VNode, VNodeChild } from '../vnode' -import { isReactive, shallowReadArray, toReactive } from '@vue/reactivity' +import { + isReactive, + isShallow, + shallowReadArray, + toReactive, +} from '@vue/reactivity' import { isArray, isObject, isString } from '@vue/shared' import { warn } from '../warning' @@ -63,13 +68,15 @@ export function renderList( if (sourceIsArray || isString(source)) { const sourceIsReactiveArray = sourceIsArray && isReactive(source) + let needsWrap = false if (sourceIsReactiveArray) { + needsWrap = !isShallow(source) source = shallowReadArray(source) } ret = new Array(source.length) for (let i = 0, l = source.length; i < l; i++) { ret[i] = renderItem( - sourceIsReactiveArray ? toReactive(source[i]) : source[i], + needsWrap ? toReactive(source[i]) : source[i], i, undefined, cached && cached[i], diff --git a/packages/runtime-core/src/scheduler.ts b/packages/runtime-core/src/scheduler.ts index 2250af41110..1eac06e5bf0 100644 --- a/packages/runtime-core/src/scheduler.ts +++ b/packages/runtime-core/src/scheduler.ts @@ -267,27 +267,23 @@ function flushJobs(seen?: CountMap) { } function checkRecursiveUpdates(seen: CountMap, fn: SchedulerJob) { - if (!seen.has(fn)) { - seen.set(fn, 1) - } else { - const count = seen.get(fn)! - if (count > RECURSION_LIMIT) { - const instance = fn.i - const componentName = instance && getComponentName(instance.type) - handleError( - `Maximum recursive updates exceeded${ - componentName ? ` in component <${componentName}>` : `` - }. ` + - `This means you have a reactive effect that is mutating its own ` + - `dependencies and thus recursively triggering itself. Possible sources ` + - `include component template, render function, updated hook or ` + - `watcher source function.`, - null, - ErrorCodes.APP_ERROR_HANDLER, - ) - return true - } else { - seen.set(fn, count + 1) - } + const count = seen.get(fn) || 0 + if (count > RECURSION_LIMIT) { + const instance = fn.i + const componentName = instance && getComponentName(instance.type) + handleError( + `Maximum recursive updates exceeded${ + componentName ? ` in component <${componentName}>` : `` + }. ` + + `This means you have a reactive effect that is mutating its own ` + + `dependencies and thus recursively triggering itself. Possible sources ` + + `include component template, render function, updated hook or ` + + `watcher source function.`, + null, + ErrorCodes.APP_ERROR_HANDLER, + ) + return true } + seen.set(fn, count + 1) + return false } diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 42f5d6c6e2f..728d0ed5afc 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.5.3", + "version": "3.5.4", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", diff --git a/packages/runtime-test/src/index.ts b/packages/runtime-test/src/index.ts index ba11f60c2c1..b754509cb20 100644 --- a/packages/runtime-test/src/index.ts +++ b/packages/runtime-test/src/index.ts @@ -17,7 +17,7 @@ export const render = baseRender as RootRenderFunction export const createApp = baseCreateApp as CreateAppFunction // convenience for one-off render validations -export function renderToString(vnode: VNode) { +export function renderToString(vnode: VNode): string { const root = nodeOps.createElement('div') render(vnode, root) return serializeInner(root) diff --git a/packages/runtime-test/src/nodeOps.ts b/packages/runtime-test/src/nodeOps.ts index e338fd52000..933a0f73eeb 100644 --- a/packages/runtime-test/src/nodeOps.ts +++ b/packages/runtime-test/src/nodeOps.ts @@ -57,11 +57,11 @@ export interface NodeOp { let nodeId: number = 0 let recordedNodeOps: NodeOp[] = [] -export function logNodeOp(op: NodeOp) { +export function logNodeOp(op: NodeOp): void { recordedNodeOps.push(op) } -export function resetOps() { +export function resetOps(): void { recordedNodeOps = [] } @@ -128,7 +128,7 @@ function createComment(text: string): TestComment { return node } -function setText(node: TestText, text: string) { +function setText(node: TestText, text: string): void { logNodeOp({ type: NodeOpTypes.SET_TEXT, targetNode: node, @@ -137,7 +137,11 @@ function setText(node: TestText, text: string) { node.text = text } -function insert(child: TestNode, parent: TestElement, ref?: TestNode | null) { +function insert( + child: TestNode, + parent: TestElement, + ref?: TestNode | null, +): void { let refIndex if (ref) { refIndex = parent.children.indexOf(ref) @@ -166,7 +170,7 @@ function insert(child: TestNode, parent: TestElement, ref?: TestNode | null) { } } -function remove(child: TestNode, logOp = true) { +function remove(child: TestNode, logOp = true): void { const parent = child.parentNode if (parent) { if (logOp) { @@ -188,7 +192,7 @@ function remove(child: TestNode, logOp = true) { } } -function setElementText(el: TestElement, text: string) { +function setElementText(el: TestElement, text: string): void { logNodeOp({ type: NodeOpTypes.SET_ELEMENT_TEXT, targetNode: el, @@ -228,11 +232,23 @@ function querySelector(): never { throw new Error('querySelector not supported in test renderer.') } -function setScopeId(el: TestElement, id: string) { +function setScopeId(el: TestElement, id: string): void { el.props[id] = '' } -export const nodeOps = { +export const nodeOps: { + insert: typeof insert + remove: typeof remove + createElement: typeof createElement + createText: typeof createText + createComment: typeof createComment + setText: typeof setText + setElementText: typeof setElementText + parentNode: typeof parentNode + nextSibling: typeof nextSibling + querySelector: typeof querySelector + setScopeId: typeof setScopeId +} = { insert, remove, createElement, diff --git a/packages/runtime-test/src/patchProp.ts b/packages/runtime-test/src/patchProp.ts index f10b5364746..8b4479b8dc6 100644 --- a/packages/runtime-test/src/patchProp.ts +++ b/packages/runtime-test/src/patchProp.ts @@ -6,7 +6,7 @@ export function patchProp( key: string, prevValue: any, nextValue: any, -) { +): void { logNodeOp({ type: NodeOpTypes.PATCH, targetNode: el, diff --git a/packages/runtime-test/src/serialize.ts b/packages/runtime-test/src/serialize.ts index e8871945be1..87efa6cd911 100644 --- a/packages/runtime-test/src/serialize.ts +++ b/packages/runtime-test/src/serialize.ts @@ -23,7 +23,7 @@ export function serializeInner( node: TestElement, indent: number = 0, depth: number = 0, -) { +): string { const newLine = indent ? `\n` : `` return node.children.length ? newLine + diff --git a/packages/runtime-test/src/triggerEvent.ts b/packages/runtime-test/src/triggerEvent.ts index 94ccd2badcd..4b037d62af3 100644 --- a/packages/runtime-test/src/triggerEvent.ts +++ b/packages/runtime-test/src/triggerEvent.ts @@ -5,7 +5,7 @@ export function triggerEvent( el: TestElement, event: string, payload: any[] = [], -) { +): void { const { eventListeners } = el if (eventListeners) { const listener = eventListeners[event] diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 80639a81dea..3222f76f5fc 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.5.3", + "version": "3.5.4", "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 636b6767ec7..44e6af461d3 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.5.3", + "version": "3.5.4", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", diff --git a/packages/vue-compat/__tests__/utils.ts b/packages/vue-compat/__tests__/utils.ts index 18e6516a4a6..1d862422761 100644 --- a/packages/vue-compat/__tests__/utils.ts +++ b/packages/vue-compat/__tests__/utils.ts @@ -2,7 +2,7 @@ export function triggerEvent( target: Element, event: string, process?: (e: any) => any, -) { +): Event { const e = new Event(event, { bubbles: true, cancelable: true, diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index 4a015d2f4da..c51558b6af1 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.5.3", + "version": "3.5.4", "description": "Vue 3 compatibility build for Vue 2", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", diff --git a/packages/vue/__tests__/e2e/commits.mock.ts b/packages/vue/__tests__/e2e/commits.mock.ts index 4a793e25aea..8e3f153446d 100644 --- a/packages/vue/__tests__/e2e/commits.mock.ts +++ b/packages/vue/__tests__/e2e/commits.mock.ts @@ -548,4 +548,4 @@ export default { ], }, ], -} +} as any diff --git a/packages/vue/__tests__/e2e/e2eUtils.ts b/packages/vue/__tests__/e2e/e2eUtils.ts index 87e99ac7b5d..8512dcaae47 100644 --- a/packages/vue/__tests__/e2e/e2eUtils.ts +++ b/packages/vue/__tests__/e2e/e2eUtils.ts @@ -31,7 +31,27 @@ export async function expectByPolling( } } -export function setupPuppeteer(args?: string[]) { +interface PuppeteerUtils { + page: () => Page + click(selector: string, options?: ClickOptions): Promise + count(selector: string): Promise + text(selector: string): Promise + value(selector: string): Promise + html(selector: string): Promise + classList(selector: string): Promise + children(selector: string): Promise + isVisible(selector: string): Promise + isChecked(selector: string): Promise + isFocused(selector: string): Promise + setValue(selector: string, value: string): Promise + typeValue(selector: string, value: string): Promise + enterValue(selector: string, value: string): Promise + clearValue(selector: string): Promise + timeout(time: number): Promise + nextFrame(): Promise +} + +export function setupPuppeteer(args?: string[]): PuppeteerUtils { let browser: Browser let page: Page @@ -69,35 +89,38 @@ export function setupPuppeteer(args?: string[]) { await browser.close() }) - async function click(selector: string, options?: ClickOptions) { + async function click( + selector: string, + options?: ClickOptions, + ): Promise { await page.click(selector, options) } - async function count(selector: string) { + async function count(selector: string): Promise { return (await page.$$(selector)).length } - async function text(selector: string) { - return await page.$eval(selector, node => node.textContent) + async function text(selector: string): Promise { + return page.$eval(selector, node => node.textContent) } - async function value(selector: string) { - return await page.$eval(selector, node => (node as HTMLInputElement).value) + async function value(selector: string): Promise { + return page.$eval(selector, node => (node as HTMLInputElement).value) } - async function html(selector: string) { - return await page.$eval(selector, node => node.innerHTML) + async function html(selector: string): Promise { + return page.$eval(selector, node => node.innerHTML) } - async function classList(selector: string) { - return await page.$eval(selector, (node: any) => [...node.classList]) + async function classList(selector: string): Promise { + return page.$eval(selector, (node: any) => [...node.classList]) } - async function children(selector: string) { - return await page.$eval(selector, (node: any) => [...node.children]) + async function children(selector: string): Promise { + return page.$eval(selector, (node: any) => [...node.children]) } - async function isVisible(selector: string) { + async function isVisible(selector: string): Promise { const display = await page.$eval(selector, node => { return window.getComputedStyle(node).display }) diff --git a/packages/vue/package.json b/packages/vue/package.json index 23fbbfd71fc..b6d7e14917b 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.5.3", + "version": "3.5.4", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d991f78d431..b9fea8228a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,14 +54,14 @@ importers: specifier: 5.0.4 version: 5.0.4(rollup@4.21.2) '@swc/core': - specifier: ^1.7.23 - version: 1.7.23 + specifier: ^1.7.24 + version: 1.7.24 '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 '@types/node': - specifier: ^20.16.3 - version: 20.16.3 + specifier: ^20.16.5 + version: 20.16.5 '@types/semver': specifier: ^7.5.8 version: 7.5.8 @@ -70,7 +70,7 @@ importers: version: 6.1.4 '@vitest/coverage-v8': specifier: ^2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8)) + version: 2.0.5(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -91,10 +91,10 @@ importers: version: 9.9.1 eslint-plugin-import-x: specifier: ^3.1.0 - version: 3.1.0(eslint@9.9.1)(typescript@5.5.4) + version: 3.1.0(eslint@9.9.1)(typescript@5.6.2) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.9.1)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8)) + version: 0.5.4(eslint@9.9.1)(typescript@5.6.2)(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)) estree-walker: specifier: 'catalog:' version: 2.0.2 @@ -133,7 +133,7 @@ importers: version: 3.0.3 puppeteer: specifier: ~23.3.0 - version: 23.3.0(typescript@5.5.4) + version: 23.3.0(typescript@5.6.2) rimraf: specifier: ^6.0.1 version: 6.0.1 @@ -142,7 +142,7 @@ importers: version: 4.21.2 rollup-plugin-dts: specifier: ^6.1.1 - version: 6.1.1(rollup@4.21.2)(typescript@5.5.4) + version: 6.1.1(rollup@4.21.2)(typescript@5.6.2) rollup-plugin-esbuild: specifier: ^6.1.1 version: 6.1.1(esbuild@0.23.1)(rollup@4.21.2) @@ -167,21 +167,18 @@ importers: tslib: specifier: ^2.7.0 version: 2.7.0 - tsx: - specifier: ^4.19.0 - version: 4.19.0 typescript: - specifier: ~5.5.4 - version: 5.5.4 + specifier: ~5.6.2 + version: 5.6.2 typescript-eslint: specifier: ^8.4.0 - version: 8.4.0(eslint@9.9.1)(typescript@5.5.4) + version: 8.4.0(eslint@9.9.1)(typescript@5.6.2) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.3)(sass@1.77.8) + version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) vitest: specifier: ^2.0.5 - version: 2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8) + version: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) packages-private/dts-built-test: dependencies: @@ -207,8 +204,8 @@ importers: packages-private/sfc-playground: dependencies: '@vue/repl': - specifier: ^4.3.1 - version: 4.3.1 + specifier: ^4.4.0 + version: 4.4.0 file-saver: specifier: ^2.0.5 version: 2.0.5 @@ -221,10 +218,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 5.1.2(vite@5.4.0(@types/node@20.16.3)(sass@1.77.8))(vue@packages+vue) + version: 5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.3)(sass@1.77.8) + version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) packages-private/template-explorer: dependencies: @@ -239,10 +236,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: 'catalog:' - version: 5.1.2(vite@5.4.0(@types/node@20.16.3)(sass@1.77.8))(vue@packages+vue) + version: 5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue) vite: specifier: 'catalog:' - version: 5.4.0(@types/node@20.16.3)(sass@1.77.8) + version: 5.4.0(@types/node@20.16.5)(sass@1.78.0) vue: specifier: workspace:* version: link:../../packages/vue @@ -336,8 +333,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 sass: - specifier: ^1.77.8 - version: 1.77.8 + specifier: ^1.78.0 + version: 1.78.0 packages/compiler-ssr: dependencies: @@ -1080,68 +1077,68 @@ packages: cpu: [x64] os: [win32] - '@swc/core-darwin-arm64@1.7.23': - resolution: {integrity: sha512-yyOHPfti6yKlQulfVWMt7BVKst+SyEZYCWuQSGMn1KgmNCH/bYufRWfQXIhkGSj44ZkEepJmsJ8tDyIb4k5WyA==} + '@swc/core-darwin-arm64@1.7.24': + resolution: {integrity: sha512-s0k09qAcsoa8jIncwgRRd43VApYqXu28R4OmICtDffV4S01HtsRLRarXsMuLutoZk3tbxqitep+A8MPBuqNgdg==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.7.23': - resolution: {integrity: sha512-GzqHwQ0Y1VyjdI/bBKFX2GKm5HD3PIB6OhuAQtWZMTtEr2yIrlT0YK2T+XKh7oIg31JwxGBeQdBk3KTI7DARmQ==} + '@swc/core-darwin-x64@1.7.24': + resolution: {integrity: sha512-1dlsulJ/fiOoJoJyQgaCewIEaZ7Sh6aJN4r5Uhl4lIZuNWa27XOb28A3K29/6HDO9JML3IJrvXPnl5o0vxDQuQ==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.7.23': - resolution: {integrity: sha512-qwX4gB41OS6/OZkHcpTqLFGsdmvoZyffnJIlgB/kZKwH3lfeJWzv6vx57zXtNpM/t7GoQEe0VZUVdmNjxSxBZw==} + '@swc/core-linux-arm-gnueabihf@1.7.24': + resolution: {integrity: sha512-2ft1NmxyvHCu5CY4r2rNVybPqZtJaxpRSzvCcPlVjN/2D5Q3QgM5kBoo1t+0RCFfk4TS2V0KWJhtqKz0CNX62Q==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.7.23': - resolution: {integrity: sha512-TsrbUZdMaUwzI7+g/8rHPLWbntMKYSu5Bn5IBSqVKPeyqaXxNnlIUnWXgXcUcRAc+T+Y8ADfr7EiFz9iz5DuSA==} + '@swc/core-linux-arm64-gnu@1.7.24': + resolution: {integrity: sha512-v/Z8I9tUUNkNHKa1Sw4r1Q7Wp66ezbRhe6xMIxvPNKVJQFaMOsRpe0t8T5qbk5sV2hJGOCKpQynSpZqQXLcJDQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.7.23': - resolution: {integrity: sha512-JEdtwdthazKq4PBz53KSubwwK8MvqODAihGSAzc8u3Unq4ojcvaS8b0CwLBeD+kTQ78HpxOXTt3DsFIxpgaCAA==} + '@swc/core-linux-arm64-musl@1.7.24': + resolution: {integrity: sha512-0jJx0IcajcyOXaJsx1jXy86lYVrbupyy2VUj/OiJux/ic4oBJLjfL+WOuc8T8/hZj2p6X0X4jvfSCqWSuic4kA==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.7.23': - resolution: {integrity: sha512-V51gFPWaVAHbI1yg9ahsoya3aB4uawye3SZ5uQWgcP7wdCdiv60dw4F5nuPJf5Z1oXD3U/BslXuamv8Oh9vXqQ==} + '@swc/core-linux-x64-gnu@1.7.24': + resolution: {integrity: sha512-2+3aKQpSGjVnWKDTKUPuJzitQlTQrGorg+PVFMRkv6l+RcNCHZQNe/8VYpMhyBhxDMb3LUlbp7776FRevcruxg==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.7.23': - resolution: {integrity: sha512-BBqQi4+UdeRqag3yM4IJjaHG4yc1o3l9ksENHToE0o/u2DT0FY5+K/DiYGZLC1JHbSFzNqRCYsa7DIzRtZ0A1A==} + '@swc/core-linux-x64-musl@1.7.24': + resolution: {integrity: sha512-PMQ6SkCtMoj0Ks77DiishpEmIuHpYjFLDuVOzzJCzGeGoii0yRP5lKy/VeglFYLPqJzmhK9BHlpVehVf/8ZpvA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.7.23': - resolution: {integrity: sha512-JPk6pvCKncL6bXG7p+NLZf8PWx4FakVvKNdwGeMrYunb+yk1IZf7qf9LJk8+GDGF5QviDXPs8opZrTrfsW80fA==} + '@swc/core-win32-arm64-msvc@1.7.24': + resolution: {integrity: sha512-SNdCa4DtGXNWrPVHqctVUxgEVZVETuqERpqF50KFHO0Bvf5V/m1IJ4hFr2BxXlrzgnIW4t1Dpi6YOJbcGbEmnA==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.7.23': - resolution: {integrity: sha512-2Whxi8d+bLQBzJcQ5qYPHlk02YYVGsMVav0fWk+FnX2z1QRREIu1L1xvrpi7gBpjXp6BIU40ya8GiKeekNT2bg==} + '@swc/core-win32-ia32-msvc@1.7.24': + resolution: {integrity: sha512-5p3olHqwibMfrVFg2yVuSIPh9HArDYYlJXNZ9JKqeZk23A19J1pl9MuPmXDw+sxsiPfYJ/nUedIGeUHPF/+EDw==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.7.23': - resolution: {integrity: sha512-82fARk4/yJ40kwWKY/gdKDisPdtgJE9jgpl/vkNG3alyJxrCzuNM7+CtiKoYbXLeqM8GQTS3wlvCaJu9oQ8dag==} + '@swc/core-win32-x64-msvc@1.7.24': + resolution: {integrity: sha512-gRyPIxDznS8d2ClfmWbytjp2d48bij6swHnDLWhukNuOvXdQkEmaIzjEsionFG/zhcFLnz8zKfTvjEjInAMzxg==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.7.23': - resolution: {integrity: sha512-VDNkpDvDlreGh2E3tlDj8B3piiuLhhQA/7rIVZpiLUvG1YpucAa6N7iDXA7Gc/+Hah8spaCg/qvEaBkCmcIYCQ==} + '@swc/core@1.7.24': + resolution: {integrity: sha512-FzJaai6z6DYdICAY1UKNN5pzTn296ksK2zzEjjaXlpZtoMkGktWT0ttS7hbdBCPGhLOu5Q9TA2zdPejKUFjgig==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -1164,8 +1161,8 @@ packages: '@types/hash-sum@1.0.2': resolution: {integrity: sha512-UP28RddqY8xcU0SCEp9YKutQICXpaAq9N8U2klqF5hegGha7KzTOL8EdhIIV3bOSGBzjEpN9bU/d+nNZBdJYVw==} - '@types/node@20.16.3': - resolution: {integrity: sha512-/wdGiWRkMOm53gAsSyFMXFZHbVg7C6CbkrzHNpaHoYfsUWPg7m6ZRKtvQjgvQ9i8WT540a3ydRlRQbxjY30XxQ==} + '@types/node@20.16.5': + resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1303,8 +1300,8 @@ packages: resolution: {integrity: sha512-oTyUE+QHIzLw2PpV14GD/c7EohDyP64xCniWTcqcEmTd699eFqTIwOmtDYjcO1j3QgdXoJEoWv1/cCdLrRoOfg==} engines: {node: '>= 0.12.0'} - '@vue/repl@4.3.1': - resolution: {integrity: sha512-yzUuLhR+MqOGBDES+xbnm27SfPIEv7XKwhFWWpQhL7HUbXj77GVu+x50Q56JhCWWKTUJzk9MOvAn7bSgdvB5og==} + '@vue/repl@4.4.0': + resolution: {integrity: sha512-caOSbxYOIY7AOYYqc0SJe8BKaFhwmLy3v3wpxWyzumCMH3W2rk6/j0MjZ+9D8dK0zefhJ2dWl+oetg6HmDQqxg==} '@zeit/schemas@2.36.0': resolution: {integrity: sha512-7kjMwcChYEzMKjeex9ZFXkt1AyNov9R5HZtjBKVsmVpw7pa7ZtlCGvCBC2vnnXctaYN+aRI61HjIqeetZW5ROg==} @@ -2972,8 +2969,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.77.8: - resolution: {integrity: sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==} + sass@1.78.0: + resolution: {integrity: sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==} engines: {node: '>=14.0.0'} hasBin: true @@ -3224,11 +3221,6 @@ packages: tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - tsx@4.19.0: - resolution: {integrity: sha512-bV30kM7bsLZKZIOCHeMNVMJ32/LuJzLVajkQI/qf92J2Qr08ueLQvW00PUZGiuLPP760UINwupgUj8qrSCPUKg==} - engines: {node: '>=18.0.0'} - hasBin: true - type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -3258,6 +3250,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + engines: {node: '>=14.17'} + hasBin: true + uglify-js@3.19.1: resolution: {integrity: sha512-y/2wiW+ceTYR2TSSptAhfnEtpLaQ4Ups5zrjB2d3kuVxHj16j/QJwPl5PvuGy9uARb39J0+iKxcRPvtpsx4A4A==} engines: {node: '>=0.8.0'} @@ -3908,51 +3905,51 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.21.2': optional: true - '@swc/core-darwin-arm64@1.7.23': + '@swc/core-darwin-arm64@1.7.24': optional: true - '@swc/core-darwin-x64@1.7.23': + '@swc/core-darwin-x64@1.7.24': optional: true - '@swc/core-linux-arm-gnueabihf@1.7.23': + '@swc/core-linux-arm-gnueabihf@1.7.24': optional: true - '@swc/core-linux-arm64-gnu@1.7.23': + '@swc/core-linux-arm64-gnu@1.7.24': optional: true - '@swc/core-linux-arm64-musl@1.7.23': + '@swc/core-linux-arm64-musl@1.7.24': optional: true - '@swc/core-linux-x64-gnu@1.7.23': + '@swc/core-linux-x64-gnu@1.7.24': optional: true - '@swc/core-linux-x64-musl@1.7.23': + '@swc/core-linux-x64-musl@1.7.24': optional: true - '@swc/core-win32-arm64-msvc@1.7.23': + '@swc/core-win32-arm64-msvc@1.7.24': optional: true - '@swc/core-win32-ia32-msvc@1.7.23': + '@swc/core-win32-ia32-msvc@1.7.24': optional: true - '@swc/core-win32-x64-msvc@1.7.23': + '@swc/core-win32-x64-msvc@1.7.24': optional: true - '@swc/core@1.7.23': + '@swc/core@1.7.24': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.12 optionalDependencies: - '@swc/core-darwin-arm64': 1.7.23 - '@swc/core-darwin-x64': 1.7.23 - '@swc/core-linux-arm-gnueabihf': 1.7.23 - '@swc/core-linux-arm64-gnu': 1.7.23 - '@swc/core-linux-arm64-musl': 1.7.23 - '@swc/core-linux-x64-gnu': 1.7.23 - '@swc/core-linux-x64-musl': 1.7.23 - '@swc/core-win32-arm64-msvc': 1.7.23 - '@swc/core-win32-ia32-msvc': 1.7.23 - '@swc/core-win32-x64-msvc': 1.7.23 + '@swc/core-darwin-arm64': 1.7.24 + '@swc/core-darwin-x64': 1.7.24 + '@swc/core-linux-arm-gnueabihf': 1.7.24 + '@swc/core-linux-arm64-gnu': 1.7.24 + '@swc/core-linux-arm64-musl': 1.7.24 + '@swc/core-linux-x64-gnu': 1.7.24 + '@swc/core-linux-x64-musl': 1.7.24 + '@swc/core-win32-arm64-msvc': 1.7.24 + '@swc/core-win32-ia32-msvc': 1.7.24 + '@swc/core-win32-x64-msvc': 1.7.24 '@swc/counter@0.1.3': {} @@ -3966,7 +3963,7 @@ snapshots: '@types/hash-sum@1.0.2': {} - '@types/node@20.16.3': + '@types/node@20.16.5': dependencies: undici-types: 6.19.6 @@ -3978,43 +3975,43 @@ snapshots: '@types/serve-handler@6.1.4': dependencies: - '@types/node': 20.16.3 + '@types/node': 20.16.5 '@types/trusted-types@2.0.7': {} '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.16.3 + '@types/node': 20.16.5 optional: true - '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/eslint-plugin@8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.6.2))(eslint@9.9.1)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.4.0 - '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/type-utils': 8.4.0(eslint@9.9.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.4.0 eslint: 9.9.1 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.4.0 debug: 4.3.6 eslint: 9.9.1 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color @@ -4028,14 +4025,14 @@ snapshots: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 - '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/type-utils@8.4.0(eslint@9.9.1)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.6.2) debug: 4.3.6 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color @@ -4044,7 +4041,7 @@ snapshots: '@typescript-eslint/types@8.4.0': {} - '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@7.18.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 7.18.0 '@typescript-eslint/visitor-keys': 7.18.0 @@ -4053,13 +4050,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.4.0(typescript@5.5.4)': + '@typescript-eslint/typescript-estree@8.4.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.4.0 '@typescript-eslint/visitor-keys': 8.4.0 @@ -4068,29 +4065,29 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.5.4) + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.18.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/utils@7.18.0(eslint@9.9.1)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) '@typescript-eslint/scope-manager': 7.18.0 '@typescript-eslint/types': 7.18.0 - '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.6.2) eslint: 9.9.1 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.4.0(eslint@9.9.1)(typescript@5.5.4)': + '@typescript-eslint/utils@8.4.0(eslint@9.9.1)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.1) '@typescript-eslint/scope-manager': 8.4.0 '@typescript-eslint/types': 8.4.0 - '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.4.0(typescript@5.6.2) eslint: 9.9.1 transitivePeerDependencies: - supports-color @@ -4106,12 +4103,12 @@ snapshots: '@typescript-eslint/types': 8.4.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@20.16.3)(sass@1.77.8))(vue@packages+vue)': + '@vitejs/plugin-vue@5.1.2(vite@5.4.0(@types/node@20.16.5)(sass@1.78.0))(vue@packages+vue)': dependencies: - vite: 5.4.0(@types/node@20.16.3)(sass@1.77.8) + vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) vue: link:packages/vue - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -4125,7 +4122,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8) + vitest: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) transitivePeerDependencies: - supports-color @@ -4164,7 +4161,7 @@ snapshots: '@vue/consolidate@1.0.0': {} - '@vue/repl@4.3.1': {} + '@vue/repl@4.4.0': {} '@zeit/schemas@2.36.0': {} @@ -4549,14 +4546,14 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig@9.0.0(typescript@5.5.4): + cosmiconfig@9.0.0(typescript@5.6.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 cross-spawn@7.0.3: dependencies: @@ -4747,9 +4744,9 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import-x@3.1.0(eslint@9.9.1)(typescript@5.5.4): + eslint-plugin-import-x@3.1.0(eslint@9.9.1)(typescript@5.6.2): dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 7.18.0(eslint@9.9.1)(typescript@5.6.2) debug: 4.3.6 doctrine: 3.0.0 eslint: 9.9.1 @@ -4764,12 +4761,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.9.1)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8)): + eslint-plugin-vitest@0.5.4(eslint@9.9.1)(typescript@5.6.2)(vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0)): dependencies: - '@typescript-eslint/utils': 7.18.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/utils': 7.18.0(eslint@9.9.1)(typescript@5.6.2) eslint: 9.9.1 optionalDependencies: - vitest: 2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8) + vitest: 2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0) transitivePeerDependencies: - supports-color - typescript @@ -5813,11 +5810,11 @@ snapshots: - supports-color - utf-8-validate - puppeteer@23.3.0(typescript@5.5.4): + puppeteer@23.3.0(typescript@5.6.2): dependencies: '@puppeteer/browsers': 2.4.0 chromium-bidi: 0.6.5(devtools-protocol@0.0.1330662) - cosmiconfig: 9.0.0(typescript@5.5.4) + cosmiconfig: 9.0.0(typescript@5.6.2) devtools-protocol: 0.0.1330662 puppeteer-core: 23.3.0 typed-query-selector: 2.12.0 @@ -5914,11 +5911,11 @@ snapshots: glob: 11.0.0 package-json-from-dist: 1.0.0 - rollup-plugin-dts@6.1.1(rollup@4.21.2)(typescript@5.5.4): + rollup-plugin-dts@6.1.1(rollup@4.21.2)(typescript@5.6.2): dependencies: magic-string: 0.30.11 rollup: 4.21.2 - typescript: 5.5.4 + typescript: 5.6.2 optionalDependencies: '@babel/code-frame': 7.24.7 @@ -5996,7 +5993,7 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.77.8: + sass@1.78.0: dependencies: chokidar: 3.6.0 immutable: 4.3.7 @@ -6242,19 +6239,12 @@ snapshots: dependencies: punycode: 2.3.1 - ts-api-utils@1.3.0(typescript@5.5.4): + ts-api-utils@1.3.0(typescript@5.6.2): dependencies: - typescript: 5.5.4 + typescript: 5.6.2 tslib@2.7.0: {} - tsx@4.19.0: - dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.7.6 - optionalDependencies: - fsevents: 2.3.3 - type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -6265,19 +6255,21 @@ snapshots: typed-query-selector@2.12.0: {} - typescript-eslint@8.4.0(eslint@9.9.1)(typescript@5.5.4): + typescript-eslint@8.4.0(eslint@9.9.1)(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.5.4))(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.5.4) - '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.4.0(@typescript-eslint/parser@8.4.0(eslint@9.9.1)(typescript@5.6.2))(eslint@9.9.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.4.0(eslint@9.9.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.4.0(eslint@9.9.1)(typescript@5.6.2) optionalDependencies: - typescript: 5.5.4 + typescript: 5.6.2 transitivePeerDependencies: - eslint - supports-color typescript@5.5.4: {} + typescript@5.6.2: {} + uglify-js@3.19.1: optional: true @@ -6319,13 +6311,13 @@ snapshots: vary@1.1.2: {} - vite-node@2.0.5(@types/node@20.16.3)(sass@1.77.8): + vite-node@2.0.5(@types/node@20.16.5)(sass@1.78.0): dependencies: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.16.3)(sass@1.77.8) + vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) transitivePeerDependencies: - '@types/node' - less @@ -6337,17 +6329,17 @@ snapshots: - supports-color - terser - vite@5.4.0(@types/node@20.16.3)(sass@1.77.8): + vite@5.4.0(@types/node@20.16.5)(sass@1.78.0): dependencies: esbuild: 0.21.5 postcss: 8.4.41 rollup: 4.20.0 optionalDependencies: - '@types/node': 20.16.3 + '@types/node': 20.16.5 fsevents: 2.3.3 - sass: 1.77.8 + sass: 1.78.0 - vitest@2.0.5(@types/node@20.16.3)(jsdom@25.0.0)(sass@1.77.8): + vitest@2.0.5(@types/node@20.16.5)(jsdom@25.0.0)(sass@1.78.0): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -6365,11 +6357,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.0 tinyrainbow: 1.2.0 - vite: 5.4.0(@types/node@20.16.3)(sass@1.77.8) - vite-node: 2.0.5(@types/node@20.16.3)(sass@1.77.8) + vite: 5.4.0(@types/node@20.16.5)(sass@1.78.0) + vite-node: 2.0.5(@types/node@20.16.5)(sass@1.78.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.16.3 + '@types/node': 20.16.5 jsdom: 25.0.0 transitivePeerDependencies: - less diff --git a/scripts/size-report.ts b/scripts/size-report.js similarity index 60% rename from scripts/size-report.ts rename to scripts/size-report.js index 363fa927985..f92577d0d12 100644 --- a/scripts/size-report.ts +++ b/scripts/size-report.js @@ -1,20 +1,24 @@ +// @ts-check import path from 'node:path' import { markdownTable } from 'markdown-table' import prettyBytes from 'pretty-bytes' import { readdir } from 'node:fs/promises' import { existsSync } from 'node:fs' -interface SizeResult { - size: number - gzip: number - brotli: number -} +/** + * @typedef {Object} SizeResult + * @property {number} size + * @property {number} gzip + * @property {number} brotli + */ -interface BundleResult extends SizeResult { - file: string -} +/** + * @typedef {SizeResult & { file: string }} BundleResult + */ -type UsageResult = Record +/** + * @typedef {Record} UsageResult + */ const currDir = path.resolve('temp/size') const prevDir = path.resolve('temp/size-prev') @@ -23,6 +27,9 @@ const sizeHeaders = ['Size', 'Gzip', 'Brotli'] run() +/** + * Runs the main process of rendering file and usage data + */ async function run() { await renderFiles() await renderUsages() @@ -30,32 +37,36 @@ async function run() { process.stdout.write(output) } +/** + * Renders file sizes and diffs between current and previous versions + */ async function renderFiles() { - const filterFiles = (files: string[]) => + const filterFiles = files => files.filter(file => file[0] !== '_' && !file.endsWith('.txt')) const curr = filterFiles(await readdir(currDir)) const prev = existsSync(prevDir) ? filterFiles(await readdir(prevDir)) : [] const fileList = new Set([...curr, ...prev]) - const rows: string[][] = [] + const rows = [] for (const file of fileList) { const currPath = path.resolve(currDir, file) const prevPath = path.resolve(prevDir, file) - const curr = await importJSON(currPath) - const prev = await importJSON(prevPath) + const curr = await importJSON(currPath) + const prev = await importJSON(prevPath) const fileName = curr?.file || prev?.file || '' if (!curr) { rows.push([`~~${fileName}~~`]) - } else + } else { rows.push([ fileName, `${prettyBytes(curr.size)}${getDiff(curr.size, prev?.size)}`, `${prettyBytes(curr.gzip)}${getDiff(curr.gzip, prev?.gzip)}`, `${prettyBytes(curr.brotli)}${getDiff(curr.brotli, prev?.brotli)}`, ]) + } } output += '### Bundles\n\n' @@ -63,13 +74,13 @@ async function renderFiles() { output += '\n\n' } +/** + * Renders usage data comparing current and previous usage results + */ async function renderUsages() { - const curr = (await importJSON( - path.resolve(currDir, '_usages.json'), - ))! - const prev = await importJSON( - path.resolve(prevDir, '_usages.json'), - ) + const curr = await importJSON(path.resolve(currDir, '_usages.json')) + const prev = await importJSON(path.resolve(prevDir, '_usages.json')) + output += '\n### Usages\n\n' const data = Object.values(curr) @@ -86,17 +97,31 @@ async function renderUsages() { `${prettyBytes(usage.brotli)}${diffBrotli}`, ] }) - .filter((usage): usage is string[] => !!usage) + .filter(usage => !!usage) output += `${markdownTable([['Name', ...sizeHeaders], ...data])}\n\n` } -async function importJSON(path: string): Promise { - if (!existsSync(path)) return undefined - return (await import(path, { assert: { type: 'json' } })).default +/** + * Imports JSON data from a specified path + * + * @template T + * @param {string} filePath - Path to the JSON file + * @returns {Promise} The JSON content or undefined if the file does not exist + */ +async function importJSON(filePath) { + if (!existsSync(filePath)) return undefined + return (await import(filePath, { assert: { type: 'json' } })).default } -function getDiff(curr: number, prev?: number) { +/** + * Calculates the difference between the current and previous sizes + * + * @param {number} curr - The current size + * @param {number} [prev] - The previous size + * @returns {string} The difference in pretty format + */ +function getDiff(curr, prev) { if (prev === undefined) return '' const diff = curr - prev if (diff === 0) return '' diff --git a/scripts/usage-size.ts b/scripts/usage-size.js similarity index 64% rename from scripts/usage-size.ts rename to scripts/usage-size.js index 5b915866c1d..c68e3703b91 100644 --- a/scripts/usage-size.ts +++ b/scripts/usage-size.js @@ -1,3 +1,4 @@ +// @ts-check import { mkdir, writeFile } from 'node:fs/promises' import path from 'node:path' import { rollup } from 'rollup' @@ -23,12 +24,20 @@ const { const sizeDir = path.resolve('temp/size') const entry = path.resolve('./packages/vue/dist/vue.runtime.esm-bundler.js') -interface Preset { - name: string - imports: string[] -} +/** + * @typedef {Object} Preset + * @property {string} name - The name of the preset + * @property {string[]} imports - The imports that are part of this preset + * @property {Record} [replace] + */ -const presets: Preset[] = [ +/** @type {Preset[]} */ +const presets = [ + { + name: 'createApp (CAPI only)', + imports: ['createApp'], + replace: { __VUE_OPTIONS_API__: 'false' }, + }, { name: 'createApp', imports: ['createApp'] }, { name: 'createSSRApp', imports: ['createSSRApp'] }, { name: 'defineCustomElement', imports: ['defineCustomElement'] }, @@ -47,28 +56,45 @@ const presets: Preset[] = [ main() +/** + * Main function that initiates the bundling process for the presets + */ async function main() { console.log() - const tasks: ReturnType[] = [] + /** @type {Promise<{name: string, size: number, gzip: number, brotli: number}>[]} */ + const tasks = [] for (const preset of presets) { tasks.push(generateBundle(preset)) } + const results = await Promise.all(tasks) - const results = Object.fromEntries( - (await Promise.all(tasks)).map(r => [r.name, r]), - ) + for (const r of results) { + console.log( + `${pico.green(pico.bold(r.name))} - ` + + `min:${prettyBytes(r.size, { minimumFractionDigits: 3 })} / ` + + `gzip:${prettyBytes(r.gzip, { minimumFractionDigits: 3 })} / ` + + `brotli:${prettyBytes(r.brotli, { minimumFractionDigits: 3 })}`, + ) + } await mkdir(sizeDir, { recursive: true }) await writeFile( path.resolve(sizeDir, '_usages.json'), - JSON.stringify(results, null, 2), + JSON.stringify(Object.fromEntries(results.map(r => [r.name, r])), null, 2), 'utf-8', ) } -async function generateBundle(preset: Preset) { +/** + * Generates a bundle for a given preset + * + * @param {Preset} preset - The preset to generate the bundle for + * @returns {Promise<{name: string, size: number, gzip: number, brotli: number}>} - The result of the bundling process + */ +async function generateBundle(preset) { const id = 'virtual:entry' const content = `export { ${preset.imports.join(', ')} } from '${entry}'` + const result = await rollup({ input: id, plugins: [ @@ -89,6 +115,7 @@ async function generateBundle(preset: Preset) { __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'false', __VUE_OPTIONS_API__: 'true', preventAssignment: true, + ...preset.replace, }), ], }) @@ -100,7 +127,7 @@ async function generateBundle(preset: Preset) { module: true, toplevel: true, }) - ).code! + ).code const size = minified.length const gzip = gzipSync(minified).length @@ -110,13 +137,6 @@ async function generateBundle(preset: Preset) { await writeFile(path.resolve(sizeDir, preset.name + '.js'), bundled) } - console.log( - `${pico.green(pico.bold(preset.name))} - ` + - `min:${prettyBytes(size, { minimumFractionDigits: 3 })} / ` + - `gzip:${prettyBytes(gzip, { minimumFractionDigits: 3 })} / ` + - `brotli:${prettyBytes(brotli, { minimumFractionDigits: 3 })}`, - ) - return { name: preset.name, size, diff --git a/tsconfig.build-node.json b/tsconfig.build-node.json deleted file mode 100644 index 045e23f03b8..00000000000 --- a/tsconfig.build-node.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "types": ["node"], - "declaration": true, - "emitDeclarationOnly": true, - "stripInternal": true, - "composite": false - }, - "include": [ - "packages/global.d.ts", - "packages/compiler-sfc/src", - "packages/compiler-ssr/src", - "packages/server-renderer/src" - ] -} diff --git a/tsconfig.build-browser.json b/tsconfig.build.json similarity index 70% rename from tsconfig.build-browser.json rename to tsconfig.build.json index 79e90602e9e..fc36b251d51 100644 --- a/tsconfig.build-browser.json +++ b/tsconfig.build.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.json", "compilerOptions": { - "types": [], + "types": ["node"], "declaration": true, "emitDeclarationOnly": true, "stripInternal": true, @@ -16,6 +16,10 @@ "packages/runtime-core/src", "packages/runtime-dom/src", "packages/reactivity/src", - "packages/shared/src" + "packages/shared/src", + "packages/global.d.ts", + "packages/compiler-sfc/src", + "packages/compiler-ssr/src", + "packages/server-renderer/src" ] } diff --git a/tsconfig.json b/tsconfig.json index a12850af027..9896083cf14 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,11 +32,9 @@ "include": [ "packages/global.d.ts", "packages/*/src", - "packages-private/*/src", - "packages/runtime-dom/types/jsx.d.ts", "packages/*/__tests__", - "packages-private/dts-test", "packages/vue/jsx-runtime", + "packages/runtime-dom/types/jsx.d.ts", "scripts/*", "rollup.*.js" ],