feat(fuselage-tokens)!: Rework the token build and its output formats - #2148
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 58bb207 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
tassoevan
force-pushed
the
feat/tokens-output
branch
2 times, most recently
from
August 8, 2026 06:12
d434dd6 to
2f71150
Compare
juliajforesti
requested changes
Aug 11, 2026
The root `colors.*`, `breakpoints.*` and `typography.*` files were symlinks into `dist/`, and npm drops symlinks when packing — they never made it into the published tarball despite being listed in `files`. The monorepo hid this because yarn symlinks the whole workspace directory. Removes the symlinks, narrows `files` to `dist`, and repoints every consumer at `@rocket.chat/fuselage-tokens/dist/*`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tassoevan
force-pushed
the
feat/tokens-output
branch
from
August 11, 2026 16:11
2f71150 to
58bb207
Compare
juliajforesti
approved these changes
Aug 11, 2026
Merged
ivans-netto
added a commit
that referenced
this pull request
Aug 12, 2026
Resolves the conflict in the badge color tokens: #2148 moved `src/badge/base.json` to `src/colors/badge.json` and added an explicit `"type": "color"` to the dark values, while this branch changed dark `level-1` to the n700 value. Kept the new file layout and format with the n700 (`#6C737A`) value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes (including videos or screenshots)
Reworks how
@rocket.chat/fuselage-tokensis built and what it publishes.The legacy
build-design-tokenstool is gone — Style Dictionary is now the only token build, and every artifact is generated fromsrc/intodist/. Sources were reorganized (src/colors/*.json,src/breakpoints.json,src/typography.json,src/border.json) and tokens now carry explicit types.New tokens. A
bordercategory exposesradius(none,default,small,medium,large,extra-large,full) andwidth(none,default,medium,large).@rocket.chat/fuselagereads them, so theborderRadiusandborderWidthstyling props now accept those keywords;borderRadiusreturnsremrather thanpx.Every artifact now lives under
dist/. The root-levelcolors.*,breakpoints.*andtypography.*entry points are gone. Only.jsonand.scssare emitted — the.jsand.mjsbundles are no longer built or published.JSON shapes changed.
breakpoints.jsonis an object keyed by breakpoint name instead of an array, and the redundantnamefield is gone.typography.jsonrenamesfontFamiliestofontFamilyandfontScalestofontScale.badge,button,font,shadow,status,statusBullet,stroke,surface) no longer repeat the category as a top-level key:badge.jsonis now{ light, high-contrast, dark }rather than{ badge: { light, … } }.SCSS shapes changed. Each category exports a single flat map with quoted kebab-case keys, and lengths are converted to
rem:typography.scssreplaces$font-familiesand$font-scaleswith a single$typographymap.Color values changed. Hex values are now lowercase, and
n300is#ebecefrather than#eeeff1— the SCSS palette already used that value, soneutral-300had been inconsistent betweenTheme.tsand the stylesheets. It now agrees.Issue(s)
Further comments
Why the root entry points had to go. They were briefly symlinks into
dist/, which looks fine in the monorepo — yarn symlinks the whole workspace directory, so@rocket.chat/fuselage-tokens/colors.jsonresolves and everything builds green. But npm drops symlinks when packing, so those files never reach the published tarball despite being declared infiles. Verified with a realnpm pack, not just--dry-run: the symlink is absent from the archive while an equivalent regular file survives. Sinceyarn releaserunschangeset publish, which shells out to npm, this would have shipped a package whose advertised entry points 404 for every consumer installing from the registry. Removing them and pointing everything atdist/makes the manifest match what actually ships.This is a breaking move for already-built consumers. The test run demonstrated it:
layoutandonboarding-uiinitially failed withCannot find module '@rocket.chat/fuselage-tokens/colors.json'from stalelogo/distandlayout/distartifacts compiled against the old path. Rebuilding those packages resolved it. Downstream consumers will need the same.Verification.
tsc --noEmitreports zerosrc/errors acrossfuselage,layout,logo,onboarding-uiandfuselage-hooks;fuselagebuilds under webpack; tests pass forfuselage-hooks(139),layout(24),logo(2),fuselage-forms(42) andonboarding-ui(34).Known failure.
fuselage'sContextualbar.spec.tsxfails 4 snapshots (477/481 tests pass) — generated class hashes only. It reproduces on the branch point without any of the entry-point changes, so the snapshot is stale relative to this branch's token changes rather than a regression from them. Left untouched here; happy to regenerate it if reviewers prefer it fixed in this PR.Release. The changeset covers six packages:
fuselage-tokensandfuselageas minor (breaking, per this repo's 0.x convention), andfuselage-hooks,layout,logoandonboarding-uias patch.