@vitest/coverage-istanbul 4.1.4 → 5.0.0-beta.1
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 +23 -14
- package/package.json +3 -3
package/dist/provider.js
CHANGED
|
@@ -3543,7 +3543,7 @@ function requireIstanbulLibSourceMaps () {
|
|
|
3543
3543
|
var istanbulLibSourceMapsExports = requireIstanbulLibSourceMaps();
|
|
3544
3544
|
var libSourceMaps = /*@__PURE__*/getDefaultExportFromCjs(istanbulLibSourceMapsExports);
|
|
3545
3545
|
|
|
3546
|
-
var version = "
|
|
3546
|
+
var version = "5.0.0-beta.1";
|
|
3547
3547
|
|
|
3548
3548
|
const debug = createDebug("vitest:coverage");
|
|
3549
3549
|
class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
@@ -3553,19 +3553,28 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
|
|
|
3553
3553
|
transformedModuleIds = new Set();
|
|
3554
3554
|
initialize(ctx) {
|
|
3555
3555
|
this._initialize(ctx);
|
|
3556
|
-
this.instrumenter
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3556
|
+
if (this.options.instrumenter) {
|
|
3557
|
+
this.instrumenter = this.options.instrumenter({
|
|
3558
|
+
coverageVariable: COVERAGE_STORE_KEY,
|
|
3559
|
+
coverageGlobalScope: "globalThis",
|
|
3560
|
+
coverageGlobalScopeFunc: false,
|
|
3561
|
+
ignoreClassMethods: this.options.ignoreClassMethods
|
|
3562
|
+
});
|
|
3563
|
+
} else {
|
|
3564
|
+
this.instrumenter = srcExports.createInstrumenter({
|
|
3565
|
+
produceSourceMap: true,
|
|
3566
|
+
autoWrap: false,
|
|
3567
|
+
esModules: true,
|
|
3568
|
+
compact: false,
|
|
3569
|
+
coverageVariable: COVERAGE_STORE_KEY,
|
|
3570
|
+
coverageGlobalScope: "globalThis",
|
|
3571
|
+
coverageGlobalScopeFunc: false,
|
|
3572
|
+
ignoreClassMethods: this.options.ignoreClassMethods,
|
|
3573
|
+
parserPlugins: [...defaults.instrumenter.parserPlugins, ["importAttributes", { deprecatedAssertSyntax: true }]],
|
|
3574
|
+
generatorOpts: { importAttributesKeyword: "with" },
|
|
3575
|
+
ignoreLines: true
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3569
3578
|
}
|
|
3570
3579
|
requiresTransform(id) {
|
|
3571
3580
|
// Istanbul/babel cannot instrument CSS - e.g. Vue imports end up here.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/coverage-istanbul",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0-beta.1",
|
|
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": "
|
|
40
|
+
"vitest": "5.0.0-beta.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@babel/core": "^7.29.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"istanbul-lib-instrument": "^6.0.3",
|
|
61
61
|
"istanbul-lib-source-maps": "^5.0.6",
|
|
62
62
|
"pathe": "^2.0.3",
|
|
63
|
-
"vitest": "
|
|
63
|
+
"vitest": "5.0.0-beta.1"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "premove dist && rollup -c",
|