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.34 to 0.1.35

1

CHANGELOG.md

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

<table>
<tr><td>v0.1.35</td><td>accept cobertura contrib from @nbrownus, fix #52</td></tr>
<tr><td>v0.1.34</td><td>fix async reporting, update dependencies, accept html cleanup contrib from @mathiasbynens</td></tr>

@@ -7,0 +8,0 @@ <tr><td>v0.1.33</td><td>initialize global coverage object before running tests to workaround mocha leak detection</td></tr>

5

lib/hook.js

@@ -33,3 +33,4 @@ /*

*/
var fs = require('fs'),
var path = require('path'),
fs = require('fs'),
Module = require('module'),

@@ -44,3 +45,3 @@ vm = require('vm'),

return function (code, filename) {
var shouldHook = matcher(filename),
var shouldHook = matcher(path.resolve(filename)),
transformed,

@@ -47,0 +48,0 @@ changed = false;

@@ -94,7 +94,23 @@ /*

hits = fileCoverage.f[k];
writer.println('\t\t\t<method' +
writer.println(
'\t\t\t<method' +
attr('name', name) +
attr('hits', hits) +
attr('signature', '()V') + //fake out a no-args void return
' />');
'>'
);
//Add the function definition line and hits so that jenkins cobertura plugin records method hits
writer.println(
'\t\t\t\t<lines>' +
'<line' +
attr('number', fnMap[k].line) +
attr('hits', fileCoverage.f[k]) +
'/>' +
'</lines>'
);
writer.println('\t\t\t</method>');
});

@@ -101,0 +117,0 @@ writer.println('\t\t</methods>');

{
"name": "istanbul",
"version": "0.1.34",
"version": "0.1.35",
"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",

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

"Daniel Perez Alvarez <unindented@gmail.com>",
"Mathias Bynens <mathias@qiwi.be>"
"Mathias Bynens <mathias@qiwi.be>",
"Nathan Brown <nate@betable.com>"
],

@@ -46,8 +47,4 @@ "preferGlobal": true,

"requirejs": "2.x"
},
"TODO": [
"Need a legend for the HTML report + some explanation on how branch coverage is shown",
"figure out a controlled mechanism to suppress branch coverage when impossible-to-test branches are present in source"
]
}
}
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