You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the bug fix in 7.1.0 in #1985 is arguably a breaking change. Per semver:
PATCH version when you make backwards compatible bug fixes
For example, we had code that looked roughly like:
.implies('dry-run','--fix false')
Our intent was to imply --fix false when dry-run is provided. Elsewhere, we had a default: false on the dry-run arg.
With yargs@17.0.0, this skipped validation in the default case. With yargs@17.1.0, our script no longer works in the default case, because --dry-run defaults to false and yargs spits out:
(I think arguably this makes sense – what our code was trying to express is that we want to imply --fix false when dry-run is true.)
I realize 17.1.0 was released ~4 months ago at this point, so it's too late to reconsider the choice of versioning. I would maybe just recommend updating the CHANGELOG to call out this change as "potentially breaking" in bold or something?
The text was updated successfully, but these errors were encountered:
@serhalp thanks for bringing this up. Since the behaviro that was modified wasn't captured in tests, I'd prefer not to bump from v17 to v18, or rollback the work, since it has been in the wild for 4 months.
However, would be happy to add this information to the CHANGELOG 👍
Hi there.
I think the bug fix in 7.1.0 in #1985 is arguably a breaking change. Per semver:
For example, we had code that looked roughly like:
Our intent was to imply
--fix false
whendry-run
is provided. Elsewhere, we had adefault: false
on thedry-run
arg.With yargs@17.0.0, this skipped validation in the default case. With yargs@17.1.0, our script no longer works in the default case, because
--dry-run
defaults tofalse
and yargs spits out:(I think arguably this makes sense – what our code was trying to express is that we want to imply
--fix false
whendry-run
is true.)I realize 17.1.0 was released ~4 months ago at this point, so it's too late to reconsider the choice of versioning. I would maybe just recommend updating the CHANGELOG to call out this change as "potentially breaking" in bold or something?
The text was updated successfully, but these errors were encountered: