From 9bfdcf2c6d5a97e27834230177738eb94ea63f1a Mon Sep 17 00:00:00 2001 From: Zeegaan Date: Wed, 19 Jun 2024 12:04:43 +0200 Subject: [PATCH 01/12] Update to dotnet 9 and update nuget packages --- Directory.Build.props | 3 +- Directory.Packages.props | 42 +++++++++---------- global.json | 5 ++- tests/Directory.Packages.props | 8 ++-- .../Umbraco.JsonSchema.csproj | 2 +- 5 files changed, 31 insertions(+), 29 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 5f3055125f9c..df8c6e105b83 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,8 @@ - net8.0 + net9.0 + 12.0 Umbraco HQ Umbraco Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy')) diff --git a/Directory.Packages.props b/Directory.Packages.props index 090afcd2160d..651b6f025bf6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,27 +12,27 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -83,7 +83,7 @@ - + diff --git a/global.json b/global.json index 391ba3c2a30b..5053f42469e6 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,7 @@ { "sdk": { - "version": "8.0.100", - "rollForward": "latestFeature" + "version": "9.0.100", + "rollForward": "latestFeature", + "allowPrerelease": true } } diff --git a/tests/Directory.Packages.props b/tests/Directory.Packages.props index 4fce9e86f31e..bbc72ba1026b 100644 --- a/tests/Directory.Packages.props +++ b/tests/Directory.Packages.props @@ -5,12 +5,12 @@ - - + + - - + + diff --git a/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj b/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj index 7771d9c195b0..431674852ed6 100644 --- a/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj +++ b/tools/Umbraco.JsonSchema/Umbraco.JsonSchema.csproj @@ -7,7 +7,7 @@ - + From f6770a93b0cbc51ad91e9f391572db0c2260e763 Mon Sep 17 00:00:00 2001 From: Zeegaan Date: Wed, 19 Jun 2024 13:39:59 +0200 Subject: [PATCH 02/12] Update umbraco code version --- Directory.Packages.props | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 651b6f025bf6..c652e5b7edee 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,17 +7,17 @@ - + - + - + From 38a5d22b5b2a4922df90a390ff72cca6193b5c14 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:28:31 +0200 Subject: [PATCH 03/12] Update Directory.Build.props Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com> --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index df8c6e105b83..6142d21bc08f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ net9.0 - 12.0 + 13.0 Umbraco HQ Umbraco Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy')) From 07b2fd4b66c32f5c9342cd08dbf79dfacd3ca9d2 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:58:16 +0200 Subject: [PATCH 04/12] Include preview version in pipeline --- build/azure-pipelines.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index aa7e1845f7d8..6c822069f8a0 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -105,6 +105,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: Run dotnet restore inputs: @@ -163,6 +164,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true - task: PowerShell@2 displayName: Install DocFX inputs: @@ -280,6 +282,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true - task: DotNetCoreCLI@2 displayName: Run dotnet test inputs: @@ -321,6 +324,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true # Test - task: DotNetCoreCLI@2 @@ -369,6 +373,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true # Start SQL Server - powershell: docker run --name mssql -d -p 1433:1433 -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$(SA_PASSWORD)" mcr.microsoft.com/mssql/server:2022-latest @@ -462,6 +467,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true - pwsh: | "UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL) @@ -528,7 +534,7 @@ stages: - ${{ if eq(parameters.isNightly, true) }}: pwsh: npm run test --ignore-certificate-errors ${{ else }}: - pwsh: npm run smokeTest --ignore-certificate-errors + pwsh: npm run smokeTest --ignore-certificate-errors displayName: Run Playwright tests continueOnError: true workingDirectory: tests/Umbraco.Tests.AcceptanceTest @@ -597,6 +603,7 @@ stages: displayName: Use .NET SDK from global.json inputs: useGlobalJson: true + includePreviewVersions: true - pwsh: | "UMBRACO_USER_LOGIN=$(UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL) From b317b089c62951b4c81b6a61f09fe53ea718d592 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:12:31 +0200 Subject: [PATCH 05/12] update template projects --- Directory.Build.props | 1 - .../UmbracoPackage/.template.config/template.json | 10 +++++----- templates/UmbracoPackage/UmbracoPackage.csproj | 2 +- .../UmbracoPackageRcl/.template.config/template.json | 10 +++++----- templates/UmbracoPackageRcl/UmbracoPackage.csproj | 2 +- .../UmbracoProject/.template.config/template.json | 10 +++++----- templates/UmbracoProject/UmbracoProject.csproj | 2 +- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 6142d21bc08f..9019dfa3daf0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,6 @@ net9.0 - 13.0 Umbraco HQ Umbraco Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy')) diff --git a/templates/UmbracoPackage/.template.config/template.json b/templates/UmbracoPackage/.template.config/template.json index 33ec0699b1c9..5c93b1d68df9 100644 --- a/templates/UmbracoPackage/.template.config/template.json +++ b/templates/UmbracoPackage/.template.config/template.json @@ -28,13 +28,13 @@ "datatype": "choice", "choices": [ { - "displayName": ".NET 8.0", - "description": "Target net8.0", - "choice": "net8.0" + "displayName": ".NET 9.0", + "description": "Target net9.0", + "choice": "net9.0" } ], - "defaultValue": "net8.0", - "replaces": "net8.0" + "defaultValue": "net9.0", + "replaces": "net9.0" }, "UmbracoVersion": { "displayName": "Umbraco version", diff --git a/templates/UmbracoPackage/UmbracoPackage.csproj b/templates/UmbracoPackage/UmbracoPackage.csproj index d9e17128e7c7..9790da947cbf 100644 --- a/templates/UmbracoPackage/UmbracoPackage.csproj +++ b/templates/UmbracoPackage/UmbracoPackage.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable . diff --git a/templates/UmbracoPackageRcl/.template.config/template.json b/templates/UmbracoPackageRcl/.template.config/template.json index c887e8902cfa..c03c86014123 100644 --- a/templates/UmbracoPackageRcl/.template.config/template.json +++ b/templates/UmbracoPackageRcl/.template.config/template.json @@ -29,13 +29,13 @@ "datatype": "choice", "choices": [ { - "displayName": ".NET 8.0", - "description": "Target net8.0", - "choice": "net8.0" + "displayName": ".NET 9.0", + "description": "Target net9.0", + "choice": "net9.0" } ], - "defaultValue": "net8.0", - "replaces": "net8.0" + "defaultValue": "net9.0", + "replaces": "net9.0" }, "UmbracoVersion": { "displayName": "Umbraco version", diff --git a/templates/UmbracoPackageRcl/UmbracoPackage.csproj b/templates/UmbracoPackageRcl/UmbracoPackage.csproj index 701513430285..b959751c8762 100644 --- a/templates/UmbracoPackageRcl/UmbracoPackage.csproj +++ b/templates/UmbracoPackageRcl/UmbracoPackage.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable true diff --git a/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json index b17352476ea5..13d4ec68f7f5 100644 --- a/templates/UmbracoProject/.template.config/template.json +++ b/templates/UmbracoProject/.template.config/template.json @@ -38,13 +38,13 @@ "datatype": "choice", "choices": [ { - "displayName": ".NET 8.0", - "description": "Target net8.0", - "choice": "net8.0" + "displayName": ".NET 9.0", + "description": "Target net9.0", + "choice": "net9.0" } ], - "defaultValue": "net8.0", - "replaces": "net8.0" + "defaultValue": "net9.0", + "replaces": "net9.0" }, "UmbracoVersion": { "displayName": "Umbraco version", diff --git a/templates/UmbracoProject/UmbracoProject.csproj b/templates/UmbracoProject/UmbracoProject.csproj index ee8dd5e56ead..544456bcd6d5 100644 --- a/templates/UmbracoProject/UmbracoProject.csproj +++ b/templates/UmbracoProject/UmbracoProject.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable Umbraco.Cms.Web.UI From 53be52558b55c01bd921c4e87119ea6fb3aeacc3 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:12:42 +0200 Subject: [PATCH 06/12] update global json with specific version --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 5053f42469e6..5db4761d4604 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100", + "version": "9.0.100-preview.5.24307.3", "rollForward": "latestFeature", "allowPrerelease": true } From 9bf9e8972d9a8a50fbe5cc528198dd3cd3596c7f Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:33:18 +0200 Subject: [PATCH 07/12] Update version.json to v15 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index cf30f7b7d284..36cd9614b603 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "14.1.0-rc", + "version": "15.0.0-rc1", "assemblyVersion": { "precision": "build" }, From 749aed0cb6a48ae9eb291c56e94e8c0502acd882 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:41:57 +0200 Subject: [PATCH 08/12] Rename TrimStart and TrimEnd to string specific --- .../OpenApi/SchemaIdHandler.cs | 2 +- .../Services/ApiMediaQueryService.cs | 2 +- .../Services/RequestRedirectService.cs | 2 +- .../Controllers/Indexer/AllIndexerController.cs | 2 +- .../Controllers/Searcher/AllSearcherController.cs | 2 +- .../umbraco/UmbracoWebsite/Maintenance.cshtml | 2 +- .../umbraco/UmbracoWebsite/NoNodes.cshtml | 2 +- .../umbraco/UmbracoWebsite/NotFound.cshtml | 2 +- .../Configuration/ModelsBuilderConfigExtensions.cs | 2 +- .../DeliveryApi/ApiContentRouteBuilder.cs | 2 +- src/Umbraco.Core/Extensions/StringExtensions.cs | 8 ++++---- src/Umbraco.Core/Models/Content.cs | 12 ++++++------ src/Umbraco.Core/Models/ContentBase.cs | 12 ++++++------ src/Umbraco.Core/Routing/UmbracoRequestPaths.cs | 4 ++-- src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs | 2 +- .../DeliveryApi/ApiRichTextElementParser.cs | 2 +- .../Install/FilePermissionHelper.cs | 4 ++-- .../Logging/Serilog/LoggerConfigExtensions.cs | 2 +- .../Persistence/NPocoSqlExtensions.cs | 4 ++-- .../Repositories/Implement/UserRepository.cs | 2 +- .../Persistence/SqlSyntax/SqlSyntaxProviderBase.cs | 2 +- .../Extensions/ApplicationBuilderExtensions.cs | 2 +- .../Extensions/LinkGeneratorExtensions.cs | 2 +- .../Extensions/UrlHelperExtensions.cs | 4 ++-- .../DependencyInjection/UmbracoBuilderExtensions.cs | 2 +- .../ManagementApi/ManagementApiTest.cs | 2 +- .../ShortStringHelper/StringExtensionsTests.cs | 4 ++-- .../Persistence/NPocoTests/NPocoSqlTemplateTests.cs | 2 +- 28 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs b/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs index c08e0be19ac9..fd575f537281 100644 --- a/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs +++ b/src/Umbraco.Cms.Api.Common/OpenApi/SchemaIdHandler.cs @@ -36,7 +36,7 @@ private string SanitizedTypeName(Type t) => t.Name // first grab the "non-generic" part of any generic type name (i.e. "PagedViewModel`1" becomes "PagedViewModel") .Split('`').First() // then remove the "ViewModel" postfix from type names - .TrimEnd("ViewModel"); + .TrimEndOfString("ViewModel"); private string HandleGenerics(string name, Type type) { diff --git a/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs b/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs index 5969e0a788de..1f471ea53f21 100644 --- a/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs +++ b/src/Umbraco.Cms.Api.Delivery/Services/ApiMediaQueryService.cs @@ -85,7 +85,7 @@ private IPublishedMediaCache GetRequiredPublishedMediaCache() return null; } - var childrenOf = fetch.TrimStart(childrenOfParameter); + var childrenOf = fetch.TrimStartOfString(childrenOfParameter); if (childrenOf.IsNullOrWhiteSpace()) { // this mirrors the current behavior of the Content Delivery API :-) diff --git a/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs b/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs index 882525c8d073..e0ab4acd0177 100644 --- a/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs +++ b/src/Umbraco.Cms.Api.Delivery/Services/RequestRedirectService.cs @@ -66,7 +66,7 @@ public RequestRedirectService( } // important: redirect URLs are always tracked without trailing slashes - IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEnd("/"), culture); + IRedirectUrl? redirectUrl = _redirectUrlService.GetMostRecentRedirectUrl(requestedPath.TrimEndOfString("/"), culture); IPublishedContent? content = redirectUrl != null ? _apiPublishedContentCache.GetById(redirectUrl.ContentKey) : null; diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs index 768389b56d0b..f5b982b7db31 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Indexer/AllIndexerController.cs @@ -37,7 +37,7 @@ public Task> All( { IndexResponseModel[] indexes = _examineManager.Indexes .Select(_indexPresentationFactory.Create) - .OrderBy(indexModel => indexModel.Name.TrimEnd("Indexer")).ToArray(); + .OrderBy(indexModel => indexModel.Name.TrimEndOfString("Indexer")).ToArray(); var viewModel = new PagedViewModel { Items = indexes.Skip(skip).Take(take), Total = indexes.Length }; return Task.FromResult(viewModel); diff --git a/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs b/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs index 76cd2f639b92..e4599f879a69 100644 --- a/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs +++ b/src/Umbraco.Cms.Api.Management/Controllers/Searcher/AllSearcherController.cs @@ -30,7 +30,7 @@ public async Task>> All( var searchers = new List( _examineManager.RegisteredSearchers.Select(searcher => new SearcherResponse { Name = searcher.Name }) .OrderBy(x => - x.Name.TrimEnd("Searcher"))); // order by name , but strip the "Searcher" from the end if it exists + x.Name.TrimEndOfString("Searcher"))); // order by name , but strip the "Searcher" from the end if it exists var viewModel = new PagedViewModel { Items = searchers.Skip(skip).Take(take), diff --git a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml index 94de5f3c5235..7c78ce31fe5c 100644 --- a/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml +++ b/src/Umbraco.Cms.StaticAssets/umbraco/UmbracoWebsite/Maintenance.cshtml @@ -17,7 +17,7 @@ Website is Under Maintainance - +