Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-progress

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-progress - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

3

CHANGES.md

@@ -0,1 +1,4 @@

### 1.6.1 ###
* Bugfix: `roundTo` parameter was not set for `elapsedTime` calculation which caused raw float values within formatted time strings - thanks to [rekinyz on GitHub](https://github.com/AndiDittrich/Node.CLI-Progress/pull/16) #16
### 1.6.0 ###

@@ -2,0 +5,0 @@ * Added: Additional payload data which can be used as **custom-tokens** within the bar - thanks to [tobiasps on GitHub](https://github.com/AndiDittrich/Node.CLI-Progress/pull/15) #15

8

lib/Bar.js

@@ -99,3 +99,3 @@ var _readline = require('readline');

var elapsedTime = Math.round((Date.now() - this.startTime)/1000);
var elapsedTimef = this.formatTime(elapsedTime);
var elapsedTimef = this.formatTime(elapsedTime, 1);

@@ -145,6 +145,6 @@ // calculate eta

// format a number of seconds into hours and minutes as appropriate
Bar.prototype.formatTime = function (t, roundTo) {
Bar.prototype.formatTime = function (t, roundToMultipleOf) {
var round = function (input) {
if (roundTo) {
return roundTo * Math.round(input / roundTo);
if (roundToMultipleOf) {
return roundToMultipleOf * Math.round(input / roundToMultipleOf);
} else {

@@ -151,0 +151,0 @@ return input

{
"name": "cli-progress",
"version": "1.6.0",
"version": "1.6.1",
"description": "Easy to use Progress-Bar for Command-Line/Terminal Applications",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc