Skip to content

Commit

Permalink
bump NuGet.Protocol to fix a vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
Inok committed Dec 6, 2023
1 parent 4b42ffc commit f5bdaf7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Promote.NuGet.Feeds/Promote.NuGet.Feeds.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ItemGroup>
<PackageReference Include="CSharpFunctionalExtensions" Version="2.34.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="NuGet.Protocol" Version="6.3.0" />
<PackageReference Include="NuGet.Protocol" Version="6.8.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Promote.NuGet/Promote.NuGet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="NuGet.Protocol" Version="6.3.0" />
<PackageReference Include="NuGet.Protocol" Version="6.8.0" />
<PackageReference Include="Spectre.Console" Version="0.45.0" />
<PackageReference Include="Spectre.Console.Analyzer" Version="0.45.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ public override async Task<int> ExecuteAsync(CommandContext context, PromoteSing
return 0;
}

private async Task<Result<PackageIdentity>> CreatePackageIdentity(INuGetRepository repository,
PromoteSinglePackageSettings promoteSettings,
CancellationToken cancellationToken)
private async Task<Result<PackageIdentity>> CreatePackageIdentity(
INuGetRepository repository,
PromoteSinglePackageSettings promoteSettings,
CancellationToken cancellationToken)
{
if (!promoteSettings.IsLatestVersion)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using NuGet.Versioning;
using Spectre.Console;
using Spectre.Console.Cli;
Expand All @@ -17,6 +18,7 @@ internal sealed class PromoteSinglePackageSettings : PromoteSettings
[CommandOption("-v|--version")]
public string? Version { get; init; }

[MemberNotNullWhen(false, nameof(Version))]
public bool IsLatestVersion => string.IsNullOrEmpty(Version) || string.Equals(Version, EXPLICIT_LATEST_VERSION_STRING, StringComparison.OrdinalIgnoreCase);

public override ValidationResult Validate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Promote.NuGet.Tests.Promote.FromFile;
public class PackageDescriptorParserTests
{
[TestCase("PackageName 1.2.3", "PackageName", "[1.2.3]")]
public void Parse_space_separated_package_descriptor(string input, string id, string? versionRange)
public void Parse_space_separated_package_descriptor(string input, string id, string versionRange)
{
var expected = new PackageDependency(id, VersionRange.Parse(versionRange));

Expand Down

0 comments on commit f5bdaf7

Please sign in to comment.