From 57fd19400f53b5d4559de4dcf6ede2e638250625 Mon Sep 17 00:00:00 2001 From: jeffhandley Date: Thu, 7 Mar 2013 17:35:32 -0800 Subject: [PATCH 1/7] Updated to RC2, with new definition for build metadata. --- semver.md | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/semver.md b/semver.md index b760a56..9f4ad9c 100644 --- a/semver.md +++ b/semver.md @@ -1,4 +1,4 @@ -Semantic Versioning 2.0.0-rc.1 +Semantic Versioning 2.0.0-rc.2 ============================== In the world of software management there exists a dread place called @@ -79,22 +79,28 @@ MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. -1. A build version MAY be denoted by appending a plus sign and a series of dot -separated identifiers immediately following the patch version or pre-release -version. Identifiers MUST be comprised of only ASCII alphanumerics and hyphen -[0-9A-Za-z-]. Build versions satisfy and have a higher precedence than the -associated normal version. Examples: 1.0.0+build.1, 1.3.7+build.11.e0f985a. +1. Unique build metadata MAY be denoted by appending a plus `+` and a series of +dot separated identifiers immediately following the patch or pre-release +version. While identifiers MUST be comprised of only ASCII alphanumerics and +hyphens [0-9A-Za-z\\-], their values only define uniqueness. The Semantic +Versioning specation intentionally omits precedence rule definitions for +comparing two versions where only build metadata is different. Furthermore, +this specification does not define precedence rules for comparing a version +with build metadata to a version without build metadata. Specific +implementations of Semantic Versioning MAY define their own precedence rules +for those scenarios, but due to the lack of precedence defined within the +specification, consumers SHOULD NOT rely on build metadata when taking +dependencies on packages. 1. Precedence MUST be calculated by separating the version into major, minor, patch, pre-release, and build identifiers in that order. Major, minor, and -patch versions are always compared numerically. Pre-release and build version -precedence MUST be determined by comparing each dot separated identifier as -follows: identifiers consisting of only digits are compared numerically and -identifiers with letters or hyphens are compared lexically in ASCII sort order. -Numeric identifiers always have lower precedence than non-numeric identifiers. +patch versions are always compared numerically. Pre-release precedence MUST be +determined by comparing each dot separated identifier as follows: identifiers +consisting of only digits are compared numerically and identifiers with +letters or hyphens are compared lexically in ASCII sort order. Numeric +identifiers always have lower precedence than non-numeric identifiers. Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta.2 < 1.0.0-beta.11 < -1.0.0-rc.1 < 1.0.0-rc.1+build.1 < 1.0.0 < 1.0.0+0.3.7 < 1.3.7+build < -1.3.7+build.2.b8f12d7 < 1.3.7+build.11.e0f985a. +1.0.0-rc.1 < 1.0.0. Why Use Semantic Versioning? ---------------------------- From 26e3cf8523b798d7d03354d5197c09dadae7c6e3 Mon Sep 17 00:00:00 2001 From: jeffhandley Date: Thu, 7 Mar 2013 17:37:34 -0800 Subject: [PATCH 2/7] Removed an extraneous slash --- semver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semver.md b/semver.md index 9f4ad9c..306aeb3 100644 --- a/semver.md +++ b/semver.md @@ -82,7 +82,7 @@ version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. 1. Unique build metadata MAY be denoted by appending a plus `+` and a series of dot separated identifiers immediately following the patch or pre-release version. While identifiers MUST be comprised of only ASCII alphanumerics and -hyphens [0-9A-Za-z\\-], their values only define uniqueness. The Semantic +hyphens [0-9A-Za-z\-], their values only define uniqueness. The Semantic Versioning specation intentionally omits precedence rule definitions for comparing two versions where only build metadata is different. Furthermore, this specification does not define precedence rules for comparing a version From 13aaadaadb0d572b59c84a9851540ed1caeea35f Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 13 Mar 2013 14:30:43 -0700 Subject: [PATCH 3/7] Add description of build metadata Build metadata is a completely optional way to tack on metadata to a version that does not affect the public API or precedence while still be compliant with SemVer. It's not unlike a comment. This allows folks to build on additional meaning or behavior that's meaningful to their custom systems without making any claims about the public version. For example, folks might use it for cache busting, layering custom behavior on top of SemVer, bookkeeping to tie when and where a build was made, etc. --- semver.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/semver.md b/semver.md index 306aeb3..257e329 100644 --- a/semver.md +++ b/semver.md @@ -79,18 +79,12 @@ MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. -1. Unique build metadata MAY be denoted by appending a plus `+` and a series of -dot separated identifiers immediately following the patch or pre-release -version. While identifiers MUST be comprised of only ASCII alphanumerics and -hyphens [0-9A-Za-z\-], their values only define uniqueness. The Semantic -Versioning specation intentionally omits precedence rule definitions for -comparing two versions where only build metadata is different. Furthermore, -this specification does not define precedence rules for comparing a version -with build metadata to a version without build metadata. Specific -implementations of Semantic Versioning MAY define their own precedence rules -for those scenarios, but due to the lack of precedence defined within the -specification, consumers SHOULD NOT rely on build metadata when taking -dependencies on packages. +1. Build metadata MAY be denoted by appending a plus + and a series of dot +separated identifiers immediately following the patch or pre-release version. +Identifiers MUST be comprised of only ASCII alphanumerics and hyphen +[0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version +precedence. Thus two packages with the same version, but different build +metadata are considered to be the same version. 1. Precedence MUST be calculated by separating the version into major, minor, patch, pre-release, and build identifiers in that order. Major, minor, and From 5114f8543aba8ed1244f09bb2612a3ea5738df49 Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 13 Mar 2013 14:36:15 -0700 Subject: [PATCH 4/7] Omit build metadata from precedence rules Looks like a big change, but all I did was remove Build metadata from the precedence rules. --- semver.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/semver.md b/semver.md index 257e329..5ecbeb2 100644 --- a/semver.md +++ b/semver.md @@ -87,14 +87,14 @@ precedence. Thus two packages with the same version, but different build metadata are considered to be the same version. 1. Precedence MUST be calculated by separating the version into major, minor, -patch, pre-release, and build identifiers in that order. Major, minor, and -patch versions are always compared numerically. Pre-release precedence MUST be -determined by comparing each dot separated identifier as follows: identifiers -consisting of only digits are compared numerically and identifiers with -letters or hyphens are compared lexically in ASCII sort order. Numeric -identifiers always have lower precedence than non-numeric identifiers. -Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-beta.2 < 1.0.0-beta.11 < -1.0.0-rc.1 < 1.0.0. +patch and pre-release identifiers in that order (Build metadata does not figure +into precedence). Major, minor, and patch versions are always compared +numerically. Pre-release precedence MUST be determined by comparing each dot +separated identifier as follows: identifiers consisting of only digits are +compared numerically and identifiers with letters or hyphens are compared +lexically in ASCII sort order. Numeric identifiers always have lower precedence +than non-numeric identifiers. Example: 1.0.0-alpha < 1.0.0-alpha.1 < +1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0. Why Use Semantic Versioning? ---------------------------- From 9c5829561e2580e3c63e30c57aa48a88b2015f80 Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 13 Mar 2013 14:48:25 -0700 Subject: [PATCH 5/7] Removed the plus sign and added examples The `+` seemed out of character with the rest of the spec. Following the example of the pre-release section, we just spell out "sign" and provide examples for those who don't know what a plus sign is. :) --- semver.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/semver.md b/semver.md index 5ecbeb2..771ec88 100644 --- a/semver.md +++ b/semver.md @@ -79,12 +79,13 @@ MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. -1. Build metadata MAY be denoted by appending a plus + and a series of dot +1. Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST be comprised of only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version precedence. Thus two packages with the same version, but different build -metadata are considered to be the same version. +metadata are considered to be the same version. Examples: 1.0.0-alpha+001, +1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85. 1. Precedence MUST be calculated by separating the version into major, minor, patch and pre-release identifiers in that order (Build metadata does not figure From 2629b7e09cbb0856cca8fd6e075e12139d353d76 Mon Sep 17 00:00:00 2001 From: Phil Haack Date: Wed, 13 Mar 2013 18:27:15 -0700 Subject: [PATCH 6/7] Fixed grammar mistake Changed "be comprised of only" with the correct "comprise only". Bonus, it's less verbose. --- semver.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/semver.md b/semver.md index 771ec88..11dcfc8 100644 --- a/semver.md +++ b/semver.md @@ -81,11 +81,11 @@ version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. 1. Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. -Identifiers MUST be comprised of only ASCII alphanumerics and hyphen -[0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version -precedence. Thus two packages with the same version, but different build -metadata are considered to be the same version. Examples: 1.0.0-alpha+001, -1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85. +Identifiers MUST comprise only ASCII alphanumerics and hyphen[0-9A-Za-z-]. +Build metadata SHOULD be ignored when determining version precedence. Thus two +packages with the same version, but different build metadata are considered to +be the same version. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, +1.0.0-beta+exp.sha.5114f85. 1. Precedence MUST be calculated by separating the version into major, minor, patch and pre-release identifiers in that order (Build metadata does not figure From 3823b6a1e3c810cd8b3e5a4c727e3574e6071e50 Mon Sep 17 00:00:00 2001 From: Haacked Date: Fri, 15 Mar 2013 11:48:47 -0700 Subject: [PATCH 7/7] Add space between "hypen" and regex. --- semver.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semver.md b/semver.md index 11dcfc8..2c36693 100644 --- a/semver.md +++ b/semver.md @@ -81,7 +81,7 @@ version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. 1. Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. -Identifiers MUST comprise only ASCII alphanumerics and hyphen[0-9A-Za-z-]. +Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version precedence. Thus two packages with the same version, but different build metadata are considered to be the same version. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700,