Skip to content

fix: prevent 0.x minor bumps from triggering major in dependents#447

Merged
ascorbic merged 1 commit intomainfrom
fix/changeset-version-bumps
Apr 11, 2026
Merged

fix: prevent 0.x minor bumps from triggering major in dependents#447
ascorbic merged 1 commit intomainfrom
fix/changeset-version-bumps

Conversation

@ascorbic
Copy link
Copy Markdown
Collaborator

What does this PR do?

Fixes the release PR (#396) incorrectly bumping plugin-ai-moderation, plugin-color, plugin-embeds, and plugin-forms to 1.0.0 when emdash gets a minor bump.

The root cause: changesets treats a minor in 0.x as a breaking change (per semver spec). Plugins with emdash as a peer dep got a major bump, jumping them to 1.0.0.

Two fixes:

  1. Changesets config: Add onlyUpdatePeerDependentsWhenOutOfRange and updateInternalDependents: "out-of-range" so workspace:* ranges (which match everything) never trigger automatic major bumps in dependents.
  2. Plugin deps: Move emdash from dependencies to peerDependencies in atproto, audit-log, and webhook-notifier to match the other plugins. Plugins shouldn't bundle emdash — they run inside it.

Type of change

  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm --silent lint:json | jq '.diagnostics | length' returns 0
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code

Screenshots / test output

N/A — config-only change. Verified by inspecting the release PR behavior.

Changesets treats a minor bump in 0.x as breaking (per semver), which
caused plugins with emdash as a peer dep to jump to 1.0.0 in the
release PR. Fix by:

- Adding updateInternalDependents: out-of-range so workspace:* deps
  are never considered out of range
- Adding onlyUpdatePeerDependentsWhenOutOfRange for the same reason
- Moving emdash from dependencies to peerDependencies in atproto,
  audit-log, and webhook-notifier to match the other plugins
Copilot AI review requested due to automatic review settings April 11, 2026 11:21
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 11, 2026

⚠️ No Changeset found

Latest commit: caf2ab5

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 11, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
emdash-playground caf2ab5 Apr 11 2026, 11:23 AM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 11, 2026

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/@emdash-cms/admin@447

@emdash-cms/auth

npm i https://pkg.pr.new/@emdash-cms/auth@447

@emdash-cms/blocks

npm i https://pkg.pr.new/@emdash-cms/blocks@447

@emdash-cms/cloudflare

npm i https://pkg.pr.new/@emdash-cms/cloudflare@447

emdash

npm i https://pkg.pr.new/emdash@447

create-emdash

npm i https://pkg.pr.new/create-emdash@447

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/@emdash-cms/gutenberg-to-portable-text@447

@emdash-cms/x402

npm i https://pkg.pr.new/@emdash-cms/x402@447

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/@emdash-cms/plugin-ai-moderation@447

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/@emdash-cms/plugin-atproto@447

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/@emdash-cms/plugin-audit-log@447

@emdash-cms/plugin-color

npm i https://pkg.pr.new/@emdash-cms/plugin-color@447

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/@emdash-cms/plugin-embeds@447

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/@emdash-cms/plugin-forms@447

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/@emdash-cms/plugin-webhook-notifier@447

commit: caf2ab5

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

Adjusts Changesets and plugin dependency declarations to prevent 0.x minor bumps in emdash from triggering major (1.0.0) bumps in dependent plugins during automated releases.

Changes:

  • Adds Changesets experimental settings to only bump dependents when their peer/internal ranges are out-of-range.
  • Moves emdash from dependencies to peerDependencies for selected plugins so they don’t bundle the host runtime.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
.changeset/config.json Adds experimental Changesets options to avoid unnecessary dependent bumps when ranges still satisfy.
packages/plugins/atproto/package.json Switches emdash from dependency to peer dependency to match plugin runtime expectations.
packages/plugins/audit-log/package.json Switches emdash from dependency to peer dependency.
packages/plugins/webhook-notifier/package.json Switches emdash from dependency to peer dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +16 to +19
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true,
"updateInternalDependents": "out-of-range"
},
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

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

The config schema URL is pinned to @changesets/config@3.0.2, but the repo is using @changesets/config@3.1.2 (via @changesets/cli in pnpm-lock.yaml). With the newly added experimental options, the older schema may not validate/auto-complete these keys correctly in editors or schema-based linters. Consider updating the $schema URL to match the installed @changesets/config version (or otherwise aligning these versions) to avoid false schema errors and reduce confusion.

Copilot uses AI. Check for mistakes.
@ascorbic ascorbic merged commit d398eb7 into main Apr 11, 2026
31 checks passed
@ascorbic ascorbic deleted the fix/changeset-version-bumps branch April 11, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants