deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

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

Open timreichen opened this issue 1 year ago • 0 comments

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.

  • buildmetadata just seem to replace the semver build property.
  • prerelease as a string kinda breaks the established pattern of prerelease being an (string|number)[] array and needs to be parsed inside increment(). It doesn't seem very intuitive, how that argument works in combination with ReturnType and existing version.prerelease. This is why the majority of the jsdoc description tries to explain that.

Describe the solution you'd like

  • Remove buildmetadata argument, as version.build can be set outside the increment() function.
  • Remove prerelease argument, as version.prerelease can be set outside the increment() function.

Describe alternatives you've considered

Leave as is.

timreichen avatar Mar 01 '24 00:03 timreichen