Skip to content

V9.0.2/package maintenance #10

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 8 commits into from
Apr 16, 2025
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
116 changes: 31 additions & 85 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ on:
- Debug
- Release

permissions:
contents: read

jobs:
build:
name: 🛠️ Build
Expand Down Expand Up @@ -122,99 +125,42 @@ jobs:
with:
configuration: ${{ matrix.configuration }}
buildSwitches: -p:SkipSignAssembly=true

sonarcloud:
name: 🔬 Code Quality Analysis
name: call-sonarcloud
needs: [build,test]
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- name: Install .NET Tool - Sonar Scanner
uses: codebeltnet/dotnet-tool-install-sonarscanner@v1

- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2

- name: Run SonarCloud Analysis
uses: codebeltnet/sonarcloud-scan@v1
with:
token: ${{ secrets.SONAR_TOKEN }}
organization: geekle
projectKey: newtonsoft-json
version: ${{ needs.build.outputs.version }}

- name: Build
uses: codebeltnet/dotnet-build@v2
with:
buildSwitches: -p:SkipSignAssembly=true
uploadBuildArtifact: false

- name: Finalize SonarCloud Analysis
uses: codebeltnet/sonarcloud-scan-finalize@v1
with:
token: ${{ secrets.SONAR_TOKEN }}
uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v1
with:
organization: geekle
projectKey: newtonsoft-json
version: ${{ needs.build.outputs.version }}
secrets: inherit

codecov:
name: 📊 Code Coverage Analysis
name: call-codecov
needs: [build,test]
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Run CodeCov Analysis
uses: codebeltnet/codecov-scan@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
repository: codebeltnet/newtonsoft-json
uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1
with:
repository: codebeltnet/newtonsoft
secrets: inherit

codeql:
name: 🛡️ Security Analysis
name: call-codeql
needs: [build,test]
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2

- name: Prepare CodeQL SAST Analysis
uses: codebeltnet/codeql-scan@v1

- name: Build
uses: codebeltnet/dotnet-build@v2
with:
buildSwitches: -p:SkipSignAssembly=true
uploadBuildArtifact: false

- name: Finalize CodeQL SAST Analysis
uses: codebeltnet/codeql-scan-finalize@v1
uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1
permissions:
security-events: write

deploy:
if: github.event_name != 'pull_request'
name: 🚀 Deploy v${{ needs.build.outputs.version }}
runs-on: ubuntu-22.04
timeout-minutes: 15
needs: [build, pack, test, sonarcloud, codecov, codeql]
environment: Production
steps:
- uses: codebeltnet/nuget-push@v1
with:
token: ${{ secrets.NUGET_TOKEN }}
configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
name: call-nuget
needs: [build,pack,test,sonarcloud,codecov,codeql]
uses: codebeltnet/jobs-nuget/.github/workflows/default.yml@v1
with:
version: ${{ needs.build.outputs.version }}
environment: Production
configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }}
permissions:
contents: write
packages: write
secrets: inherit
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.1
Version 9.0.2
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Version 9.0.1
Availability: .NET 9 and .NET 8

# ALM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.1
Version 9.0.2
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Version 9.0.1
Availability: .NET 9 and .NET 8

# ALM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.1
Version 9.0.2
Availability: .NET 9 and .NET 8

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Version 9.0.1
Availability: .NET 9 and .NET 8

# ALM
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Version 9.0.1
Version 9.0.2
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
- CHANGED Dependencies to latest and greatest with respect to TFMs

Version 9.0.1
Availability: .NET 9, .NET 8 and .NET Standard 2.0

# ALM
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba
> [!NOTE]
> Changelog entries prior to version 8.4.0 was migrated from previous versions of Cuemon.Extensions.Newtonsoft.Json, Cuemon.Extensions.AspNetCore.Newtonsoft.Json and Cuemon.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.

## [9.0.2] - 2025-04-16

This is a service update that focuses on package dependencies.

## [9.0.1] - 2025-01-30

This is a service update that primarily focuses on package dependencies and minor improvements.
Expand Down
5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.console" />
<PackageReference Include="xunit.runner.visualstudio" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
28 changes: 14 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Codebelt.Extensions.Xunit" Version="9.0.1" />
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="9.0.1" />
<PackageVersion Include="Cuemon.AspNetCore.Mvc" Version="9.0.1" />
<PackageVersion Include="Cuemon.Core" Version="9.0.1" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore" Version="9.0.1" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore.Authentication" Version="9.0.1" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore.Mvc" Version="9.0.1" />
<PackageVersion Include="Cuemon.Extensions.Core" Version="9.0.1" />
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.1" />
<PackageVersion Include="Cuemon.IO" Version="9.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="Codebelt.Extensions.Xunit" Version="10.0.0" />
<PackageVersion Include="Codebelt.Extensions.Xunit.App" Version="10.0.0" />
<PackageVersion Include="Cuemon.AspNetCore.Mvc" Version="9.0.4" />
<PackageVersion Include="Cuemon.Core" Version="9.0.4" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore" Version="9.0.4" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore.Authentication" Version="9.0.4" />
<PackageVersion Include="Cuemon.Extensions.AspNetCore.Mvc" Version="9.0.4" />
<PackageVersion Include="Cuemon.Extensions.Core" Version="9.0.4" />
<PackageVersion Include="Cuemon.Extensions.IO" Version="9.0.4" />
<PackageVersion Include="Cuemon.IO" Version="9.0.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="MinVer" Version="6.0.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.4" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.console" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net9'))">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.4" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net8'))">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.15" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<Description>Provides a convenient set of default API additions for building a .NET application that favors Newtonsoft.Json.</Description>
<NoWarn>NU5128</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public void AddHttpExceptionDescriptorConverter_ShouldAddHttpExceptionDescriptor
oome = e;
}

using (var middleware = WebHostTestFactory.Create())
using (var middleware = WebHostTestFactory.Create(hostFixture: null))
{
var context = middleware.ServiceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
var context = middleware.Host.Services.GetRequiredService<IHttpContextAccessor>().HttpContext;
var correlationId = Guid.NewGuid().ToString("N");
var requestId = Guid.NewGuid().ToString("N");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public async Task ReadRequestBodyAsync_ShouldReturnCreated()
{
app.UseRouting();
app.UseEndpoints(routes => { routes.MapControllers(); });
}))
}, hostFixture: null))
{
var wf = new WeatherForecast();
var formatter = new NewtonsoftJsonFormatter(o =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public async Task WriteResponseBodyAsync_ShouldReturnOk()
{
app.UseRouting();
app.UseEndpoints(routes => { routes.MapControllers(); });
}))
}, hostFixture: null))
{
var client = filter.Host.GetTestClient();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public async Task OnException_ShouldCaptureException_RenderAsProblemDetails_Usin
{
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
return client.GetAsync("/statuscodes/XXX/serverError");
});
}, hostFixture: null);

var body = await response.Content.ReadAsStringAsync();
TestOutput.WriteLine(body);
Expand Down Expand Up @@ -309,7 +309,7 @@ public async Task OnException_ShouldCaptureException_RenderAsDefault_UsingNewton
{
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
return client.GetAsync("/statuscodes/XXX/serverError");
});
}, hostFixture: null);

var body = await response.Content.ReadAsStringAsync();
TestOutput.WriteLine(body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public async Task AddNewtonsoftJsonExceptionResponseFormatter_ShouldCaptureExcep
{
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
return client.GetAsync("/");
});
}, hostFixture: null);

var body = await response.Content.ReadAsStringAsync();

Expand Down Expand Up @@ -161,7 +161,7 @@ public async Task AddNewtonsoftJsonExceptionResponseFormatter_ShouldCaptureExcep
{
client.DefaultRequestHeaders.Accept.Add(MediaTypeWithQualityHeaderValue.Parse("application/json"));
return client.GetAsync("/");
});
}, hostFixture: null);

var body = await response.Content.ReadAsStringAsync();

Expand Down Expand Up @@ -249,7 +249,7 @@ public async void AddNewtonsoftJsonExceptionResponseFormatter_AuthorizationRespo
{
endpoints.MapGet("/", context => context.Response.WriteAsync($"Hello {context.User.Identity!.Name}"));
});
}))
}, hostFixture: null))
{
var client = startup.Host.GetTestClient();
var bb = new BasicAuthorizationHeaderBuilder()
Expand Down
4 changes: 2 additions & 2 deletions testenvironments.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{
"name": "WSL-Ubuntu",
"type": "wsl",
"wslDistribution": "Ubuntu-22.04"
"wslDistribution": "Ubuntu-24.04"
},
{
"name": "Docker-Ubuntu",
"type": "docker",
"dockerImage": "gimlichael/ubuntu-testrunner:net8.0.405-9.0.102"
"dockerImage": "gimlichael/ubuntu-testrunner:net8.0.408-9.0.203"
}
]
}
Loading