@vitest/coverage-istanbul 0.24.3 → 0.24.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.
@@ -1,7 +1,7 @@
1
1
  const COVERAGE_STORE_KEY = "__VITEST_COVERAGE__";
2
2
 
3
3
  async function getProvider() {
4
- const { IstanbulCoverageProvider } = await import('./provider-d77f27e8.js');
4
+ const { IstanbulCoverageProvider } = await import('./provider-97efd69a.js');
5
5
  return new IstanbulCoverageProvider();
6
6
  }
7
7
  function takeCoverage() {
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { g as getProvider, t as takeCoverage } from './index-c2eb9bd2.js';
1
+ export { g as getProvider, t as takeCoverage } from './index-cc7ec1dd.js';
@@ -7,7 +7,7 @@ import libCoverage from 'istanbul-lib-coverage';
7
7
  import libSourceMaps from 'istanbul-lib-source-maps';
8
8
  import { createInstrumenter } from 'istanbul-lib-instrument';
9
9
  import _TestExclude from 'test-exclude';
10
- import { C as COVERAGE_STORE_KEY } from './index-c2eb9bd2.js';
10
+ import { C as COVERAGE_STORE_KEY } from './index-cc7ec1dd.js';
11
11
 
12
12
  function normalizeWindowsPath(input = "") {
13
13
  if (!input.includes("\\")) {
@@ -225,6 +225,7 @@ class IstanbulCoverageProvider {
225
225
  if (!this.testExclude.shouldInstrument(id))
226
226
  return;
227
227
  const sourceMap = pluginCtx.getCombinedSourcemap();
228
+ sourceMap.sources = sourceMap.sources.map(removeQueryParameters);
228
229
  const code = this.instrumenter.instrumentSync(sourceCode, id, sourceMap);
229
230
  const map = this.instrumenter.lastSourceMap();
230
231
  return { code, map };
@@ -329,5 +330,8 @@ function resolveIstanbulOptions(options, root) {
329
330
  };
330
331
  return resolved;
331
332
  }
333
+ function removeQueryParameters(filename) {
334
+ return filename.split("?")[0];
335
+ }
332
336
 
333
337
  export { IstanbulCoverageProvider };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/coverage-istanbul",
3
3
  "type": "module",
4
- "version": "0.24.3",
4
+ "version": "0.24.5",
5
5
  "description": "Istanbul coverage provider for Vitest",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "istanbul-lib-source-maps": "^4.0.1",
44
44
  "istanbul-reports": "^3.1.5",
45
45
  "test-exclude": "^6.0.0",
46
- "vitest": "0.24.3"
46
+ "vitest": "0.24.5"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/istanbul-lib-coverage": "^2.0.4",