[Proposal] Change CLI prompt order from major-minor-patch to patch-minor-major
See original GitHub issueAffected Packages
@changesets/cli
Problem
When adding changesets, the CLI prompt asks the release type that starts from major
then minor
-> patch
. But most release types during development are patch
and minor
, does it make sense to tweak the order to start from patch
, then minor
-> major
?
Proposed solution
Change the default prompt order to: patch
-> minor
-> major
, or make the order customizable via config.json
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:5 (2 by maintainers)
Top Results From Across the Web
changesets
When adding changesets, the CLI prompt asks the release type that starts from major then minor -> patch . But most release types...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We already support “plugins” in a form of modules that we can call to from our CLI. In fact, the default behaviors of those parts are implemented using the same APIs. I’m specifically referring to the
changelog
andcommit
options.You can check out what configuring such an option looks like here: https://github.com/FormidableLabs/urql/blob/60388cbf8710e8a25d7030870412c7ae973adaf9/.changeset/config.json#L3 and how such a plugin module like here: https://github.com/FormidableLabs/urql/blob/60388cbf8710e8a25d7030870412c7ae973adaf9/scripts/changesets/changelog.js
So I imagine that we could introduce a new option, smth like
add-prompt
, and “convert” our current logic to such a plugin. This way you could just swap out this part of Changesets to your custom logic (such modules could be shareable, maybe different flavours could be later implemented in the Changesets repo itself). Note that we’d have to figure out the exact API of such modules, for this specific option.To go a step father, I would just prefer a prompt.
I was always a little confused by the CLI since it uses 2 selection strategies – first a sequence of questions for the release type, and then a multiple choice prompt for the component.