Skip to content

fix: missing cjs dist file for web-package#4725

Merged
mimarz merged 12 commits intomainfrom
fix-web-entry-file
Apr 13, 2026
Merged

fix: missing cjs dist file for web-package#4725
mimarz merged 12 commits intomainfrom
fix-web-entry-file

Conversation

@mimarz
Copy link
Copy Markdown
Collaborator

@mimarz mimarz commented Apr 10, 2026

Fix for the following error downstream when web-package was being imported as cjs module.

Cannot find module '@digdir/designsystemet-web' from 'node_modules/@digdir/designsystemet-react/dist/cjs/index.js'

Empty changeset because this was introduced in #4672 which is not released yet.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: 8d4f0a6

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 Patch
@digdir/designsystemet Patch
@digdir/designsystemet-css Patch
@digdir/designsystemet-web Patch
@digdir/designsystemet-types 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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Preview deployments for this pull request:

storybook - 13. Apr 2026 - 15:44

themebuilder - 13. Apr 2026 - 12:44

www - 13. Apr 2026 - 12:52

Copy link
Copy Markdown
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.

🐛

@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented Apr 13, 2026

🐛

Just saw this was not in review - monday going good so far :)

@mimarz mimarz force-pushed the fix-web-entry-file branch 3 times, most recently from baa6f74 to dd8b99f Compare April 13, 2026 11:30
@unekinn
Copy link
Copy Markdown
Contributor

unekinn commented Apr 13, 2026

After pinning @digdir/* dependencies (to ensure the transitive @digdir/designsystemet-web follows the same version as @digdir/designsystemet-react) the downstream jest test suite now runs without errors. Just update the package.json to

    "@digdir/designsystemet-css": "0.0.0-fix-web-entry-file-20260413125841",
    "@digdir/designsystemet-react": "0.0.0-fix-web-entry-file-20260413125841",

However, this is only an actual problem in the snapshot releases. For the regular releases, the version range ^1.14.0 would force an upgrade from 1.13.1 to 1.14.0 for the transitive dependency. But in the snapshot release the range ^0.0.0-fix-web-entry-file-20260413104256 would add 0.0.0-main-20260410175907 as a matching dependency to the lockfile, which didn't contain the fix we were actually testing 🫠

@mimarz mimarz marked this pull request as ready for review April 13, 2026 13:42
@mimarz mimarz merged commit d8286ee into main Apr 13, 2026
24 of 25 checks passed
@mimarz mimarz deleted the fix-web-entry-file branch April 13, 2026 14:05
@github-actions github-actions bot mentioned this pull request Apr 13, 2026
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.

4 participants