Conversation
✅ Deploy Preview for changesets ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: cd2f845 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 @@
## main #2308 +/- ##
==========================================
+ Coverage 87.48% 87.60% +0.12%
==========================================
Files 78 78
Lines 2973 3002 +29
Branches 853 859 +6
==========================================
+ Hits 2601 2630 +29
Misses 337 337
Partials 35 35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #2307.
changeset add --patch -m 'Fix the export types'failed at parse time, because--patch <pkg>made the value mandatory.addalready computes the changed packages on every run and passes them intocreateChangeset, where the CLI branch ignored them. This uses them.The options are now
[pkg], andnormalizeOptionskeeps thetruethat cac produces for a valueless option rather than stringifying it to"true", the same shape--snapshot [name]already carries intoversion.resolveBumpFlagsswaps that marker for the detected list before the existing validators run, so they and the release loop are unchanged.Decisions
--patch. The repo treats them as a triple everywhere, and making one of them optional-valued would be the special case. The CLI path never reachesconfirmMajorRelease, so a valueless--majoris not a new hazard.--major pkg-a --patchmajorspkg-aand patches the rest. Substituting the detected list raw would instead make that command fail its own duplicate check, which is a worse answer than the obvious one. Two valueless options still collide, and the existing duplicate error names them.catchwarns and continues today because the detection only orders a prompt. With no value there is nothing to fall back to.--emptyis how you ask for that.Note on detection
getChangedFilesSincediffs the working tree against the base, so an uncommitted edit to a tracked file counts, but a new file only counts once it isgit added. That is pre-existing and matches what the prompt shows; I have documented it rather than changed it.Tests
Parse cases in
cli.test.ts, andadd.test.tscovers the valueless option, combining it with a named list, the cross-option exclusion, single-package repos, two valueless options, nothing detected, and detection failing.For context, #2152 asked for a non-interactive bump type and the options landed with the list mandatory, which is what this finishes.