unstale

npm / pretty-ms

pretty-ms

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

7 breaking11 fixes and other

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

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

pretty-ms 1017 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 10

  • 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

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

    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 91 changes

Fixes and other changes 1

  • Prevents milliseconds from rounding up to 1000ms.

    9.3.1release notes