Skip to content

Commit 28ed100

Browse files
committed
Fill in the displayName field in Unity's package.json file
1 parent 227b964 commit 28ed100

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/UnityNuGet/RegistryCache.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace UnityNuGet
3131
public class RegistryCache
3232
{
3333
public static readonly bool IsRunningOnAzure = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME"));
34-
34+
3535
// Change this version number if the content of the packages are changed by an update of this class
3636
private const string CurrentRegistryVersion = "1.6.0";
3737

@@ -209,7 +209,7 @@ private async Task BuildInternal()
209209
// Clear the cache entirely
210210
_npmPackageRegistry.Reset();
211211
}
212-
212+
213213
var regexFilter = Filter != null ? new Regex(Filter, RegexOptions.IgnoreCase) : null;
214214
if (Filter != null)
215215
{
@@ -1073,6 +1073,7 @@ private static UnityPackage CreateUnityPackage(NpmPackageInfo npmPackageInfo, Np
10731073
var unityPackage = new UnityPackage
10741074
{
10751075
Name = npmPackageInfo.Name,
1076+
DisplayName = npmPackageVersion.DisplayName,
10761077
Version = npmPackageVersion.Version,
10771078
Description = npmPackageInfo.Description,
10781079
Unity = npmPackageVersion.Unity

src/UnityNuGet/UnityPackage.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public UnityPackage()
1717
[JsonProperty("name")]
1818
public string? Name { get; set; }
1919

20+
[JsonProperty("displayName")]
21+
public string? DisplayName { get; set; }
22+
2023
[JsonProperty("version")]
2124
public string? Version { get; set; }
2225

0 commit comments

Comments
 (0)