Skip to content

chore(changeset): link preview-middleware and preview-middleware-client releases via changeset fixed group#4466

Merged
heimwege merged 2 commits intomainfrom
chore/preview-middleware/fix-middleware-and-client
Mar 30, 2026
Merged

chore(changeset): link preview-middleware and preview-middleware-client releases via changeset fixed group#4466
heimwege merged 2 commits intomainfrom
chore/preview-middleware/fix-middleware-and-client

Conversation

@heimwege
Copy link
Copy Markdown
Contributor

Problem

@sap-ux/preview-middleware uses @sap-ux-private/preview-middleware-client as a devDependency — its client bundle is built into the middleware's dist/client folder at build time. Because changesets only auto-bumps packages whose runtime dependencies change, a changeset targeting only preview-middleware-client would not trigger a new release of preview-middleware, even though the published artifact of preview-middleware contains the client code.

Solution

Add a fixed group in .changeset/config.json that includes both packages. With fixed, whenever either package has a changeset, both are bumped and released together with the same version.

Trade-offs

Pros:

  • Ensures preview-middleware is always re-published when its embedded client changes — consumers get the updated
    client bundle
  • Simple config-only change, no dependency restructuring needed
  • Uses a first-class changesets feature (fixed) supported by the current @changesets/cli@2.30.0

Cons:

  • Both packages will now share a version number (versions converge on next release — currently preview-middleware@0.25.1 vs preview-middleware-client@0.19.1)
  • Coupling is bidirectional: a changeset on preview-middleware alone will also bump preview-middleware-client, even if the client itself has no changes
  • Slightly inflated release frequency for preview-middleware-client (a private package, so low impact)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 26, 2026

⚠️ No Changeset found

Latest commit: 28d5bc4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@heimwege heimwege marked this pull request as ready for review March 26, 2026 12:07
Copy link
Copy Markdown
Member

@devinea devinea left a comment

Choose a reason for hiding this comment

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

Thanks @heimwege looks like a useful fix.

@sonarqubecloud
Copy link
Copy Markdown

@heimwege heimwege merged commit df0e235 into main Mar 30, 2026
17 checks passed
@heimwege heimwege deleted the chore/preview-middleware/fix-middleware-and-client branch March 30, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants