Skip to content

Commit

Permalink
Merge pull request #120 from Lombiq/issue/OSOE-751
Browse files Browse the repository at this point in the history
OSOE-751: Upgrade to Orchard Core 1.8
  • Loading branch information
Psichorex authored Feb 21, 2024
2 parents 5b729a6 + 97c9237 commit 00a8afc
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 27 deletions.
14 changes: 7 additions & 7 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 All @@ -50,8 +50,8 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.3.2" />
<PackageReference Include="Lombiq.HelpfulLibraries.Common" Version="8.0.3-alpha.0.lmbq-249" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.3.3-alpha.0.osoe-751" />
<PackageReference Include="Lombiq.HelpfulLibraries.Common" Version="8.1.1-alpha.7.osoe-751" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="..\..\..\Utilities\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions.targets" />
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
{
}
4 changes: 2 additions & 2 deletions 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 All @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests.UI" Version="8.1.0-alpha.1.osoe-638" />
<PackageReference Include="Lombiq.Tests.UI" Version="8.2.1-alpha.22.osoe-751" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.VueJs/Assets/Scripts/helpers/process-helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');
const getProjectDirectory = require('.nx/scripts/get-project-directory');
const { handleErrorObject, handleErrorMessage, handleWarningMessage } = require('.nx/scripts/handle-error');
const getProjectDirectory = require('.nx/scripts/get-project-directory');

async function executeFunctionByCommandLineArgument(functions) {
const [functionName, argumentOptionsJson] = process.argv.slice(2);
Expand Down
12 changes: 6 additions & 6 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 All @@ -57,8 +57,8 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.0.3-alpha.0.lmbq-249" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.3.2" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.1.1-alpha.7.osoe-751" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.3.3-alpha.0.osoe-751" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="..\..\..\Utilities\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions.targets" />
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>

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

0 comments on commit 00a8afc

Please sign in to comment.