Comparing version 0.1.30 to 0.1.31
@@ -190,3 +190,5 @@ /* | ||
stream.write(instrumenter.instrumentSync(fs.readFileSync(file, 'utf8'), file)); | ||
try { stream.end(); } catch (ex) {} | ||
if (stream !== process.stdout) { | ||
stream.end(); | ||
} | ||
} | ||
@@ -193,0 +195,0 @@ } |
@@ -45,8 +45,8 @@ /* | ||
function padding(num, char) { | ||
function padding(num, ch) { | ||
var str = '', | ||
i; | ||
char = char || ' '; | ||
ch = ch || ' '; | ||
for (i = 0; i < num; i += 1) { | ||
str += char; | ||
str += ch; | ||
} | ||
@@ -53,0 +53,0 @@ return str; |
{ | ||
"name": "istanbul", | ||
"version": "0.1.30", | ||
"version": "0.1.31", | ||
"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" ], |
@@ -14,3 +14,3 @@ /*jslint nomen: true */ | ||
esprimaSource = reader('..', '..', '..', 'node_modules', 'esprima', 'esprima.js'), | ||
escodegenSource = reader('..', '..', '..', 'node_modules', 'escodegen', 'escodegen.js'), | ||
escodegenSource = reader('..', '..', '..', 'node_modules', 'escodegen', 'escodegen.browser.js'), | ||
vm = require('vm'), | ||
@@ -17,0 +17,0 @@ server; |
@@ -14,2 +14,3 @@ /*jslint nomen: true */ | ||
seq = 0, | ||
verbose = false, | ||
OPTS = { | ||
@@ -58,2 +59,5 @@ }; | ||
function setVerbose(flag) { | ||
verbose = flag; | ||
} | ||
function setOpts(userOpts) { | ||
@@ -80,6 +84,8 @@ Object.keys(userOpts).forEach(function (k) { OPTS[k] = userOpts[k]; }); | ||
if (filtered.length === 0) { | ||
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'); | ||
console.log('Could not find: ' + pat + ' in:'); | ||
console.log(array.join('\n')); | ||
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'); | ||
if (verbose) { | ||
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'); | ||
console.log('Could not find: ' + pat + ' in:'); | ||
console.log(array.join('\n')); | ||
console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'); | ||
} | ||
} | ||
@@ -122,7 +128,11 @@ return filtered.length > 0; | ||
out += data; | ||
process.stdout.write(data); | ||
if (verbose) { | ||
process.stdout.write(data); | ||
} | ||
}); | ||
handle.stderr.on('data', function (data) { | ||
err += data; | ||
process.stderr.write(data); | ||
if (verbose) { | ||
process.stderr.write(data); | ||
} | ||
}); | ||
@@ -191,2 +201,3 @@ handle.on('exit', function (exitCode) { | ||
module.exports = { | ||
setVerbose: setVerbose, | ||
runCommand: runCommand, | ||
@@ -193,0 +204,0 @@ resetOpts: resetOpts, |
@@ -38,3 +38,4 @@ #!/usr/bin/env node | ||
rimraf = require('rimraf'), | ||
common = require('./common'); | ||
common = require('./common'), | ||
cliHelper = require('./cli-helper'); | ||
@@ -47,2 +48,3 @@ function runTests(pat, forceCover) { | ||
cliHelper.setVerbose(process.env.VERBOSE); | ||
loader.runTests(pat, defaultReporter, undefined, function (err) { | ||
@@ -60,3 +62,3 @@ var coverageDir = common.getCoverageDir(); | ||
// run the equivalent of | ||
// $ istanbul cover run-junit.js -- <pat> | ||
// $ istanbul cover run-again.js -- <pat> | ||
args = [ | ||
@@ -76,3 +78,3 @@ path.resolve(__dirname, '..', 'lib', 'cli.js'), | ||
'**/yui-load-hook.js', | ||
path.resolve(__dirname, 'run-junit.js'), | ||
path.resolve(__dirname, 'run-again.js'), | ||
'--', | ||
@@ -79,0 +81,0 @@ pat || '' |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
372181
108
7907
0
200
66