diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2dee241df..2f2ad861c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Set up dotnet tools run: make install install-styleguide @@ -31,7 +31,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Set up dotnet tools run: make install install-styleguide @@ -51,7 +51,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Set up dotnet tools and dependencies run: make install @@ -67,7 +67,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Set up dotnet tools and dependencies run: make install @@ -102,7 +102,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Install docfx run: make install-tools @@ -124,21 +124,21 @@ jobs: EASYPOST_PROD_API_KEY: "123" strategy: matrix: - name: [ 'NetStandard20', 'Net50', 'Net60', 'Net70', 'Net80' ] + name: [ 'NetStandard20', 'Net60', 'Net70', 'Net80', 'Net90' ] include: - name: NetStandard20 # can't run tests on .NET Standard, it's just a bridge between .NET Framework and .NET. # So we'll target .NET Framework 4.6.2 # More notes at the bottom of this file framework: net462 - - name: Net50 - framework: net5.0 - name: Net60 framework: net6.0 - name: Net70 framework: net7.0 - name: Net80 framework: net8.0 + - name: Net90 + framework: net9.0 steps: - uses: actions/checkout@v4 with: @@ -147,10 +147,11 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - # .NET 5.0 is deprecated and removed from GitHub Actions, we need to manually install it dotnet-version: | - 5.x.x + 6.x.x + 7.x.x 8.x.x + 9.x.x - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.1.2 @@ -187,7 +188,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.1.2 @@ -207,7 +208,7 @@ jobs: # Run the integration tests - name: Run Tests - run: make integration-test fw=net7.0 # Always run integration tests on the latest framework + run: make integration-test fw=net9.0 # Always run integration tests on the latest framework FSharp_Compatibility_Tests: runs-on: windows-2022 @@ -219,7 +220,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.1.2 @@ -239,7 +240,7 @@ jobs: # Run the compatibility tests - name: Run Tests - run: make fs-compat-test fw=net7.0 # Always run compatibility tests on the latest framework + run: make fs-compat-test fw=net9.0 # Always run compatibility tests on the latest framework Visual_Basic_Compatibility_Test: runs-on: windows-2022 @@ -252,7 +253,7 @@ jobs: - name: Install .NET SDK uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x.x + dotnet-version: 9.x.x - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.1.2 @@ -272,7 +273,7 @@ jobs: # Run the compatibility tests - name: Run Tests - run: make vb-compat-test fw=net7.0 # Always run compatibility tests on the latest framework + run: make vb-compat-test fw=net9.0 # Always run compatibility tests on the latest framework # .NET Standard notes: diff --git a/EasyPost.Compatibility.FSharp/EasyPost.Compatibility.FSharp.fsproj b/EasyPost.Compatibility.FSharp/EasyPost.Compatibility.FSharp.fsproj index 028edf681..bf58593e9 100644 --- a/EasyPost.Compatibility.FSharp/EasyPost.Compatibility.FSharp.fsproj +++ b/EasyPost.Compatibility.FSharp/EasyPost.Compatibility.FSharp.fsproj @@ -1,7 +1,7 @@  - net8.0 + net9.0 true true EasyPost.Compatibility.FSharp diff --git a/EasyPost.Compatibility.FSharp/packages.lock.json b/EasyPost.Compatibility.FSharp/packages.lock.json index bec50d617..7fd532669 100644 --- a/EasyPost.Compatibility.FSharp/packages.lock.json +++ b/EasyPost.Compatibility.FSharp/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net8.0": { + "net9.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", diff --git a/EasyPost.Compatibility.VB/EasyPost.Compatibility.VB.vbproj b/EasyPost.Compatibility.VB/EasyPost.Compatibility.VB.vbproj index 51bf2832c..d78a4cc28 100644 --- a/EasyPost.Compatibility.VB/EasyPost.Compatibility.VB.vbproj +++ b/EasyPost.Compatibility.VB/EasyPost.Compatibility.VB.vbproj @@ -2,7 +2,7 @@ EasyPost.Compatibility.VB - net8.0 + net9.0 true diff --git a/EasyPost.Compatibility.VB/packages.lock.json b/EasyPost.Compatibility.VB/packages.lock.json index b480aa81e..c86ff612a 100644 --- a/EasyPost.Compatibility.VB/packages.lock.json +++ b/EasyPost.Compatibility.VB/packages.lock.json @@ -1,7 +1,7 @@ { "version": 1, "dependencies": { - "net8.0": { + "net9.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", diff --git a/EasyPost.Integration/EasyPost.Integration.csproj b/EasyPost.Integration/EasyPost.Integration.csproj index 316dc78cb..e48ec9aae 100644 --- a/EasyPost.Integration/EasyPost.Integration.csproj +++ b/EasyPost.Integration/EasyPost.Integration.csproj @@ -1,7 +1,7 @@ - net462;net5.0;net6.0;net7.0;net8.0 + net462;net6.0;net7.0;net8.0;net9.0 latest enable enable diff --git a/EasyPost.Tests/EasyPost.Tests.csproj b/EasyPost.Tests/EasyPost.Tests.csproj index e7e840489..6abad3ffc 100644 --- a/EasyPost.Tests/EasyPost.Tests.csproj +++ b/EasyPost.Tests/EasyPost.Tests.csproj @@ -1,6 +1,6 @@ - net462;net5.0;net6.0;net7.0;net8.0 + net462;net6.0;net7.0;net8.0;net9.0 false diff --git a/EasyPost.Tests/ExceptionsTests/ExceptionsTest.cs b/EasyPost.Tests/ExceptionsTests/ExceptionsTest.cs index 5ba926891..4fb58127b 100644 --- a/EasyPost.Tests/ExceptionsTests/ExceptionsTest.cs +++ b/EasyPost.Tests/ExceptionsTests/ExceptionsTest.cs @@ -15,6 +15,7 @@ namespace EasyPost.Tests.ExceptionsTests { +#pragma warning disable CA2263 public class ExceptionsTests : UnitTest { public ExceptionsTests() : base("exceptions") @@ -31,6 +32,7 @@ public async Task TestApiExceptionPrettyPrint() // Generate a dummy HttpResponseMessage with the given status code to parse HttpStatusCode httpStatusCode = (HttpStatusCode)Enum.Parse(typeof(HttpStatusCode), statusCode.ToString(CultureInfo.InvariantCulture)); + HttpResponseMessage response = new() { StatusCode = httpStatusCode }; ApiError generatedError = await ApiError.FromErrorResponse(response); @@ -480,4 +482,5 @@ public async Task TestHTTPTimeoutFriendlyException() #endregion } +#pragma warning restore CA2263 } diff --git a/EasyPost.Tests/packages.lock.json b/EasyPost.Tests/packages.lock.json index 725b00ac9..b95299cd8 100644 --- a/EasyPost.Tests/packages.lock.json +++ b/EasyPost.Tests/packages.lock.json @@ -264,7 +264,7 @@ } } }, - ".NETCoreApp,Version=v5.0": { + "net6.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", @@ -375,11 +375,7 @@ "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==", - "dependencies": { - "System.Buffers": "4.5.1", - "System.Memory": "4.5.4" - } + "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -426,11 +422,6 @@ "resolved": "5.11.0", "contentHash": "eaiXkUjC4NPcquGWzAGMXjuxvLwc6XGKMptSyOGQeT0X70BUZObuybJFZLA0OfTdueLd3US23NBPTBb6iF3V1Q==" }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.5.1", - "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" - }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", "resolved": "6.0.0", @@ -439,11 +430,6 @@ "System.Runtime.CompilerServices.Unsafe": "6.0.0" } }, - "System.Memory": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==" - }, "System.Reflection.Metadata": { "type": "Transitive", "resolved": "1.6.0", @@ -506,7 +492,7 @@ } } }, - "net6.0": { + "net7.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", @@ -734,7 +720,7 @@ } } }, - "net7.0": { + "net8.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", @@ -962,7 +948,7 @@ } } }, - "net8.0": { + "net9.0": { "coverlet.collector": { "type": "Direct", "requested": "[3.1.2, 4.0.0)", diff --git a/EasyPost.nuspec b/EasyPost.nuspec index 74d950088..a1e07b288 100644 --- a/EasyPost.nuspec +++ b/EasyPost.nuspec @@ -9,8 +9,8 @@ https://www.easypost.com MIT false - EasyPost Shipping API Client Library for .NET https://easypost.com/docs - EasyPost ShippingAPI USPS UPS FedEx + EasyPost Shipping API Client Library for .NET https://docs.easypost.com + EasyPost shipping API USPS UPS FedEx DHL CanadaPost RoyalMail mail package logistics rate insurance docs\README.md See Release Notes at https://github.com/EasyPost/easypost-csharp/releases images\icon.png @@ -18,9 +18,6 @@ - - - @@ -30,19 +27,22 @@ + + + - - + + diff --git a/EasyPost/EasyPost.csproj b/EasyPost/EasyPost.csproj index 9c979fbb1..d35ee207c 100644 --- a/EasyPost/EasyPost.csproj +++ b/EasyPost/EasyPost.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net5.0;net6.0;net7.0;net8.0 + netstandard2.0;net6.0;net7.0;net8.0;net9.0 enable enable Library diff --git a/EasyPost/Parameters/Tracker/CreateList.cs b/EasyPost/Parameters/Tracker/CreateList.cs index 0179bac6b..62559b23b 100644 --- a/EasyPost/Parameters/Tracker/CreateList.cs +++ b/EasyPost/Parameters/Tracker/CreateList.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; @@ -6,9 +7,10 @@ namespace EasyPost.Parameters.Tracker { /// - /// Parameters for API calls. + /// This parameter set is no longer used. /// [ExcludeFromCodeCoverage] + [Obsolete("This parameter set is no longer used.")] public class CreateList : BaseParameters, ITrackerParameter { #region Request Parameters @@ -67,8 +69,9 @@ public override Dictionary ToDictionary() } /// - /// Internal class used to construct a parameter set. + /// This class is no longer used. /// + [Obsolete("This class is no longer used.")] internal sealed class CreateListTracker { /// diff --git a/EasyPost/packages.lock.json b/EasyPost/packages.lock.json index 770e1509a..0e840452f 100644 --- a/EasyPost/packages.lock.json +++ b/EasyPost/packages.lock.json @@ -17,112 +17,42 @@ "resolved": "13.0.1", "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" }, - "StyleCop.Analyzers": { - "type": "Direct", - "requested": "[1.2.0-beta.435, )", - "resolved": "1.2.0-beta.435", - "contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==", - "dependencies": { - "StyleCop.Analyzers.Unstable": "1.2.0.435" - } - }, "Microsoft.NETCore.Platforms": { "type": "Transitive", "resolved": "1.1.0", "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "StyleCop.Analyzers.Unstable": { - "type": "Transitive", - "resolved": "1.2.0.435", - "contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg==" } }, - ".NETCoreApp,Version=v5.0": { + "net6.0": { "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.1, 14.0.0)", "resolved": "13.0.1", "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "StyleCop.Analyzers": { - "type": "Direct", - "requested": "[1.2.0-beta.435, )", - "resolved": "1.2.0-beta.435", - "contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==", - "dependencies": { - "StyleCop.Analyzers.Unstable": "1.2.0.435" - } - }, - "StyleCop.Analyzers.Unstable": { - "type": "Transitive", - "resolved": "1.2.0.435", - "contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg==" } }, - "net6.0": { + "net7.0": { "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.1, 14.0.0)", "resolved": "13.0.1", "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "StyleCop.Analyzers": { - "type": "Direct", - "requested": "[1.2.0-beta.435, )", - "resolved": "1.2.0-beta.435", - "contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==", - "dependencies": { - "StyleCop.Analyzers.Unstable": "1.2.0.435" - } - }, - "StyleCop.Analyzers.Unstable": { - "type": "Transitive", - "resolved": "1.2.0.435", - "contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg==" } }, - "net7.0": { + "net8.0": { "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.1, 14.0.0)", "resolved": "13.0.1", "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "StyleCop.Analyzers": { - "type": "Direct", - "requested": "[1.2.0-beta.435, )", - "resolved": "1.2.0-beta.435", - "contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==", - "dependencies": { - "StyleCop.Analyzers.Unstable": "1.2.0.435" - } - }, - "StyleCop.Analyzers.Unstable": { - "type": "Transitive", - "resolved": "1.2.0.435", - "contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg==" } }, - "net8.0": { + "net9.0": { "Newtonsoft.Json": { "type": "Direct", "requested": "[13.0.1, 14.0.0)", "resolved": "13.0.1", "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "StyleCop.Analyzers": { - "type": "Direct", - "requested": "[1.2.0-beta.435, )", - "resolved": "1.2.0-beta.435", - "contentHash": "TADk7vdGXtfTnYCV7GyleaaRTQjfoSfZXprQrVMm7cSJtJbFc1QIbWPyLvrgrfGdfHbGmUPvaN4ODKNxg2jgPQ==", - "dependencies": { - "StyleCop.Analyzers.Unstable": "1.2.0.435" - } - }, - "StyleCop.Analyzers.Unstable": { - "type": "Transitive", - "resolved": "1.2.0.435", - "contentHash": "ouwPWZxbOV3SmCZxIRqHvljkSzkCyi1tDoMzQtDb/bRP8ctASV/iRJr+A2Gdj0QLaLmWnqTWDrH82/iP+X80Lg==" } } } diff --git a/README.md b/README.md index 0a74a992c..4fd138959 100644 --- a/README.md +++ b/README.md @@ -327,13 +327,13 @@ Some tests may require a user with a particular set of enabled features such as referrals. We have attempted to call out these functions in their respective docstrings. **NOTE** .NET Framework/.NET Standard unit tests cannot currently be run on Apple Silicon (M1, M2, etc.). Instead, run -unit tests in one framework at a time with, e.g `make unit-test fw=net8.0`. Valid frameworks: +unit tests in one framework at a time with, e.g `make unit-test fw=net9.0`. Valid frameworks: - `net462` (.NET Framework 4.6.2, the oldest non-EOL version of .NET Framework; will not run on Apple Silicon) -- `net5.0` (.NET 5.0) - `net6.0` (.NET 6.0) - `net7.0` (.NET 7.0) - `net8.0` (.NET 8.0) +- `net9.0` (.NET 9.0) #### Test Coverage diff --git a/scripts/unix/setup.sh b/scripts/unix/setup.sh index cb1dcec7b..932280550 100644 --- a/scripts/unix/setup.sh +++ b/scripts/unix/setup.sh @@ -10,7 +10,7 @@ if [[ $(sysctl -n machdep.cpu.brand_string) =~ "Apple" ]]; then fi # .NET versions we want to install -declare -a NetVersions=("8.0" "7.0" "6.0" "5.0") +declare -a NetVersions=("9.0" "8.0" "7.0" "6.0") # Download dotnet-install.sh echo "Downloading dotnet-install.sh script..." diff --git a/scripts/win/setup.bat b/scripts/win/setup.bat index 34bdbe254..6cc7de42e 100644 --- a/scripts/win/setup.bat +++ b/scripts/win/setup.bat @@ -10,7 +10,7 @@ @ECHO OFF :: .NET Versions we want to install and destination -SET NetVersions=Current 8.0 7.0 6.0 5.0 +SET NetVersions=Current 9.0 8.0 7.0 6.0 SET InstallPath=C:\dotnet :: Dependency file