From 5fe9349b1f6110814148720cac335334380eb248 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Tue, 25 Jul 2023 02:25:50 +0800 Subject: [PATCH] Upgrade to ABP 7.3.0 --- Directory.Build.props | 2 +- common.props | 2 +- ...asyAbp.SharedResources.HttpApi.Host.csproj | 2 +- .../package.json | 2 +- .../yarn.lock | 8 +++--- .../EasyAbp.SharedResources.Web.Host.csproj | 2 +- .../package.json | 2 +- .../yarn.lock | 8 +++--- ...EasyAbp.SharedResources.Web.Unified.csproj | 2 +- .../package.json | 2 +- .../yarn.lock | 8 +++--- ...syAbp.SharedResources.Domain.Shared.csproj | 1 + .../SharedResourcesDomainSharedModule.cs | 6 +++-- ...syAbp.SharedResources.MongoDB.Tests.csproj | 5 +++- .../MongoDB/MongoDbFixture.cs | 25 ++++++++++++++++--- .../SharedResourcesMongoDbTestModule.cs | 6 +---- 16 files changed, 52 insertions(+), 31 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e0c62c6..7c9adc8 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 7.2.1 + 7.3.0 \ No newline at end of file diff --git a/common.props b/common.props index 003fe05..ee36443 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 0.14.0 + 0.15.0 $(NoWarn);CS1591 true EasyAbp Team diff --git a/host/EasyAbp.SharedResources.HttpApi.Host/EasyAbp.SharedResources.HttpApi.Host.csproj b/host/EasyAbp.SharedResources.HttpApi.Host/EasyAbp.SharedResources.HttpApi.Host.csproj index b61188d..42ad144 100644 --- a/host/EasyAbp.SharedResources.HttpApi.Host/EasyAbp.SharedResources.HttpApi.Host.csproj +++ b/host/EasyAbp.SharedResources.HttpApi.Host/EasyAbp.SharedResources.HttpApi.Host.csproj @@ -12,7 +12,7 @@ - + diff --git a/host/EasyAbp.SharedResources.IdentityServer/package.json b/host/EasyAbp.SharedResources.IdentityServer/package.json index 12d4d4e..1dfe228 100644 --- a/host/EasyAbp.SharedResources.IdentityServer/package.json +++ b/host/EasyAbp.SharedResources.IdentityServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-identityserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0" } } \ No newline at end of file diff --git a/host/EasyAbp.SharedResources.IdentityServer/yarn.lock b/host/EasyAbp.SharedResources.IdentityServer/yarn.lock index 9a60fba..d521b89 100644 --- a/host/EasyAbp.SharedResources.IdentityServer/yarn.lock +++ b/host/EasyAbp.SharedResources.IdentityServer/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1": - version "2.2.0" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628" - integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g== +"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0": + version "2.3.0" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be" + integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww== dependencies: "@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1" diff --git a/host/EasyAbp.SharedResources.Web.Host/EasyAbp.SharedResources.Web.Host.csproj b/host/EasyAbp.SharedResources.Web.Host/EasyAbp.SharedResources.Web.Host.csproj index b99dc40..ebcb0c2 100644 --- a/host/EasyAbp.SharedResources.Web.Host/EasyAbp.SharedResources.Web.Host.csproj +++ b/host/EasyAbp.SharedResources.Web.Host/EasyAbp.SharedResources.Web.Host.csproj @@ -21,7 +21,7 @@ - + diff --git a/host/EasyAbp.SharedResources.Web.Host/package.json b/host/EasyAbp.SharedResources.Web.Host/package.json index 330a0b3..24d9c85 100644 --- a/host/EasyAbp.SharedResources.Web.Host/package.json +++ b/host/EasyAbp.SharedResources.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0" } } \ No newline at end of file diff --git a/host/EasyAbp.SharedResources.Web.Host/yarn.lock b/host/EasyAbp.SharedResources.Web.Host/yarn.lock index 9a60fba..d521b89 100644 --- a/host/EasyAbp.SharedResources.Web.Host/yarn.lock +++ b/host/EasyAbp.SharedResources.Web.Host/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1": - version "2.2.0" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628" - integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g== +"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0": + version "2.3.0" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be" + integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww== dependencies: "@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1" diff --git a/host/EasyAbp.SharedResources.Web.Unified/EasyAbp.SharedResources.Web.Unified.csproj b/host/EasyAbp.SharedResources.Web.Unified/EasyAbp.SharedResources.Web.Unified.csproj index 5b0a943..a09bbe8 100644 --- a/host/EasyAbp.SharedResources.Web.Unified/EasyAbp.SharedResources.Web.Unified.csproj +++ b/host/EasyAbp.SharedResources.Web.Unified/EasyAbp.SharedResources.Web.Unified.csproj @@ -17,7 +17,7 @@ - + diff --git a/host/EasyAbp.SharedResources.Web.Unified/package.json b/host/EasyAbp.SharedResources.Web.Unified/package.json index 330a0b3..24d9c85 100644 --- a/host/EasyAbp.SharedResources.Web.Unified/package.json +++ b/host/EasyAbp.SharedResources.Web.Unified/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.2.0-rc.1" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.3.0" } } \ No newline at end of file diff --git a/host/EasyAbp.SharedResources.Web.Unified/yarn.lock b/host/EasyAbp.SharedResources.Web.Unified/yarn.lock index 9a60fba..d521b89 100644 --- a/host/EasyAbp.SharedResources.Web.Unified/yarn.lock +++ b/host/EasyAbp.SharedResources.Web.Unified/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.2.0-rc.1": - version "2.2.0" - resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.2.0.tgz#dc76d1d869e16876288c90f5fec31df3a99bb628" - integrity sha512-mAAptSqGWQu+GefI1XHlP7KF8PncWreuC9u09rUdZ1cixFURy7PaG/n/QMNj9YJSVIb+vPsnFjYDeTtNbrxU/g== +"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~2.3.0": + version "2.3.0" + resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-2.3.0.tgz#7e05ce2a897de0f0bb016e0ae4a9adfd0260e7be" + integrity sha512-d7p8Pv6g8aocjBIBKHMF8fFDeVzWqkriz6uKy3oowCKSe5tqzq3j35Um7kEu7DapPf9MyBPq8+z9VsGbxJCjww== dependencies: "@abp/aspnetcore.mvc.ui.theme.shared" "~7.2.1" diff --git a/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp.SharedResources.Domain.Shared.csproj b/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp.SharedResources.Domain.Shared.csproj index 275fbd2..6cb048b 100644 --- a/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp.SharedResources.Domain.Shared.csproj +++ b/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp.SharedResources.Domain.Shared.csproj @@ -9,6 +9,7 @@ + diff --git a/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp/SharedResources/SharedResourcesDomainSharedModule.cs b/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp/SharedResources/SharedResourcesDomainSharedModule.cs index f160abc..23ca82e 100644 --- a/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp/SharedResources/SharedResourcesDomainSharedModule.cs +++ b/src/EasyAbp.SharedResources.Domain.Shared/EasyAbp/SharedResources/SharedResourcesDomainSharedModule.cs @@ -1,4 +1,5 @@ -using Volo.Abp.Modularity; +using Volo.Abp.Domain; +using Volo.Abp.Modularity; using Volo.Abp.Localization; using EasyAbp.SharedResources.Localization; using Volo.Abp.Localization.ExceptionHandling; @@ -9,7 +10,8 @@ namespace EasyAbp.SharedResources { [DependsOn( - typeof(AbpValidationModule) + typeof(AbpValidationModule), + typeof(AbpDddDomainSharedModule) )] public class SharedResourcesDomainSharedModule : AbpModule { diff --git a/test/EasyAbp.SharedResources.MongoDB.Tests/EasyAbp.SharedResources.MongoDB.Tests.csproj b/test/EasyAbp.SharedResources.MongoDB.Tests/EasyAbp.SharedResources.MongoDB.Tests.csproj index ccfad2a..b1d5ecd 100644 --- a/test/EasyAbp.SharedResources.MongoDB.Tests/EasyAbp.SharedResources.MongoDB.Tests.csproj +++ b/test/EasyAbp.SharedResources.MongoDB.Tests/EasyAbp.SharedResources.MongoDB.Tests.csproj @@ -7,7 +7,10 @@ - + + + + diff --git a/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/MongoDbFixture.cs b/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/MongoDbFixture.cs index fa24a62..40f51d3 100644 --- a/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/MongoDbFixture.cs +++ b/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/MongoDbFixture.cs @@ -1,12 +1,31 @@ using System; -using Mongo2Go; +using EphemeralMongo; namespace EasyAbp.SharedResources.MongoDB { public class MongoDbFixture : IDisposable { - private static readonly MongoDbRunner MongoDbRunner = MongoDbRunner.Start(); - public static readonly string ConnectionString = MongoDbRunner.ConnectionString; + public readonly static IMongoRunner MongoDbRunner; + + static MongoDbFixture() + { + MongoDbRunner = MongoRunner.Run(new MongoRunnerOptions + { + UseSingleNodeReplicaSet = true + }); + } + + public static string GetRandomConnectionString() + { + return GetConnectionString("Db_" + Guid.NewGuid().ToString("N")); + } + + public static string GetConnectionString(string databaseName) + { + var stringArray = MongoDbRunner.ConnectionString.Split('?'); + var connectionString = stringArray[0].EnsureEndsWith('/') + databaseName + "/?" + stringArray[1]; + return connectionString; + } public void Dispose() { diff --git a/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/SharedResourcesMongoDbTestModule.cs b/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/SharedResourcesMongoDbTestModule.cs index b568d41..a265d37 100644 --- a/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/SharedResourcesMongoDbTestModule.cs +++ b/test/EasyAbp.SharedResources.MongoDB.Tests/MongoDB/SharedResourcesMongoDbTestModule.cs @@ -12,13 +12,9 @@ public class SharedResourcesMongoDbTestModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') + - "Db_" + - Guid.NewGuid().ToString("N"); - Configure(options => { - options.ConnectionStrings.Default = connectionString; + options.ConnectionStrings.Default = MongoDbFixture.GetRandomConnectionString(); }); } }