@vitest/coverage-istanbul 1.6.0 → 2.0.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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as COVERAGE_STORE_KEY } from './constants-DBqnqzn-.js';
1
+ import { C as COVERAGE_STORE_KEY } from './constants-BCJfMgEg.js';
2
2
 
3
3
  async function getProvider() {
4
4
  const providerPath = "./provider.js";
package/dist/provider.js CHANGED
@@ -10,17 +10,18 @@ import libCoverage from 'istanbul-lib-coverage';
10
10
  import libSourceMaps from 'istanbul-lib-source-maps';
11
11
  import { createInstrumenter } from 'istanbul-lib-instrument';
12
12
  import _TestExclude from 'test-exclude';
13
- import { C as COVERAGE_STORE_KEY } from './constants-DBqnqzn-.js';
13
+ import { C as COVERAGE_STORE_KEY } from './constants-BCJfMgEg.js';
14
14
 
15
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
15
16
  function normalizeWindowsPath(input = "") {
16
- if (!input || !input.includes("\\")) {
17
+ if (!input) {
17
18
  return input;
18
19
  }
19
- return input.replace(/\\/g, "/");
20
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
20
21
  }
21
22
  const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
22
23
  function cwd() {
23
- if (typeof process !== "undefined") {
24
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
24
25
  return process.cwd().replace(/\\/g, "/");
25
26
  }
26
27
  return "/";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/coverage-istanbul",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "2.0.0-beta.2",
5
5
  "description": "Istanbul coverage provider for Vitest",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -37,16 +37,16 @@
37
37
  "dist"
38
38
  ],
39
39
  "peerDependencies": {
40
- "vitest": "1.6.0"
40
+ "vitest": "2.0.0-beta.2"
41
41
  },
42
42
  "dependencies": {
43
43
  "debug": "^4.3.4",
44
44
  "istanbul-lib-coverage": "^3.2.2",
45
- "istanbul-lib-instrument": "^6.0.1",
45
+ "istanbul-lib-instrument": "^6.0.2",
46
46
  "istanbul-lib-report": "^3.0.1",
47
47
  "istanbul-lib-source-maps": "^5.0.4",
48
- "istanbul-reports": "^3.1.6",
49
- "magicast": "^0.3.3",
48
+ "istanbul-reports": "^3.1.7",
49
+ "magicast": "^0.3.4",
50
50
  "picocolors": "^1.0.0",
51
51
  "test-exclude": "^6.0.0"
52
52
  },
@@ -57,8 +57,8 @@
57
57
  "@types/istanbul-lib-report": "^3.0.3",
58
58
  "@types/istanbul-lib-source-maps": "^4.0.4",
59
59
  "@types/istanbul-reports": "^3.0.4",
60
- "pathe": "^1.1.1",
61
- "vitest": "1.6.0"
60
+ "pathe": "^1.1.2",
61
+ "vitest": "2.0.0-beta.2"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "rimraf dist && rollup -c",