chore: add missing changesets for CommonJS builds and codemod iterations#2412
Conversation
🦋 Changeset detectedLatest commit: 1138496 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
| --- | ||
| '@modelcontextprotocol/server': minor | ||
| '@modelcontextprotocol/client': minor | ||
| '@modelcontextprotocol/core': minor | ||
| '@modelcontextprotocol/server-legacy': minor | ||
| '@modelcontextprotocol/codemod': minor | ||
| '@modelcontextprotocol/express': minor | ||
| '@modelcontextprotocol/hono': minor | ||
| '@modelcontextprotocol/fastify': minor | ||
| '@modelcontextprotocol/node': minor | ||
| --- | ||
|
|
||
| Ship CommonJS builds alongside ESM for all v2 packages, so `require()` consumers and CJS-only toolchains can use the SDK without a bundler shim. |
There was a problem hiding this comment.
🔴 The .changeset/cjs-dual-builds.md file duplicates the existing, still-unconsumed .changeset/cjs-support-v2-packages.md that PR #2405 already added for the same CommonJS dual-build change across the same 9 packages, and the two disagree on bump level (existing: patch, new: minor). Drop this new file (or, if a minor bump is actually intended, edit/remove the original instead) — otherwise the next Version Packages run produces two near-identical CHANGELOG entries per package and a silently escalated bump. The codemod-iterations-5.md changeset is genuinely missing from #2398 and is fine to add.
Extended reasoning...
What the bug is. The PR description states that "The CommonJS dual-build change ... merged without changesets", but that premise is incorrect. PR #2405 (commit f172626, feat(packaging): ship CommonJS builds alongside ESM for v2 packages) already included .changeset/cjs-support-v2-packages.md, and that file is still present at HEAD on this branch. This PR adds a second changeset, .changeset/cjs-dual-builds.md, describing the exact same change ("Ship CommonJS builds alongside ESM") for the exact same 9 packages.
Why the existing state doesn't prevent it. A changeset is only removed once it is consumed by a changeset version run (or listed in .changeset/pre.json's changesets array during pre-release mode). At HEAD, pre.json's consumed list contains only "beta-release", so cjs-support-v2-packages.md has not been consumed yet. Both changesets are therefore pending and will both be picked up by the next Version Packages run.
Concrete impact — step through the next changeset version run:
- Changesets collects all pending files:
beta-release(already consumed, skipped),cjs-support-v2-packages.md(patch × 9 packages),cjs-dual-builds.md(minor × 9 packages),codemod-iterations-5.md(patch for codemod). - For each of the 9 packages (
server,client,core,server-legacy,codemod,express,hono,fastify,node), the CHANGELOG gains two entries describing the same CJS dual-build change, one worded per each file — redundant and confusing release notes. - The bump level for each package is the max across its changesets, so the new
minordeclaration silently overrides thepatchlevel the original author chose in feat(packaging): ship CommonJS builds alongside ESM for v2 packages #2405 (visible in the changeset-bot comment on this PR: everything jumps to Minor, and the pre-1.0 middleware packages to Major). Whichever level is correct, having two conflicting declarations for one change means the escalation happens implicitly rather than as a deliberate decision.
Why this matters for this PR specifically. Half of the PR is this duplicate file, and its stated purpose ("the release automation has nothing to version" for the CJS change) is not true. The other half — .changeset/codemod-iterations-5.md — is legitimate: commit 1772473 (#2398) merged with no changeset, so that one is genuinely missing.
How to fix. Either:
- Remove
.changeset/cjs-dual-builds.mdfrom this PR (if the originalpatchlevel is correct), or - If a
minorbump is actually intended for the CJS change, edit or replace the originalcjs-support-v2-packages.mdinstead of adding a second changeset alongside it, so exactly one changeset describes the change at the intended level.
The CommonJS dual-build change and codemod iterations 5 merged without changesets, so the release automation has nothing to version. This adds the two missing changesets; on merge the Version Packages PR regenerates for the next beta.
Types of changes
Checklist