Skip to content

Commit

Permalink
Drop BuildMetadata from NPM package version
Browse files Browse the repository at this point in the history
NPM doesn't support it anyway. It just silently drops it.
  • Loading branch information
AArnott committed Oct 18, 2022
1 parent 5a1f25c commit 5e1adb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NerdBank.GitVersioning/VersionOracle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public IEnumerable<string> BuildMetadataWithCommitId
/// <summary>
/// Gets the version to use for NPM packages.
/// </summary>
public string NpmPackageVersion => this.SemVer2;
public string NpmPackageVersion => $"{this.Version.ToStringSafe(3)}{this.PrereleaseVersion}";

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

0 comments on commit 5e1adb5

Please sign in to comment.