Skip to content

Commit

Permalink
OCC-313: Update NuGet package versions to fix PNPM problem (#525)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig authored Feb 25, 2025
1 parent 17473fc commit 3fe276f
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 65 deletions.
36 changes: 18 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console) - net6.0",
"name": ".NET Core Launch (console) - net8.0",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Web App: Dotnet Build Debug - net6.0",
"program": "${workspaceRoot}/SampleWebApp/bin/Debug/net6.0/SampleWebApp.dll",
"preLaunchTask": "Web App: Dotnet Build Debug - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Commerce.Web/bin/Debug/net8.0/OrchardCore.Commerce.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/SampleWebApp",
"cwd": "${workspaceRoot}/src/OrchardCore.Commerce.Web",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"stopAtEntry": false
},
{
"name": ".NET Core Launch (web debug) - net6.0",
"name": ".NET Core Launch (web debug) - net8.0",
"type": "coreclr",
"request": "launch",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Web App: Dotnet Build Debug - net6.0",
"program": "${workspaceRoot}/SampleWebApp/bin/Debug/net6.0/SampleWebApp.dll",
"preLaunchTask": "Web App: Dotnet Build Debug - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Commerce.Web/bin/Debug/net8.0/OrchardCore.Commerce.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/SampleWebApp",
"cwd": "${workspaceRoot}/src/OrchardCore.Commerce.Web",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -33,13 +33,13 @@
}
},
{
"name": ".NET Core Launch (web release) - net6.0",
"name": ".NET Core Launch (web release) - net8.0",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Web App: Dotnet Build Release - net6.0",
"program": "${workspaceRoot}/SampleWebApp/bin/Release/net6.0/SampleWebApp.dll",
"preLaunchTask": "Web App: Dotnet Build Release - net8.0",
"program": "${workspaceRoot}/src/OrchardCore.Commerce.Web/bin/Release/net8.0/OrchardCore.Commerce.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/SampleWebApp",
"cwd": "${workspaceRoot}/src/OrchardCore.Commerce.Web",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
Expand All @@ -56,12 +56,12 @@
"processId": "${command:pickProcess}"
},
{
"name": ".NET Core Launch (publish framework dependent) - net6.0",
"name": ".NET Core Launch (publish framework dependent) - net8.0",
"type": "coreclr",
"request": "launch",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Web App: Dotnet Publish (framework dependent) - net6.0",
"program": "${workspaceRoot}/.build/release/SampleWebApp.dll",
"preLaunchTask": "Web App: Dotnet Publish (framework dependent) - net8.0",
"program": "${workspaceRoot}/.build/release/OrchardCore.Commerce.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/.build/release",
"env": {
Expand All @@ -74,12 +74,12 @@
}
},
{
"name": ".NET Core Launch (publish self-contained) - net6.0",
"name": ".NET Core Launch (publish self-contained) - net8.0",
"type": "coreclr",
"request": "launch",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "Web App: Dotnet Publish (self-contained) - net6.0",
"program": "${workspaceRoot}/.build/release/SampleWebApp.dll",
"preLaunchTask": "Web App: Dotnet Publish (self-contained) - net8.0",
"program": "${workspaceRoot}/.build/release/OrchardCore.Commerce.Web.dll",
"args": [],
"cwd": "${workspaceRoot}/.build/release",
"env": {
Expand Down
48 changes: 24 additions & 24 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,52 @@
]
},
{
"label": "Web App: Dotnet Build Debug - net6.0",
"label": "Web App: Dotnet Build Debug - net8.0",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"${workspaceRoot}/SampleWebApp",
"${workspaceRoot}/src/OrchardCore.Commerce.Web",
"-c",
"Debug",
"-f",
"net6.0"
"net8.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "Web App: Dotnet Rebuild Debug - net6.0",
"label": "Web App: Dotnet Rebuild Debug - net8.0",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"${workspaceRoot}/SampleWebApp",
"${workspaceRoot}/src/OrchardCore.Commerce.Web",
"--no-incremental",
"-c",
"Debug",
"-f",
"net6.0"
"net8.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "Web App: Dotnet Build Release - net6.0",
"label": "Web App: Dotnet Build Release - net8.0",
"type": "shell",
"command": "dotnet",
"args": [
"build",
"${workspaceRoot}/SampleWebApp",
"${workspaceRoot}/src/OrchardCore.Commerce.Web",
"-c",
"Release",
"-f",
"net6.0"
"net8.0"
],
"problemMatcher": "$msCompile"
},
{
"label": "Web App: Dotnet Run",
"args": [
"cd ${workspaceRoot}/SampleWebApp & dotnet run"
"cd ${workspaceRoot}/src/OrchardCore.Commerce.Web & dotnet run"
]
},
{
Expand All @@ -126,89 +126,89 @@
]
},
{
"label": "Dotnet Publish (self-contained) - net6.0",
"label": "Dotnet Publish (self-contained) - net8.0",
"type": "shell",
"command": "dotnet",
"windows": {
"command": "dotnet",
"args": [
"publish",
"${workspaceRoot}\\SampleWebApp",
"${workspaceRoot}\\src\\OrchardCore.Commerce.Web",
"--configuration",
"release",
"--runtime",
"win-x64",
"--self-contained",
"--framework",
"net6.0",
"net8.0",
"--output",
".\\.build\\release"
]
},
"args": [
"publish",
"${workspaceRoot}/SampleWebApp",
"${workspaceRoot}/src/OrchardCore.Commerce.Web",
"--configuration",
"release",
"--runtime",
"linux-x64",
"--self-contained",
"--framework",
"net6.0",
"net8.0",
"--output",
"./.build/release"
],
"problemMatcher": "$msCompile"
},
{
"label": "Dotnet Publish (framework dependent) - net6.0",
"label": "Dotnet Publish (framework dependent) - net8.0",
"type": "shell",
"command": "dotnet",
"windows": {
"command": "dotnet",
"args": [
"publish",
"${workspaceRoot}\\SampleWebApp",
"${workspaceRoot}\\src\\OrchardCore.Commerce.Web",
"--configuration",
"release",
"--runtime",
"win-x64",
"--self-contained",
"false",
"--framework",
"net6.0",
"net8.0",
"--output",
".\\.build\\release"
]
},
"args": [
"publish",
"${workspaceRoot}/SampleWebApp",
"${workspaceRoot}/src/OrchardCore.Commerce.Web",
"--configuration",
"release",
"--runtime",
"linux-x64",
"--self-contained",
"false",
"--framework",
"net6.0",
"net8.0",
"--output",
"./.build/release"
],
"problemMatcher": "$msCompile"
},
{
"label": "Web App: Dotnet Publish (self-contained) - net6.0",
"label": "Web App: Dotnet Publish (self-contained) - net8.0",
"dependsOn": [
"Cleanup build folder",
"Dotnet Publish (self-contained) - net6.0"
"Dotnet Publish (self-contained) - net8.0"
]
},
{
"label": "Web App: Dotnet Publish (framework dependent) - net6.0",
"label": "Web App: Dotnet Publish (framework dependent) - net8.0",
"dependsOn": [
"Cleanup build folder",
"Dotnet Publish (framework dependent) - net6.0"
"Dotnet Publish (framework dependent) - net8.0"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
</PropertyGroup>

<ItemGroup>
<PackageVersion Include="Lombiq.Analyzers.OrchardCore" Version="5.0.0" />
<PackageVersion Include="Lombiq.Analyzers.OrchardCore" Version="5.2.0" />
<PackageVersion Include="Lombiq.HelpfulLibraries.OrchardCore" Version="$(LombiqHelpfulLibrariesVersion)" />
<PackageVersion Include="Lombiq.HelpfulLibraries.AspNetCore" Version="$(LombiqHelpfulLibrariesVersion)" />
<PackageVersion Include="Lombiq.HelpfulLibraries.Refit" Version="$(LombiqHelpfulLibrariesVersion)" />
<PackageVersion Include="Lombiq.NodeJs.Extensions" Version="2.1.1" />
<PackageVersion Include="Lombiq.NodeJs.Extensions" Version="2.1.2" />
<PackageVersion Include="Lombiq.Tests" Version="4.0.0" />
<PackageVersion Include="Lombiq.Tests.UI" Version="$(LombiqTestsUIVersion)" />
<PackageVersion Include="Lombiq.Tests.UI.AppExtensions" Version="$(LombiqTestsUIVersion)" />
<PackageVersion Include="Lombiq.Tests.UI.Shortcuts" Version="$(LombiqTestsUIVersion)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OrchardCore.Application.Cms.Targets" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.ContentFields" Version="$(OrchardCoreVersion)" />
Expand All @@ -41,10 +41,10 @@
<PackageVersion Include="OrchardCore.Templates" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.Title" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="OrchardCore.Workflows.Abstractions" Version="$(OrchardCoreVersion)" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="Stripe.net" Version="44.13.0" />
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
<PackageVersion Include="System.Text.Json" Version="9.0.2" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"private": true,
"devDependencies": {
"all-contributors-cli": "^6.20.0"
}
},
"packageManager": "[email protected]+sha1.aa4bc353b5f59fe1f1df5d802ce049ddf7f3c60e"
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace OrchardCore.Commerce.Payment.Stripe.Controllers;
[Route("stripe-webhook")]
[ApiController]
[Authorize(AuthenticationSchemes = "Api"), IgnoreAntiforgeryToken, AllowAnonymous]
public class WebhookController : Controller
public class WebhookController : ControllerBase
{
private readonly ISiteService _siteService;
private readonly IDataProtectionProvider _dataProtectionProvider;
Expand All @@ -38,7 +38,7 @@ public WebhookController(
}

[HttpPost]
public async Task<IActionResult> Index()
public async Task<IActionResult> Index([FromHeader(Name = "Stripe-Signature")] string signature)
{
using var streamReader = new StreamReader(HttpContext.Request.Body);
var json = await streamReader.ReadToEndAsync(HttpContext.RequestAborted);
Expand All @@ -49,7 +49,7 @@ public async Task<IActionResult> Index()

var stripeEvent = _stripeHelperService.PrepareStripeEvent(
json,
Request.Headers["Stripe-Signature"],
signature,
webhookSigningKey,
// Let the logic handle version mismatch.
throwOnApiVersionMismatch: false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ await _contentDefinitionManager
{
// This is fine, it just means that the table didn't exist.
_logger.LogInformation(
exception,
"The table {TableName} didn't exist so it couldn't be dropped, full exception message: {ExceptionMessage}",
typeof(OrderPaymentIndex),
exception.Message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected PaymentBaseController(INotifier notifier, ILogger logger)
_logger = logger;
}

public async Task<IActionResult> ProduceActionResultAsync(PaymentOperationStatusViewModel paidStatusViewModel)
protected async Task<IActionResult> ProduceActionResultAsync(PaymentOperationStatusViewModel paidStatusViewModel)
{
if (paidStatusViewModel.ShowMessage != null)
{
Expand Down Expand Up @@ -82,7 +82,7 @@ private RedirectToActionResult RedirectToActionWithParams<TController>(
: returnUrl;
}

object? routeValues = new { area, returnUrl = localReturnUrl };
object routeValues = new { area, returnUrl = localReturnUrl };

if (!string.IsNullOrEmpty(orderId))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task<ActionResult> Update(ShoppingCartUpdateModel cart, string shop
// Check if there are any line items that failed to deserialize. This can only happen if the shopping cart
// update model was manually altered or if a product from cart was removed in the backend. This is however
// unlikely, because products should be made unavailable rather than deleted.
if (lines.Any(line => line.Item == null))
if (!ModelState.IsValid || lines.Any(line => line.Item == null))
{
await _shoppingCartPersistence.StoreAsync(new ShoppingCart(), shoppingCartId);

Expand Down Expand Up @@ -185,7 +185,10 @@ public async Task<ActionResult> AddItem(ShoppingCartLineUpdateModel line, string
{
try
{
if (await _shoppingCartSerializer.ParseCartLineAsync(line) is not { } shoppingCartItem) return NotFound();
if (!ModelState.IsValid || await _shoppingCartSerializer.ParseCartLineAsync(line) is not { } shoppingCartItem)
{
return NotFound();
}

var parsedLine = await _shoppingCartHelpers.AddToCartAsync(
shoppingCartId,
Expand All @@ -208,10 +211,14 @@ await _workflowManagers.TriggerEventAsync<ProductAddedToCartEvent>(
[ValidateAntiForgeryToken]
public async Task<ActionResult> RemoveItem(ShoppingCartLineUpdateModel line, string shoppingCartId = null)
{
var parsedLine = await _shoppingCartSerializer.ParseCartLineAsync(line);
var cart = await _shoppingCartPersistence.RetrieveAsync(shoppingCartId);
cart.RemoveItem(parsedLine);
await _shoppingCartPersistence.StoreAsync(cart, shoppingCartId);
if (ModelState.IsValid)
{
var parsedLine = await _shoppingCartSerializer.ParseCartLineAsync(line);
var cart = await _shoppingCartPersistence.RetrieveAsync(shoppingCartId);
cart.RemoveItem(parsedLine);
await _shoppingCartPersistence.StoreAsync(cart, shoppingCartId);
}

return RedirectToAction(nameof(Index), new { shoppingCartId });
}
}
Loading

0 comments on commit 3fe276f

Please sign in to comment.