@vitest/coverage-istanbul 3.1.3 → 3.2.0-beta.2
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 +6 -3
- package/package.json +3 -3
package/dist/provider.js
CHANGED
@@ -107,7 +107,7 @@ const isAbsolute = function(p) {
|
|
107
107
|
return _IS_ABSOLUTE_RE.test(p);
|
108
108
|
};
|
109
109
|
|
110
|
-
var version = "3.
|
110
|
+
var version = "3.2.0-beta.2";
|
111
111
|
|
112
112
|
const debug = createDebug("vitest:coverage");
|
113
113
|
class IstanbulCoverageProvider extends BaseCoverageProvider {
|
@@ -139,7 +139,10 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
139
139
|
});
|
140
140
|
}
|
141
141
|
onFileTransform(sourceCode, id, pluginCtx) {
|
142
|
-
if (
|
142
|
+
if (id.endsWith(".css")) {
|
143
|
+
return;
|
144
|
+
}
|
145
|
+
if (!this.testExclude.shouldInstrument(removeQueryParameters(id))) {
|
143
146
|
return;
|
144
147
|
}
|
145
148
|
const sourceMap = pluginCtx.getCombinedSourcemap();
|
@@ -224,7 +227,7 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
224
227
|
timeout = setTimeout(() => debug(c.bgRed(`File "${filename}" is taking longer than 3s`)), 3e3);
|
225
228
|
debug("Uncovered file %d/%d", index, uncoveredFiles.length);
|
226
229
|
}
|
227
|
-
await transform(`${filename}?
|
230
|
+
await transform(`${filename}?cache=${cacheKey}`);
|
228
231
|
const lastCoverage = this.instrumenter.lastFileCoverage();
|
229
232
|
coverageMap.addFileCoverage(lastCoverage);
|
230
233
|
if (debug.enabled) {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/coverage-istanbul",
|
3
3
|
"type": "module",
|
4
|
-
"version": "3.
|
4
|
+
"version": "3.2.0-beta.2",
|
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": "3.
|
40
|
+
"vitest": "3.2.0-beta.2"
|
41
41
|
},
|
42
42
|
"dependencies": {
|
43
43
|
"@istanbuljs/schema": "^0.1.3",
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"@types/istanbul-reports": "^3.0.4",
|
61
61
|
"@types/test-exclude": "^6.0.2",
|
62
62
|
"pathe": "^2.0.3",
|
63
|
-
"vitest": "3.
|
63
|
+
"vitest": "3.2.0-beta.2"
|
64
64
|
},
|
65
65
|
"scripts": {
|
66
66
|
"build": "rimraf dist && rollup -c",
|