-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add identifier validation to inc()
#754
Conversation
The We'll have to return null in cases where we're throwing in this PR. I do think refusing to generate invalid results is a good bugfix. |
The https://github.com/npm/node-semver/blob/main/functions/inc.js#L16 The classes usually throw if something is off. Should this be different here? |
Ah yep you're right. |
🤖 I have created a release *beep* *boop* --- ## [7.7.0](v7.6.3...v7.7.0) (2025-01-29) ### Features * [`0864b3c`](0864b3c) [#753](#753) add "release" inc type (#753) (@mbtools) ### Bug Fixes * [`d588e37`](d588e37) [#755](#755) diff: fix prerelease to stable version diff logic (#755) (@eminberkayd, berkay.daglar) * [`8a34bde`](8a34bde) [#754](#754) add identifier validation to `inc()` (#754) (@mbtools) ### Documentation * [`67e5478`](67e5478) [#756](#756) readme: added missing period for consistency (#756) (@shaymolcho) * [`868d4bb`](868d4bb) [#749](#749) clarify comment about obsolete prefixes (#749) (@mbtools, @ljharb) ### Chores * [`145c554`](145c554) [#741](#741) bump @npmcli/eslint-config from 4.0.5 to 5.0.0 (@dependabot[bot]) * [`753e02b`](753e02b) [#747](#747) bump @npmcli/template-oss from 4.23.3 to 4.23.4 (#747) (@dependabot[bot], @npm-cli-bot) * [`0b812d5`](0b812d5) [#744](#744) postinstall for dependabot template-oss PR (@hashtagchris) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
identifier
parameter forinc()
when trying to increase pre-releases. This prevents the creation of an invalid semver.inc()
when it is throwing (it was changing the version)Closes #349