npm / d3-format
d3-format
What changed in d3-format 2 to 3, from its official release notes, upgrade guides and advisories. Also covers @types/d3-format. Sources checked 2026-10-27.
4 breaking3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initd3-format 36 changes
Breaking changes 3
Formats zero as
0instead of0.0.The package now requires Node.js 12 or higher.
The package adopts the module type, affecting how Node.js interprets its files.
Fixes and other changes 3
Fixes handling of parentheses when using formatPrefix.
Returns NaN when step is zero.
Prevents the s format from sometimes applying an erroneous suffix to NaN or ±Infinity.
d3-format 21 changes
Breaking changes 1
The default minus sign changes from hyphen-minus (-) to minus sign (−).