test: adjust coverage config, use v8 coverage

This commit is contained in:
Evan You 2024-08-29 10:38:07 +08:00
parent 29c321bfd3
commit ac9e7e8bfa
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
19 changed files with 53 additions and 264 deletions

View File

@ -21,7 +21,7 @@
"test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts",
"test-dts": "run-s build-dts test-dts-only",
"test-dts-only": "tsc -p packages-private/dts-built-test/tsconfig.json && tsc -p ./packages-private/dts-test/tsconfig.test.json",
"test-coverage": "vitest -c vitest.unit.config.ts --coverage",
"test-coverage": "vitest run -c vitest.unit.config.ts --coverage",
"test-bench": "vitest bench",
"release": "node scripts/release.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
@ -71,7 +71,7 @@
"@types/node": "^20.16.2",
"@types/semver": "^7.5.8",
"@types/serve-handler": "^6.1.4",
"@vitest/coverage-istanbul": "^2.0.5",
"@vitest/coverage-v8": "^2.0.5",
"@vue/consolidate": "1.0.0",
"conventional-changelog-cli": "^5.0.0",
"enquirer": "^2.4.1",

View File

@ -725,7 +725,7 @@ function genNode(node: CodegenNode | symbol | string, context: CodegenContext) {
!__BROWSER__ && genReturnStatement(node, context)
break
/* istanbul ignore next */
/* v8 ignore start */
case NodeTypes.IF_BRANCH:
// noop
break
@ -736,6 +736,7 @@ function genNode(node: CodegenNode | symbol | string, context: CodegenContext) {
const exhaustiveCheck: never = node
return exhaustiveCheck
}
/* v8 ignore stop */
}
}

View File

@ -68,7 +68,7 @@ export function baseCompile(
): CodegenResult {
const onError = options.onError || defaultOnError
const isModuleMode = options.mode === 'module'
/* istanbul ignore if */
/* v8 ignore start */
if (__BROWSER__) {
if (options.prefixIdentifiers === true) {
onError(createCompilerError(ErrorCodes.X_PREFIX_ID_NOT_SUPPORTED))
@ -76,6 +76,7 @@ export function baseCompile(
onError(createCompilerError(ErrorCodes.X_MODULE_MODE_NOT_SUPPORTED))
}
}
/* v8 ignore stop */
const prefixIdentifiers =
!__BROWSER__ && (options.prefixIdentifiers === true || isModuleMode)

View File

@ -222,7 +222,7 @@ export function createTransformContext(
return `_${helperNameMap[context.helper(name)]}`
},
replaceNode(node) {
/* istanbul ignore if */
/* v8 ignore start */
if (__DEV__) {
if (!context.currentNode) {
throw new Error(`Node being replaced is already removed.`)
@ -231,9 +231,11 @@ export function createTransformContext(
throw new Error(`Cannot replace root node.`)
}
}
/* v8 ignore stop */
context.parent!.children[context.childIndex] = context.currentNode = node
},
removeNode(node) {
/* v8 ignore next 3 */
if (__DEV__ && !context.parent) {
throw new Error(`Cannot remove root node.`)
}
@ -243,7 +245,7 @@ export function createTransformContext(
: context.currentNode
? context.childIndex
: -1
/* istanbul ignore if */
/* v8 ignore next 3 */
if (__DEV__ && removalIndex < 0) {
throw new Error(`node being removed is not a child of current parent`)
}

View File

@ -273,7 +273,7 @@ export function advancePositionWithMutation(
}
export function assert(condition: boolean, msg?: string): void {
/* istanbul ignore if */
/* v8 ignore next 3 */
if (!condition) {
throw new Error(msg || `unexpected compiler condition`)
}

View File

@ -3,6 +3,7 @@ import { LRUCache } from 'lru-cache'
export function createCache<T extends {}>(
max = 500,
): Map<string, T> | LRUCache<string, T> {
/* v8 ignore next 3 */
if (__GLOBAL__ || __ESM_BROWSER__) {
return new Map<string, T>()
}

View File

@ -306,7 +306,7 @@ function convertLegacySlots(vnode: VNode): VNode {
}
export function defineLegacyVNodeProperties(vnode: VNode): void {
/* istanbul ignore if */
/* v8 ignore start */
if (
isCompatEnabled(
DeprecationTypes.RENDER_FUNCTION,
@ -346,4 +346,5 @@ export function defineLegacyVNodeProperties(vnode: VNode): void {
},
})
}
/* v8 ignore stop */
}

View File

@ -1060,8 +1060,8 @@ export function finishComponentSetup(
// warn missing template/render
// the runtime compilation of template in SSR is done by server-render
if (__DEV__ && !Component.render && instance.render === NOOP && !isSSR) {
/* istanbul ignore if */
if (!compile && Component.template) {
/* v8 ignore start */
warn(
`Component provided template option but ` +
`runtime compilation is not supported in this build of Vue.` +
@ -1073,6 +1073,7 @@ export function finishComponentSetup(
? ` Use "vue.global.js" instead.`
: ``) /* should not happen */,
)
/* v8 ignore stop */
} else {
warn(`Component is missing template or render function: `, Component)
}
@ -1208,7 +1209,6 @@ export function getComponentName(
: Component.name || (includeInferred && Component.__name)
}
/* istanbul ignore next */
export function formatComponentName(
instance: ComponentInternalInstance | null,
Component: ConcreteComponent,

View File

@ -387,7 +387,7 @@ function matches(pattern: MatchPattern, name: string): boolean {
pattern.lastIndex = 0
return pattern.test(name)
}
/* istanbul ignore next */
/* v8 ignore next */
return false
}

View File

@ -457,7 +457,7 @@ function createSuspenseBoundary(
rendererInternals: RendererInternals,
isHydrating = false,
): SuspenseBoundary {
/* istanbul ignore if */
/* v8 ignore start */
if (__DEV__ && !__TEST__ && !hasWarned) {
hasWarned = true
// @ts-expect-error `console.info` cannot be null error
@ -466,6 +466,7 @@ function createSuspenseBoundary(
`<Suspense> is an experimental feature and its API will likely change.`,
)
}
/* v8 ignore stop */
const {
p: patch,

View File

@ -4,8 +4,6 @@ import { getGlobalThis } from '@vue/shared'
* This is only called in esm-bundler builds.
* It is called when a renderer is created, in `baseCreateRenderer` so that
* importing runtime-core is side-effects free.
*
* istanbul-ignore-next
*/
export function initFeatureFlags(): void {
const needWarn = []

View File

@ -63,12 +63,12 @@ export function warn(msg: string, ...args: any[]): void {
)
} else {
const warnArgs = [`[Vue warn]: ${msg}`, ...args]
/* istanbul ignore if */
if (
trace.length &&
// avoid spamming console during tests
!__TEST__
) {
/* v8 ignore next 2 */
warnArgs.push(`\n`, ...formatTrace(trace))
}
console.warn(...warnArgs)
@ -107,7 +107,7 @@ export function getComponentTrace(): ComponentTraceStack {
return normalizedStack
}
/* istanbul ignore next */
/* v8 ignore start */
function formatTrace(trace: ComponentTraceStack): any[] {
const logs: any[] = []
trace.forEach((entry, i) => {
@ -131,7 +131,6 @@ function formatTraceEntry({ vnode, recurseCount }: TraceEntry): any[] {
: [open + close]
}
/* istanbul ignore next */
function formatProps(props: Data): any[] {
const res: any[] = []
const keys = Object.keys(props)
@ -146,7 +145,6 @@ function formatProps(props: Data): any[] {
function formatProp(key: string, value: unknown): any[]
function formatProp(key: string, value: unknown, raw: true): any
/* istanbul ignore next */
function formatProp(key: string, value: unknown, raw?: boolean): any {
if (isString(value)) {
value = JSON.stringify(value)
@ -181,3 +179,4 @@ export function assertNumber(val: unknown, type: string): void {
warn(`${type} is NaN - ` + 'the duration expression might be incorrect.')
}
}
/* v8 ignore stop */

View File

@ -397,7 +397,6 @@ export function getTransitionInfo(
let type: CSSTransitionInfo['type'] = null
let timeout = 0
let propCount = 0
/* istanbul ignore if */
if (expectedType === TRANSITION) {
if (transitionTimeout > 0) {
type = TRANSITION

View File

@ -2,7 +2,6 @@ import { getCurrentInstance, warn } from '@vue/runtime-core'
import { EMPTY_OBJ } from '@vue/shared'
export function useCssModule(name = '$style'): Record<string, string> {
/* istanbul ignore else */
if (!__GLOBAL__) {
const instance = getCurrentInstance()!
if (!instance) {
@ -22,9 +21,11 @@ export function useCssModule(name = '$style'): Record<string, string> {
}
return mod as Record<string, string>
} else {
/* v8 ignore start */
if (__DEV__) {
warn(`useCssModule() is not supported in the global build.`)
}
return EMPTY_OBJ
/* v8 ignore stop */
}
}

View File

@ -20,12 +20,13 @@ export function useCssVars(getter: (ctx: any) => Record<string, string>): void {
if (!__BROWSER__ && !__TEST__) return
const instance = getCurrentInstance()
/* istanbul ignore next */
/* v8 ignore start */
if (!instance) {
__DEV__ &&
warn(`useCssVars is called without current active component instance.`)
return
}
/* v8 ignore stop */
const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
Array.from(

View File

@ -29,7 +29,6 @@ export function looseEqual(a: any, b: any): boolean {
aValidType = isObject(a)
bValidType = isObject(b)
if (aValidType || bValidType) {
/* istanbul ignore if: this if will probably never be called */
if (!aValidType || !bValidType) {
return false
}

View File

@ -2,7 +2,6 @@ import { initCustomFormatter } from '@vue/runtime-dom'
export function initDev(): void {
if (__BROWSER__) {
/* istanbul ignore if */
if (!__ESM_BUNDLER__) {
console.info(
`You are running a development build of Vue.\n` +

View File

@ -68,7 +68,7 @@ importers:
'@types/serve-handler':
specifier: ^6.1.4
version: 6.1.4
'@vitest/coverage-istanbul':
'@vitest/coverage-v8':
specifier: ^2.0.5
version: 2.0.5(vitest@2.0.5(@types/node@20.16.2)(jsdom@25.0.0)(sass@1.77.8))
'@vue/consolidate':
@ -451,36 +451,6 @@ packages:
resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
engines: {node: '>=6.9.0'}
'@babel/compat-data@7.25.2':
resolution: {integrity: sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ==}
engines: {node: '>=6.9.0'}
'@babel/core@7.25.2':
resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==}
engines: {node: '>=6.9.0'}
'@babel/generator@7.25.0':
resolution: {integrity: sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==}
engines: {node: '>=6.9.0'}
'@babel/helper-compilation-targets@7.25.2':
resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==}
engines: {node: '>=6.9.0'}
'@babel/helper-module-imports@7.24.7':
resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==}
engines: {node: '>=6.9.0'}
'@babel/helper-module-transforms@7.25.2':
resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
'@babel/helper-simple-access@7.24.7':
resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==}
engines: {node: '>=6.9.0'}
'@babel/helper-string-parser@7.24.8':
resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==}
engines: {node: '>=6.9.0'}
@ -489,14 +459,6 @@ packages:
resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==}
engines: {node: '>=6.9.0'}
'@babel/helper-validator-option@7.24.8':
resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==}
engines: {node: '>=6.9.0'}
'@babel/helpers@7.25.0':
resolution: {integrity: sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==}
engines: {node: '>=6.9.0'}
'@babel/highlight@7.24.7':
resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==}
engines: {node: '>=6.9.0'}
@ -506,18 +468,13 @@ packages:
engines: {node: '>=6.0.0'}
hasBin: true
'@babel/template@7.25.0':
resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==}
engines: {node: '>=6.9.0'}
'@babel/traverse@7.25.3':
resolution: {integrity: sha512-HefgyP1x754oGCsKmV5reSmtV7IXj/kpaE1XYY+D9G5PvKKoFfSbiS4M77MdjuwlZKDIKFCffq9rPU+H/s3ZdQ==}
engines: {node: '>=6.9.0'}
'@babel/types@7.25.2':
resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==}
engines: {node: '>=6.9.0'}
'@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
'@conventional-changelog/git-client@1.0.1':
resolution: {integrity: sha512-PJEqBwAleffCMETaVm/fUgHldzBE35JFk3/9LL6NUA5EXa3qednu+UT6M7E5iBu3zIQZCULYIiZ90fBYHt6xUw==}
engines: {node: '>=18'}
@ -1319,8 +1276,8 @@ packages:
vite: ^5.0.0
vue: ^3.2.25
'@vitest/coverage-istanbul@2.0.5':
resolution: {integrity: sha512-BvjWKtp7fiMAeYUD0mO5cuADzn1gmjTm54jm5qUEnh/O08riczun8rI4EtQlg3bWoRo2lT3FO8DmjPDX9ZthPw==}
'@vitest/coverage-v8@2.0.5':
resolution: {integrity: sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==}
peerDependencies:
vitest: 2.0.5
@ -1502,11 +1459,6 @@ packages:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
browserslist@4.23.3:
resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
buffer-crc32@0.2.13:
resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==}
@ -1537,9 +1489,6 @@ packages:
resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==}
engines: {node: '>=14.16'}
caniuse-lite@1.0.30001651:
resolution: {integrity: sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==}
chai@5.1.1:
resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==}
engines: {node: '>=12'}
@ -1715,9 +1664,6 @@ packages:
engines: {node: '>=18'}
hasBin: true
convert-source-map@2.0.0:
resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
core-util-is@1.0.3:
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
@ -1830,9 +1776,6 @@ packages:
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
electron-to-chromium@1.5.5:
resolution: {integrity: sha512-QR7/A7ZkMS8tZuoftC/jfqNkZLQO779SSW3YuZHP4eXpj3EffGLFcB/Xu9AAZQzLccTiCV+EmUo3ha4mQ9wnlA==}
emoji-regex@10.3.0:
resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==}
@ -2072,10 +2015,6 @@ packages:
generic-names@4.0.0:
resolution: {integrity: sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A==}
gensync@1.0.0-beta.2:
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
engines: {node: '>=6.9.0'}
get-caller-file@2.0.5:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
@ -2137,10 +2076,6 @@ packages:
engines: {node: 20 || >=22}
hasBin: true
globals@11.12.0:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
globals@14.0.0:
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
engines: {node: '>=18'}
@ -2365,10 +2300,6 @@ packages:
resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==}
engines: {node: '>=8'}
istanbul-lib-instrument@6.0.3:
resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==}
engines: {node: '>=10'}
istanbul-lib-report@3.0.1:
resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==}
engines: {node: '>=10'}
@ -2410,11 +2341,6 @@ packages:
canvas:
optional: true
jsesc@2.5.2:
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
engines: {node: '>=4'}
hasBin: true
json-buffer@3.0.1:
resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==}
@ -2434,11 +2360,6 @@ packages:
json-stable-stringify-without-jsonify@1.0.1:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
json5@2.2.3:
resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
engines: {node: '>=6'}
hasBin: true
jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
@ -2509,9 +2430,6 @@ packages:
resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==}
engines: {node: 20 || >=22}
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
lru-cache@7.18.3:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
@ -2640,9 +2558,6 @@ packages:
resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==}
engines: {node: '>= 0.4.0'}
node-releases@2.0.18:
resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
normalize-package-data@6.0.2:
resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==}
engines: {node: ^16.14.0 || >=18.0.0}
@ -3055,10 +2970,6 @@ packages:
resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==}
engines: {node: '>=v12.22.7'}
semver@6.3.1:
resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
hasBin: true
semver@7.6.3:
resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==}
engines: {node: '>=10'}
@ -3356,12 +3267,6 @@ packages:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
update-browserslist-db@1.1.0:
resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==}
hasBin: true
peerDependencies:
browserslist: '>= 4.21.0'
update-check@1.5.4:
resolution: {integrity: sha512-5YHsflzHP4t1G+8WGPlvKbJEbAJGCgw+Em+dGR1KmBUbr1J36SJBqlHLjR7oob7sco5hWHGQVcr9B2poIVDDTQ==}
@ -3532,9 +3437,6 @@ packages:
resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
engines: {node: '>=10'}
yallist@3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
yaml@2.5.0:
resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==}
engines: {node: '>= 14'}
@ -3570,78 +3472,10 @@ snapshots:
'@babel/highlight': 7.24.7
picocolors: 1.0.1
'@babel/compat-data@7.25.2': {}
'@babel/core@7.25.2':
dependencies:
'@ampproject/remapping': 2.3.0
'@babel/code-frame': 7.24.7
'@babel/generator': 7.25.0
'@babel/helper-compilation-targets': 7.25.2
'@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2)
'@babel/helpers': 7.25.0
'@babel/parser': 7.25.3
'@babel/template': 7.25.0
'@babel/traverse': 7.25.3
'@babel/types': 7.25.2
convert-source-map: 2.0.0
debug: 4.3.6
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
transitivePeerDependencies:
- supports-color
'@babel/generator@7.25.0':
dependencies:
'@babel/types': 7.25.2
'@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
jsesc: 2.5.2
'@babel/helper-compilation-targets@7.25.2':
dependencies:
'@babel/compat-data': 7.25.2
'@babel/helper-validator-option': 7.24.8
browserslist: 4.23.3
lru-cache: 5.1.1
semver: 6.3.1
'@babel/helper-module-imports@7.24.7':
dependencies:
'@babel/traverse': 7.25.3
'@babel/types': 7.25.2
transitivePeerDependencies:
- supports-color
'@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)':
dependencies:
'@babel/core': 7.25.2
'@babel/helper-module-imports': 7.24.7
'@babel/helper-simple-access': 7.24.7
'@babel/helper-validator-identifier': 7.24.7
'@babel/traverse': 7.25.3
transitivePeerDependencies:
- supports-color
'@babel/helper-simple-access@7.24.7':
dependencies:
'@babel/traverse': 7.25.3
'@babel/types': 7.25.2
transitivePeerDependencies:
- supports-color
'@babel/helper-string-parser@7.24.8': {}
'@babel/helper-validator-identifier@7.24.7': {}
'@babel/helper-validator-option@7.24.8': {}
'@babel/helpers@7.25.0':
dependencies:
'@babel/template': 7.25.0
'@babel/types': 7.25.2
'@babel/highlight@7.24.7':
dependencies:
'@babel/helper-validator-identifier': 7.24.7
@ -3653,30 +3487,14 @@ snapshots:
dependencies:
'@babel/types': 7.25.2
'@babel/template@7.25.0':
dependencies:
'@babel/code-frame': 7.24.7
'@babel/parser': 7.25.3
'@babel/types': 7.25.2
'@babel/traverse@7.25.3':
dependencies:
'@babel/code-frame': 7.24.7
'@babel/generator': 7.25.0
'@babel/parser': 7.25.3
'@babel/template': 7.25.0
'@babel/types': 7.25.2
debug: 4.3.6
globals: 11.12.0
transitivePeerDependencies:
- supports-color
'@babel/types@7.25.2':
dependencies:
'@babel/helper-string-parser': 7.24.8
'@babel/helper-validator-identifier': 7.24.7
to-fast-properties: 2.0.0
'@bcoe/v8-coverage@0.2.3': {}
'@conventional-changelog/git-client@1.0.1(conventional-commits-filter@5.0.0)(conventional-commits-parser@6.0.0)':
dependencies:
'@types/semver': 7.5.8
@ -4279,16 +4097,18 @@ snapshots:
vite: 5.4.0(@types/node@20.16.2)(sass@1.77.8)
vue: link:packages/vue
'@vitest/coverage-istanbul@2.0.5(vitest@2.0.5(@types/node@20.16.2)(jsdom@25.0.0)(sass@1.77.8))':
'@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.16.2)(jsdom@25.0.0)(sass@1.77.8))':
dependencies:
'@istanbuljs/schema': 0.1.3
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 0.2.3
debug: 4.3.6
istanbul-lib-coverage: 3.2.2
istanbul-lib-instrument: 6.0.3
istanbul-lib-report: 3.0.1
istanbul-lib-source-maps: 5.0.6
istanbul-reports: 3.1.7
magic-string: 0.30.11
magicast: 0.3.4
std-env: 3.7.0
test-exclude: 7.0.1
tinyrainbow: 1.2.0
vitest: 2.0.5(@types/node@20.16.2)(jsdom@25.0.0)(sass@1.77.8)
@ -4481,13 +4301,6 @@ snapshots:
dependencies:
fill-range: 7.1.1
browserslist@4.23.3:
dependencies:
caniuse-lite: 1.0.30001651
electron-to-chromium: 1.5.5
node-releases: 2.0.18
update-browserslist-db: 1.1.0(browserslist@4.23.3)
buffer-crc32@0.2.13: {}
buffer@5.7.1:
@ -4513,8 +4326,6 @@ snapshots:
camelcase@7.0.1: {}
caniuse-lite@1.0.30001651: {}
chai@5.1.1:
dependencies:
assertion-error: 2.0.1
@ -4722,8 +4533,6 @@ snapshots:
dependencies:
meow: 13.2.0
convert-source-map@2.0.0: {}
core-util-is@1.0.3: {}
cosmiconfig@9.0.0(typescript@5.5.4):
@ -4810,8 +4619,6 @@ snapshots:
eastasianwidth@0.2.0: {}
electron-to-chromium@1.5.5: {}
emoji-regex@10.3.0: {}
emoji-regex@8.0.0: {}
@ -5141,8 +4948,6 @@ snapshots:
dependencies:
loader-utils: 3.3.1
gensync@1.0.0-beta.2: {}
get-caller-file@2.0.5: {}
get-east-asian-width@1.2.0: {}
@ -5220,8 +5025,6 @@ snapshots:
package-json-from-dist: 1.0.0
path-scurry: 2.0.0
globals@11.12.0: {}
globals@14.0.0: {}
globby@11.1.0:
@ -5408,16 +5211,6 @@ snapshots:
istanbul-lib-coverage@3.2.2: {}
istanbul-lib-instrument@6.0.3:
dependencies:
'@babel/core': 7.25.2
'@babel/parser': 7.25.3
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.2
semver: 7.6.3
transitivePeerDependencies:
- supports-color
istanbul-lib-report@3.0.1:
dependencies:
istanbul-lib-coverage: 3.2.2
@ -5487,8 +5280,6 @@ snapshots:
- supports-color
- utf-8-validate
jsesc@2.5.2: {}
json-buffer@3.0.1: {}
json-parse-even-better-errors@2.3.1: {}
@ -5501,8 +5292,6 @@ snapshots:
json-stable-stringify-without-jsonify@1.0.1: {}
json5@2.2.3: {}
jsonfile@6.1.0:
dependencies:
universalify: 2.0.1
@ -5592,10 +5381,6 @@ snapshots:
lru-cache@11.0.0: {}
lru-cache@5.1.1:
dependencies:
yallist: 3.1.1
lru-cache@7.18.3: {}
magic-string@0.30.11:
@ -5689,8 +5474,6 @@ snapshots:
netmask@2.0.2: {}
node-releases@2.0.18: {}
normalize-package-data@6.0.2:
dependencies:
hosted-git-info: 7.0.2
@ -6194,8 +5977,6 @@ snapshots:
dependencies:
xmlchars: 2.2.0
semver@6.3.1: {}
semver@7.6.3: {}
serve-handler@6.1.5:
@ -6482,12 +6263,6 @@ snapshots:
universalify@2.0.1: {}
update-browserslist-db@1.1.0(browserslist@4.23.3):
dependencies:
browserslist: 4.23.3
escalade: 3.1.2
picocolors: 1.0.1
update-check@1.5.4:
dependencies:
registry-auth-token: 3.3.2
@ -6646,8 +6421,6 @@ snapshots:
y18n@5.0.8: {}
yallist@3.1.1: {}
yaml@2.5.0: {}
yargs-parser@21.1.1: {}

View File

@ -32,9 +32,22 @@ export default defineConfig({
hooks: 'list',
},
coverage: {
provider: 'istanbul',
provider: 'v8',
reporter: ['text', 'html'],
include: ['packages/*/src/**'],
exclude: [
// entries that are not really used during tests
'packages/vue-compat/**',
'packages/vue/src/dev.ts',
'packages/vue/src/runtime.ts',
// not testable during unit tests
'packages/runtime-core/src/profiling.ts',
'packages/runtime-core/src/featureFlags.ts',
'packages/runtime-core/src/customFormatter.ts',
// tested via e2e so no coverage is collected
'packages/runtime-core/src/hydrationStrategies.ts',
'packages/runtime-dom/src/components/Transition*',
],
},
},
})