Skip to content

Commit e4e124b

Browse files
committed
Update to latest dependency versions
1 parent 3729de1 commit e4e124b

File tree

8 files changed

+24
-20
lines changed

8 files changed

+24
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
name: packages
5555
path: artifacts/
5656
if-no-files-found: error
57-
- uses: codecov/codecov-action@v1
57+
- uses: codecov/codecov-action@v2
5858
with:
5959
name: unittests-${{ matrix.os }}
6060
fail_ci_if_error: true

src/Directory.Build.targets

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project InitialTargets="UpdateCiSettings">
22

3-
<ItemGroup Condition=" '$(CI)' == 'true' ">
4-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
3+
<ItemGroup>
4+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
55
</ItemGroup>
66

77
<ItemGroup Condition="'$(DisablePublicApiAnalyzer)' != 'true'">
8-
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.2" PrivateAssets="All" />
8+
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" PrivateAssets="All" />
99
<AdditionalFiles Include="PublicAPI.Shipped.txt" />
1010
<AdditionalFiles Include="PublicAPI.Unshipped.txt" />
1111
</ItemGroup>

src/Hosting.CommandLine/HostBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private static IServiceCollection AddCommonServices(this IServiceCollection serv
139139
.AddSingleton<IHostLifetime, CommandLineLifetime>()
140140
.AddSingleton(provider =>
141141
{
142-
state.SetConsole(provider.GetService<IConsole>());
142+
state.SetConsole(provider.GetRequiredService<IConsole>());
143143
return state;
144144
})
145145
.AddSingleton<CommandLineContext>(state);

src/Hosting.CommandLine/Internal/CommandLineLifetime.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ namespace McMaster.Extensions.Hosting.CommandLine.Internal
1616
/// </summary>
1717
internal class CommandLineLifetime : IHostLifetime, IDisposable
1818
{
19-
private readonly IApplicationLifetime _applicationLifetime;
19+
private readonly IHostApplicationLifetime _applicationLifetime;
2020
private readonly ICommandLineService _cliService;
2121
private readonly IConsole _console;
2222
private readonly IUnhandledExceptionHandler? _unhandledExceptionHandler;
2323

2424
/// <summary>
2525
/// Creates a new instance.
2626
/// </summary>
27-
public CommandLineLifetime(IApplicationLifetime applicationLifetime,
27+
public CommandLineLifetime(IHostApplicationLifetime applicationLifetime,
2828
ICommandLineService cliService,
2929
IConsole console,
3030
IUnhandledExceptionHandler? unhandledExceptionHandler = null)

src/Hosting.CommandLine/Internal/CommandLineService.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace McMaster.Extensions.Hosting.CommandLine.Internal
1717
internal class CommandLineService : IDisposable, ICommandLineService
1818
{
1919
private readonly CommandLineApplication _application;
20-
private readonly ILogger _logger;
20+
private readonly ILogger<CommandLineService>? _logger;
2121
private readonly CommandLineState _state;
2222

2323
/// <summary>
@@ -27,13 +27,16 @@ internal class CommandLineService : IDisposable, ICommandLineService
2727
/// <param name="state">The command line state</param>
2828
/// <param name="serviceProvider">The DI service provider</param>
2929
/// <param name="configure">The delegate to configure the app</param>
30-
public CommandLineService(ILogger<CommandLineService> logger, CommandLineState state,
31-
IServiceProvider serviceProvider, Action<CommandLineApplication> configure)
30+
public CommandLineService(
31+
CommandLineState state,
32+
IServiceProvider serviceProvider,
33+
Action<CommandLineApplication> configure,
34+
ILogger<CommandLineService>? logger = null)
3235
{
3336
_logger = logger;
3437
_state = state;
3538

36-
logger.LogDebug("Constructing CommandLineApplication with args [{args}]", string.Join(",", state.Arguments));
39+
logger?.LogDebug("Constructing CommandLineApplication with args [{args}]", string.Join(",", state.Arguments));
3740
_application = new CommandLineApplication(state.Console, state.WorkingDirectory);
3841

3942
_application.Conventions
@@ -51,7 +54,7 @@ public CommandLineService(ILogger<CommandLineService> logger, CommandLineState s
5154
/// <inheritdoc />
5255
public async Task<int> RunAsync(CancellationToken cancellationToken)
5356
{
54-
_logger.LogDebug("Running");
57+
_logger?.LogDebug("Running");
5558
_state.ExitCode = await _application.ExecuteAsync(_state.Arguments, cancellationToken);
5659
return _state.ExitCode;
5760
}

src/Hosting.CommandLine/McMaster.Extensions.Hosting.CommandLine.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.0" />
12+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" />
13+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
1314
</ItemGroup>
1415

1516
<ItemGroup>

test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
</ItemGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="coverlet.collector" Version="3.0.3" />
19+
<PackageReference Include="coverlet.collector" Version="3.1.0" />
2020
<PackageReference Include="McMaster.Extensions.Xunit" Version="0.1.0" />
21-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
22-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
23-
<PackageReference Include="FluentAssertions" Version="5.10.3" />
21+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
22+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
23+
<PackageReference Include="FluentAssertions" Version="6.2.0" />
2424
<PackageReference Include="Moq" Version="4.16.1" />
2525
<PackageReference Include="xunit" Version="2.4.1" />
2626
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

test/Hosting.CommandLine.Tests/McMaster.Extensions.Hosting.CommandLine.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="coverlet.collector" Version="3.0.3" />
18-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
17+
<PackageReference Include="coverlet.collector" Version="3.1.0" />
18+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
2020
<PackageReference Include="Moq" Version="4.16.1" />
2121
<PackageReference Include="xunit" Version="2.4.1" />
2222
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

0 commit comments

Comments
 (0)