Skip to content

Conversation

@unekinn
Copy link
Contributor

@unekinn unekinn commented Nov 19, 2025

Summary

Move submodule @digdir/designsystemet/types to a new package @digdir/designsystemet-types and change all references.

After re-running tokens build downstream, this removes transitive dependencies on runtime dependencies on CLI tools like commander and style-dictionary which are never used in runtime, but are required for the CLI to function. It also makes code which doesn't use the CLI unaffected by our node version limitations (currently >= 22 due to style-dictionary).

@digdir/designsystemet/types is preserved for now as a deprecated re-export of @digdir/designsystemet-types to avoid breaking people's builds.

Checks

@changeset-bot
Copy link

changeset-bot bot commented Nov 19, 2025

🦋 Changeset detected

Latest commit: 24084a9

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

This PR includes changesets to release 5 packages
Name Type
@digdir/designsystemet-react Minor
@digdir/designsystemet-theme Minor
@digdir/designsystemet-types Minor
@digdir/designsystemet Minor
@digdir/designsystemet-css Minor

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

@unekinn unekinn marked this pull request as draft November 19, 2025 16:29
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Preview deployments for this pull request:

storybook - 24. Nov 2025 - 12:25

@unekinn unekinn force-pushed the fix/types-package branch 3 times, most recently from d1fa746 to 528f61c Compare November 19, 2025 16:44
@unekinn unekinn marked this pull request as ready for review November 20, 2025 11:08
@Barsnes
Copy link
Member

Barsnes commented Nov 21, 2025

All in all, I think we should go ahead with this.
I've been thinking about a type package for some time, and this makes more sense than having to install the CLI just for a couple of types

@Barsnes Barsnes moved this from 🔵 Inbox to 👀 Ready for review in Team Designsystemet Nov 24, 2025
Copy link
Member

@Barsnes Barsnes left a comment

Choose a reason for hiding this comment

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

I think we'll go ahead with this.
Having a type package will most likely be useful for a web components package as well.
I'm not sure if we need to publish this package locally before Github Actions, but we'll figure that out.

We might also need to check that sync-changelogs.js works, but I don't see why it should fail.

@unekinn unekinn merged commit c2faf2e into main Nov 24, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from 👀 Ready for review to ✅ Done in Team Designsystemet Nov 24, 2025
@unekinn unekinn deleted the fix/types-package branch November 24, 2025 12:44
@github-actions github-actions bot mentioned this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants