Comparing version 0.1.42 to 0.1.43
@@ -5,2 +5,3 @@ Changelog | ||
<table> | ||
<tr><td>v0.1.43</td>Add colors to text report thanks to @runk<td></td></tr> | ||
<tr><td>v0.1.42</td><td>fix #78: embed source regression introduced in v0.1.38. Fix broken test for this</td></tr> | ||
@@ -7,0 +8,0 @@ <tr><td>v0.1.41</td><td>add json report to dump coverage object for certain use cases</td></tr> |
@@ -340,3 +340,4 @@ /* | ||
ConditionalExpression: this.conditionalBranchInjector, | ||
LogicalExpression: this.logicalExpressionBranchInjector | ||
LogicalExpression: this.logicalExpressionBranchInjector, | ||
ObjectExpression: this.maybeAddType | ||
}, this, this.opts.walkDebug); | ||
@@ -738,2 +739,13 @@ | ||
} | ||
}, | ||
maybeAddType: function (node /*, walker */) { | ||
var props = node.properties, | ||
i, | ||
child; | ||
for (i = 0; i < props.length; i += 1) { | ||
child = props[i]; | ||
if (!child.type) { | ||
child.type = SYNTAX.Property.name; | ||
} | ||
} | ||
} | ||
@@ -740,0 +752,0 @@ }; |
@@ -58,2 +58,3 @@ /* | ||
str = String(str); | ||
var leadingSpaces = tabs * TAB_SIZE, | ||
@@ -63,10 +64,24 @@ remaining = width - leadingSpaces, | ||
fmtStr = '', | ||
fillStr; | ||
fillStr, | ||
isNumber = !isNaN(parseFloat(str)) && isFinite(str), | ||
strlen = str.length, | ||
isTty = Boolean(process.stdout.isTTY); | ||
if (isNumber && isTty) { | ||
// low: < 50 % medium: >= 50 % high: >= 80 % | ||
if (str >= 80) { | ||
str = '\033[92m' + str + '\033[0m'; // high - green | ||
} else if (str >= 50) { | ||
str = '\033[93m' + str + '\033[0m'; // medium - yellow | ||
} else { | ||
str = '\033[91m' + str + '\033[0m'; // low - red | ||
} | ||
} | ||
if (remaining > 0) { | ||
if (remaining >= str.length) { | ||
fillStr = padding(remaining - str.length); | ||
if (remaining >= strlen) { | ||
fillStr = padding(remaining - strlen); | ||
fmtStr = right ? fillStr + str : str + fillStr; | ||
} else { | ||
fmtStr = str.substring(str.length - remaining); | ||
fmtStr = str.substring(strlen - remaining); | ||
fmtStr = '... ' + fmtStr.substring(4); | ||
@@ -76,3 +91,2 @@ } | ||
return leader + fmtStr; | ||
} | ||
@@ -79,0 +93,0 @@ |
{ | ||
"name": "istanbul", | ||
"version": "0.1.42", | ||
"version": "0.1.43", | ||
"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", | ||
@@ -20,3 +20,4 @@ "keywords": [ "coverage", "code coverage", "JS code coverage", "JS coverage" ], | ||
"Joe @jhansche <jhansche@meetme.com>", | ||
"Vojta Jina <vojta.jina@gmail.com>" | ||
"Vojta Jina <vojta.jina@gmail.com>", | ||
"Dmitry Shirokov @runk <deadrunk@gmail.com>" | ||
], | ||
@@ -39,3 +40,3 @@ "preferGlobal": true, | ||
"esprima": "1.0.x", | ||
"escodegen": "0.0.x", | ||
"escodegen": "0.0.23", | ||
"handlebars": "1.0.x", | ||
@@ -42,0 +43,0 @@ "mkdirp": "0.3.x", |
Istanbul - a JS code coverage tool written in JS | ||
================================================ | ||
[![Build Status](https://secure.travis-ci.org/gotwarlost/istanbul.png)](http://travis-ci.org/gotwarlost/istanbul) [![Dependency Status](https://gemnasium.com/gotwarlost/istanbul.png)](https://gemnasium.com/gotwarlost/istanbul) | ||
[![Build Status](https://secure.travis-ci.org/gotwarlost/istanbul.png)](http://travis-ci.org/gotwarlost/istanbul) | ||
[![Dependency Status](https://gemnasium.com/gotwarlost/istanbul.png)](https://gemnasium.com/gotwarlost/istanbul) | ||
[![NPM](https://nodei.co/npm/istanbul.png?downloads=true)](https://nodei.co/npm/istanbul/) | ||
Features | ||
@@ -7,0 +10,0 @@ -------- |
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
400576
122
8621
205
+ Addedescodegen@0.0.23(transitive)
+ Addedestraverse@0.0.4(transitive)
- Removedescodegen@0.0.28(transitive)
- Removedestraverse@1.3.2(transitive)
Updatedescodegen@0.0.23