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.2.10 to 0.2.11

3

CHANGELOG.md

@@ -6,2 +6,5 @@ Changelog

<tr>
<td>v0.2.11</td><td>Allow source map generation, thanks to @jason0x43</td>
</tr>
<tr>
<td>v0.2.10</td><td>Add flag to handle sigints and dump coverage, thanks to @samccone</td>

@@ -8,0 +11,0 @@ </tr>

@@ -469,4 +469,9 @@ /*

var usingStrict = false,
codegenOptions;
codegenOptions,
generated,
preamble,
lineCount,
i;
filename = filename || String(new Date().getTime()) + '.js';
this.sourceMap = null;
this.coverState = {

@@ -502,3 +507,17 @@ path: filename,

//console.log(JSON.stringify(program, undefined, 2));
return this.getPreamble(originalCode || '', usingStrict) + '\n' + ESPGEN.generate(program, codegenOptions) + '\n';
generated = ESPGEN.generate(program, codegenOptions);
preamble = this.getPreamble(originalCode || '', usingStrict);
if (generated.map && generated.code) {
lineCount = preamble.split(/\r\n|\r|\n/).length;
// offset all the generated line numbers by the number of lines in the preamble
for (i = 0; i < generated.map._mappings.length; i += 1) {
generated.map._mappings[i].generatedLine += lineCount;
}
this.sourceMap = generated.map;
generated = generated.code;
}
return preamble + '\n' + generated + '\n';
},

@@ -542,2 +561,11 @@ /**

},
/**
* returns the source map object for the code that was instrumented
* just before calling this method.
* @return {Object} a source map object for the code last instrumented
* by this instrumenter
*/
lastSourceMap: function () {
return this.sourceMap;
},
fixColumnPositions: function (coverState) {

@@ -544,0 +572,0 @@ var offset = LEADER_WRAP.length,

5

package.json
{
"name": "istanbul",
"version": "0.2.10",
"version": "0.2.11",
"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",

@@ -33,3 +33,4 @@ "keywords": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ],

"@markyen",
"Sam Saccone @samccone <sam@samx.it>"
"Sam Saccone @samccone <sam@samx.it>",
"Jason Cheatham @jason0x43"
],

@@ -36,0 +37,0 @@ "preferGlobal": true,

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