Comparing version 1.2.1 to 1.3.0
@@ -5,6 +5,4 @@ var path = require('path') | ||
// use colors module, if available | ||
if (process.stdout.isTTY) { | ||
try {colors = require('colors') } catch(err) {} | ||
} | ||
// use chalk module, if available | ||
try {chalk = require('chalk') } catch(err) {} | ||
@@ -96,3 +94,3 @@ function formatError(err, options) { | ||
if (colors) { | ||
if (chalk) { | ||
if (line.indexOf(node_modules) >= 0) { | ||
@@ -111,4 +109,4 @@ type = "node_modules"; | ||
if (colors[color]) { | ||
return colors[color](line); | ||
if (chalk[color] && chalk[color] !== 'default') { | ||
return chalk[color](line); | ||
} | ||
@@ -115,0 +113,0 @@ } |
@@ -5,2 +5,3 @@ var util = require('util') | ||
, hookit = require('hookit') | ||
, chalk = require('chalk') | ||
, formatErrorWithOptions = require('./formatError').formatError | ||
@@ -17,3 +18,3 @@ , normalizeError = require('./formatError').normalizeError | ||
, 'colors': { | ||
'node': 'white', | ||
'node': 'default', | ||
'node_modules': 'cyan', | ||
@@ -282,3 +283,4 @@ 'default': 'red' | ||
trycatch.format = null | ||
trycatch.chalk = chalk | ||
module.exports = trycatch | ||
module.exports = trycatch |
{ | ||
"name": "trycatch", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "An asynchronous domain-based exception handler with long stack traces for node.js", | ||
@@ -32,4 +32,4 @@ "homepage": "http://github.com/CrabDude/trycatch", | ||
"dependencies": { | ||
"colors": ">=0.5.0 <0.6", | ||
"hookit": "~0.1.1" | ||
"hookit": "~0.1.1", | ||
"chalk": "^0.4.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "keywords": [ |
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
48925
20
793
+ Addedchalk@^0.4.0
+ Addedansi-styles@1.0.0(transitive)
+ Addedchalk@0.4.0(transitive)
+ Addedhas-color@0.1.7(transitive)
+ Addedstrip-ansi@0.1.1(transitive)
- Removedcolors@>=0.5.0 <0.6
- Removedcolors@0.5.1(transitive)