Skip to content

Commit 5e1adb5

Browse files
authored
Drop BuildMetadata from NPM package version
NPM doesn't support it anyway. It just silently drops it.
1 parent 5a1f25c commit 5e1adb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NerdBank.GitVersioning/VersionOracle.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ public IDictionary<string, string> CloudBuildVersionVars
365365
/// <summary>
366366
/// Gets the version to use for NPM packages.
367367
/// </summary>
368-
public string NpmPackageVersion => this.SemVer2;
368+
public string NpmPackageVersion => $"{this.Version.ToStringSafe(3)}{this.PrereleaseVersion}";
369369

370370
/// <summary>
371371
/// Gets a SemVer 1.0 compliant string that represents this version, including the -COMMITID suffix

0 commit comments

Comments
 (0)