Add --type flag to add command - #2153
Closed
brunorodmoreira wants to merge 1 commit into
Closed
Conversation
🦋 Changeset detectedLatest commit: 54cf9a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #2153 +/- ##
==========================================
+ Coverage 81.17% 81.49% +0.32%
==========================================
Files 61 61
Lines 2321 2351 +30
Branches 635 648 +13
==========================================
+ Hits 1884 1916 +32
+ Misses 392 390 -2
Partials 45 45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
We went with this one instead #1121 - its |
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.
Reworks #1890 based on the feedback there: based on
next, scoped down to only theaddcommand (nochangedcommand), and simplified to take just a bump type and a message instead of multiple--packageflags.The
addcommand now supports a--typeflag that provides the semver bump type (patch,minorormajor) from the command line instead of prompting for it. The bump type is applied to all packages that have changed since the base branch (or the ref provided with--since). Combined with--message, the changeset is created without any prompts, so scripts, CI and AI agents can add changesets non-interactively:changeset add --type patch --message 'Fix crash on startup'Notes:
--typecomposes with the existing flags like--messagedoes: on its own it only replaces the package selection and bump type prompts, and the summary is still asked for. Single package repos just use their sole package.--typemode, failing to detect the changed packages (or detecting none) is a hard error instead of the interactive flow's best-effort warning, since the result now decides what gets released.changesetin a non-git single package repo.--typeI noticed the CLI README never documented--since, so I added it there too.Tested with unit tests for all the new paths and end-to-end against a real monorepo (27+ packages), including the error paths and exit codes.
Refs #979, #1604