Skip to content

Commit

Permalink
refactor: fix tsconfig file in ui (#7221)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Jan 12, 2025
1 parent a942ea7 commit b307055
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/ui/node/reporter.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import type {
File,
ModuleGraphData,
Reporter,
RunnerTestFile,
SerializedConfig,
Vitest,
} from 'vitest'
import type { HTMLOptions } from 'vitest/node'
import type { HTMLOptions, Vitest } from 'vitest/node'
import type { Reporter } from 'vitest/reporters'
import { promises as fs } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { promisify } from 'node:util'
Expand Down Expand Up @@ -34,7 +33,7 @@ function getOutputFile(config: PotentialConfig | undefined) {

interface HTMLReportData {
paths: string[]
files: File[]
files: RunnerTestFile[]
config: SerializedConfig
moduleGraph: Record<string, Record<string, ModuleGraphData>>
unhandledErrors: unknown[]
Expand Down Expand Up @@ -75,7 +74,7 @@ export default class HTMLReporter implements Reporter {
const browser = resolvedConfig.browser.enabled && resolvedConfig.browser.ui
result.moduleGraph[projectName] ??= {}
result.moduleGraph[projectName][file.filepath] = await getModuleGraph(
this.ctx as any,
this.ctx,
projectName,
file.filepath,
browser,
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../../tsconfig.base.json",
"include": ["./*.ts"]
}
1 change: 1 addition & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"vitest": ["./packages/vitest/src/public/index.ts"],
"vitest/globals": ["./packages/vitest/globals.d.ts"],
"vitest/node": ["./packages/vitest/src/public/node.ts"],
"vitest/reporters": ["./packages/vitest/src/public/reporters.ts"],
"vitest/execute": ["./packages/vitest/src/public/execute.ts"],
"vitest/config": ["./packages/vitest/src/public/config.ts"],
"vitest/coverage": ["./packages/vitest/src/public/coverage.ts"],
Expand Down

0 comments on commit b307055

Please sign in to comment.