fix(cli): caret-bound mops update and mops outdated by default#521
Merged
fix(cli): caret-bound mops update and mops outdated by default#521
mops update and mops outdated by default#521Conversation
Add `--major` flag to opt back into cross-major updates. Made-with: Cursor
Apply pr-reviewer findings: - outdated test now strips ANSI and survives any future core@1.x release - --major addOption matches surrounding style - help text spells out the caret bound semantics - drop dead version fallbacks; align changelog with cargo-only semantics Made-with: Cursor
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.
Problem
mops updateandmops outdatedjumped across major versions by default. Pinningcore = "2.0.0"and runningmops updatewould happily move you to a future3.0.0— silently breaking the project. This is the opposite of whatcargo updateandnpm updatedo, and the opposite of what users expect from "update".Fix
Both commands are now caret-bound by default:
0.x.y→ bumps within0.x.y(patch only — pre-1.0 minors are treated as breaking, matching cargo/npm)1.x.yand above → bumps within<major>.x.y(minor + patch)Old behavior is one flag away:
--majoropts back into cross-major updates (same flag for both commands for consistency).Hard-pinned (
pkg@x.y.z) and prefix-pinned (pkg@x/pkg@x.y) deps are unchanged — pinning already encodes the bound the user wants.Why "fix" and not "breaking"
The previous default was a footgun, not a contract. Anyone who actually wanted cross-major bumps was either burned by it or never noticed. The escape hatch (
--major) is one flag away.Test plan
mops update(default) bumpsbase 0.14.5within0.14.xand leavescore 1.0.0alone (no1.x.y > 1.0.0exists)mops update --majorbumps both past their major boundsmops outdatedmirrors the same behavior with--majorparity--helpfor both commands shows--majorDocs
docs/docs/cli/1-deps/04-mops-update.md— documents--majorand the new defaultdocs/docs/cli/1-deps/03-mops-outdated.md— samecli/CHANGELOG.md— single-line fix entry under## Next.agents/skills/mops-cli/SKILL.md— updated cheat-sheetAGENTS.md— added a note thatbaseis deprecated; new examples should usecore(caught while writing this PR's docs)Made with Cursor