Skip to content

feat: improve the sdk api#2801

Merged
noahwaldner merged 6 commits into
mainfrom
feat/improve-sdk-api
Jul 16, 2026
Merged

feat: improve the sdk api#2801
noahwaldner merged 6 commits into
mainfrom
feat/improve-sdk-api

Conversation

@noahwaldner

Copy link
Copy Markdown
Contributor

Type safety

  • status is always set: story parser understands satisfies Meta<...>, six components got their stories wired up, icons ship as 'released'
  • New exported literal unions derived from the bundled data: ComponentStatus, ComponentCategory, TokenCategory (filter typos now fail at compile time)
  • null instead of '' for not-applicable fields: instructions, deprecationMessage, cssVariable

API surface

  • New components.statuses() / components.status(name) facet accessors
  • Every entity now carries a canonical id (equals name for components)
  • Removed the build-system output field from tokens
  • Removed the redundant ComponentDetails.subComponentNames
  • Token values stay by-reference (value, cssVariable, tailwindClass): no resolved literals, rendered values are theme/brand-dependent at runtime

Behavior

  • All data is deeply frozen: mutating nodes or list() results throws instead of corrupting shared state
  • keyPathStartsWith is segment-aware: 'colors.chart' no longer matches colors.charts.*
  • Facet ordering pinned to the 'en' locale for cross-machine determinism
  • The SDK build now validates the data snapshot (missing status/category, dangling relatedComponents, duplicate ids) and fails instead of shipping inconsistencies

Docs

  • Filter edge cases defined: empty-array clause matches nothing, text: '' is ignored
  • tailwindClass * wildcard documented as a utility-prefix placeholder (bg-, text-, border-, ...)
  • Token coverage documented as intentionally curated (colors + semantic)
  • Icon quirks documented: empty description, empty props/related(), instructions: null
  • Sub-components documented as not top-level addressable
  • Fixed all stale claims: phantom status() method, icon-status contradictions, wrong counts, "fuzzy" vs substring match

Versioning and packaging

  • Contract version = @frontify/fondue-sdk version; umbrella pins and re-exports it
  • sideEffects: false, engines: node >=20

@noahwaldner
noahwaldner requested a review from syeo66 July 16, 2026 11:59
@noahwaldner
noahwaldner requested a review from a team as a code owner July 16, 2026 11:59
@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c1f9dfa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@frontify/fondue-sdk Minor
@frontify/fondue-components Patch
@frontify/fondue Patch

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

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for fondue-components ready!

Name Link
🔨 Latest commit c1f9dfa
🔍 Latest deploy log https://app.netlify.com/projects/fondue-components/deploys/6a58d252d944d50008ab7601
😎 Deploy Preview https://deploy-preview-2801.components.fondue-components.frontify.com
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@noahwaldner noahwaldner changed the title improve the sdk api types feat: improve the sdk api Jul 16, 2026
Comment thread packages/fondue/scripts/detectDeprecatedExports/temp/active-exports.txt Outdated
* a shared collection (e.g. sorting `list()` in place) throws instead of
* silently corrupting every other consumer in the process.
*/
export const deepFreeze = <T>(value: T): T => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@noahwaldner
noahwaldner merged commit a086574 into main Jul 16, 2026
17 checks passed
@noahwaldner
noahwaldner deleted the feat/improve-sdk-api branch July 16, 2026 12:50
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.

2 participants