npm / style-dictionary
style-dictionary
What changed in style-dictionary 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-22.
2 breaking1 security1 new APIs and options1 behavior and defaults4 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initstyle-dictionary 59 changes
Breaking changes 2
Built-in name transforms ignore a trailing DTCG v2025.10 $root path segment, so root tokens are named after their group.
The transform preserves input precision using the minimum necessary decimals, avoids dividing values already in seconds, and no longer pads outputs with fixed decimals.
Security 1
Style Dictionary - Prototype Pollution in convertTokenData utility function
New APIs and options 1
Adds the sassdoc comment style, a triple-slash short comment.
Behavior and default changes 1
The transform now matches DTCG duration tokens and handles object values, while remaining backwards compatible with Style Dictionary time tokens.
Fixes and other changes 4
References to $root tokens are now replaced correctly when outputReferences is enabled.
The transform stringifies transition duration and delay properties, including properties that reference duration tokens.
Sorting with multiple levels of references no longer warns about filtered-out token references, allowing outputReferencesFilter to clear those warnings.
Resolves references containing RegExp special characters instead of leaking a raw placeholder into formatted output.