@vitest/coverage-istanbul 2.1.0-beta.3 → 2.1.0-beta.5

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.
Files changed (2) hide show
  1. package/dist/provider.js +11 -0
  2. package/package.json +3 -3
package/dist/provider.js CHANGED
@@ -108,6 +108,8 @@ const isAbsolute = function(p) {
108
108
  return _IS_ABSOLUTE_RE.test(p);
109
109
  };
110
110
 
111
+ var version = "2.1.0-beta.5";
112
+
111
113
  const DEFAULT_PROJECT = Symbol.for("default-project");
112
114
  const debug = createDebug("vitest:coverage");
113
115
  let uniqueId = 0;
@@ -122,6 +124,15 @@ class IstanbulCoverageProvider extends BaseCoverageProvider {
122
124
  pendingPromises = [];
123
125
  initialize(ctx) {
124
126
  const config = ctx.config.coverage;
127
+ if (ctx.version !== version) {
128
+ ctx.logger.warn(
129
+ c.yellow(
130
+ `Loaded ${c.inverse(c.yellow(` vitest@${ctx.version} `))} and ${c.inverse(c.yellow(` @vitest/coverage-istanbul@${version} `))}.
131
+ Running mixed versions is not supported and may lead into bugs
132
+ Update your dependencies and make sure the versions match.`
133
+ )
134
+ );
135
+ }
125
136
  this.ctx = ctx;
126
137
  this.options = {
127
138
  ...coverageConfigDefaults,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/coverage-istanbul",
3
3
  "type": "module",
4
- "version": "2.1.0-beta.3",
4
+ "version": "2.1.0-beta.5",
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": "2.1.0-beta.3"
40
+ "vitest": "2.1.0-beta.5"
41
41
  },
42
42
  "dependencies": {
43
43
  "@istanbuljs/schema": "^0.1.3",
@@ -59,7 +59,7 @@
59
59
  "@types/istanbul-lib-source-maps": "^4.0.4",
60
60
  "@types/istanbul-reports": "^3.0.4",
61
61
  "pathe": "^1.1.2",
62
- "vitest": "2.1.0-beta.3"
62
+ "vitest": "2.1.0-beta.5"
63
63
  },
64
64
  "scripts": {
65
65
  "build": "rimraf dist && rollup -c",