unstale

npm / pretty-ms

pretty-ms

What changed in pretty-ms 6 to 10, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

11 breaking1 behavior and defaults12 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

pretty-ms 1016 changes

Breaking changes 7

  • After a year, days are padded to 3 digits so their width does not change between 9 and 100 days.

    10.0.0release notes

  • With hideSeconds, colonNotation always shows hours; a one-minute duration now displays as 0:01.

    10.0.0release notes

  • unitCount is ignored with colonNotation, so dropping a field no longer changes the meaning of the remaining fields.

    10.0.0release notes

  • Fractional numbers are read to 15 significant digits, while integer numbers and bigints are exact at any size.

    10.0.0release notes

  • Fractional seconds no longer round up into the next unit; for example, 1999.999999 now displays as 1.9s.

    10.0.0release notes

  • Decimal milliseconds now round half up correctly; 1.005 with two digits displays as 1.01ms.

    10.0.0release notes

  • Node.js 22 is now required.

    10.0.0release notes

Fixes and other changes 9

  • Sub-millisecond fields are corrected, including phantom nanoseconds and inaccurate microsecond values.

    10.0.0release notes

  • For a duration under a minute, hideSeconds now shows the seconds instead of 0ms.

    10.0.0release notes

  • Days, hours, and minutes are corrected for very large durations.

    10.0.0release notes

  • Negative zero, such as -0ms, is no longer shown.

    10.0.0release notes

  • A nonzero duration is no longer displayed as 0ms.

    10.0.0release notes

  • Seconds retain precision for large durations and high digit counts.

    10.0.0release notes

  • Values outside 0–100 no longer throw a RangeError, and NaN no longer displays as NaNs.

    10.0.0release notes

  • When seconds cannot show the value, subSecondsAsDecimals no longer displays 0ms; 50 now displays as 50ms.

    10.0.0release notes

  • unitCount: NaN no longer returns an empty string.

    10.0.0release notes

pretty-ms 94 changes

Breaking changes 1

Behavior and default changes 1

Fixes and other changes 2

pretty-ms 81 changes

Breaking changes 1

  • The package is now pure ESM, changing how developers import it.

    8.0.0release notes

pretty-ms 71 changes

Breaking changes 1

  • Time is always floored instead of rounded up, which may change exact output.

    7.0.0release notes

pretty-ms 62 changes

Breaking changes 1

  • The compact and unitCount options no longer prefix output with a tilde.

    6.0.0release notes

Fixes and other changes 1

  • Fixes an inconsistency in milliseconds rounding.

    6.0.0release notes