diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index dfc06c2..67207aa 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -18,6 +18,9 @@ on: - Debug - Release +permissions: + contents: read + jobs: build: name: 🛠️ Build @@ -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 diff --git a/.nuget/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/PackageReleaseNotes.txt index 3fdd36c..6ad5dfd 100644 --- a/.nuget/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/PackageReleaseNotes.txt @@ -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 diff --git a/.nuget/Codebelt.Extensions.AspNetCore.Newtonsoft.Json/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.AspNetCore.Newtonsoft.Json/PackageReleaseNotes.txt index 2b19c6b..eb26ba3 100644 --- a/.nuget/Codebelt.Extensions.AspNetCore.Newtonsoft.Json/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.AspNetCore.Newtonsoft.Json/PackageReleaseNotes.txt @@ -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 diff --git a/.nuget/Codebelt.Extensions.Newtonsoft.Json.App/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.Newtonsoft.Json.App/PackageReleaseNotes.txt index efd9b34..9ea61e9 100644 --- a/.nuget/Codebelt.Extensions.Newtonsoft.Json.App/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.Newtonsoft.Json.App/PackageReleaseNotes.txt @@ -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 diff --git a/.nuget/Codebelt.Extensions.Newtonsoft.Json/PackageReleaseNotes.txt b/.nuget/Codebelt.Extensions.Newtonsoft.Json/PackageReleaseNotes.txt index bb2f465..cc114c4 100644 --- a/.nuget/Codebelt.Extensions.Newtonsoft.Json/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Extensions.Newtonsoft.Json/PackageReleaseNotes.txt @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index bc91658..5dfbab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/Directory.Build.props b/Directory.Build.props index cb923b2..4d0c988 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -71,7 +71,10 @@ - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Directory.Packages.props b/Directory.Packages.props index d6cc5aa..a3df029 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,17 +3,17 @@ true - - - - - - - - - - - + + + + + + + + + + + @@ -21,12 +21,12 @@ - + - + - + \ No newline at end of file diff --git a/src/Codebelt.Extensions.Newtonsoft.Json.App/Codebelt.Extensions.Newtonsoft.Json.App.csproj b/src/Codebelt.Extensions.Newtonsoft.Json.App/Codebelt.Extensions.Newtonsoft.Json.App.csproj index ac58bec..a0bd564 100644 --- a/src/Codebelt.Extensions.Newtonsoft.Json.App/Codebelt.Extensions.Newtonsoft.Json.App.csproj +++ b/src/Codebelt.Extensions.Newtonsoft.Json.App/Codebelt.Extensions.Newtonsoft.Json.App.csproj @@ -9,6 +9,7 @@ false false Provides a convenient set of default API additions for building a .NET application that favors Newtonsoft.Json. + NU5128 diff --git a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/Converters/JsonConverterCollectionExtensionsTest.cs b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/Converters/JsonConverterCollectionExtensionsTest.cs index fb501ca..4f0397a 100644 --- a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/Converters/JsonConverterCollectionExtensionsTest.cs +++ b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/Converters/JsonConverterCollectionExtensionsTest.cs @@ -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().HttpContext; + var context = middleware.Host.Services.GetRequiredService().HttpContext; var correlationId = Guid.NewGuid().ToString("N"); var requestId = Guid.NewGuid().ToString("N"); diff --git a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationInputFormatterTest.cs b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationInputFormatterTest.cs index ffa55ae..565394b 100644 --- a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationInputFormatterTest.cs +++ b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationInputFormatterTest.cs @@ -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 => diff --git a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationOutputFormatterTest.cs b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationOutputFormatterTest.cs index 60df4c1..707e347 100644 --- a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationOutputFormatterTest.cs +++ b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/JsonSerializationOutputFormatterTest.cs @@ -56,7 +56,7 @@ public async Task WriteResponseBodyAsync_ShouldReturnOk() { app.UseRouting(); app.UseEndpoints(routes => { routes.MapControllers(); }); - })) + }, hostFixture: null)) { var client = filter.Host.GetTestClient(); diff --git a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/MvcBuilderExtensionsTests.cs b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/MvcBuilderExtensionsTests.cs index 04671f9..e2144ba 100644 --- a/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/MvcBuilderExtensionsTests.cs +++ b/test/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.Tests/MvcBuilderExtensionsTests.cs @@ -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); @@ -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); diff --git a/test/Codebelt.Extensions.AspNetCore.Newtonsoft.Json.Tests/Formatters/ServiceCollectionExtensionsTest.cs b/test/Codebelt.Extensions.AspNetCore.Newtonsoft.Json.Tests/Formatters/ServiceCollectionExtensionsTest.cs index 68f1860..00d2cec 100644 --- a/test/Codebelt.Extensions.AspNetCore.Newtonsoft.Json.Tests/Formatters/ServiceCollectionExtensionsTest.cs +++ b/test/Codebelt.Extensions.AspNetCore.Newtonsoft.Json.Tests/Formatters/ServiceCollectionExtensionsTest.cs @@ -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(); @@ -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(); @@ -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() diff --git a/testenvironments.json b/testenvironments.json index e296d68..5bccf82 100644 --- a/testenvironments.json +++ b/testenvironments.json @@ -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" } ] }