fix: update dependencies

This commit is contained in:
Dylan R. E. Moonfire 2022-01-02 02:14:51 -06:00
parent 9344af62cd
commit 52797f136a
8 changed files with 40 additions and 37 deletions

View file

@ -7,11 +7,11 @@ namespace MfGames.ToolBuilder.Extensions
{ {
public static class ParseResultExtensions public static class ParseResultExtensions
{ {
public static List<string> ValueListForOption( public static List<string> GetValueListForOption(
this ParseResult result, this ParseResult result,
Option<string> option) Option<string> option)
{ {
string? optionValues = result.ValueForOption(option); string? optionValues = result.GetValueForOption(option);
if (optionValues == null) if (optionValues == null)
{ {

View file

@ -35,7 +35,7 @@ namespace MfGames.ToolBuilder
return defaultValue; return defaultValue;
} }
TType value = results.ValueForOption(option)!; TType value = results.GetValueForOption(option)!;
return value; return value;
} }

View file

@ -19,10 +19,10 @@ namespace MfGames.ToolBuilder.Globals
{ {
this.ConfigOption = new Option<string[]>( this.ConfigOption = new Option<string[]>(
"--config", "--config",
"Configuration file to use for settings, otherwise a default will be used.", "Configuration file to use for settings, otherwise a default will be used.")
ArgumentArity.OneOrMore)
{ {
AllowMultipleArgumentsPerToken = false, AllowMultipleArgumentsPerToken = false,
Arity = ArgumentArity.OneOrMore,
}; };
this.ConfigOption.AddAlias("-c"); this.ConfigOption.AddAlias("-c");
@ -129,7 +129,7 @@ namespace MfGames.ToolBuilder.Globals
} }
var json = file.ReadAllText(); var json = file.ReadAllText();
TType result = JsonConvert.DeserializeObject<TType>(json); TType result = JsonConvert.DeserializeObject<TType>(json)!;
return result; return result;
} }

View file

@ -7,37 +7,37 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="6.2.0" /> <PackageReference Include="Autofac" Version="6.3.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" /> <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.2.0" />
<PackageReference Include="ConsoleTableExt" Version="3.1.9" /> <PackageReference Include="ConsoleTableExt" Version="3.1.9" />
<PackageReference Include="CsvHelper" Version="27.1.1" /> <PackageReference Include="CsvHelper" Version="27.2.1" />
<PackageReference Include="FluentResults" Version="2.5.0" /> <PackageReference Include="FluentResults" Version="3.1.0" />
<PackageReference Include="Glob" Version="1.1.8" /> <PackageReference Include="Glob" Version="1.1.9" />
<PackageReference Include="Humanizer.Core" Version="2.11.10" /> <PackageReference Include="Humanizer.Core" Version="2.13.14" />
<PackageReference Include="MfGames.IO" Version="1.0.5" /> <PackageReference Include="MfGames.IO" Version="1.2.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Roslynator.Analyzers" Version="3.2.2"> <PackageReference Include="Roslynator.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="1.1.1"> <PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="1.2.2"> <PackageReference Include="Roslynator.Formatting.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Serilog" Version="2.10.0" /> <PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Enrichers.Demystifier" Version="1.0.1" /> <PackageReference Include="Serilog.Enrichers.Demystifier" Version="1.0.2" />
<PackageReference Include="Serilog.Exceptions" Version="7.0.0" /> <PackageReference Include="Serilog.Exceptions" Version="8.0.0" />
<PackageReference Include="Serilog.Extensions.Autofac.DependencyInjection" Version="4.0.0" /> <PackageReference Include="Serilog.Extensions.Autofac.DependencyInjection" Version="4.0.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="4.1.2" /> <PackageReference Include="Serilog.Extensions.Hosting" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" /> <PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21216.1" /> <PackageReference Include="System.CommandLine" Version="2.0.0-beta2.21617.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -138,7 +138,7 @@ namespace MfGames.ToolBuilder.Tables
this.DefaultColumns?.ToList() ?? new List<string>(); this.DefaultColumns?.ToList() ?? new List<string>();
var optionColumns = context.ParseResult var optionColumns = context.ParseResult
.ValueListForOption(this.tableColumnOption) .GetValueListForOption(this.tableColumnOption)
.ToList(); .ToList();
List<string> tableColumns = optionColumns.Count == 0 List<string> tableColumns = optionColumns.Count == 0
@ -307,7 +307,7 @@ namespace MfGames.ToolBuilder.Tables
private TableFormatType GetTableFormat(InvocationContext context) private TableFormatType GetTableFormat(InvocationContext context)
{ {
string? tableFormat = string? tableFormat =
context.ParseResult.ValueForOption(this.tableFormatOption) context.ParseResult.GetValueForOption(this.tableFormatOption)
?? nameof(TableFormatType.Minimal); ?? nameof(TableFormatType.Minimal);
if (!tableFormat.TryParseEnumFuzzy(out TableFormatType value)) if (!tableFormat.TryParseEnumFuzzy(out TableFormatType value))
@ -433,7 +433,7 @@ namespace MfGames.ToolBuilder.Tables
// We default to aligning numerical columns to the right. // We default to aligning numerical columns to the right.
bool noAlign = bool noAlign =
context.ParseResult.ValueForOption(this.noAlignTableOption); context.ParseResult.GetValueForOption(this.noAlignTableOption);
if (!noAlign) if (!noAlign)
{ {

View file

@ -7,28 +7,31 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="CliWrap" Version="3.3.3" /> <PackageReference Include="CliWrap" Version="3.3.3" />
<PackageReference Include="coverlet.collector" Version="3.0.1"> <PackageReference Include="coverlet.collector" Version="3.1.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="JunitXml.TestLogger" Version="2.1.81" /> <PackageReference Include="JunitXml.TestLogger" Version="3.0.110" />
<PackageReference Include="MfGames.IO" Version="1.2.3" /> <PackageReference Include="MfGames.IO" Version="1.2.3" />
<PackageReference Include="MfGames.TestSetup" Version="1.0.4" /> <PackageReference Include="MfGames.TestSetup" Version="1.0.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Roslynator.Analyzers" Version="3.2.2"> <PackageReference Include="Roslynator.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="1.1.1"> <PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="1.2.2"> <PackageReference Include="Roslynator.Formatting.Analyzers" Version="3.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" /> <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup> </ItemGroup>

View file

@ -24,7 +24,7 @@ namespace SampleTool
/// <inheritdoc /> /// <inheritdoc />
public Task<int> InvokeAsync(InvocationContext context) public Task<int> InvokeAsync(InvocationContext context)
{ {
bool messy = context.ParseResult.ValueForOption(this.messyOption); bool messy = context.ParseResult.GetValueForOption(this.messyOption);
if (messy) if (messy)
{ {

View file

@ -6,7 +6,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21216.1" /> <PackageReference Include="System.CommandLine" Version="2.0.0-beta2.21617.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>