coffee-time 1.2.0-beta.4 → 1.2.0-beta.5

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.
package/README.md CHANGED
@@ -47,7 +47,7 @@ coffee-time start --interval 45 --status
47
47
  * Prints a single startup line:
48
48
  `Coffee breaks scheduled every 45 minutes. Press Ctrl+C to stop.`
49
49
  * Optional status flag (`--status`) prints a countdown update every minute:
50
- `⏳ Next break in 44:00`
50
+ `⏰ Next break in 44 minutes`
51
51
  * Waits 45 minutes, then triggers a break notification.
52
52
  * After each break, countdown updates continue when `--status` is enabled.
53
53
  * Immediately schedules the next interval and repeats until you stop it (`Ctrl+C`).
@@ -97,9 +97,9 @@ function notify(intervalMinutes, logLine = console.log) {
97
97
 
98
98
  function formatRemaining(remainingMs) {
99
99
  const totalSeconds = Math.max(0, Math.ceil(remainingMs / 1000));
100
- const minutes = Math.floor(totalSeconds / 60);
101
- const seconds = totalSeconds % 60;
102
- return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
100
+ const minutes = Math.max(0, Math.ceil(totalSeconds / 60));
101
+ const unit = minutes === 1 ? 'minute' : 'minutes';
102
+ return `${minutes} ${unit}`;
103
103
  }
104
104
 
105
105
  function printCoffeeArt() {
@@ -196,7 +196,7 @@ function startLoop(intervalMinutes, options = {}) {
196
196
 
197
197
  const logStatus = () => {
198
198
  const remaining = nextTime - Date.now();
199
- const message = `⏰ Next break in ${formatRemaining(remaining)}`;
199
+ const message = `⏰ Next break in ${formatRemaining(remaining)}`;
200
200
  const paddedMessage = message.padEnd(statusLength, ' ');
201
201
  process.stdout.write(`\r${paddedMessage}`);
202
202
  statusLength = message.length;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.2.0-beta.4",
6
+ "version": "1.2.0-beta.5",
7
7
  "description": "Lightweight CLI to schedule coffee breaks at a fixed interval.",
8
8
  "bin": {
9
9
  "coffee-time": "./bin/coffee-time.js"