Skip to content

fix: align package versions before packing to prevent ENOENT on publish#6538

Open
michaelmkraus wants to merge 4 commits into
mainfrom
fix-pipeline-mcp-publish
Open

fix: align package versions before packing to prevent ENOENT on publish#6538
michaelmkraus wants to merge 4 commits into
mainfrom
fix-pipeline-mcp-publish

Conversation

@michaelmkraus
Copy link
Copy Markdown
Contributor

@michaelmkraus michaelmkraus commented Apr 21, 2026

Proposed changes

Problem

The CI/CD publish job failed with:

npm error enoent ENOENT: no such file or directory, open '…/build-outputs/db-ux-mcp-server-4.6.1.tgz'
The newly added @db-ux/mcp-server package was missing from the publish script, so it was never packed into a .tgz — but the pipeline expected it to exist.

Root Cause

Step What happens Problem
changeset version Bumps versions of packages with changesets mcp-server was new and had no changeset → version stayed at 4.6.0
npm pack (RELEASE) Version was not set (only ran for PRE_RELEASE) npm pack produced db-ux-mcp-server-4.6.0.tgz
npm publish Looked for db-ux-mcp-server-4.6.1.tgz (hardcoded from VALID_SEMVER_VERSION) ENOENT — filename mismatch

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/fix-pipeline-mcp-publish

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 21, 2026

⚠️ No Changeset found

Latest commit: ecbb0d8

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

@michaelmkraus michaelmkraus marked this pull request as draft April 21, 2026 09:14
@michaelmkraus michaelmkraus requested a review from nmerget April 21, 2026 09:15
@michaelmkraus michaelmkraus marked this pull request as ready for review April 21, 2026 09:15
Comment on lines +43 to +52
const STANDALONE_PACKAGES = new Set([
'core-foundations',
'agent-cli',
'core-migration',
'core-stylelint',
'core-eslint-plugin',
'core-postcss-plugin',
'core-vite-plugin',
'mcp-server'
]);
Copy link
Copy Markdown
Collaborator

@mfranzke mfranzke Apr 22, 2026

Choose a reason for hiding this comment

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

I'm struggling whether we should maintain this as a static list in which we might still forget to add new entries. Those packages would be possible to get determined programmatically out of the package.json contents out of all packages.

@michaelmkraus michaelmkraus moved this from 🏗 In progress to 🎁 Ready for review in UX Engineering Team Backlog Apr 22, 2026
@nmerget
Copy link
Copy Markdown
Collaborator

nmerget commented Apr 27, 2026

Right now we ship all packages with the same version, to make sure that a user knows they belong to each other, even when there is no change.

If we want to separate the versions, we need to use some sort of peerDependency. Imagine the mcp-server is on version 1.2.3 and our core packages on 5.4.3. If we change the documentation and the components in 6.0.0 we also need to change the mcp so it become 2.0.0 and it has to know which range of core packages it serves.

@nmerget nmerget moved this from 🎁 Ready for review to 🎶 Waiting for feedback in UX Engineering Team Backlog Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a publish-job ENOENT failure by aligning package versions before npm pack for both PRE_RELEASE and RELEASE flows, and by capturing the actual .tgz filenames produced by npm pack rather than reconstructing them from VALID_SEMVER_VERSION. This prevents mismatches when newly added packages (like mcp-server) lag behind in version because they have no changeset.

Changes:

  • Always run npm version to align each workspace to VALID_SEMVER_VERSION (not only on PRE_RELEASE).
  • Extract the standalone-package list into a Set and gate dependency rewriting on it.
  • Capture each npm pack stdout filename into a Map and pass it to npm publish instead of reconstructing the filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎶 Waiting for feedback

Development

Successfully merging this pull request may close these issues.

4 participants