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

OCC-218: Update NuGet packages and migrate to centralized package management #410

Merged
merged 14 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Contributors.md$
docs/releases
docs/requirements\.txt$
mkdocs\.yml$
Directory.Packages.props$
src/Libraries/OrchardCore\.Commerce\.MoneyDataType/Currency\.extra\.cs$
src/Modules/OrchardCore\.Commerce\.Payment/Constants/CurrencyCollectionConstants\.cs$
src/Modules/OrchardCore\.Commerce\.Payment\.Stripe/Extensions/PaymentExtensions\.cs$
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>-->

<ItemGroup>
<PackageReference Condition="!Exists($(LombiqAnalyzersPath))" Include="Lombiq.Analyzers.OrchardCore" Version="5.0.0">
<PackageReference Condition="!Exists($(LombiqAnalyzersPath))" Include="Lombiq.Analyzers.OrchardCore">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
38 changes: 38 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Lombiq.Analyzers.OrchardCore" Version="5.0.0" />
<PackageVersion Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageVersion Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageVersion Include="Lombiq.Tests" Version="3.0.0" />
<PackageVersion Include="Lombiq.Tests.UI" Version="9.0.1-alpha.2.occ-218" />
<PackageVersion Include="Lombiq.Tests.UI.AppExtensions" Version="9.0.1-alpha.2.occ-218" />
<PackageVersion Include="Lombiq.Tests.UI.Shortcuts" Version="9.0.1-alpha.2.occ-218" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OrchardCore.Application.Cms.Targets" Version="1.8.2" />
Piedone marked this conversation as resolved.
Show resolved Hide resolved
<PackageVersion Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageVersion Include="OrchardCore.ContentManagement" Version="1.8.2" />
<PackageVersion Include="OrchardCore.ContentManagement.Abstractions" Version="1.8.2" />
<PackageVersion Include="OrchardCore.ContentTypes" Version="1.8.2" />
<PackageVersion Include="OrchardCore.ContentTypes.Abstractions" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Html" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Indexing.Abstractions" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Localization" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Logging.NLog" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Navigation.Core" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Templates" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Title" Version="1.8.2" />
<PackageVersion Include="OrchardCore.Workflows.Abstractions" Version="1.8.2" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="Stripe.net" Version="43.15.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.2" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
</ItemGroup>
</Project>
21 changes: 18 additions & 3 deletions Nuget.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Based on https://learn.microsoft.com/en-us/nuget/consume-packages/package-source-mapping#enable-by-manually-editing-nugetconfig. -->
<configuration>
<packageSources>
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<!-- Define the package sources, `clear` ensures no additional sources are inherited from another config file. -->
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="orchardcore-commerce" value="https://nuget.cloudsmith.io/orchardcore/commerce/v3/index.json" />
</packageSources>

<!-- Define mappings by adding package patterns beneath the target source. -->
<!-- OrchardCore.Commerce* packages will be restored from orchardcore-commerce, everything else from nuget.org. -->
<packageSourceMapping>
Piedone marked this conversation as resolved.
Show resolved Hide resolved
<packageSource key="NuGet">
<package pattern="*" />
</packageSource>
<packageSource key="orchardcore-commerce">
<package pattern="OrchardCore.Commerce*" />
</packageSource>
</packageSourceMapping>
</configuration>
1 change: 1 addition & 0 deletions OrchardCore.Commerce.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Nuget.config = Nuget.config
Readme.md = Readme.md
Reset-Local.ps1 = Reset-Local.ps1
Directory.Packages.props = Directory.Packages.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B2D057AA-E3F7-404D-A713-C3C59F9DE562}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" />
</ItemGroup>

<ItemGroup Condition="Exists($(LombiqHelpfulLibrariesPath))">
<ProjectReference Include="$(LombiqHelpfulLibrariesPath)\Lombiq.HelpfulLibraries.OrchardCore/Lombiq.HelpfulLibraries.OrchardCore.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists($(LombiqHelpfulLibrariesPath))">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Text.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Indexing.Abstractions" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.Templates" Version="1.8.2" />
<PackageReference Include="OrchardCore.Indexing.Abstractions" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="OrchardCore.Templates" />
</ItemGroup>

<ItemGroup>
Expand All @@ -41,7 +41,7 @@
<ProjectReference Include="$(LombiqHelpfulLibrariesPath)\Lombiq.HelpfulLibraries.OrchardCore/Lombiq.HelpfulLibraries.OrchardCore.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists($(LombiqHelpfulLibrariesPath))">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" />
</ItemGroup>

<ItemGroup Condition="Exists($(LombiqNodeJsExtensionsPath))">
Expand All @@ -52,7 +52,7 @@
<Import Project="$(LombiqNodeJsExtensionsPath)\Lombiq.NodeJs.Extensions.targets" />
</ImportGroup>
<ItemGroup Condition="!Exists($(LombiqNodeJsExtensionsPath))">
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageReference Include="Lombiq.NodeJs.Extensions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" />
<PackageReference Include="OrchardCore.ContentManagement" />
<PackageReference Include="OrchardCore.Module.Targets" />
</ItemGroup>

<ItemGroup Condition="Exists($(LombiqHelpfulLibrariesPath))">
<ProjectReference Include="$(LombiqHelpfulLibrariesPath)\Lombiq.HelpfulLibraries.OrchardCore/Lombiq.HelpfulLibraries.OrchardCore.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists($(LombiqHelpfulLibrariesPath))">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2"/>
<PackageReference Include="Stripe.net" Version="41.27.0" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="Stripe.net" />
</ItemGroup>

<ItemGroup>
Expand All @@ -45,7 +45,7 @@
<Import Project="$(LombiqNodeJsExtensionsPath)\Lombiq.NodeJs.Extensions.targets" />
</ImportGroup>
<ItemGroup Condition="!Exists($(LombiqNodeJsExtensionsPath))">
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageReference Include="Lombiq.NodeJs.Extensions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" />
<PackageReference Include="OrchardCore.ContentManagement" />
<PackageReference Include="OrchardCore.Module.Targets" />
</ItemGroup>

<ItemGroup Condition="Exists($(LombiqHelpfulLibrariesPath))">
<ProjectReference Include="$(LombiqHelpfulLibrariesPath)\Lombiq.HelpfulLibraries.OrchardCore/Lombiq.HelpfulLibraries.OrchardCore.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists($(LombiqHelpfulLibrariesPath))">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" />
</ItemGroup>

<ItemGroup Condition="Exists($(LombiqNodeJsExtensionsPath))">
Expand All @@ -54,7 +54,7 @@
<Import Project="$(LombiqNodeJsExtensionsPath)\Lombiq.NodeJs.Extensions.targets" />
</ImportGroup>
<ItemGroup Condition="!Exists($(LombiqNodeJsExtensionsPath))">
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageReference Include="Lombiq.NodeJs.Extensions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="OrchardCore.ContentFields" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="OrchardCore.ContentFields" />
</ItemGroup>

<ItemGroup>
Expand Down
22 changes: 11 additions & 11 deletions src/Modules/OrchardCore.Commerce/OrchardCore.Commerce.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentTypes" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentTypes.Abstractions" Version="1.8.2" />
<PackageReference Include="OrchardCore.Html" Version="1.8.2" />
<PackageReference Include="OrchardCore.Localization" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.Navigation.Core" Version="1.8.2" />
<PackageReference Include="OrchardCore.Title" Version="1.8.2" />
<PackageReference Include="OrchardCore.Workflows.Abstractions" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentFields" />
<PackageReference Include="OrchardCore.ContentManagement" />
<PackageReference Include="OrchardCore.ContentTypes" />
<PackageReference Include="OrchardCore.ContentTypes.Abstractions" />
<PackageReference Include="OrchardCore.Html" />
<PackageReference Include="OrchardCore.Localization" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="OrchardCore.Navigation.Core" />
<PackageReference Include="OrchardCore.Title" />
<PackageReference Include="OrchardCore.Workflows.Abstractions" />
</ItemGroup>

<ItemGroup>
Expand All @@ -60,7 +60,7 @@
<Import Project="$(LombiqNodeJsExtensionsPath)\Lombiq.NodeJs.Extensions.targets" />
</ImportGroup>
<ItemGroup Condition="!Exists($(LombiqNodeJsExtensionsPath))">
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
<PackageReference Include="Lombiq.NodeJs.Extensions" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/OrchardCore.Commerce.Web/OrchardCore.Commerce.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</ItemGroup> -->

<ItemGroup>
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="8.2.1-alpha.14.osoe-767" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" Version="8.2.1-alpha.14.osoe-767" />
<PackageReference Include="OrchardCore.Application.Cms.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.Logging.NLog" Version="1.8.2" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" />
<PackageReference Include="Lombiq.Tests.UI.Shortcuts" />
<PackageReference Include="OrchardCore.Application.Cms.Targets" />
<PackageReference Include="OrchardCore.Logging.NLog" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Module.Targets" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentManagement" Version="1.8.2" />
<PackageReference Include="OrchardCore.ContentManagement.Abstractions" Version="1.8.2" />
<PackageReference Include="OrchardCore.Module.Targets" />
<PackageReference Include="OrchardCore.ContentManagement" />
<PackageReference Include="OrchardCore.ContentManagement.Abstractions" />
</ItemGroup>

<ItemGroup>
Expand All @@ -44,7 +44,7 @@
<ProjectReference Include="$(LombiqHelpfulLibrariesPath)\Lombiq.HelpfulLibraries.OrchardCore/Lombiq.HelpfulLibraries.OrchardCore.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists($(LombiqHelpfulLibrariesPath))">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="9.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Lombiq.Tests.UI" Version="9.0.0" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PackageReference Include="Lombiq.Tests.UI" />
<PackageReference Include="Lombiq.Tests.UI.AppExtensions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public Task FullSecurityScanShouldPass() =>
context => context.RunAndConfigureAndAssertFullSecurityScanForContinuousIntegrationAsync(
configuration =>
{
configuration.DisableActiveScanRule(
6,
"Path Traversal (all paths are virtual so it's not a real concern, also creates too many errors)");

configuration.DisableActiveScanRule(
40024,
"SQL Injection - SQLite (everything goes through YesSql so these are false positive)");
Expand All @@ -38,15 +42,15 @@ public Task FullSecurityScanShouldPass() =>
}),
changeConfiguration: configuration => configuration.AssertAppLogsAsync = async webApplicationInstance =>
{
var logsWithoutUnwantedExpectionMessages = (await webApplicationInstance.GetLogOutputAsync())
var logsWithoutUnwantedExceptionMessages = (await webApplicationInstance.GetLogOutputAsync())
.SplitByNewLines()
.Where(message =>
!message.ContainsOrdinalIgnoreCase("System.IO.DirectoryNotFoundException: Could not find a part of the path") &&
!message.ContainsOrdinalIgnoreCase(
"System.IO.IOException: The filename, directory name, or volume label syntax is incorrect") &&
!message.ContainsOrdinalIgnoreCase("System.InvalidOperationException: This action intentionally causes an exception!"));

logsWithoutUnwantedExpectionMessages.ShouldNotContain(item => item.Contains("|ERROR|"));
logsWithoutUnwantedExceptionMessages.ShouldNotContain(item => item.Contains("|ERROR|"));
});

private static void FalsePositive(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Lombiq.Tests" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="OrchardCore.ContentFields" Version="1.8.2" />
<PackageReference Include="Shouldly" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.5.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1">
<PackageReference Include="Lombiq.Tests" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="OrchardCore.ContentFields" />
<PackageReference Include="Shouldly" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading