From d5525c2e7e39bb581a5800d1bba0e3016d81e05c Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:27:37 +0100 Subject: [PATCH 1/9] Update .NET SDK version in global.json to 8.0.400 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index fe1d243..4ccdb21 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.100", + "version": "8.0.400", "allowPrerelease": false, "rollForward": "latestFeature" } From f2e3c3d6778a5ecc518bf75addbb83f4c7415601 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:33:10 +0100 Subject: [PATCH 2/9] Remove unused System.Security.Cryptography.ProtectedData package --- src/Dax.Formatter/Dax.Formatter.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Dax.Formatter/Dax.Formatter.csproj b/src/Dax.Formatter/Dax.Formatter.csproj index e5aa8e1..b1736b5 100644 --- a/src/Dax.Formatter/Dax.Formatter.csproj +++ b/src/Dax.Formatter/Dax.Formatter.csproj @@ -47,7 +47,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - From 2d29768e8c5497c15c18ea3970bbc4f4f521a236 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:39:07 +0100 Subject: [PATCH 3/9] Update projects to target .NET 8.0 --- samples/getting-started/BasicFormatter.csproj | 2 +- src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj | 2 +- src/Dax.Formatter/Dax.Formatter.csproj | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/samples/getting-started/BasicFormatter.csproj b/samples/getting-started/BasicFormatter.csproj index 4e4ad2e..1382696 100644 --- a/samples/getting-started/BasicFormatter.csproj +++ b/samples/getting-started/BasicFormatter.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net8.0 diff --git a/src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj b/src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj index c02a088..2fcf183 100644 --- a/src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj +++ b/src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj @@ -1,7 +1,7 @@  - net472;net6.0 + net472;net6.0;net8.0 latest enable false diff --git a/src/Dax.Formatter/Dax.Formatter.csproj b/src/Dax.Formatter/Dax.Formatter.csproj index b1736b5..d6d772b 100644 --- a/src/Dax.Formatter/Dax.Formatter.csproj +++ b/src/Dax.Formatter/Dax.Formatter.csproj @@ -1,7 +1,7 @@  - netstandard2.0;net6.0 + netstandard2.0;net6.0;net8.0 latest enable en-US @@ -60,5 +60,8 @@ Dax.Formatter .NET 6.0 + + Dax.Formatter .NET 8.0 + \ No newline at end of file From cb6b628c46ab18773ac3773f194ba1998480d5a7 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:39:33 +0100 Subject: [PATCH 4/9] Update package references for SourceLink and System.Text.Json Removed Microsoft.SourceLink.GitHub package reference. Updated System.Text.Json package reference: - For net6.0 and netstandard2.0: version range [6.0.11, 7.0.0). - For net8.0: version range [8.0.5, 9.0.0). --- src/Dax.Formatter/Dax.Formatter.csproj | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Dax.Formatter/Dax.Formatter.csproj b/src/Dax.Formatter/Dax.Formatter.csproj index d6d772b..7be196f 100644 --- a/src/Dax.Formatter/Dax.Formatter.csproj +++ b/src/Dax.Formatter/Dax.Formatter.csproj @@ -43,11 +43,8 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + From cb3166be532fe3525b1cbf7f1f95b3c2d4079511 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:45:14 +0100 Subject: [PATCH 5/9] Add dependabot.yml to configure Dependabot for NuGet and GitHub Actions --- .github/dependabot.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e402d0d --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: "nuget" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + assignees: + - "albertospelta" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 + assignees: + - "albertospelta" \ No newline at end of file From 77e9f0a85720121d4d98eab6a33b5434087c458d Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 17:47:25 +0100 Subject: [PATCH 6/9] Update ci.yml --- .azure/pipelines/ci.yml | 9 +++++++-- .github/workflows/ci.yml | 31 +++++++++++++++---------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 246e134..e8e06a9 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -40,10 +40,15 @@ steps: inputs: secureFile: 'DaxFormatter.snk' - task: UseDotNet@2 - displayName: '.NET setup' + displayName: 'Install .NET SDK' inputs: packageType: sdk - version: 6.0.x + useGlobalJson: true +- task: UseDotNet@2 + displayName: 'Install .NET 6.0 runtime' + inputs: + packageType: runtime + version: '6.0.x' - task: DotNetCoreCLI@2 displayName: '.NET restore' inputs: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b46522..bba9830 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ -name: CI +name: ci + on: push: branches: @@ -7,8 +8,7 @@ on: branches: - master workflow_dispatch: -env: - CONFIGURATION: 'Release' + jobs: build-and-test: name: build-and-test--${{ matrix.os-version }} @@ -17,18 +17,17 @@ jobs: matrix: os-version: [windows-latest] #, ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v2 - - name: .NET setup - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x - - name: .NET info - run: dotnet --info - - name: .NET restore + dotnet-version: | + 6.0.x + global-json-file: global.json + - name: restore run: dotnet restore ./src - - name: .NET build - run: dotnet build ./src/Dax.Formatter.sln --configuration ${{ env.CONFIGURATION }} --no-restore - - name: .NET test - run: dotnet test ./src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal - - name: .NET pack - run: dotnet pack ./src/Dax.Formatter/Dax.Formatter.csproj --configuration ${{ env.CONFIGURATION }} --no-build --no-restore --verbosity normal \ No newline at end of file + - name: build + run: dotnet build ./src/Dax.Formatter.sln --configuration Release --no-restore + - name: test + run: dotnet test ./src/Dax.Formatter.Tests/Dax.Formatter.Tests.csproj --configuration Release --no-build --verbosity normal + - name: pack + run: dotnet pack ./src/Dax.Formatter/Dax.Formatter.csproj --configuration Release --no-build --no-restore --verbosity normal \ No newline at end of file From b002bea7869a216ae4151cc4cfcdfbbcf5af6af3 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 18:16:13 +0100 Subject: [PATCH 7/9] Update System.Text.Json version in Dax.Formatter.csproj, changed version ranges to fixed versions --- src/Dax.Formatter/Dax.Formatter.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dax.Formatter/Dax.Formatter.csproj b/src/Dax.Formatter/Dax.Formatter.csproj index 7be196f..45cd0ec 100644 --- a/src/Dax.Formatter/Dax.Formatter.csproj +++ b/src/Dax.Formatter/Dax.Formatter.csproj @@ -43,8 +43,8 @@ - - + + From e53108ec5ba7c6ec34c0d3ba7bf41650f1131cb0 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 18:21:41 +0100 Subject: [PATCH 8/9] Update nuget properties --- src/Dax.Formatter/Dax.Formatter.csproj | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Dax.Formatter/Dax.Formatter.csproj b/src/Dax.Formatter/Dax.Formatter.csproj index 45cd0ec..8aae777 100644 --- a/src/Dax.Formatter/Dax.Formatter.csproj +++ b/src/Dax.Formatter/Dax.Formatter.csproj @@ -25,14 +25,16 @@ package-icon.png README.md MIT - https://raw.githubusercontent.com/sql-bi/DaxFormatter/master/src/package-icon.png https://github.com/sql-bi/DaxFormatter https://github.com/sql-bi/DaxFormatter + git + master true true - true - snupkg - true + embedded + + + true From 63be47fc15d28a89b76cce885323d2fc787be7e5 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Sat, 16 Nov 2024 18:24:49 +0100 Subject: [PATCH 9/9] Fix build warnings --- src/Dax.Formatter.Tests/Security/SecurityHelpersTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dax.Formatter.Tests/Security/SecurityHelpersTests.cs b/src/Dax.Formatter.Tests/Security/SecurityHelpersTests.cs index 72f4c18..21c2778 100644 --- a/src/Dax.Formatter.Tests/Security/SecurityHelpersTests.cs +++ b/src/Dax.Formatter.Tests/Security/SecurityHelpersTests.cs @@ -11,7 +11,7 @@ public class SecurityHelpersTests [InlineData("abcdefghiABCDEFGHI??=", "1bca6736f96f84e35fa921938f45ba981a6e3f6aa02bcf46763009d3614cf89d")] [InlineData("", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")] [InlineData(null, null)] - public void SecurityHelpers_ToHashSHA256_ComputeCorrectResult(string value, string expected) + public void SecurityHelpers_ToHashSHA256_ComputeCorrectResult(string? value, string? expected) { var actual = value.ToHashSHA256(); Assert.Equal(expected, actual);