Skip to content

Commit 54e053b

Browse files
authored
Release V4 (#22)
* Enable RestorePackagesWithLockFile * Update Nuget Packages * Change command name to `checkdeps`
1 parent 4ec29fe commit 54e053b

12 files changed

Lines changed: 2677 additions & 31 deletions

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Added cancellation token support for commands
13-
- Added a built-in `verify-dependencies` command that validates the application's Dependency Injection setup by ensuring all required services are fully and correctly registered in the composition root.
13+
- Added a built-in `check-deps` command that validates the application's Dependency Injection setup by ensuring all required services are fully and correctly registered in the composition root.
1414

1515
### Changed
1616

17+
- Updated Scrutor to v6.0.1
1718
- Updated NLog.Extensions.Logging to v5.3.15
19+
- Updated Microsoft.Extensions.Configuration.Json to v8.0.1
20+
- Updated Microsoft.Extensions.Configuration.UserSecrets to v8.0.1
21+
- Updated Microsoft.Extensions.DependencyInjection to v8.0.1
22+
- Updated Microsoft.Extensions.Hosting to v8.0.1
23+
- Updated Microsoft.Extensions.Logging to v8.0.1
24+
- Updated Microsoft.Extensions.Logging.Configuration to v8.0.1
1825

1926
## [3.0.4] - 2024-11-28
2027

Neolution.DotNet.Console.SampleAsync/Neolution.DotNet.Console.SampleAsync.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
89
</PropertyGroup>
910

1011
<ItemGroup>
1112
<PackageReference Include="CommandLineParser" Version="2.9.1" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
13-
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
13+
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
1414
<PackageReference Include="Neolution.CodeAnalysis" Version="3.2.1">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Neolution.DotNet.Console.SampleAsync/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"DOTNET_ENVIRONMENT": "Development"
77
}
88
},
9-
"Sample Console App: verify-dependencies": {
9+
"Sample Console App: check-deps": {
1010
"commandName": "Project",
11-
"commandLineArgs": "verify-dependencies",
11+
"commandLineArgs": "check-deps",
1212
"environmentVariables": {
1313
"DOTNET_ENVIRONMENT": "Development"
1414
}

Neolution.DotNet.Console.SampleAsync/packages.lock.json

Lines changed: 377 additions & 0 deletions
Large diffs are not rendered by default.

Neolution.DotNet.Console.UnitTests/DotNetConsoleBuilderTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
public class DotNetConsoleBuilderTests
1616
{
1717
/// <summary>
18-
/// The argument string for the internal verify-dependencies command
18+
/// The argument string for the internal check-deps command
1919
/// </summary>
20-
private static readonly string[] VerifyDependenciesArgs = { "verify-dependencies" };
20+
private const string CheckDependenciesArgumentString = "check-deps";
2121

2222
/// <summary>
2323
/// Given a mistyped verb, when a default verb is defined, then should throw on console building.
@@ -97,13 +97,13 @@ public void GivenInvalidArguments_WhenNoDefaultVerbIsDefined_ThenShouldNotThrowO
9797
}
9898

9999
/// <summary>
100-
/// Given the verify-dependencies builder, when registration is missing, then should throw on console building.
100+
/// Given the check-deps builder, when registration is missing, then should throw on console building.
101101
/// </summary>
102102
[Fact]
103-
public void GivenVerifyDependenciesCommand_WhenRegistrationIsMissing_ThenShouldThrow()
103+
public void GivenCheckDependenciesCommand_WhenRegistrationIsMissing_ThenShouldThrow()
104104
{
105105
// Arrange
106-
var builder = DotNetConsole.CreateBuilderWithReference(Assembly.GetAssembly(typeof(DefaultCommand))!, VerifyDependenciesArgs);
106+
var builder = DotNetConsole.CreateBuilderWithReference(Assembly.GetAssembly(typeof(DefaultCommand))!, [CheckDependenciesArgumentString]);
107107

108108
// Intentionally only registering the transient service and not the scoped and singleton services.
109109
builder.Services.AddTransient<ITransientServiceStub, TransientServiceStub>();

Neolution.DotNet.Console.UnitTests/DotNetConsoleRunTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void GivenServicesWithVariousServiceLifetimes_WhenRunningConsoleApp_ThenS
5454
[InlineData("--version")]
5555
[InlineData("help echo")]
5656
[InlineData("echo --help")]
57-
[InlineData("verify-dependencies")]
57+
[InlineData("check-deps")]
5858
public void GivenValidArguments_WhenNoDefaultVerbIsDefined_ThenShouldNotThrow([NotNull] string args)
5959
{
6060
ArgumentNullException.ThrowIfNull(args);

Neolution.DotNet.Console.UnitTests/Neolution.DotNet.Console.UnitTests.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
<PropertyGroup>
44
<TargetFramework>net8.0</TargetFramework>
5-
65
<IsPackable>false</IsPackable>
7-
86
<AssemblyName>Neolution.DotNet.Console.UnitTests</AssemblyName>
9-
107
<RootNamespace>Neolution.DotNet.Console.UnitTests</RootNamespace>
11-
128
<LangVersion>default</LangVersion>
9+
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
1310
</PropertyGroup>
1411

1512
<ItemGroup>
16-
<PackageReference Include="coverlet.msbuild" Version="6.0.3">
13+
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
1714
<PrivateAssets>all</PrivateAssets>
1815
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1916
</PackageReference>
@@ -23,13 +20,13 @@
2320
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2421
</PackageReference>
2522
<PackageReference Include="Objectivity.AutoFixture.XUnit2.AutoNSubstitute" Version="3.6.2" />
26-
<PackageReference Include="Shouldly" Version="4.2.1" />
23+
<PackageReference Include="Shouldly" Version="4.3.0" />
2724
<PackageReference Include="xunit" Version="2.9.3" />
2825
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
2926
<PrivateAssets>all</PrivateAssets>
3027
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3128
</PackageReference>
32-
<PackageReference Include="coverlet.collector" Version="6.0.3">
29+
<PackageReference Include="coverlet.collector" Version="6.0.4">
3330
<PrivateAssets>all</PrivateAssets>
3431
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3532
</PackageReference>

0 commit comments

Comments
 (0)