cli-progress
Advanced tools
Comparing version 3.9.1 to 3.10.0
## Branch 3.x ## | ||
### 3.10.0 ### | ||
* Changed: foreground color of `preset.shades-grey` is set directly by ANSI codes | ||
* Changed: example snippets are using `ansi-colors` library | ||
* Bugfix: removed `colors` dependency due to some issues with the maintainer... see [Zalgo bomb](https://github.com/Marak/colors.js/issues/285#issuecomment-1008212640) | ||
### 3.9.1 ### | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "cli-progress", | ||
"version": "3.9.1", | ||
"version": "3.10.0", | ||
"description": "easy to use progress-bar for command-line/terminal applications", | ||
@@ -38,3 +38,2 @@ "keywords": [ | ||
"dependencies": { | ||
"colors": "^1.1.2", | ||
"string-width": "^4.2.0" | ||
@@ -41,0 +40,0 @@ }, |
@@ -1,8 +0,7 @@ | ||
const _colors = require('colors'); | ||
// cli-progress legacy style as of 1.x | ||
module.exports = { | ||
format: _colors.grey(' {bar}') + ' {percentage}% | ETA: {eta}s | {value}/{total}', | ||
format: ' \u001b[90m{bar}\u001b[0m {percentage}% | ETA: {eta}s | {value}/{total}', | ||
barCompleteChar: '\u2588', | ||
barIncompleteChar: '\u2591' | ||
}; |
@@ -25,3 +25,3 @@ [![Build Status](https://travis-ci.org/npkgz/cli-progress.svg?branch=master)](https://travis-ci.org/npkgz/cli-progress) | ||
* **Simple**, **Robust** and **Easy** to use | ||
* Full customizable output format (constious placeholders are available) | ||
* Full customizable output format (various placeholders are available) | ||
* Single progressbar mode | ||
@@ -70,5 +70,8 @@ * Multi progessbar mode | ||
// note: you have to install this dependency manually since it's not required by cli-progress | ||
const colors = require('ansi-colors'); | ||
// create new progress bar | ||
const b1 = new cliProgress.SingleBar({ | ||
format: 'CLI Progress |' + _colors.cyan('{bar}') + '| {percentage}% || {value}/{total} Chunks || Speed: {speed}', | ||
format: 'CLI Progress |' + colors.cyan('{bar}') + '| {percentage}% || {value}/{total} Chunks || Speed: {speed}', | ||
barCompleteChar: '\u2588', | ||
@@ -307,5 +310,5 @@ barIncompleteChar: '\u2591', | ||
if (params.value >= params.total){ | ||
return '# ' + _colors.grey(payload.task) + ' ' + _colors.green(params.value + '/' + params.total) + ' --[' + bar + ']-- '; | ||
return '# ' + colors.grey(payload.task) + ' ' + colors.green(params.value + '/' + params.total) + ' --[' + bar + ']-- '; | ||
}else{ | ||
return '# ' + payload.task + ' ' + _colors.yellow(params.value + '/' + params.total) + ' --[' + bar + ']-- '; | ||
return '# ' + payload.task + ' ' + colors.yellow(params.value + '/' + params.total) + ' --[' + bar + ']-- '; | ||
} | ||
@@ -399,6 +402,6 @@ } | ||
```js | ||
const _colors = require('colors'); | ||
const colors = require('ansi-colors'); | ||
module.exports = { | ||
format: _colors.red(' {bar}') + ' {percentage}% | ETA: {eta}s | {value}/{total} | Speed: {speed} kbit', | ||
format: colors.red(' {bar}') + ' {percentage}% | ETA: {eta}s | {value}/{total} | Speed: {speed} kbit', | ||
barCompleteChar: '\u2588', | ||
@@ -405,0 +408,0 @@ barIncompleteChar: '\u2591' |
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
55664
1
450
821
- Removedcolors@^1.1.2
- Removedcolors@1.4.0(transitive)