grunt-istanbul
Advanced tools
Comparing version 0.6.1 to 0.6.2
{ | ||
"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 { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16938
276
+ Addedansi-regex@2.1.1(transitive)
+ Addedchalk@1.1.1(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedistanbul@0.4.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
- Removedansi-regex@1.1.1(transitive)
- Removedchalk@1.0.0(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedhas-ansi@1.0.3(transitive)
- Removedistanbul@0.3.22(transitive)
- Removedstrip-ansi@2.0.1(transitive)
- Removedsupports-color@1.3.1(transitive)
Updatedchalk@1.1.1
Updatedistanbul@0.4.2