Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/8cfe0c73-7afe-4603-9d07-6b713fb70f12 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix changeset release bump for minor updates
Prevent fixed-group minor releases from escalating to major due to internal peerDependency churn
Apr 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the monorepo’s Changesets/release configuration to prevent minor releases in a fixed group from incorrectly escalating to a major version due to internal peerDependency version churn, and documents the fix.
Changes:
- Enabled Changesets’ experimental
onlyUpdatePeerDependentsWhenOutOfRangeoption to reduce peer-dependent bump propagation. - Updated
@object-ui/plugin-designerto treat internal@object-ui/*packages asdependencies(keeping onlyreact/react-domas peers). - Added an Unreleased changelog entry describing the release-versioning guardrail.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/plugin-designer/package.json |
Moves internal @object-ui/* from peerDependencies to dependencies to avoid peerDependency-driven major bump detection. |
.changeset/config.json |
Adds ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange: true to prevent unnecessary peer-dependent updates. |
CHANGELOG.md |
Documents the release bump escalation fix under Unreleased → Fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A minor changeset on
@object-ui/consolewas causing the release PR to jump the fixed group from3.1.5to4.0.0. The escalation came from internal monorepo packages declared aspeerDependenciesin@object-ui/plugin-designer, which made synchronized internal version updates look breaking.Changesets behavior guardrail
.changeset/config.json:___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange: true@object-ui/plugin-designerdependency model correction@object-ui/*entries frompeerDependenciestodependencies(kept asworkspace:*).reactreact-dompeerDependenciesMeta.Monorepo-wide consistency check
packages/*/package.jsonfor similar internal@object-ui/*peer dependency patterns; no additional fixes were required.Release notes update
CHANGELOG.mddocumenting the release-versioning fix.Example of the effective config change:
{ "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } }Original prompt
Problem
When creating a minor changeset (e.g.,
"@object-ui/console": minor), the Changesets release PR bumps all packages from3.1.5to4.0.0instead of the expected3.2.0.See PR #1224 for the incorrect release.
Root Cause
@object-ui/plugin-designer(inpackages/plugin-designer/package.json) declares internal monorepo packages aspeerDependencies:Combined with the
"fixed"group in.changeset/config.json, this triggers a chain reaction:@object-ui/consoleminor bump → all fixed group packages sync to3.2.0@object-ui/types,@object-ui/core, etc. version changesplugin-designerfixedgroup syncs again → all packages jump to4.0.0Required Changes
1. Add experimental option to
.changeset/config.jsonAdd the
onlyUpdatePeerDependentsWhenOutOfRangeflag so that peerDependency updates only trigger a major bump when the version is actually out of range:{ "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { "onlyUpdatePeerDependentsWhenOutOfRange": true } }2. Fix
packages/plugin-designer/package.jsonpeerDependenciesMove the internal
@object-ui/*packages frompeerDependenciestodependencies. Internal monorepo packages usingworkspace:*should not be peer dependencies — they are tightly coupled and versioned together via thefixedgroup. Keep onlyreactandreact-domas peerDependencies. UpdatepeerDependenciesMetaaccordingly (remove entries for moved packages).The
peerDependenciesshould become:And the internal packages should be moved to
dependencies:And remove
peerDependenciesMetaentirely since none of the remaining peer deps need meta config.3. Check for other packages with similar issues
Scan all
packages/*/package.jsonfor any other packages that declare internal@object-ui/*packages aspeerDependencies. If found, apply the same fix (move todependencies).4. Update CHANGELOG.md
Add an entry documenting this fix.
Important Notes
.changeset/twenty-mugs-grow.mdfile — it is the pending minor changeset and should remain as-is.pnpm testto verify nothing is broken.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: 我只想发一个 minior 为什么发布出来是 major
Assistant:
Let我来分析这个 PR 的变更内容,找出为什么版本号变成了 major 而不是 minor。
Assistant: 找到根本原因了。让我来解释:
原因分析
你的 changeset 文件
.changeset/twenty-mugs-grow.md确实只声明了一个 minor 变更:但是最终所有包都被发布为
4.0.0(major),根本原因在于你的.changeset/config.json中使用了"fixed"策略:fixed的行为fixed会让组内所有包 始终保持相同版本号。当前@object-ui/console的版本是3.1.5,而其他一些包的版本可能已经低于或偏离了这个版本。Changesets 在fixed模式下会:更关键的是:你的项目当前版本是
3.x.x,但 PR 生成的是4.0.0。这说明:建议的修复方式
立即修复:关闭这个 PR,检查所有包的当前版本是否一致:
确认没有残留的 major changeset:当前
.changeset目录下只有twenty-mugs-grow.md,内容确认是 minor,所以问题大概率是 版本不一致导致的对齐。对齐版本后重新发布:将所有
fixed组内的包手动统一到同一个版本(比如都设为3.1.5),然...This pull request was created from Copilot chat.