fix: align package versions before packing to prevent ENOENT on publish#6538
fix: align package versions before packing to prevent ENOENT on publish#6538michaelmkraus wants to merge 4 commits into
Conversation
|
| const STANDALONE_PACKAGES = new Set([ | ||
| 'core-foundations', | ||
| 'agent-cli', | ||
| 'core-migration', | ||
| 'core-stylelint', | ||
| 'core-eslint-plugin', | ||
| 'core-postcss-plugin', | ||
| 'core-vite-plugin', | ||
| 'mcp-server' | ||
| ]); |
There was a problem hiding this comment.
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.
|
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. |
There was a problem hiding this comment.
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 versionto align each workspace toVALID_SEMVER_VERSION(not only on PRE_RELEASE). - Extract the standalone-package list into a
Setand gate dependency rewriting on it. - Capture each
npm packstdout filename into aMapand pass it tonpm publishinstead of reconstructing the filename.
Proposed changes
Problem
The CI/CD publish job failed with:
Root Cause
changeset versionmcp-serverwas new and had no changeset → version stayed at4.6.0npm pack(RELEASE)PRE_RELEASE)npm packproduceddb-ux-mcp-server-4.6.0.tgznpm publishdb-ux-mcp-server-4.6.1.tgz(hardcoded fromVALID_SEMVER_VERSION)Types of changes
🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/fix-pipeline-mcp-publish