@buzuli/color
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -5,6 +5,7 @@ const chalk = require('chalk') | ||
const defaultColorLevel = 3 | ||
const buzLevel = process.env.BUZULI_COLOR_LEVEL | ||
const colorLevel = Number(buzLevel) || undefined | ||
const level = (colorLevel == null) ? colorLevel : (colorLevel < 0) ? 0 : (colorLevel > 3) ? 3 : colorLevel | ||
const chalkContext = new chalk.constructor({ level }) | ||
const colorLevel = Number(buzLevel) | ||
const level = isNaN(colorLevel) ? defaultColorLevel : (colorLevel <= 0) ? 0 : (colorLevel > 3) ? 3 : colorLevel | ||
const chalkContext = new chalk.Instance({ level }) | ||
@@ -11,0 +12,0 @@ const light = process.env.BUZULI_COLOR_LIGHT |
{ | ||
"name": "@buzuli/color", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Preferred colors for @buzuli's projects", | ||
@@ -22,9 +22,9 @@ "main": "lib/color.js", | ||
"dependencies": { | ||
"chalk": "^2.4.2", | ||
"node-emoji": "^1.10.0" | ||
"chalk": "^4.1.2", | ||
"node-emoji": "^1.11.0" | ||
}, | ||
"devDependencies": { | ||
"standard": "^13.1.0", | ||
"tap": "^14.4.3" | ||
"standard": "^16.0.3", | ||
"tap": "^15.0.9" | ||
} | ||
} |
8872
196
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedsupports-color@5.5.0(transitive)
Updatedchalk@^4.1.2
Updatednode-emoji@^1.11.0