wct-istanbul
Advanced tools
Comparing version 0.12.3 to 0.12.4
@@ -27,5 +27,12 @@ var _ = require('lodash'); | ||
function getFilePath(root, req) { | ||
var pathname = parseurl(req).pathname; | ||
var rootDirName = root.split(/[\/\\]/).pop(); | ||
var componentPathName = pathname.split(/\//)[1]; | ||
return req._filePath || (rootDirName === componentPathName ? path.join(root, '..', pathname) : path.join(root, pathname)); | ||
} | ||
function instrumentHtml(html, req, root){ | ||
var asset = req.url; | ||
var htmlFilePath = path.join(root, '..', parseurl(req).pathname); | ||
var htmlFilePath = getFilePath(root, req); | ||
@@ -45,3 +52,3 @@ if ( !cache[asset] ){ | ||
var asset = req.url; | ||
var assetPath = path.join(root, '..', parseurl(req).pathname); | ||
var assetPath = getFilePath(root, req); | ||
@@ -48,0 +55,0 @@ if ( !cache[asset] ){ |
{ | ||
"name": "wct-istanbul", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"description": "Instanbul coverage reporting for projects being tested by web-component-tester", | ||
@@ -37,3 +37,3 @@ "main": "lib/plugin.js", | ||
"parseurl": "^1.3.0", | ||
"polyserve": "github:t2ym/polyserve#0.19.1-istanbul.2" | ||
"polyserve": "github:t2ym/polyserve#0.19.1-istanbul.3" | ||
}, | ||
@@ -40,0 +40,0 @@ "wct-plugin": { |
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
11744
201