npm / filesize
filesize
What changed in filesize 4 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-14.
4 breaking1 security9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initfilesize 1113 changes
Breaking changes 3
Precision is now applied before rounding for decimal units, changing the resulting formatted values.
Invalid rounding methods are now rejected.
Precision values are formatted with the default locale.
Security 1
Input validation and edge-case handling in filesize() were hardened.
Fixes and other changes 9
Accepts uppercase spellings of the standard option.
Locale formatting is now applied when precision is set.
Small values and custom separators are kept free of scientific notation.
Locale and separator options are now honored when formatting zero values.
Preserves BigInt precision above Number.MAX_SAFE_INTEGER.
Keeps precision trailing zeros for negative values.
Keeps the plural fullform name when using a comma decimal separator.
The output 'exponent' now returns the final exponent.
The pad option is now honored for zero values.
filesize 41 changes
Breaking changes 1
The deprecated suffixes option was removed in this major release.