Maximum number for [major].[minor].[patch]
Asked Answered
S

0

8

For @semantic-release, [major].[minor].[patch], what is the maximum number that it can goes to for major, minor, patch? i.e. 999.999.999?

Simonesimoneau answered 14/12, 2020 at 2:17 Comment(3)
The semver spec doesn't explicitly state the maximum semver, however JavaScript's MAX_SAFE_INTEGER constant has a value of 9007199254740991. So, using the npm tools the maximum major, minor, patch in a semver is; 9007199254740991.9007199254740991.9007199254740991. If you exceed that value, tools such as node-semver will begin to error. Also it would be absurd if you ever did exceed that value :)Crimson
@Crimson Thanks! Yes agree. It will be totally absurd is I exceed that value. In the semver spec link semver.org/#does-semver-have-a-size-limit-on-the-version-string, also did not state there is any maximum semver.Simonesimoneau
For code that confirms the answer given by @Crimson see the constructor that parses a version string. Each number in the string can't exceed MAX_SAFE_INTEGER and the whole version string can't exceed the 256-character limit defined here.Coreen

© 2022 - 2024 — McMap. All rights reserved.