Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nuget dependencies #1384

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CodeGen/CodeGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NuGet.Protocol" Version="6.2.4" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NuGet.Protocol" Version="6.9.1" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.2.0-alpha.19174.3" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions UnitsNet.Benchmark/UnitsNet.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3">
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@

<!-- NuGet references that work for both signed and unsigned -->
<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

<!-- Project references, will also generate the corresponding nuget dependencies -->
Expand Down
14 changes: 7 additions & 7 deletions UnitsNet.Tests/CustomCode/ParseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ public void ParseLengthToMetersUsEnglish(string s, double expected)
[InlineData("1 kg", typeof(FormatException))] // Wrong measurement type.
[InlineData("1ft monkey 1in", typeof(FormatException))] // Invalid separator between two valid measurements.
[InlineData("1ft 1invalid", typeof(FormatException))] // Valid
public void ParseLength_InvalidString_USEnglish_ThrowsException(string s, Type expectedExceptionType)
public void ParseLength_InvalidString_USEnglish_ThrowsException(string? s, Type expectedExceptionType)
{
var usEnglish = CultureInfo.GetCultureInfo("en-US");
Assert.Throws(expectedExceptionType, () => Length.Parse(s, usEnglish));
Assert.Throws(expectedExceptionType, () => Length.Parse(s!, usEnglish));
}

/// <exception cref="UnitsNetException">Error parsing string.</exception>
[Theory]
[InlineData("5.5 m", 5.5)]
[InlineData("500 005 m", 500005)]
// quantity doesn't match number format
public void ParseWithCultureUsingSpaceAsThousandSeparators(string s, double expected)
public void ParseWithCultureUsingSpaceAsThousandSeparators(string? s, double expected)
{
var numberFormat = (NumberFormatInfo) CultureInfo.InvariantCulture.NumberFormat.Clone();
numberFormat.NumberGroupSeparator = " ";
numberFormat.CurrencyGroupSeparator = " ";
numberFormat.NumberDecimalSeparator = ".";
numberFormat.CurrencyDecimalSeparator = ".";

double actual = Length.Parse(s, numberFormat).Meters;
double actual = Length.Parse(s!, numberFormat).Meters;
Assert.Equal(expected, actual);
}

Expand Down Expand Up @@ -125,10 +125,10 @@ public void ParseLengthUnitUsEnglish(string s, LengthUnit expected)
[Theory]
[InlineData("kg", typeof(UnitNotFoundException))]
[InlineData(null, typeof(ArgumentNullException))]
public void ParseLengthUnitUsEnglish_ThrowsExceptionOnInvalidString(string s, Type expectedExceptionType)
public void ParseLengthUnitUsEnglish_ThrowsExceptionOnInvalidString(string? s, Type expectedExceptionType)
{
var usEnglish = CultureInfo.GetCultureInfo("en-US");
Assert.Throws(expectedExceptionType, () => Length.ParseUnit(s, usEnglish));
Assert.Throws(expectedExceptionType, () => Length.ParseUnit(s!, usEnglish));
}

[Theory]
Expand All @@ -137,7 +137,7 @@ public void ParseLengthUnitUsEnglish_ThrowsExceptionOnInvalidString(string s, Ty
[InlineData("2 kg", false)]
[InlineData(null, false)]
[InlineData("foo", false)]
public void TryParseLengthUnitUsEnglish(string s, bool expected)
public void TryParseLengthUnitUsEnglish(string? s, bool expected)
{
CultureInfo usEnglish = CultureInfo.GetCultureInfo("en-US");
bool actual = Length.TryParse(s, usEnglish, out Length _);
Expand Down
2 changes: 1 addition & 1 deletion UnitsNet.Tests/QuantityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void AllowSpecialValue()
}
catch (ArgumentException)
{
Assert.True(false, "Special double values (NaN, -Inf, +Inf) must be allowed.");
Assert.Fail("Special double values (NaN, -Inf, +Inf) must be allowed.");
}
}

Expand Down
8 changes: 4 additions & 4 deletions UnitsNet.Tests/UnitsNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion UnitsNet/UnitsNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<!-- NuGet references that work for all TargetFrameworks, both signed and unsigned. -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<!-- Link in common unit definition .json files -->
Expand Down