Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

istanbul-lib-instrument

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul-lib-instrument - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.1.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@3.1.1...istanbul-lib-instrument@3.1.2) (2019-04-03)
### Bug Fixes
* Be more friendly to ts-node. ([#352](https://github.com/istanbuljs/istanbuljs/issues/352)) ([40d15f5](https://github.com/istanbuljs/istanbuljs/commit/40d15f5)), closes [#336](https://github.com/istanbuljs/istanbuljs/issues/336)
## [3.1.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument@3.1.0...istanbul-lib-instrument@3.1.1) (2019-03-12)

@@ -8,0 +19,0 @@

3

dist/read-coverage.js

@@ -57,5 +57,4 @@ "use strict";

const result = {};
var _arr = ['path', 'hash', 'gcv', 'coverageData'];
for (var _i = 0; _i < _arr.length; _i++) {
for (var _i = 0, _arr = ['path', 'hash', 'gcv', 'coverageData']; _i < _arr.length; _i++) {
const key = _arr[_i];

@@ -62,0 +61,0 @@ const binding = covScope.getOwnBinding(key);

@@ -525,6 +525,9 @@ "use strict";

};
const globalTemplateFunction = (0, _template.default)(`
const globalTemplateAlteredFunction = (0, _template.default)(`
var Function = (function(){}).constructor;
var global = (new Function(GLOBAL_COVERAGE_SCOPE))();
`);
const globalTemplateFunction = (0, _template.default)(`
var global = (new Function(GLOBAL_COVERAGE_SCOPE))();
`);
const globalTemplateVariable = (0, _template.default)(`

@@ -545,3 +548,2 @@ var global = GLOBAL_COVERAGE_SCOPE;

}
coverageData.hash = hash;
return coverage[path] = coverageData;

@@ -625,10 +627,18 @@ })();

const hash = (0, _crypto.createHash)(_constants.SHA).update(JSON.stringify(coverageData)).digest('hex');
coverageData.hash = hash;
const coverageNode = T.valueToNode(coverageData);
delete coverageData[_constants.MAGIC_KEY];
delete coverageData.hash;
let gvTemplate;
if (opts.coverageGlobalScopeFunc) {
gvTemplate = globalTemplateFunction({
GLOBAL_COVERAGE_SCOPE: T.stringLiteral('return ' + opts.coverageGlobalScope)
});
if (path.scope.getBinding('Function')) {
gvTemplate = globalTemplateAlteredFunction({
GLOBAL_COVERAGE_SCOPE: T.stringLiteral('return ' + opts.coverageGlobalScope)
});
} else {
gvTemplate = globalTemplateFunction({
GLOBAL_COVERAGE_SCOPE: T.stringLiteral('return ' + opts.coverageGlobalScope)
});
}
} else {

@@ -635,0 +645,0 @@ gvTemplate = globalTemplateVariable({

{
"name": "istanbul-lib-instrument",
"version": "3.1.1",
"version": "3.1.2",
"description": "Core istanbul API for JS code coverage",

@@ -22,3 +22,3 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",

"istanbul-lib-coverage": "^2.0.4",
"semver": "^5.5.0"
"semver": "^6.0.0"
},

@@ -43,3 +43,3 @@ "license": "BSD-3-Clause",

},
"gitHead": "c81b051d83217947dfd97d8d06532bd5013e98c3"
"gitHead": "e8063c799d0854341cb3daaf91c58acd06bd501c"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc