macaca-istanbul
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -40,3 +40,4 @@ /* | ||
get: function (key) { | ||
return fs.readFileSync(key, 'utf8'); | ||
return sourceLookup(key) | ||
// return fs.readFileSync(key, 'utf8'); | ||
}, | ||
@@ -63,1 +64,20 @@ hasKey: function (key) { | ||
/* ====================================== */ | ||
/** | ||
* fslookup patch | ||
* | ||
* @see https://github.com/vuejs/vue-loader/pull/1372 | ||
*/ | ||
function sourceLookup (path) { | ||
if (fs.existsSync(path)) { | ||
return fs.readFileSync(path, 'utf8'); | ||
} | ||
if (/\.vue\.js$/.test(path)) { | ||
const originalPath = path.substring(0, path.length - 3); | ||
if (fs.existsSync(originalPath)) { | ||
return fs.readFileSync(originalPath, 'utf8'); | ||
} | ||
} | ||
throw new Error('Unable to lookup source: ' + path); | ||
} |
{ | ||
"name": "macaca-istanbul", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
6679
0
306574
56