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

istanbul

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

istanbul - npm Package Compare versions

Comparing version 0.1.41 to 0.1.42

1

CHANGELOG.md

@@ -5,2 +5,3 @@ Changelog

<table>
<tr><td>v0.1.42</td><td>fix #78: embed source regression introduced in v0.1.38. Fix broken test for this</td></tr>
<tr><td>v0.1.41</td><td>add json report to dump coverage object for certain use cases</td></tr>

@@ -7,0 +8,0 @@ <tr><td>v0.1.40</td><td>forward sourceStore from lcov to html report, pull request by @vojtajina</td></tr>

8

lib/instrumenter.js

@@ -374,3 +374,3 @@ /*

}
return this.instrumentASTSync(program, filename);
return this.instrumentASTSync(program, filename, code);
},

@@ -385,4 +385,6 @@ /**

* of this library.
* @param {String} originalCode the original code corresponding to the AST,
* used for embedding the source into the coverage object
*/
instrumentASTSync: function (program, filename) {
instrumentASTSync: function (program, filename, originalCode) {
filename = filename || String(new Date().getTime()) + '.js';

@@ -408,3 +410,3 @@ this.coverState = {

//console.log(JSON.stringify(program, undefined, 2));
return this.getPreamble("") + '\n' + ESPGEN.generate(program, codegenOptions) + '\n';
return this.getPreamble(originalCode || '') + '\n' + ESPGEN.generate(program, codegenOptions) + '\n';
},

@@ -411,0 +413,0 @@ /**

{
"name": "istanbul",
"version": "0.1.41",
"version": "0.1.42",
"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": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ],

@@ -114,3 +114,4 @@ /*jslint nomen: true */

fileCov = cov[Object.keys(cov)[0]];
test.ok(fileCov.code);
test.ok(fileCov.code.length > 1);
test.ok(fileCov.code[1] === 'output = x;');
test.done();

@@ -117,0 +118,0 @@ }

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