question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Proposal] Change CLI prompt order from major-minor-patch to patch-minor-major

See original GitHub issue

Affected 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:open
  • Created a year ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Andaristcommented, Aug 7, 2022

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 and commit 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.

2reactions
sileskycommented, Aug 4, 2022

To go a step father, I would just prefer a prompt.

# Order could be customizable
Please choose a release type:
(x) Patch
( ) Minor
( ) Major

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found