npm / @terrazzo/token-tools
@terrazzo/token-tools
What changed in @terrazzo/token-tools 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.
8 breaking1 deprecations4 new APIs and options5 behavior and defaults1 tooling12 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@terrazzo/token-tools 231 changes
Breaking changes 8
The CSS plugin now inherits alphabetize from options, a minor breaking change.
Border, Transition, and Typography tokens now have stricter requirements that all properties be present; lint rules can be adjusted individually to opt out.
Color parsing now uses Color.js instead of Culori, changing some color utility outputs and providing more performant, CSS spec-compliant color science.
DTCG 2nd Editors draft validation now errors by default; colors require components, dimensions and durations require object notation, and typography requires its minimum properties. Lint settings can opt out.
Plugin lint runs once on the merged set rather than on individual files; plugins using src must read from sources and match token source filenames.
The first parameter is now a Momoa node, the second is a context object, and transforms must return a Momoa node rather than raw JSON.
Border, Transition, and Typography tokens now have stricter requirements that all properties be present; lint rules can be adjusted individually to opt out.
Border, Transition, and Typography tokens now have stricter requirements that all properties be present; lint rules can be adjusted individually to opt out.
Deprecations 1
This lint rule is soft-deprecated in favor of core/valid-typography.
New APIs and options 4
A dependency-free package provides types for generated JS plugin declarations, so consumers of published token packages do not need to install @terrazzo/parser.
Added the omitTypographyShorthand option to generateShorthand().
JSON $refs now have first-class support for both remote and local references, and DTCG aliases are transformed to JSON $refs so the forms are interchangeable.
Typography shorthand was added, alongside improvements to the Sass plugin.
Behavior and default changes 5
Shadow token types and CSS processing now allow lists of aliases.
The resolver API now detects orthogonality, except for $extends.
The build() plugin hook now executes in parallel with other build() hooks.
The buildEnd() plugin hook now executes in parallel with other buildEnd() hooks.
This value may be undefined for tokens created dynamically via $ref.
Tooling 1
Validation is now implemented as lint rules, so token validation can be configured individually and extended.
Fixes and other changes 12
CSS transformation resolves an aliased typography token to a complete sub-token instead of a mode-less stub, preventing crashes during recursive transformation.
Zero-valued dimension tokens preserve their units rather than serializing as bare
0, keeping values such as0pxand0remtype-compatible in CSS math functions.Rounds CSS gradient stop positions to 1/1000, dropping IEEE-754 artefacts such as 55.00000000000001%.
Improves handling of aliases when the primitive or primary token exists but the aliases do not, preventing tokens from being dropped in plugins.
Fixes legacy modeSelectors resolving to the default alias instead of the requested mode.
Fixes a parser runtime error when $extensions does not have a mode object.
Fixed an issue where partial aliases in border tokens could sometimes refer to themselves.
Fixed border tokens not cascading correctly across modes.
Group types now include the $deprecated property.
Fixed false unused warnings for lint rules that are turned off.
Fixed partialAliasOf handling for strokeStyle.
Extended typography property CSS generation was improved.