@tapjs/processinfo
Advanced tools
Comparing version 3.1.5 to 3.1.6
@@ -12,2 +12,3 @@ "use strict"; | ||
const node_url_1 = require("node:url"); | ||
const canonical_source_js_1 = require("./canonical-source.js"); | ||
const find_source_map_safe_js_1 = require("./find-source-map-safe.js"); | ||
@@ -37,3 +38,3 @@ const get_exclude_js_1 = require("./get-exclude.js"); | ||
? (0, get_exclude_js_1.getExclude)('_TAPJS_PROCESSINFO_COV_EXCLUDE_', false) | ||
: undefined; | ||
: /[\\\/]node_modules[\\\/]/; | ||
const fileCovered = (f, sources = [], files = []) => { | ||
@@ -45,4 +46,5 @@ const testFiles = [f]; | ||
// never include coverage if the file is fully ignored. | ||
if (!testFiles.some(f => files.includes(f))) | ||
if (!testFiles.some(f => files.includes(f))) { | ||
return false; | ||
} | ||
// if at least one of them are explicitly covered, then include it, | ||
@@ -108,2 +110,3 @@ // otherwise omit if we explicitly listed | ||
} | ||
obj.url = (0, canonical_source_js_1.canonicalSource)(obj.url); | ||
const f = (0, node_url_1.fileURLToPath)(obj.url); | ||
@@ -129,3 +132,6 @@ // see if it has a source map | ||
/* c8 ignore stop */ | ||
data: payload, | ||
data: { | ||
...payload, | ||
sources: payload.sources?.map(s => (0, canonical_source_js_1.canonicalSource)(s)), | ||
}, | ||
}); | ||
@@ -132,0 +138,0 @@ } |
@@ -9,2 +9,3 @@ // start tracking coverage, unless disabled explicltly | ||
import { fileURLToPath } from 'node:url'; | ||
import { canonicalSource } from './canonical-source.js'; | ||
import { findSourceMapSafe } from './find-source-map-safe.js'; | ||
@@ -34,3 +35,3 @@ import { getExclude } from './get-exclude.js'; | ||
? getExclude('_TAPJS_PROCESSINFO_COV_EXCLUDE_', false) | ||
: undefined; | ||
: /[\\\/]node_modules[\\\/]/; | ||
const fileCovered = (f, sources = [], files = []) => { | ||
@@ -42,4 +43,5 @@ const testFiles = [f]; | ||
// never include coverage if the file is fully ignored. | ||
if (!testFiles.some(f => files.includes(f))) | ||
if (!testFiles.some(f => files.includes(f))) { | ||
return false; | ||
} | ||
// if at least one of them are explicitly covered, then include it, | ||
@@ -104,2 +106,3 @@ // otherwise omit if we explicitly listed | ||
} | ||
obj.url = canonicalSource(obj.url); | ||
const f = fileURLToPath(obj.url); | ||
@@ -125,3 +128,6 @@ // see if it has a source map | ||
/* c8 ignore stop */ | ||
data: payload, | ||
data: { | ||
...payload, | ||
sources: payload.sources?.map(s => canonicalSource(s)), | ||
}, | ||
}); | ||
@@ -128,0 +134,0 @@ } |
{ | ||
"name": "@tapjs/processinfo", | ||
"version": "3.1.5", | ||
"version": "3.1.6", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
403581
215
3237