From 5e47aa2d55782d7564229a5462a53be9866ff869 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sun, 14 Jun 2026 08:01:17 -0700 Subject: [PATCH 1/2] Switch SymVer to SemVer --- PSDepend/Private/SemanticVersion.ps1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PSDepend/Private/SemanticVersion.ps1 b/PSDepend/Private/SemanticVersion.ps1 index 71fe12b..17e0244 100644 --- a/PSDepend/Private/SemanticVersion.ps1 +++ b/PSDepend/Private/SemanticVersion.ps1 @@ -85,7 +85,7 @@ namespace System.Management.Automation public SemanticVersion(int major, int minor, int patch, string label) : this(major, minor, patch) { - // We presume the SymVer : + // We presume the SemVer : // 1) major.minor.patch-label // 2) 'label' starts with letter or digit. if (!string.IsNullOrEmpty(label)) @@ -238,7 +238,7 @@ namespace System.Management.Automation /// - /// PreReleaseLabel position in the SymVer string 'major.minor.patch-PreReleaseLabel+BuildLabel'. + /// PreReleaseLabel position in the SemVer string 'major.minor.patch-PreReleaseLabel+BuildLabel'. /// private string preReleaseLabel; @@ -249,7 +249,7 @@ namespace System.Management.Automation /// - /// BuildLabel position in the SymVer string 'major.minor.patch-PreReleaseLabel+BuildLabel'. + /// BuildLabel position in the SemVer string 'major.minor.patch-PreReleaseLabel+BuildLabel'. /// private string buildLabel; @@ -318,7 +318,7 @@ namespace System.Management.Automation string preLabel = null; string buildLabel = null; - // We parse the SymVer 'version' string 'major.minor.patch-PreReleaseLabel+BuildLabel'. + // We parse the SemVer 'version' string 'major.minor.patch-PreReleaseLabel+BuildLabel'. var dashIndex = version.IndexOf('-'); var plusIndex = version.IndexOf('+'); @@ -474,7 +474,7 @@ namespace System.Management.Automation /// /// Implement . - /// Meets SymVer 2.0 p.11 https://semver.org/ + /// Meets SemVer 2.0 p.11 https://semver.org/ /// public int CompareTo(SemanticVersion value) { @@ -490,7 +490,7 @@ namespace System.Management.Automation if (Patch != value.Patch) return Patch > value.Patch ? 1 : -1; - // SymVer 2.0 standard requires to ignore 'BuildLabel' (Build metadata). + // SemVer 2.0 standard requires to ignore 'BuildLabel' (Build metadata). return ComparePreLabel(this.PreReleaseLabel, value.PreReleaseLabel); } @@ -507,7 +507,7 @@ namespace System.Management.Automation /// public bool Equals(SemanticVersion other) { - // SymVer 2.0 standard requires to ignore 'BuildLabel' (Build metadata). + // SemVer 2.0 standard requires to ignore 'BuildLabel' (Build metadata). return other != null && (Major == other.Major) && (Minor == other.Minor) && (Patch == other.Patch) && string.Equals(PreReleaseLabel, other.PreReleaseLabel, StringComparison.Ordinal); @@ -576,7 +576,7 @@ namespace System.Management.Automation private static int ComparePreLabel(string preLabel1, string preLabel2) { - // Symver 2.0 standard p.9 + // SemVer 2.0 standard p.9 // Pre-release versions have a lower precedence than the associated normal version. // Comparing each dot separated identifier from left to right // until a difference is found as follows: From 0749c55c9fa0b1ff5ed26ba9bfea9e7d8b0fbdb0 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sun, 14 Jun 2026 08:04:14 -0700 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Gilbert Sanchez --- PSDepend/Private/SemanticVersion.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSDepend/Private/SemanticVersion.ps1 b/PSDepend/Private/SemanticVersion.ps1 index 17e0244..f91a50d 100644 --- a/PSDepend/Private/SemanticVersion.ps1 +++ b/PSDepend/Private/SemanticVersion.ps1 @@ -85,7 +85,7 @@ namespace System.Management.Automation public SemanticVersion(int major, int minor, int patch, string label) : this(major, minor, patch) { - // We presume the SemVer : + // We presume the SemVer: // 1) major.minor.patch-label // 2) 'label' starts with letter or digit. if (!string.IsNullOrEmpty(label))