diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 95ce41f6d..ac9ee703b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -2,9 +2,9 @@ name: WTM Build and Test on: workflow_dispatch: push: - branches: [ dotnet8, "feature/**", "feat/**" ] + branches: [ dotnet8, dotnet10, "feature/**", "feat/**" ] pull_request: - branches: [ dotnet8 ] + branches: [ dotnet8, dotnet10 ] jobs: release-tooling-test: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 7394cd9ba..faba716e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # wtm custom .worktrees/ +.claude/worktrees/ demo/WalkingTec.Mvvm.Demo/wwwroot/layuiadminsrc .Publish/ @@ -281,4 +282,4 @@ __pycache__/ /demo/WalkingTec.Mvvm.VueDemo/ClientApp/yarn.lock *.lock /demo/WalkingTec.Mvvm.Vue3Demo/ClientApp/dist -.superpowers/ +.superpowers/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f86785b3..fe1b48990 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,12 @@ - **BaseImportVM — 行內錯誤清單**:新增 `InlineErrors` 屬性(最多 `InlineErrorLimit` 筆,預設 50)供 API 端點直接回傳驗證錯誤(#615)。 - **BaseTemplateVM — 欄位說明列**:`ShowDescriptionRow = true`(預設)時,於模板第二行插入淺綠色斜體說明列,標示 Required/Optional、資料類型、min/max 限制;匯入時自動識別並跳過說明列(v2 標記)(#615)。 +### Fixed +- **Test suite — EF Core 10 API**:`DataContext` 中 `modelBuilder.Model.SetMaxIdentifierLength(30)` 改為 `modelBuilder.HasMaxIdentifierLength(30)`,修正 EF Core 10 將內部 API 設為不可存取的問題(#676)。 +- **Test suite — MSTest / Test.Sdk 版本**:`MSTest.TestAdapter` / `MSTest.TestFramework` 從 3.2.2 升至 3.6.4;`Microsoft.NET.Test.Sdk` 從 17.9.0 升至 17.12.0,確保與 .NET 10 測試主機相容(#676)。 +- **Test suite — coverlet / xunit runner**:`coverlet.collector` 從 6.0.2 升至 6.0.4;`xunit.runner.visualstudio` 從 2.8.2 升至 2.8.3,修正與 Test.Sdk 17.12.0 的相容性(#676)。 +- **Test suite — Serilog Sinks**:`Serilog.Sinks.InMemory` 從 0.11.0 升至 1.0.0,解決與 `Serilog.AspNetCore 10.0.0`(使用 Serilog 4.x)的型別衝突(#676)。 + ### Deprecated - **Workflow API**:內建 Elsa workflow 整合(`IWorkflow`、`FrameworkWorkflow`、`ApproveTimeLine`、`ApproveInfo`、`FlowInfoTagHelper`、`IBaseCRUDVM` 工作流程方法、`DataContext.FrameworkWorkflows`)標記為 `[Obsolete]`,將於下一個主版本移除(#586)。 - **遷移指引**:若仍需工作流程功能,請直接引用 Elsa 或改用其他工作流程引擎;移除 `IWorkflow` 介面實作及相關 TagHelper。 diff --git a/src/WalkingTec.Mvvm.Core/DataContext.cs b/src/WalkingTec.Mvvm.Core/DataContext.cs index 5bf624c93..7ddf470f3 100644 --- a/src/WalkingTec.Mvvm.Core/DataContext.cs +++ b/src/WalkingTec.Mvvm.Core/DataContext.cs @@ -661,7 +661,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { if (DBType == DBTypeEnum.Oracle) { - modelBuilder.Model.SetMaxIdentifierLength(30); + modelBuilder.HasMaxIdentifierLength(30); // [Elsa removed] table mappings // modelBuilder.Entity().ToTable("Bookmarks"); // modelBuilder.Entity().ToTable("Triggers"); diff --git a/src/WalkingTec.Mvvm.Core/Utils.cs b/src/WalkingTec.Mvvm.Core/Utils.cs index 6d7019d9c..8495edae0 100644 --- a/src/WalkingTec.Mvvm.Core/Utils.cs +++ b/src/WalkingTec.Mvvm.Core/Utils.cs @@ -79,7 +79,6 @@ public static List GetAllAssembly() "Npgsql.", "NPOI.", "netstandard", - "MySqlConnector", "VueCliMiddleware" }; diff --git a/src/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj b/src/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj index c3441c3ed..ea0053784 100644 --- a/src/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj +++ b/src/WalkingTec.Mvvm.Core/WalkingTec.Mvvm.Core.csproj @@ -39,7 +39,6 @@ - diff --git a/src/WalkingTec.Mvvm.Mvc.Tests/WalkingTec.Mvvm.Mvc.Tests.csproj b/src/WalkingTec.Mvvm.Mvc.Tests/WalkingTec.Mvvm.Mvc.Tests.csproj index d0af71815..05b650659 100644 --- a/src/WalkingTec.Mvvm.Mvc.Tests/WalkingTec.Mvvm.Mvc.Tests.csproj +++ b/src/WalkingTec.Mvvm.Mvc.Tests/WalkingTec.Mvvm.Mvc.Tests.csproj @@ -10,7 +10,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -18,7 +18,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/WalkingTec.Mvvm.Mvc/Filters/SwaggerFilter.cs b/src/WalkingTec.Mvvm.Mvc/Filters/SwaggerFilter.cs index 5a5750e67..636ecb93a 100644 --- a/src/WalkingTec.Mvvm.Mvc/Filters/SwaggerFilter.cs +++ b/src/WalkingTec.Mvvm.Mvc/Filters/SwaggerFilter.cs @@ -3,8 +3,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc.Rendering; -using Microsoft.OpenApi.Any; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using Swashbuckle.AspNetCore.SwaggerGen; using WalkingTec.Mvvm.Core; @@ -12,7 +11,7 @@ namespace WalkingTec.Mvvm.Mvc.Filters { public class SwaggerFilter : ISchemaFilter { - public void Apply(OpenApiSchema schema, SchemaFilterContext context) + public void Apply(IOpenApiSchema schema, SchemaFilterContext context) { var type = context.Type; if(type == typeof(List)) diff --git a/src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs b/src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs index 492852a69..91ee67af0 100644 --- a/src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs +++ b/src/WalkingTec.Mvvm.Mvc/Helper/FrameworkServiceExtension.cs @@ -34,7 +34,7 @@ using Microsoft.Extensions.Localization; using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; -using Microsoft.OpenApi.Models; +using Microsoft.OpenApi; using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Core.Auth; using WalkingTec.Mvvm.Core.Extensions; @@ -785,16 +785,12 @@ public static IServiceCollection AddWtmSwagger(this IServiceCollection services, }; c.AddSecurityDefinition("Bearer", bearer); - var sr = new OpenApiSecurityRequirement(); - sr.Add(new OpenApiSecurityScheme + c.AddSecurityRequirement(_ => { - Reference = new OpenApiReference - { - Type = ReferenceType.SecurityScheme, - Id = "Bearer" - } - }, new string[] { }); - c.AddSecurityRequirement(sr); + var sr = new OpenApiSecurityRequirement(); + sr.Add(new OpenApiSecuritySchemeReference("Bearer"), new List()); + return sr; + }); c.SchemaFilter(); if (useFullName == true) { diff --git a/test/Directory.Build.props b/test/Directory.Build.props index aa8996081..baed3d4fd 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -5,12 +5,12 @@ referenced with Include in individual .csproj files. Shared versions: - Microsoft.NET.Test.Sdk 17.9.0 - MSTest.TestAdapter 3.2.2 - MSTest.TestFramework 3.2.2 + Microsoft.NET.Test.Sdk 17.12.0 + MSTest.TestAdapter 3.6.4 + MSTest.TestFramework 3.6.4 Moq 4.20.72 FluentAssertions 6.12.2 - coverlet.collector 6.0.2 + coverlet.collector 6.0.4 To add a new shared package, add an Update line here and Include (without Version) in each consuming .csproj. @@ -18,8 +18,8 @@ 4.20.72 6.12.2 - 3.2.2 - 17.9.0 - 6.0.2 + 3.6.4 + 17.12.0 + 6.0.4 diff --git a/test/WalkingTec.Mvvm.Core.Test/WalkingTec.Mvvm.Core.Test.csproj b/test/WalkingTec.Mvvm.Core.Test/WalkingTec.Mvvm.Core.Test.csproj index ca479e121..3e7f747e5 100644 --- a/test/WalkingTec.Mvvm.Core.Test/WalkingTec.Mvvm.Core.Test.csproj +++ b/test/WalkingTec.Mvvm.Core.Test/WalkingTec.Mvvm.Core.Test.csproj @@ -20,7 +20,7 @@ - +