|
1 | | -import type { CoverageMap } from 'istanbul-lib-coverage' |
2 | | -import type { Instrumenter } from 'istanbul-lib-instrument' |
| 1 | +import type { CoverageMap } from '@vitest/istanbul-lib-coverage' |
| 2 | +import type { Instrumenter } from '@vitest/istanbul-lib-instrument' |
3 | 3 | import type { ProxifiedModule } from 'magicast' |
4 | 4 | import type { CoverageProvider, ReportContext, Vite, Vitest } from 'vitest/node' |
5 | 5 | import { existsSync, promises as fs } from 'node:fs' |
6 | 6 | // @ts-expect-error missing types |
7 | 7 | import { defaults as istanbulDefaults } from '@istanbuljs/schema' |
8 | 8 | import { addMapping, GenMapping, toEncodedMap } from '@jridgewell/gen-mapping' |
9 | 9 | import { eachMapping, TraceMap } from '@jridgewell/trace-mapping' |
10 | | -import libCoverage from 'istanbul-lib-coverage' |
11 | | -import { createInstrumenter } from 'istanbul-lib-instrument' |
12 | | -import libReport from 'istanbul-lib-report' |
13 | | -import libSourceMaps from 'istanbul-lib-source-maps' |
14 | | -import reports from 'istanbul-reports' |
| 10 | +import * as libCoverage from '@vitest/istanbul-lib-coverage' |
| 11 | +import { createInstrumenter } from '@vitest/istanbul-lib-instrument' |
| 12 | +import * as libReport from '@vitest/istanbul-lib-report' |
| 13 | +import * as libSourceMaps from '@vitest/istanbul-lib-source-maps' |
15 | 14 | import { parseModule } from 'magicast' |
16 | 15 | import { createDebug } from 'obug' |
17 | 16 | import c from 'tinyrainbow' |
@@ -63,7 +62,6 @@ export class IstanbulCoverageProvider extends BaseCoverageProvider implements Co |
63 | 62 | ['importAttributes', { deprecatedAssertSyntax: true }], |
64 | 63 | ], |
65 | 64 | generatorOpts: { |
66 | | - // @ts-expect-error missing type |
67 | 65 | importAttributesKeyword: 'with', |
68 | 66 | }, |
69 | 67 |
|
@@ -206,8 +204,8 @@ export class IstanbulCoverageProvider extends BaseCoverageProvider implements Co |
206 | 204 |
|
207 | 205 | for (const reporter of this.options.reporter) { |
208 | 206 | // Type assertion required for custom reporters |
209 | | - reports |
210 | | - .create(reporter[0] as Parameters<typeof reports.create>[0], { |
| 207 | + libReport |
| 208 | + .create(reporter[0] as Parameters<typeof libReport.create>[0], { |
211 | 209 | skipFull: this.options.skipFull, |
212 | 210 | projectRoot: this.ctx.config.root, |
213 | 211 | ...reporter[1], |
|
0 commit comments