@mpen/progressbar 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +9 -1
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -210,7 +210,15 @@ var ProgressBar = class {
210
210
  const progressRate = this.current / elapsedSeconds;
211
211
  estimatedRemaining = (this.max - this.current) / progressRate;
212
212
  }
213
- if (estimatedRemaining >= 60 || elapsedSeconds >= 60) {
213
+ if (estimatedRemaining >= 6e3 * 60) {
214
+ const days = Math.floor(estimatedRemaining / (1440 * 60));
215
+ const hours = Math.floor(estimatedRemaining / 3600 % 24);
216
+ fullLine += ` ${sectionSeparator} ${days}d${String(hours).padStart(2, "0")}h`;
217
+ } else if (estimatedRemaining >= 6e3) {
218
+ const hours = Math.floor(estimatedRemaining / 3600);
219
+ const minutes = Math.floor(estimatedRemaining / 60 % 60);
220
+ fullLine += ` ${sectionSeparator} ${hours}h${String(minutes).padStart(2, "0")}m`;
221
+ } else if (estimatedRemaining >= 60 || elapsedSeconds >= 60) {
214
222
  const minutes = Math.floor(estimatedRemaining / 60);
215
223
  const seconds = Math.floor(estimatedRemaining % 60);
216
224
  fullLine += ` ${sectionSeparator} ${minutes}m${String(seconds).padStart(2, "0")}s`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mpen/progressbar",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Terminal progress bar utilities.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -30,8 +30,8 @@
30
30
  "dev": "bun src/dev.ts"
31
31
  },
32
32
  "publishHash": {
33
- "buildDate": "2026-10-04T18:59:00.809-07:00",
33
+ "buildDate": "2026-10-04T20:49:25.311-07:00",
34
34
  "hgChangesetId": "36f79ac2bb8e+",
35
- "sha256": "aa8016508ef5982c85982679c004cb4a4792a532cd94b58bc8e5693980ad5213"
35
+ "sha256": "7716c28611411cfd7826d4a6e5006281626208711a5de2903b23d39efcc73091"
36
36
  }
37
37
  }