Dont fail changeset status command if there are no changed packages - #504
Conversation
|
Hooray! All contributors have signed the CLA. |
馃 Changeset detectedLatest commit: 23afb73 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 |
Andarist
left a comment
There was a problem hiding this comment.
IMO this should be a minor bump, since the new version will produce less errors than before, not more (meaning, no CI checks should fail that were not already failing before)
This sounds reasonable to me. Any objections about this one @mitchellhamilton @Noviny ?
|
Sounds reasonable to me too but I wouldn't mind getting @Noviny's thoughts on it because I've never used changeset status to enforce having changesets. |
4658caf to
eb4f31a
Compare
|
|
||
| const sinceBranch = | ||
| since === undefined ? (sinceMaster ? "master" : undefined) : since; | ||
| const releasePlan = await getReleasePlan(cwd, sinceBranch, config); |
There was a problem hiding this comment.
I'm wondering - do you happen to know why this doesn't account for config.baseBranch? 馃 I see that it's utilized by @changesets/read but not sure why. Maybe just something you have figured out while working on this PR
There was a problem hiding this comment.
Good question! I took a look at the original PR that added it and couldn't figure out the intent here, so I decided to follow the same logic. Maybe @mitchellhamilton remembers?
Andarist
left a comment
There was a problem hiding this comment.
Could you add a changeset for this? If not - I can do it myself later and merge it then.
|
|
||
| const sinceBranch = | ||
| since === undefined ? (sinceMaster ? "master" : undefined) : since; | ||
| const releasePlan = await getReleasePlan(cwd, sinceBranch, config); |
There was a problem hiding this comment.
Good question! I took a look at the original PR that added it and couldn't figure out the intent here, so I decided to follow the same logic. Maybe @mitchellhamilton remembers?
Fixes #496.
Add a check to the status command, so
process.exit(1)is only called if there are no changesets and a package has been changed. This prevents a few false-positives that can hurt DX. See #496 for more details.@Andarist I wasn't sure if you wanted this to be a major bump or not.. IMO this should be a minor bump, since the new version will produce less errors than before, not more (meaning, no CI checks should fail that were not already failing before). Let me know if you agree or not, and I'll add the changeset accordingly.