@vitest/coverage-istanbul 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/provider.js +9 -5
- package/package.json +3 -3
package/dist/provider.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { promises } from 'node:fs';
|
|
1
|
+
import { existsSync, promises } from 'node:fs';
|
|
2
2
|
import { defaults } from '@istanbuljs/schema';
|
|
3
3
|
import createDebug from 'debug';
|
|
4
4
|
import libCoverage from 'istanbul-lib-coverage';
|
|
@@ -12,7 +12,7 @@ import { BaseCoverageProvider } from 'vitest/coverage';
|
|
|
12
12
|
import { isCSSRequest } from 'vitest/node';
|
|
13
13
|
import { C as COVERAGE_STORE_KEY } from './constants-BCJfMgEg.js';
|
|
14
14
|
|
|
15
|
-
var version = "4.0.
|
|
15
|
+
var version = "4.0.6";
|
|
16
16
|
|
|
17
17
|
const debug = createDebug("vitest:coverage");
|
|
18
18
|
class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
@@ -83,9 +83,13 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
|
83
83
|
const uncoveredCoverage = await this.getCoverageMapForUncoveredFiles(coveredFiles);
|
|
84
84
|
coverageMap.merge(await transformCoverage(uncoveredCoverage));
|
|
85
85
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
coverageMap.filter((filename) => {
|
|
87
|
+
const exists = existsSync(filename);
|
|
88
|
+
if (this.options.excludeAfterRemap) {
|
|
89
|
+
return exists && this.isIncluded(filename);
|
|
90
|
+
}
|
|
91
|
+
return exists;
|
|
92
|
+
});
|
|
89
93
|
if (debug.enabled) {
|
|
90
94
|
debug("Generate coverage total time %d ms", (performance.now() - start).toFixed());
|
|
91
95
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/coverage-istanbul",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.6",
|
|
5
5
|
"description": "Istanbul coverage provider for Vitest",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dist"
|
|
38
38
|
],
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"vitest": "4.0.
|
|
40
|
+
"vitest": "4.0.6"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@istanbuljs/schema": "^0.1.3",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@types/istanbul-lib-source-maps": "^4.0.4",
|
|
59
59
|
"@types/istanbul-reports": "^3.0.4",
|
|
60
60
|
"pathe": "^2.0.3",
|
|
61
|
-
"vitest": "4.0.
|
|
61
|
+
"vitest": "4.0.6"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "premove dist && rollup -c",
|