Skip to content

docs: mark old token systems as deprecated and transitional - #5191

Merged
pomfrida merged 2 commits into
mainfrom
docs/mark-old-tokens-do-not-use
Jul 20, 2026
Merged

docs: mark old token systems as deprecated and transitional#5191
pomfrida merged 2 commits into
mainfrom
docs/mark-old-tokens-do-not-use

Conversation

@pomfrida

Copy link
Copy Markdown
Collaborator

Summary

Addresses the remaining Definition of Done item in #5120: Old tokens marked "do not use".

Marks the two existing token systems in @equinor/eds-tokens ahead of the Tokens Studio-based replacement:

  • README (ships to npm): a transition notice at the top of Usage. The CSS variables lose the "(Recommended)" label and are flagged as transitional — still the supported option for production today (eds-core-react 2.x requires the CSS bundle), but the variable names will change in the next major. The legacy tokens JavaScript object is marked deprecated — do not use in new code. The beta line is flagged as testing/feedback only, not production.
  • src/base/index.ts: @deprecated JSDoc on the tokens export, so consumers get the deprecation hint in their editors via dist/types.
  • package.json: 2.3.12.3.2 so the marking can reach the stable line — the current publish setup only releases on the beta dist-tag, and npmjs.com shows the README of latest.
  • CHANGELOG: manual 2.3.2 entry (release-please does not generate changelog entries for manual stable publishes).

Why the wording is differentiated

An unconditional "do not use" would leave teams building today in limbo: the replacement only exists on the beta line and is not production-ready. So the legacy JS object gets a hard deprecation, while the CSS variables are marked "supported today, names will change in the next major — keep direct references few and centralised".

Release-please safety

  • eds-tokens uses release-type: simple, which tracks the version in version.txt — the manual package.json bump does not interfere with the beta line (currently 3.0.0-beta.1).
  • docs: is a hidden type, so this PR triggers no release bump.

After merge

  1. Run the Publish tokens workflow manually with npm-tag latest to publish 2.3.2 (docs-only, legacy build unchanged).
  2. Verify the npm page shows the updated README, then tick the DoD checkbox in 📦 eds-tokens packaging & release (beta flags → 3.0.0) #5120.

npm deprecate on 2.x is deliberately not used now — it would print install warnings for every consumer, including transitively via eds-core-react 2.x which still requires these tokens. That is the right tool at 3.0.0 graduation instead.

@pomfrida pomfrida self-assigned this Jul 20, 2026
@pomfrida

Copy link
Copy Markdown
Collaborator Author

@claude review

@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Claude finished @pomfrida's task in 2m 34s —— View job


Code Review

Reviewed the docs/versioning changes against origin/main. This is a clean, carefully-reasoned PR — the differentiated wording (hard-deprecate the JS object, "transitional but supported" for the CSS variables) is the right call given the replacement only exists on the beta line. I verified the release-mechanics claims against the actual config; they hold up.

Verification (claims in the PR description → confirmed)

  • @deprecated reaches consumers' editors. src/index.ts does export * from './base' and the package's . export maps types to dist/types/index.d.ts, so the JSDoc on tokens will surface in editors via dist/types. Correct.
  • docs: triggers no release. .github/release-please-config.json maps type: docs with "hidden": true, so no version bump. Correct.
  • Manual package.json bump won't fight release-please. eds-tokens uses release-type: simple with the version tracked in version.txt (currently 3.0.0-beta.1, matching .github/release-please-manifest.json). simple only manages version.txt, not package.json, so 2.3.2 sits safely on the stable line — consistent with the package CLAUDE.md note that package.json stays on the last stable version.
  • Beta line unaffected. Manifest and version.txt both on 3.0.0-beta.1; nothing here touches them.

Minor observations (non-blocking)

  1. CHANGELOG section header wording. The manual entry uses ### 📝 Documentation, but the release-please config labels the docs type as 📝 Changed (.github/release-please-config.json:132-134). Purely cosmetic since this is a hand-written entry, but if you want the changelog to read consistently with future auto-generated sections you could use 📝 Changed. I'd lean toward leaving it — "Documentation" is clearer for a human reader here.
  2. CHANGELOG ordering. 2.3.2 is placed below 3.0.0-beta.1 (both dated 2026-07-20). Given the split-line versioning where release-please keeps the beta entry at the top, this is a reasonable deliberate choice — just flagging it so it's a conscious decision rather than an accident.
  3. README-only scope is fine, but note the docs site. The docs-site pages apps/design-system-docs/docs/about/getting-started/develop/getting_started_development.md (and the versioned copy) also reference the tokens. Out of scope for this PR (which correctly targets the npm-published README + types), but a good candidate for a follow-up so the guidance is consistent everywhere consumers land.

Nits

  • The heading ## Legacy Tokens (deprecated — do not use) uses an em-dash; the repo's component-doc style avoids em-dashes, though that rule is scoped to component docs and this package README already uses them elsewhere (as does the changelog). No action needed.
  • No stale anchor links: nothing in the repo links to the old #css-variables-recommended / #legacy-tokens-backward-compatible slugs, so the heading renames are safe.

Summary

No bugs or blocking issues. The code/doc changes are accurate, the versioning strategy is sound and matches the repo's config, and deferring npm deprecate until 3.0.0 graduation is the correct restraint (avoids install warnings for every 2.x consumer, including transitively via eds-core-react). 👍
docs/mark-old-tokens-do-not-use

@pomfrida
pomfrida merged commit f1bfc56 into main Jul 20, 2026
11 checks passed
@pomfrida
pomfrida deleted the docs/mark-old-tokens-do-not-use branch July 20, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant