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

grunt-istanbul

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-istanbul - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

19

package.json
{
"name": "grunt-istanbul",
"description": "JavaScript codecoverage tool for Grunt",
"version": "0.6.1",
"version": "0.6.2",
"homepage": "https://github.com/taichi/grunt-istanbul",

@@ -17,3 +17,4 @@ "author": {

"Seth Pollack <spollack@qualitybath.com>",
"tcrevoisier <thomas.crevoisier.sfeir@ext.pmu.com>"
"tcrevoisier <thomas.crevoisier.sfeir@ext.pmu.com>",
"yeahoffline <frank.gasser@gmail.com>"
],

@@ -42,4 +43,4 @@ "repository": {

"dependencies": {
"chalk": "~1.0.0",
"istanbul" : "~0.3.7",
"chalk": "1.1.1",
"istanbul" : "0.4.2",
"nue": "0.7.1"

@@ -52,9 +53,9 @@ },

"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.11.0",
"grunt-contrib-jshint": "~0.12.0",
"grunt-contrib-nodeunit": "~0.4.1",
"grunt-contrib-clean" : "~0.6.0",
"grunt-contrib-clean" : "~0.7.0",
"isparta": "^2.2.0",
"mkdirp": "~0.5.0",
"rimraf": "~2.3.2",
"dateformat" : "~1.0.11"
"mkdirp": "~0.5.1",
"rimraf": "~2.5.1",
"dateformat" : "~1.0.12"
},

@@ -61,0 +62,0 @@ "keywords": [

@@ -128,2 +128,12 @@ exports.init = function(grunt) {

},
addUncoveredFiles: function(coverage, options, allFiles){
var instrumenter = new istanbul.Instrumenter({coverageVariable: options.coverageVar , preserveComments: false});
var transformer = instrumenter.instrumentSync.bind(instrumenter);
allFiles.forEach(function (file) {
if (!coverage[file]) {
transformer(fs.readFileSync(file, 'utf-8'), file);
coverage[file] = instrumenter.coverState;
}
});
},
storeCoverage : function(coverage, options, done) {

@@ -130,0 +140,0 @@ flow(function write_json(cov) {

@@ -25,4 +25,5 @@ /*

helper.instrument(grunt.file.expand(expandOptions, files), options, this
.async());
var allFiles = grunt.file.expand(expandOptions, files);
global['allFiles'] = allFiles;
helper.instrument(allFiles, options, this.async());
});

@@ -48,2 +49,5 @@

if (global[options.coverageVar]) {
if (options["include-all-sources"]) {
helper.addUncoveredFiles(global[options.coverageVar], options, global['allFiles']);
}
helper.storeCoverage(global[options.coverageVar], options, this.async());

@@ -50,0 +54,0 @@ } else {

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