From 204bb9f9f2c56d854a2f6b089a611ee568de5b9d Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Mon, 7 Nov 2022 18:58:47 +0000 Subject: [PATCH] Update to ASP.NET Core 7 (#130) * Update to ASP.NET Core 7 preview 1 Update to preview 1 of ASP.NET Core 7. * Fix compiler warning Fix compiler warning about possible null. * Update to ASP.NET Core 7 preview 2 Update to preview 2 of ASP.NET Core 7. * Update to ASP.NET Core 7 preview 3 Update to preview 3 of ASP.NET Core 7. * Update to ASP.NET Core 7 preview 4 Update to preview 4 of ASP.NET Core 7. * Update to ASP.NET Core 7 preview 5 Update to preview 5 of ASP.NET Core 7. * Update to ASP.NET Core 7 preview 6 Update to preview 6 of ASP.NET Core 7. * Update to ASP.NET Core 7 preview 7 Update to preview 7 of ASP.NET Core 7. * Update to ASP.NET Core 7 RC1 Update to release candidate 1 of ASP.NET Core 7. * Update to ASP.NET Core 7 RC2 Update to release candidate 2 of ASP.NET Core 7. * Update to ASP.NET Core 7 Update to the stable release of ASP.NET Core 7. --- .vscode/launch.json | 2 +- Directory.Build.props | 2 +- README.md | 2 +- global.json | 2 +- src/ApplePayJS/ApplePayJS.csproj | 3 +-- src/ApplePayJS/Views/Home/Index.cshtml | 2 +- src/ApplePayJS/package-lock.json | 2 +- src/ApplePayJS/package.json | 2 +- tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj | 4 ++-- 9 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3be2d8c9..80daf82f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net6.0/JustEat.ApplePayJS.dll", + "program": "${workspaceRoot}/src/ApplePayJS/bin/Debug/net7.0/JustEat.ApplePayJS.dll", "args": [], "cwd": "${workspaceRoot}/src/ApplePayJS", "stopAtEntry": false, diff --git a/Directory.Build.props b/Directory.Build.props index 7d6172ff..3b8829ee 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -15,7 +15,7 @@ git $(PackageProjectUrl).git latest - 6.0.0 + 7.0.0 diff --git a/README.md b/README.md index 0747c000..2fdc761e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The key components to look at for the implementation are: To setup the repository to run the sample, perform the steps below: - 1. Install the latest [.NET 6.0 SDK](https://www.microsoft.com/net/download/core), Visual Studio 2022 or Visual Studio Code. + 1. Install the latest [.NET 7 SDK](https://www.microsoft.com/net/download/core), Visual Studio 2022 or Visual Studio Code. 1. Fork this repository. 1. Clone the repository from your fork to your local machine: ```git clone https://github.com/{username}/ApplePayJSSample.git``` 1. Restore the Bower, npm and NuGet packages. diff --git a/global.json b/global.json index 885a35ba..2f0eef9a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.402", + "version": "7.0.100", "allowPrerelease": false } } diff --git a/src/ApplePayJS/ApplePayJS.csproj b/src/ApplePayJS/ApplePayJS.csproj index f1511ab6..244e4ccf 100644 --- a/src/ApplePayJS/ApplePayJS.csproj +++ b/src/ApplePayJS/ApplePayJS.csproj @@ -11,7 +11,7 @@ applepay true JustEat.ApplePayJS - net6.0 + net7.0 latest JustEat.ApplePayJS @@ -32,7 +32,6 @@ - diff --git a/src/ApplePayJS/Views/Home/Index.cshtml b/src/ApplePayJS/Views/Home/Index.cshtml index b434a90d..9c3e01cc 100644 --- a/src/ApplePayJS/Views/Home/Index.cshtml +++ b/src/ApplePayJS/Views/Home/Index.cshtml @@ -11,7 +11,7 @@ ViewData["Title"] = "Sample integration"; var token = Antiforgery.GetAndStoreTokens(Context); - var language = Context.Request.Query["lang"].FirstOrDefault() ?? Config["ApplePay:DefaultLanguage"]; + var language = Context.Request.Query["lang"].FirstOrDefault() ?? Config["ApplePay:DefaultLanguage"] ?? string.Empty; var region = new System.Globalization.RegionInfo(language); var countryCode = region.TwoLetterISORegionName; diff --git a/src/ApplePayJS/package-lock.json b/src/ApplePayJS/package-lock.json index 94ec30a1..4326f1bd 100644 --- a/src/ApplePayJS/package-lock.json +++ b/src/ApplePayJS/package-lock.json @@ -1,6 +1,6 @@ { "name": "justeatapplepayjs", - "version": "6.0.0", + "version": "7.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/ApplePayJS/package.json b/src/ApplePayJS/package.json index 3dd01e76..8efd84f6 100644 --- a/src/ApplePayJS/package.json +++ b/src/ApplePayJS/package.json @@ -1,7 +1,7 @@ { "name": "justeatapplepayjs", "private": true, - "version": "6.0.0", + "version": "7.0.0", "devDependencies": { "@types/applepayjs": "3.0.0", "@types/jquery": "3.3.34", diff --git a/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj b/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj index c18f778c..07da3ec9 100644 --- a/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj +++ b/tests/ApplePayJS.Tests/ApplePayJS.Tests.csproj @@ -1,6 +1,6 @@ - net6.0 + net7.0 false @@ -11,7 +11,7 @@ - +