A package has the version number 2.3.1-beta.2. According to SemVer, which of the following statements is TRUE?

Node.js interview question for Advanced practice.

Answer

This version is a pre-release and is considered less stable and has lower precedence than 2.3.1.

Explanation

According to SemVer, pre-release identifiers (indicated by a hyphen) are appended to the main version number and signify that the version is not yet considered stable. A pre-release version always has lower precedence than its corresponding stable release. Therefore, 2.3.1-beta.2 is less stable and has a lower precedence than the final 2.3.1 release.

Related Questions