Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/cjs-dual-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@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.

Check failure on line 13 in .changeset/cjs-dual-builds.md

View check run for this annotation

Claude / Claude Code Review

Duplicate CJS changeset — #2405 already shipped one, with conflicting bump level

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 esca
Comment on lines +1 to +13

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 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:

  1. 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).
  2. 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.
  3. The bump level for each package is the max across its changesets, so the new minor declaration silently overrides the patch level 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.md from this PR (if the original patch level is correct), or
  • If a minor bump is actually intended for the CJS change, edit or replace the original cjs-support-v2-packages.md instead of adding a second changeset alongside it, so exactly one changeset describes the change at the intended level.

5 changes: 5 additions & 0 deletions .changeset/codemod-iterations-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@modelcontextprotocol/codemod': patch
---

v1-to-v2 migration fixes from continued real-world migrations (codemod iterations 5).
Loading