{"id":39530,"date":"2023-09-10T12:30:54","date_gmt":"2023-09-10T12:30:54","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=39530"},"modified":"2023-09-10T12:30:55","modified_gmt":"2023-09-10T12:30:55","slug":"know-about-semantic-versioningsemver","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/know-about-semantic-versioningsemver\/","title":{"rendered":"Know about Semantic versioning(SemVer)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"578\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223-1024x578.png\" alt=\"\" class=\"wp-image-39531\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223-1024x578.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223-300x169.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223-768x434.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223-355x199.png 355w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-223.png 1408w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Semantic versioning (SemVer) is a versioning scheme that assigns a 3-part version number (major.minor.patch) to each release of a software project. The meaning of each part of the version number is as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Major version<\/strong>&nbsp;(X): A change in the major version number indicates a significant change to the software that may not be backward compatible. For example, a major version change might involve a change in the API, a new feature that is not backward compatible, or a significant performance improvement.<\/li>\n\n\n\n<li><strong>Minor version<\/strong>&nbsp;(Y): A change in the minor version number indicates a new feature or improvement that is backward compatible with previous versions. For example, a minor version change might involve a new bug fix, a performance improvement, or a new feature that does not change the API.<\/li>\n\n\n\n<li><strong>Patch version<\/strong>&nbsp;(Z): A change in the patch version number indicates a bug fix that is backward compatible with previous versions. For example, a patch version change might involve a fix for a security vulnerability, a crash bug, or a typo.<\/li>\n<\/ul>\n\n\n\n<p>In addition to the three parts of the version number, SemVer also allows for the use of pre-release versions and build metadata. Pre-release versions are indicated by a hyphen followed by a word or phrase that describes the pre-release state, such as &#8220;alpha&#8221; or &#8220;beta&#8221;. Build metadata is indicated by a plus sign followed by a string of characters that are used to identify the build, such as the commit hash or the build number.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"892\" height=\"474\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-224.png\" alt=\"\" class=\"wp-image-39532\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-224.png 892w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-224-300x159.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-224-768x408.png 768w\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" \/><\/figure>\n\n\n\n<p>SemVer is a widely-adopted versioning scheme that is used by many popular software projects, including Node.js, React, and Vue.js. It is a good choice for software projects that need to communicate the meaning of version numbers to users and developers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"859\" height=\"469\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-225.png\" alt=\"\" class=\"wp-image-39533\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-225.png 859w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-225-300x164.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-225-768x419.png 768w\" sizes=\"auto, (max-width: 859px) 100vw, 859px\" \/><\/figure>\n\n\n\n<p>Here are some examples of semantic version numbers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1.0.0: This is the first release of the software. It has no breaking changes and only contains bug fixes.<\/li>\n\n\n\n<li>1.1.0: This release adds a new feature that is backward compatible with the previous version.<\/li>\n\n\n\n<li>2.0.0: This release introduces a breaking change to the API. It is not backward compatible with previous versions.<\/li>\n\n\n\n<li>1.2.3-alpha: This is a pre-release version of the software. It is not yet ready for production use.<\/li>\n\n\n\n<li>1.2.3+build.1: This is a build of the software with a specific commit hash.<\/li>\n<\/ul>\n\n\n\n<p>Semantic Versioning (SemVer), often abbreviated as SemVer or Semantic Versioning 2.0, is a versioning scheme and a set of rules for software version numbers that convey meaning about the underlying changes in a software project. It was created to help developers and users understand the impact of updates and upgrades to a piece of software more easily. SemVer follows a format of major.minor.patch (e.g., 1.2.3) and includes additional rules and conventions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Major Version<\/strong> (X.0.0):\n<ul class=\"wp-block-list\">\n<li>Increment the major version when there are incompatible changes that require users to make significant modifications to their code or data structures.<\/li>\n\n\n\n<li>Examples of incompatible changes include breaking API changes, removing features, or altering data formats.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Minor Version<\/strong> (X.Y.0):\n<ul class=\"wp-block-list\">\n<li>Increment the minor version when new features or enhancements are added in a backward-compatible manner. This means that users can adopt the new version without making significant changes to their existing code.<\/li>\n\n\n\n<li>Backward compatibility should be maintained for existing functionality.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Patch Version<\/strong> (X.Y.Z):\n<ul class=\"wp-block-list\">\n<li>Increment the patch version for backward-compatible bug fixes or minor improvements that do not introduce new features or breaking changes.<\/li>\n\n\n\n<li>These updates should not require users to modify their code or data.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Pre-release Versions<\/strong>:\n<ul class=\"wp-block-list\">\n<li>A pre-release version can be indicated with a hyphen and a series of dot-separated identifiers (e.g., 1.0.0-alpha.1).<\/li>\n\n\n\n<li>Pre-release versions are used for work in progress or testing and should not be considered stable.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Build Metadata<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Build metadata can be added with a plus sign and a series of dot-separated identifiers (e.g., 1.0.0+20130313144700).<\/li>\n\n\n\n<li>Build metadata provides additional information about the build process but does not affect version precedence or compatibility.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"379\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226-1024x379.png\" alt=\"\" class=\"wp-image-39534\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226-1024x379.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226-300x111.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226-768x284.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226-1536x569.png 1536w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2023\/09\/image-226.png 1558w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The key idea behind SemVer is that users can quickly understand the nature and impact of a version change by simply looking at the version number. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Going from 1.0.0 to 2.0.0 suggests significant, potentially breaking changes.<\/li>\n\n\n\n<li>Going from 1.0.0 to 1.1.0 indicates the addition of new features without breaking changes.<\/li>\n\n\n\n<li>Going from 1.0.0 to 1.0.1 suggests minor bug fixes without new features or breaking changes.<\/li>\n<\/ul>\n\n\n\n<p>SemVer has become a widely adopted standard in the software development industry, helping developers and users manage software dependencies, make informed upgrade decisions, and ensure compatibility between different components and libraries in a software ecosystem. It promotes clarity and predictability in versioning, making it easier to maintain and evolve software projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Semantic versioning (SemVer) is a versioning scheme that assigns a 3-part version number (major.minor.patch) to each release of a software project. The meaning of each part of the version number is as follows: In addition to the three parts of the version number, SemVer also allows for the use of pre-release versions and build metadata&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-39530","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/39530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=39530"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/39530\/revisions"}],"predecessor-version":[{"id":39535,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/39530\/revisions\/39535"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=39530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=39530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=39530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}