From e7a74f6ec6e228c71267f0832a73c470b0400e24 Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Thu, 14 Nov 2024 15:29:52 -0800 Subject: [PATCH 1/3] Use latest stable .NET. --- .github/workflows/build.yaml | 8 ++------ tools/Build/Build.cs | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a313bbb..e7a38ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,16 +22,12 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - name: Install .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 6.0.x - 8.0.x - name: Check out code uses: actions/checkout@v3 with: fetch-depth: 0 # required to publish docs + - name: Install .NET + uses: actions/setup-dotnet@v4 - name: Restore run: .\build.ps1 restore - name: Build diff --git a/tools/Build/Build.cs b/tools/Build/Build.cs index f7c1cb5..d1ad62a 100644 --- a/tools/Build/Build.cs +++ b/tools/Build/Build.cs @@ -44,6 +44,6 @@ void CodeGen(bool verify) RunCodeGen("___", "___"); void RunCodeGen(params string?[] args) => - RunDotNet(new[] { "run", "--no-build", "--project", $"src/{codegen}", "-f", "net6.0", "-c", configuration, "--", "--newline", "lf", verifyOption }.Concat(args)); + RunDotNet(new[] { "run", "--no-build", "--project", $"src/{codegen}", "-c", configuration, "--", "--newline", "lf", verifyOption }.Concat(args)); } }); From 653801b05c0d0ddf26b5d7227ee4e7ac69c770c6 Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Fri, 15 Nov 2024 07:50:48 -0800 Subject: [PATCH 2/3] Allow tool to roll forward through major versions. Drop end of life frameworks. --- Directory.Packages.props | 4 ++-- dotnet-tools.json | 2 +- .../Facility.CodeGen.JavaScript.csproj | 2 +- src/Facility.CodeGen.JavaScript/JavaScriptGenerator.cs | 4 ++-- src/fsdgenjs/fsdgenjs.csproj | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index ae712e5..6c07034 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,8 +3,8 @@ true - - + + diff --git a/dotnet-tools.json b/dotnet-tools.json index 194ceef..628a8d8 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "facilityconformance": { - "version": "2.29.0", + "version": "2.30.0", "commands": [ "FacilityConformance" ], diff --git a/src/Facility.CodeGen.JavaScript/Facility.CodeGen.JavaScript.csproj b/src/Facility.CodeGen.JavaScript/Facility.CodeGen.JavaScript.csproj index d33a1e2..d6643a8 100644 --- a/src/Facility.CodeGen.JavaScript/Facility.CodeGen.JavaScript.csproj +++ b/src/Facility.CodeGen.JavaScript/Facility.CodeGen.JavaScript.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net6.0;net7.0;net8.0 + netstandard2.0;net8.0 A library that generates JavaScript or TypeScript for a Facility Service Definition. Facility FSD JavaScript TypeScript CodeGen true diff --git a/src/Facility.CodeGen.JavaScript/JavaScriptGenerator.cs b/src/Facility.CodeGen.JavaScript/JavaScriptGenerator.cs index ca64b75..661ef7c 100644 --- a/src/Facility.CodeGen.JavaScript/JavaScriptGenerator.cs +++ b/src/Facility.CodeGen.JavaScript/JavaScriptGenerator.cs @@ -218,7 +218,7 @@ public override CodeGenOutput GenerateOutput(ServiceInfo service) { var hasPathFields = httpMethodInfo.PathFields.Count != 0; var jsUriDelim = hasPathFields ? "`" : "'"; -#if NET6_0_OR_GREATER +#if !NETSTANDARD2_0 var jsUri = string.Concat(jsUriDelim, httpMethodInfo.Path.AsSpan(1), jsUriDelim); #else var jsUri = jsUriDelim + httpMethodInfo.Path.Substring(1) + jsUriDelim; @@ -1245,7 +1245,7 @@ private static bool FieldUsesKind(ServiceInfo service, ServiceFieldInfo field, S return false; } -#if NET6_0_OR_GREATER +#if !NETSTANDARD2_0 private static string ReplaceOrdinal(string value, string oldValue, string newValue) => value.Replace(oldValue, newValue, StringComparison.Ordinal); #else private static string ReplaceOrdinal(string value, string oldValue, string newValue) => value.Replace(oldValue, newValue); diff --git a/src/fsdgenjs/fsdgenjs.csproj b/src/fsdgenjs/fsdgenjs.csproj index 8242284..47e5eb5 100644 --- a/src/fsdgenjs/fsdgenjs.csproj +++ b/src/fsdgenjs/fsdgenjs.csproj @@ -2,11 +2,12 @@ Exe - net6.0;net7.0;net8.0 + net8.0 A tool that generates JavaScript or TypeScript for a Facility Service Definition. Facility FSD JavaScript TypeScript CodeGen true true + Major README.md From 9a5ffec5610a7627f751b98ea45ea2de1b0b9bc5 Mon Sep 17 00:00:00 2001 From: Ed Ball Date: Fri, 15 Nov 2024 07:51:22 -0800 Subject: [PATCH 3/3] Publish 3.1.0. --- Directory.Build.props | 4 ++-- ReleaseNotes.md | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0faaf43..ad5be64 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,8 @@ - 3.0.0 - 2.8.0 + 3.1.0 + 3.0.0 12.0 enable enable diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 75597e3..fbd047a 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -2,6 +2,11 @@ These are the NuGet package releases. See also [npm Release Notes](ReleaseNotesNpm.md). +## 3.1.0 + +* Drop support for end-of-life frameworks. +* Use roll forward with .NET tool. + ## 3.0.0 * Support required fields as not optional in TypeScript.