Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSOE-751: Upgrade to Orchard Core 1.8 #120

Merged
merged 22 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Lombiq.VueJs.Samples/Lombiq.VueJs.Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\Lombiq.VueJs\Lombiq.VueJs.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*;node_modules\**</DefaultItemExcludes>
</PropertyGroup>
Expand Down Expand Up @@ -34,10 +34,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.ContentFields" Version="1.7.0" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.7.0" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.8.2" />
<PackageReference Include="ZXing.Net.Bindings.ImageSharp.V2" Version="0.16.15" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions Lombiq.VueJs.Samples/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Version = "0.0.1",
Description = "Samples for Lombiq Vue.js.",
Category = "Vue.js",
Dependencies = new[]
{
Dependencies =
[
Lombiq.VueJs.Constants.FeatureIds.Area,
"OrchardCore.ContentFields",
}
]
)]
7 changes: 4 additions & 3 deletions Lombiq.VueJs.Samples/Migrations/BusinessCardMigrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Settings;
using OrchardCore.Data.Migration;
using System.Threading.Tasks;

namespace Lombiq.VueJs.Samples.Migrations;

Expand All @@ -13,9 +14,9 @@ public class BusinessCardMigrations : DataMigration
public BusinessCardMigrations(IContentDefinitionManager contentDefinitionManager) =>
_contentDefinitionManager = contentDefinitionManager;

public int Create()
public async Task<int> CreateAsync()
{
var businessCardPart = _contentDefinitionManager.AlterPartDefinition<BusinessCard>(partBuilder => partBuilder
var businessCardPart = await _contentDefinitionManager.AlterPartDefinitionAsync<BusinessCard>(partBuilder => partBuilder
.WithField(model => model.FirstName, field => field
.WithDisplayName("First name")
.WithSettings(new TextFieldSettings { Required = true }))
Expand All @@ -27,7 +28,7 @@ public int Create()
.WithField(model => model.Phone, field => field
.WithSettings(new TextFieldSettings { Required = true })));

_contentDefinitionManager.AlterTypeDefinition(nameof(BusinessCard), typeBuilder => typeBuilder
await _contentDefinitionManager.AlterTypeDefinitionAsync(nameof(BusinessCard), typeBuilder => typeBuilder
.DisplayedAs("Business card")
.Creatable()
.Listable()
Expand Down
2 changes: 0 additions & 2 deletions Lombiq.VueJs.Tests.UI/Assets/Media/DirectoryPlaceholder.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace Lombiq.VueJs.Tests.UI.Assets.Media;

// This is a dummy class to easier access the requested resource.
#pragma warning disable S2094 // Classes should not be empty
internal sealed class DirectoryPlaceholder
#pragma warning restore S2094 // Classes should not be empty
{
}
2 changes: 1 addition & 1 deletion Lombiq.VueJs.Tests.UI/Lombiq.VueJs.Tests.UI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions Lombiq.VueJs/Lombiq.VueJs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Condition="'$(NuGetBuild)' != 'true'" Project="..\..\..\Utilities\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<DefaultItemExcludes>$(DefaultItemExcludes);.git*;node_modules\**</DefaultItemExcludes>
</PropertyGroup>
Expand Down Expand Up @@ -46,9 +46,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.7.0" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.7.0" />
<PackageReference Include="OrchardCore.DisplayManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ResourceManagement" Version="1.8.2" />
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' != 'true'">
Expand Down
4 changes: 2 additions & 2 deletions Lombiq.VueJs/TagHelpers/VueComponentTagHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ await _displayHelper.ShapeExecuteAsync(
output.TagName = null;
}

private IEnumerable<string> FindResourceNames()
private HashSet<string> FindResourceNames()
{
var resourceNames = (Children?.Split(',') ?? Enumerable.Empty<string>())
.SelectWhere(child => child.Trim(), child => !string.IsNullOrEmpty(child))
Expand Down Expand Up @@ -90,7 +90,7 @@ private static void AddShapesRecursively(
.Where(dependency => !resourceNames.Contains(dependency))
.ToHashSet();

if (!newDependencies.Any()) return;
if (newDependencies.Count == 0) return;

resourceNames.AddRange(newDependencies);
AddShapesRecursively(resourceNames, newDependencies, componentDependencies);
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.VueJs/Views/_ViewImports.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
@inherits OrchardCore.DisplayManagement.Razor.RazorPage<TModel>
Piedone marked this conversation as resolved.
Show resolved Hide resolved

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, OrchardCore.Contents.TagHelpers
Expand Down