denoland / std

The Deno Standard Library
https://jsr.io/@std
MIT License
2.98k stars 595 forks source link

suggestion(semver): remove redundant `increment()` arguments #4420

Closed timreichen closed 1 month ago

timreichen commented 6 months ago

Is your feature request related to a problem? Please describe.

increment() has four arguments (two required, two optional). That is more than the style guide suggests.

Describe the solution you'd like

Describe alternatives you've considered

Leave as is.

iuioiua commented 2 months ago

IMO, increment() should just have two arguments: version and release. Maybe an options argument at most. @kt3k?

kt3k commented 2 months ago

I'm not in favor.

Without prerelease option, the release type of premajor, preminor, prepatch doesn't make sense. (You can't increment from 0.1.0 to 1.0.0-rc.1, for example, without prerelease option).

iuioiua commented 2 months ago

Oh, I see—my misunderstanding. I think we should at least put these two arguments into an optional last argument to adhere to our style guide.