deno_std
deno_std copied to clipboard
suggestion(semver): remove redundant `increment()` arguments
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.
buildmetadatajust seem to replace the semver build property.prereleaseas a string kinda breaks the established pattern of prerelease being an(string|number)[]array and needs to be parsed insideincrement(). It doesn't seem very intuitive, how that argument works in combination withReturnTypeand existingversion.prerelease. This is why the majority of the jsdoc description tries to explain that.
Describe the solution you'd like
- Remove
buildmetadataargument, asversion.buildcan be set outside theincrement()function. - Remove
prereleaseargument, asversion.prereleasecan be set outside theincrement()function.
Describe alternatives you've considered
Leave as is.