Skip to content

Commit b307055

Browse files
authored
refactor: fix tsconfig file in ui (#7221)
1 parent a942ea7 commit b307055

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

packages/ui/node/reporter.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import type {
2-
File,
32
ModuleGraphData,
4-
Reporter,
3+
RunnerTestFile,
54
SerializedConfig,
6-
Vitest,
75
} from 'vitest'
8-
import type { HTMLOptions } from 'vitest/node'
6+
import type { HTMLOptions, Vitest } from 'vitest/node'
7+
import type { Reporter } from 'vitest/reporters'
98
import { promises as fs } from 'node:fs'
109
import { fileURLToPath } from 'node:url'
1110
import { promisify } from 'node:util'
@@ -34,7 +33,7 @@ function getOutputFile(config: PotentialConfig | undefined) {
3433

3534
interface HTMLReportData {
3635
paths: string[]
37-
files: File[]
36+
files: RunnerTestFile[]
3837
config: SerializedConfig
3938
moduleGraph: Record<string, Record<string, ModuleGraphData>>
4039
unhandledErrors: unknown[]
@@ -75,7 +74,7 @@ export default class HTMLReporter implements Reporter {
7574
const browser = resolvedConfig.browser.enabled && resolvedConfig.browser.ui
7675
result.moduleGraph[projectName] ??= {}
7776
result.moduleGraph[projectName][file.filepath] = await getModuleGraph(
78-
this.ctx as any,
77+
this.ctx,
7978
projectName,
8079
file.filepath,
8180
browser,

packages/ui/node/tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../../../tsconfig.base.json",
3+
"include": ["./*.ts"]
4+
}

tsconfig.base.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"vitest": ["./packages/vitest/src/public/index.ts"],
2626
"vitest/globals": ["./packages/vitest/globals.d.ts"],
2727
"vitest/node": ["./packages/vitest/src/public/node.ts"],
28+
"vitest/reporters": ["./packages/vitest/src/public/reporters.ts"],
2829
"vitest/execute": ["./packages/vitest/src/public/execute.ts"],
2930
"vitest/config": ["./packages/vitest/src/public/config.ts"],
3031
"vitest/coverage": ["./packages/vitest/src/public/coverage.ts"],

0 commit comments

Comments
 (0)