Skip to content

Commit

Permalink
Upgrade dependencies. Update solution to .NET 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
patriksvensson committed Aug 3, 2023
1 parent 12653fd commit 4354d4a
Show file tree
Hide file tree
Showing 16 changed files with 90 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
run: git fetch --tags
shell: bash

- name: Setup dotnet 6.0.100
uses: actions/setup-dotnet@v1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- name: Build
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
run: git fetch --tags
shell: bash

- name: Setup dotnet
uses: actions/setup-dotnet@v1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- name: Build
shell: bash
Expand All @@ -72,8 +72,8 @@ jobs:
run: git fetch --tags
shell: bash

- name: Setup dotnet 5.0.301
uses: actions/setup-dotnet@v1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- name: Publish
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.2.0",
"version": "3.1.0",
"commands": [
"dotnet-cake"
]
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"projects": [ "src" ],
"sdk": {
"version": "6.0.300",
"version": "7.0.306",
"rollForward": "latestPatch"
}
}
11 changes: 6 additions & 5 deletions src/Cupboard.Core/Cupboard.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand All @@ -11,11 +11,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.3.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Include="CliWrap" Version="3.6.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="Spectre.Console" Version="0.41.0" />
<PackageReference Include="Spectre.IO" Version="0.8.0" />
<PackageReference Include="Spectre.Console" Version="0.47.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.47.0" />
<PackageReference Include="Spectre.IO" Version="0.12.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand All @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Management" Version="6.0.0" />
<PackageReference Include="System.Management" Version="7.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Cupboard.Providers/Cupboard.Providers.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Cupboard.Testing/Cupboard.Testing.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand All @@ -15,8 +15,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Spectre.Console.Testing" Version="0.41.0" />
<PackageReference Include="Spectre.IO.Testing" Version="0.8.0" />
<PackageReference Include="Spectre.Console.Testing" Version="0.47.0" />
<PackageReference Include="Spectre.IO.Testing" Version="0.12.0" />
</ItemGroup>

</Project>
16 changes: 8 additions & 8 deletions src/Cupboard.Tests/Cupboard.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -10,13 +10,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="Spectre.Verify.Extensions" Version="0.3.0" />
<PackageReference Include="Verify.Xunit" Version="9.0.0-beta.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="Spectre.Verify.Extensions" Version="18.0.0" />
<PackageReference Include="Verify.Xunit" Version="18.0.0" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
60 changes: 0 additions & 60 deletions src/Cupboard.Tests/FactCollectionTests.cs

This file was deleted.

52 changes: 52 additions & 0 deletions src/Cupboard.Tests/Unit/FactCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,58 @@ namespace Cupboard.Tests.Unit
{
public sealed class FactCollectionTests
{
[Theory]
[InlineData("foo")]
[InlineData("FOO")]
[InlineData("Foo")]
[InlineData("FoO")]
public void Should_Consider_Fact_Name_Case_Insensitive(string name)
{
// Then
var c = new FactCollection
{
{ "foo", 1 },
};

// When
int value = c[name];

// Then
value.ShouldBe(1);
}

[Fact]
public void Should_Get_Value_By_Path_Segments()
{
// Then
var c = new FactCollection
{
{ "foo.bar.baz", 1 },
};

// When
int value = c["foo"]["bar"]["baz"];

// Then
value.ShouldBe(1);
}

[Fact]
public void Should_Get_Value_By_Full_Path()
{
// Then
var c = new FactCollection
{
{ "foo.bar.baz", 1 },
};

// When
int value = c["foo.bar.baz"];

// Then
value.ShouldBe(1);
}

public sealed class TheIsArmOrArm64Method
{
[Fact]
Expand Down
6 changes: 3 additions & 3 deletions src/Cupboard/Cupboard.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand All @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup Label="Settings">
<Deterministic>true</Deterministic>
<LangVersion>10.0</LangVersion>
<LangVersion>11.0</LangVersion>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
Expand Down Expand Up @@ -32,16 +32,16 @@
</PropertyGroup>

<ItemGroup Label="Package References">
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.5.0" />
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.333">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="3.1.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.4.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Target Name="Versioning" BeforeTargets="MinVer">
<PropertyGroup Label="Build">
<MinVerDefaultPreReleasePhase>preview</MinVerDefaultPreReleasePhase>
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerVerbosity>normal</MinVerVerbosity>
</PropertyGroup>
</Target>
Expand Down
2 changes: 1 addition & 1 deletion src/Sandbox/Sandbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down

0 comments on commit 4354d4a

Please sign in to comment.