Design tokens in a monorepo usually start as a folder that one app imports. Then a second app needs them, then a marketing site, then a package published for another team. At each step the same question returns: how do consumers get tokens, and how do they know when a change will break them? This note covers distributing tokens in a monorepo, from a workspace package to a versioned release.
Key takeaways
- Put tokens in their own workspace package, not in an app. Every consumer imports the same package by name.
- Inside the monorepo, link with the workspace protocol. pnpm resolves
workspace:only to the local package.- When tokens leave the monorepo, version them. A renamed or removed token is a major change, as GitHub's Primer primitives changelog shows.
- Record the intent of each change when it's made. Changesets keeps a note per change and turns it into versions and a changelog.
Step 1: a tokens package
The first move is structural. Take the token files out of the app that created them and give them a package of their own. For example, with a hypothetical @acme/tokens:
Now there's one owner, one folder to review and one import path. An app that needs a token imports @acme/tokens, not a relative path into another app.
Decide early what the package ships. Token packages often ship more than one format:
The DTCG format matters here because it's the tool-neutral format that other tools can read. Our note on Style Dictionary in practice shows how to build platform outputs from it.
Step 2: link it with the workspace protocol
Inside the monorepo, consumers should always get the local package, never a published copy by accident. Package managers support this with workspaces.
npm workspaces manage "multiple packages from your local file system from within a singular top-level, root package", and link them as symlinks in node_modules (npm). pnpm goes further with the workspace: protocol. With it, "pnpm will refuse to resolve to anything other than a local workspace package" (pnpm).
When the package is published, pnpm replaces workspace:* with the real version, and workspace:^ with a caret range. The same package.json works inside the repository and after release.
Step 3: choose how the package is built
Turborepo's documentation describes three kinds of internal package, and a tokens package can be any of them (Turborepo):
- Just-in-Time. The consuming app compiles the package's source. It's the simplest setup, but Turborepo "cannot cache a build" for it.
- Compiled. The package builds itself, for example with
tsc, and consumers import the output. - Publishable. The package is built and published to a registry. It has "the most strict requirements".
For tokens, the source is often already the output: CSS and JSON need no compilation. A TypeScript file of token constants can be consumed Just-in-Time until a consumer outside the monorepo needs it.
Step 4: version what leaves the repository
While every consumer lives in the same repository, a change and its consumers can be updated in one pull request. Versions start to matter when a consumer can't be updated in the same commit: a published package, another team's repository, a mobile app with its own release train.
Then SemVer applies, and it's worth being strict about what counts as breaking for tokens:
GitHub's Primer, for one, treats token renames and removals as majors. The @primer/primitives changelog shows it: version 9.0.0 notes "Removed space tokens", and 10.0.0 lists "renaming some old ones and removing one" (Primer primitives).
Before a rename or removal, keep the old name as a deprecated alias for at least one minor release, then remove it in the next major. Our guide to breaking changes in a component library covers deprecation in detail.
A value change is the grey area. A brand colour that changes on purpose isn't breaking for the API, but it changes every screen. One common approach is a minor with a clear changelog line, so consumers can review it before upgrading.
Step 5: record changes as they happen
The hardest part of versioning isn't the number. It's remembering, at release time, what changed and why. Changesets solves this by recording each change when it's made. It describes itself as "a tool to manage versioning and changelogs with a focus on monorepos". Each changeset records the packages to release, the bump type and a summary (Changesets).
For example, a token rename then carries its own note:
At release, the notes become the version bump and the changelog. Primer's primitives, for one, are released with Changesets.
Consumers outside the monorepo
When another team installs your tokens from a registry, two things help them most:
- A migration note per major. A list of renamed tokens with old and new names turns an upgrade into a search and replace.
- A peer dependency where it applies. If the package ships React helpers, declare React as a peer dependency. npm describes peers as expressing "the compatibility of your package with a host tool or library" (npm).
For renamed tokens, a codemod saves consumers even that search and replace. The same guide shows a tested codemod for a component rename, and the same approach works for token names.
Where FISYCO fits
We build FISYCO to keep the tokens package in step with Figma. A tokens library writes CSS, SCSS, TypeScript, JSON and DTCG files into the folder you choose, such as packages/tokens/src. Changes arrive as a pull request against that folder, with renames detected by stable Figma ID rather than as a deletion plus an addition. That makes the version decision visible in review: the pull request lists which tokens were added, modified and removed before anyone bumps a number.



