Skip to content

Package updates #1013

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

Merged
merged 4 commits into from
Jun 15, 2021
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
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2020.3.3",
"version": "2021.1.3",
"commands": [
"jb"
]
},
"regitlint": {
"version": "2.1.3",
"version": "2.1.4",
"commands": [
"regitlint"
]
Expand All @@ -21,7 +21,7 @@
]
},
"dotnet-reportgenerator-globaltool": {
"version": "4.8.7",
"version": "4.8.9",
"commands": [
"reportgenerator"
]
Expand Down
5 changes: 3 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" PrivateAssets="All" />
<PackageReference Include="JetBrains.Annotations" Version="2021.1.0" PrivateAssets="All" />
<PackageReference Include="CSharpGuidelinesAnalyzer" Version="3.6.0" PrivateAssets="All" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
</ItemGroup>
Expand All @@ -25,6 +25,7 @@
<CoverletVersion>3.0.3</CoverletVersion>
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
<MoqVersion>4.16.1</MoqVersion>
<XUnitVersion>2.4.1</XUnitVersion>
<XUnitVersion>2.4.*</XUnitVersion>
<TestSdkVersion>16.10.0</TestSdkVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
</ItemGroup>
</Project>
7 changes: 6 additions & 1 deletion benchmarks/Serialization/JsonApiDeserializerBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,14 @@ public JsonApiDeserializerBenchmarks()
{
var options = new JsonApiOptions();
IResourceGraph resourceGraph = _dependencyFactory.CreateResourceGraph(options);

var serviceContainer = new ServiceContainer();
serviceContainer.AddService(typeof(IResourceDefinitionAccessor), new ResourceDefinitionAccessor(resourceGraph, serviceContainer));
serviceContainer.AddService(typeof(IResourceDefinition<BenchmarkResource>), new JsonApiResourceDefinition<BenchmarkResource>(resourceGraph));

var targetedFields = new TargetedFields();
var request = new JsonApiRequest();
var resourceFactory = new ResourceFactory(new ServiceContainer());
var resourceFactory = new ResourceFactory(serviceContainer);
var httpContextAccessor = new HttpContextAccessor();

_jsonApiDeserializer = new RequestDeserializer(resourceGraph, resourceFactory, targetedFields, httpContextAccessor, request, options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.78" />
<PackageReference Include="Dapper" Version="2.0.90" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="$(EFCoreVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlPostgreSQLVersion)" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions src/JsonApiDotNetCore/JsonApiDotNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Ben.Demystifier" Version="0.3.0" />
<PackageReference Include="Humanizer" Version="2.8.26" />
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="Humanizer" Version="2.11.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="SauceControl.InheritDoc" Version="1.2.0" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SauceControl.InheritDoc" Version="1.3.0" PrivateAssets="All" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/DiscoveryTests/DiscoveryTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public async Task Can_create_user_with_password()
User responseUser = GetResponseDeserializer().DeserializeSingle<User>(responseDocument).Data;
var document = JsonConvert.DeserializeObject<Document>(responseDocument);

document.SingleData.Attributes.Should().NotContainKey("password");
document.Should().NotBeNull();
document!.SingleData.Attributes.Should().NotContainKey("password");
document.SingleData.Attributes["userName"].Should().Be(newUser.UserName);

await _testContext.RunOnDatabaseAsync(async dbContext =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ public async Task Cannot_get_unknown_primary_resource_by_ID()
httpResponse.Should().HaveStatusCode(HttpStatusCode.NotFound);

var jObject = JsonConvert.DeserializeObject<JObject>(responseDocument);
string errorId = jObject["errors"].Should().NotBeNull().And.Subject.Select(element => (string)element["id"]).Single();
jObject.Should().NotBeNull();

string errorId = jObject!["errors"].Should().NotBeNull().And.Subject.Select(element => (string)element["id"]).Single();

responseDocument.Should().BeJson(@"{
""errors"": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/MultiDbContextTests/MultiDbContextTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/NoEntityFrameworkTests/NoEntityFrameworkTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions test/TestBuildingBlocks/DummyTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Xunit;

namespace TestBuildingBlocks
{
public sealed class DummyTest
{
[Fact]
public void Empty()
{
// This dummy test exists solely to suppress the warning
// during test runs that no tests were found in this project.
}
}
}
2 changes: 1 addition & 1 deletion test/TestBuildingBlocks/HttpResponseMessageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static async Task<string> GetFormattedContentAsync(HttpResponseMessage r
{
if (text.Length > 0)
{
return JsonConvert.DeserializeObject<JObject>(text).ToString();
return JsonConvert.DeserializeObject<JObject>(text)?.ToString();
}
}
#pragma warning disable AV1210 // Catch a specific exception instead of Exception, SystemException or ApplicationException
Expand Down
3 changes: 2 additions & 1 deletion test/TestBuildingBlocks/TestBuildingBlocks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlPostgreSQLVersion)" />
<PackageReference Include="xunit" Version="$(XUnitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" PrivateAssets="All" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion test/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="coverlet.collector" Version="$(CoverletVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(EFCoreVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="$(EFCoreVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
</ItemGroup>
</Project>