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

Update to ASP.NET Core 9 #354

Merged
merged 11 commits into from
Nov 12, 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
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net8.0/JustEat.ApplePayJS.dll",
"program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net9.0/JustEat.ApplePayJS.dll",
"args": [],
"cwd": "${workspaceRoot}/src/ApplePayJS",
"stopAtEntry": false,
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>$(PackageProjectUrl).git</RepositoryUrl>
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
<VersionPrefix>8.0.0</VersionPrefix>
<VersionPrefix>9.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.404",
"version": "9.0.100",
"allowPrerelease": false
}
}
2 changes: 1 addition & 1 deletion src/ApplePayJS/ApplePayJS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageTags>applepay</PackageTags>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RootNamespace>JustEat.ApplePayJS</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<TypeScriptToolsVersion>latest</TypeScriptToolsVersion>
<UserSecretsId>JustEat.ApplePayJS</UserSecretsId>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ApplePayJS/Clients/MerchantCertificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static X509Certificate2 LoadCertificateFromBase64String(string encoded,

return X509Certificate2.GetCertContentType(rawData) switch
{
X509ContentType.Pfx => new X509Certificate2(rawData, password),
X509ContentType.Pfx => X509CertificateLoader.LoadPkcs12(rawData, password),
_ => throw new NotSupportedException("The format of the encoded Apple Pay merchant certificate is not supported."),
};
}
Expand All @@ -71,7 +71,7 @@ private static X509Certificate2 LoadCertificateFromDisk(string? fileName, string
{
try
{
return new X509Certificate2(
return X509CertificateLoader.LoadPkcs12FromFile(
fileName ?? string.Empty,
password);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ApplePayJS/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ApplePayJS/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "justeatapplepayjs",
"private": true,
"version": "8.0.0",
"version": "9.0.0",
"devDependencies": {
"@types/applepayjs": "3.0.0",
"@types/jquery": "3.3.34",
Expand Down
4 changes: 2 additions & 2 deletions tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
Expand All @@ -11,7 +11,7 @@
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageReference Include="JustEat.HttpClientInterception" Version="4.3.0" />
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Microsoft.Playwright" Version="1.48.0" />
<PackageReference Include="Shouldly" Version="4.2.1" />
Expand Down
2 changes: 1 addition & 1 deletion tests/ApplePayJS.Tests/TestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)

builder.ConfigureKestrel(
(kestrelOptions) => kestrelOptions.ConfigureHttpsDefaults(
(connectionOptions) => connectionOptions.ServerCertificate = new X509Certificate2("localhost-dev.pfx", "Pa55w0rd!")));
(connectionOptions) => connectionOptions.ServerCertificate = X509CertificateLoader.LoadPkcs12FromFile("localhost-dev.pfx", "Pa55w0rd!")));

// Configure the server address for the server to listen on for HTTP requests
builder.UseUrls("https://127.0.0.1:0");
Expand Down