@vitest/coverage-v8 5.0.0-rc.3 → 5.0.0
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 -2
- package/package.json +6 -6
package/dist/provider.js
CHANGED
|
@@ -13,7 +13,7 @@ import { c as commands, n as normalize } from './commands-wCiafWY1.js';
|
|
|
13
13
|
import 'node:crypto';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
|
|
16
|
-
var version = "5.0.0
|
|
16
|
+
var version = "5.0.0";
|
|
17
17
|
|
|
18
18
|
const FILE_PROTOCOL = "file://";
|
|
19
19
|
const debug = createDebug("vitest:coverage");
|
|
@@ -268,7 +268,14 @@ class V8CoverageProvider extends BaseCoverageProvider {
|
|
|
268
268
|
result.url = `${FILE_PROTOCOL}${project.config.root}${result.url}`;
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
|
|
271
|
+
let filePath;
|
|
272
|
+
// Skip results that cannot be converted to file paths, for example virtual files that don't prefix to project root
|
|
273
|
+
try {
|
|
274
|
+
filePath = fileURLToPath(result.url);
|
|
275
|
+
} catch {
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
if (this.isIncluded(filePath)) {
|
|
272
279
|
scriptCoverages.push({
|
|
273
280
|
...result,
|
|
274
281
|
url: decodeURIComponent(result.url)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/coverage-v8",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0
|
|
4
|
+
"version": "5.0.0",
|
|
5
5
|
"description": "V8 coverage provider for Vitest",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@vitest/browser": "5.0.0
|
|
45
|
-
"vitest": "5.0.0
|
|
44
|
+
"@vitest/browser": "5.0.0",
|
|
45
|
+
"vitest": "5.0.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@vitest/browser": {
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"tinyrainbow": "^3.1.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@vitest/browser": "5.0.0
|
|
64
|
-
"@vitest/browser-playwright": "5.0.0
|
|
63
|
+
"@vitest/browser": "5.0.0",
|
|
64
|
+
"@vitest/browser-playwright": "5.0.0",
|
|
65
65
|
"pathe": "^2.0.3",
|
|
66
|
-
"vitest": "5.0.0
|
|
66
|
+
"vitest": "5.0.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "premove dist && rollup -c",
|