colors
Advanced tools
Comparing version 1.2.5 to 1.3.0
@@ -94,10 +94,10 @@ var colors = require('./colors'); | ||
if (typeof theme === 'string') { | ||
try { | ||
colors.themes[theme] = require(theme); | ||
applyTheme(colors.themes[theme]); | ||
return colors.themes[theme]; | ||
} catch (err) { | ||
console.log(err); | ||
return err; | ||
} | ||
console.log('colors.setTheme now only accepts an object, not a string. ' + | ||
'If you are trying to set a theme from a file, it is now your (the ' + | ||
'caller\'s) responsibility to require the file. The old syntax ' + | ||
'looked like colors.setTheme(__dirname + ' + | ||
'\'/../themes/generic-logging.js\'); The new syntax looks like '+ | ||
'colors.setTheme(require(__dirname + ' + | ||
'\'/../themes/generic-logging.js\'));'); | ||
return; | ||
} else { | ||
@@ -104,0 +104,0 @@ applyTheme(theme); |
{ | ||
"name": "colors", | ||
"description": "get colors in your node.js console", | ||
"version": "1.2.5", | ||
"version": "1.3.0", | ||
"author": "Marak Squires", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/Marak/colors.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
37445
2