Comparing version 0.4.0 to 0.4.1
@@ -150,5 +150,5 @@ /* | ||
//undocumented | ||
assetsDir: path.resolve(__dirname, 'lib', 'vendor') | ||
assetsDir: path.resolve(__dirname, 'lib', 'assets') | ||
}; | ||
@@ -135,3 +135,5 @@ var addSorting = (function () { | ||
if (cols[i].sortable) { | ||
el = getNthColumn(i).querySelector('.sorter'); | ||
// add the click event handler on the th so users | ||
// dont have to click on those tiny arrows | ||
el = getNthColumn(i).querySelector('.sorter').parentElement; | ||
if (el.addEventListener) { | ||
@@ -138,0 +140,0 @@ el.addEventListener('click', ithSorter(i)); |
@@ -155,3 +155,4 @@ /* | ||
formatOption('--save-baseline', 'produce a baseline coverage.json file out of all files instrumented'), | ||
formatOption('--baseline-file <file>', 'filename of baseline file, defaults to coverage/coverage-baseline.json') | ||
formatOption('--baseline-file <file>', 'filename of baseline file, defaults to coverage/coverage-baseline.json'), | ||
formatOption('--es-modules', 'source code uses es import/export module syntax') | ||
].join('\n\n') + '\n'); | ||
@@ -174,3 +175,4 @@ console.error('\n'); | ||
'embed-source': Boolean, | ||
'preserve-comments': Boolean | ||
'preserve-comments': Boolean, | ||
'es-modules': Boolean | ||
}, | ||
@@ -188,3 +190,4 @@ opts = nopt(template, { v : '--verbose' }, args, 0), | ||
'save-baseline': opts['save-baseline'], | ||
'baseline-file': opts['baseline-file'] | ||
'baseline-file': opts['baseline-file'], | ||
'es-modules': opts['es-modules'] | ||
} | ||
@@ -222,3 +225,4 @@ }, | ||
noCompact: !iOpts.compact(), | ||
preserveComments: iOpts.preserveComments() | ||
preserveComments: iOpts.preserveComments(), | ||
esModules: iOpts.esModules() | ||
}); | ||
@@ -225,0 +229,0 @@ |
@@ -29,3 +29,4 @@ /* | ||
'include-all-sources': false, | ||
'include-pid': false | ||
'include-pid': false, | ||
'es-modules': false | ||
}, | ||
@@ -181,2 +182,7 @@ reporting: { | ||
/** | ||
* returns if comments the JS to instrument contains es6 Module syntax. | ||
* @method esModules | ||
* @return {Boolean} true if code contains es6 import/export statements. | ||
*/ | ||
/** | ||
* returns if the coverage filename should include the PID. Used by the `instrument` command. | ||
@@ -191,3 +197,3 @@ * @method includePid | ||
'embedSource', 'variable', 'compact', 'preserveComments', | ||
'saveBaseline', 'baselineFile', | ||
'saveBaseline', 'baselineFile', 'esModules', | ||
'includeAllSources', 'includePid'); | ||
@@ -194,0 +200,0 @@ |
@@ -357,2 +357,4 @@ /* | ||
* @param {Boolean} [options.noCompact] emit readable code when set. Defaults to `false` | ||
* @param {Boolean} [options.esModules] whether the code to instrument contains uses es | ||
* imports or exports. | ||
* @param {Boolean} [options.noAutoWrap] do not automatically wrap the source in | ||
@@ -385,5 +387,13 @@ * an anonymous function before covering it. By default, code is wrapped in | ||
embedSource: false, | ||
preserveComments: false | ||
preserveComments: false, | ||
esModules: false | ||
}; | ||
if (this.opts.esModules && !this.opts.noAutoWrap) { | ||
this.opts.noAutoWrap = true; | ||
if (this.opts.debug) { | ||
console.log('Setting noAutoWrap to true as required by esModules'); | ||
} | ||
} | ||
this.walker = new Walker({ | ||
@@ -447,3 +457,4 @@ ArrowFunctionExpression: [ this.arrowBlockConverter ], | ||
tokens: this.opts.preserveComments, | ||
comment: true | ||
comment: true, | ||
sourceType: this.opts.esModules ? 'module' : 'script' | ||
}); | ||
@@ -450,0 +461,0 @@ if (this.opts.preserveComments) { |
@@ -29,5 +29,5 @@ /* | ||
switch (clazz) { | ||
case 'low' : str = '\033[91m' + str + '\033[0m'; break; | ||
case 'medium': str = '\033[93m' + str + '\033[0m'; break; | ||
case 'high': str = '\033[92m' + str + '\033[0m'; break; | ||
case 'low' : str = '\x1B[91m' + str + '\x1B[0m'; break; | ||
case 'medium': str = '\x1B[93m' + str + '\x1B[0m'; break; | ||
case 'high': str = '\x1B[92m' + str + '\x1B[0m'; break; | ||
} | ||
@@ -34,0 +34,0 @@ } |
{ | ||
"name": "istanbul", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"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", | ||
@@ -77,3 +77,7 @@ "keywords": [ | ||
"Kitson Kelly @kitsonk", | ||
"@asa-git" | ||
"@asa-git", | ||
"@RoCat", | ||
"Ian Page Hands @iphands <iphands@gmail.com>", | ||
"Eddie Gurnee @pegurnee", | ||
"Kevin Decker @kpdecker <kpdecker@gmail.com>" | ||
], | ||
@@ -101,3 +105,3 @@ "scripts": { | ||
"escodegen": "1.7.x", | ||
"esprima": "2.5.x", | ||
"esprima": "2.7.x", | ||
"fileset": "0.2.x", | ||
@@ -104,0 +108,0 @@ "handlebars": "^4.0.1", |
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
6614
286706
54
+ Addedesprima@2.7.3(transitive)
- Removedesprima@2.5.0(transitive)
Updatedesprima@2.7.x