diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
index 38760d79..ab99c04e 100644
--- a/.github/workflows/dotnetcore.yml
+++ b/.github/workflows/dotnetcore.yml
@@ -16,14 +16,14 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core and GitHub Packages
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 3.1.101
+ dotnet-version: 8.x.x
source-url: https://nuget.pkg.github.com/octokit/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Setup NuGet
- uses: nuget/setup-nuget@v1
+ uses: nuget/setup-nuget@v2
with:
nuget-version: 5.x
- name: Build using .NET Core
diff --git a/.github/workflows/generate-schema.yml b/.github/workflows/generate-schema.yml
index f621f42d..e1ce667a 100644
--- a/.github/workflows/generate-schema.yml
+++ b/.github/workflows/generate-schema.yml
@@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 3.1.x
+ dotnet-version: 8.x.x
- name: Install dependencies
run: dotnet restore
- name: Generate
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index bd23961e..3116b69e 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -15,9 +15,9 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
- uses: actions/setup-dotnet@v1
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: 3.1.101
+ dotnet-version: 8.x.x
- name: Build using .NET Core
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
- name: Run integration tests
diff --git a/Octokit.GraphQL.Core.Generation.UnitTests/Octokit.GraphQL.Core.Generation.UnitTests.csproj b/Octokit.GraphQL.Core.Generation.UnitTests/Octokit.GraphQL.Core.Generation.UnitTests.csproj
index 26891f9e..f0eb8ecb 100644
--- a/Octokit.GraphQL.Core.Generation.UnitTests/Octokit.GraphQL.Core.Generation.UnitTests.csproj
+++ b/Octokit.GraphQL.Core.Generation.UnitTests/Octokit.GraphQL.Core.Generation.UnitTests.csproj
@@ -1,24 +1,14 @@
- netcoreapp3.1
- 7.2
+ net6.0
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+
+
-
-
-
diff --git a/Octokit.GraphQL.Core.Generation/Octokit.GraphQL.Core.Generation.csproj b/Octokit.GraphQL.Core.Generation/Octokit.GraphQL.Core.Generation.csproj
index dff05e44..7cc3dd36 100644
--- a/Octokit.GraphQL.Core.Generation/Octokit.GraphQL.Core.Generation.csproj
+++ b/Octokit.GraphQL.Core.Generation/Octokit.GraphQL.Core.Generation.csproj
@@ -1,12 +1,8 @@
- netstandard2.0
- 7.2
+ net6.0
-
-
-
diff --git a/Octokit.GraphQL.Core.UnitTests/ConnectionTests.cs b/Octokit.GraphQL.Core.UnitTests/ConnectionTests.cs
index e0ad9cb1..9f896cb0 100644
--- a/Octokit.GraphQL.Core.UnitTests/ConnectionTests.cs
+++ b/Octokit.GraphQL.Core.UnitTests/ConnectionTests.cs
@@ -70,7 +70,7 @@ public static async Task Run_Specifies_Cancellation_Token()
var connection = new Connection(ProductInformation, CredentialStore, httpClient);
- await connection.Run(query, cancellationToken);
+ await Assert.ThrowsAsync(() => connection.Run(query, cancellationToken));
}
[Theory]
diff --git a/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterAssertions.cs b/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterAssertions.cs
index 1b121747..e63e3097 100644
--- a/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterAssertions.cs
+++ b/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterAssertions.cs
@@ -45,7 +45,11 @@ public static void AssertCompiledQueryExpressionEqual(string expectedString,
expectedString = ReplaceSubqueryPlaceholders(expectedString, subqueryPlaceholderReplacements);
- Assert.Equal(StripWhitespace(expectedString), StripWhitespace(actualString));
+ // hacky fix for anonymous types: actual strings give "new" and expected strings give "new object"
+ expectedString = StripWhitespace(expectedString);
+ expectedString = expectedString.Replace("new{", "newobject{");
+
+ Assert.Equal(expectedString, StripWhitespace(actualString));
}
public static string ReplaceSubqueryPlaceholders(string expectedString, params string[] subqueryPlaceholderReplacements)
diff --git a/Octokit.GraphQL.Core.UnitTests/ExpressionRewiterTests.cs b/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterTests.cs
similarity index 98%
rename from Octokit.GraphQL.Core.UnitTests/ExpressionRewiterTests.cs
rename to Octokit.GraphQL.Core.UnitTests/ExpressionRewriterTests.cs
index 691003a1..f3cd15cd 100644
--- a/Octokit.GraphQL.Core.UnitTests/ExpressionRewiterTests.cs
+++ b/Octokit.GraphQL.Core.UnitTests/ExpressionRewriterTests.cs
@@ -9,9 +9,9 @@
namespace Octokit.GraphQL.Core.UnitTests
{
- public class ExpressionRewiterTests
+ public class ExpressionRewriterTests
{
- public ExpressionRewiterTests()
+ public ExpressionRewriterTests()
{
ExpressionCompiler.IsUnitTesting = true;
}
@@ -250,16 +250,16 @@ public void Can_Use_Conditional_To_Compare_To_Null()
// data["data"]["repository"],
// x => x["name"].Type != JTokenType.Null ? x["name"].ToObject() : null);
- var readableString =
+ var readableString =
"data => Rewritten.Value.Select(data[\"data\"][\"repository\"],x => (x[\"name\"].Type != JTokenType.Null) ? x[\"name\"].ToObject() : null)";
-
+
// Expression put through ReadableExpression outputs the following, so I'm using a hard coded string instead
// data => Rewritten.Value.Select(data["data"]["repository"], x => (((int)x["name"].Type) != 10) ? x["name"].ToObject() : null)
ExpressionRewriterAssertions.AssertExpressionQueryEqual(readableString, query);
}
-
+
[Fact]
public void Union_IssueOrPullRequest()
{
diff --git a/Octokit.GraphQL.Core.UnitTests/Octokit.GraphQL.Core.UnitTests.csproj b/Octokit.GraphQL.Core.UnitTests/Octokit.GraphQL.Core.UnitTests.csproj
index 64bb6e77..ba0318a6 100644
--- a/Octokit.GraphQL.Core.UnitTests/Octokit.GraphQL.Core.UnitTests.csproj
+++ b/Octokit.GraphQL.Core.UnitTests/Octokit.GraphQL.Core.UnitTests.csproj
@@ -1,25 +1,15 @@
- netcoreapp3.1
- 7.2
+ net6.0
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+
+
+
-
-
-
diff --git a/Octokit.GraphQL.Core/Octokit.GraphQL.Core.csproj b/Octokit.GraphQL.Core/Octokit.GraphQL.Core.csproj
index c06d860e..592507f9 100644
--- a/Octokit.GraphQL.Core/Octokit.GraphQL.Core.csproj
+++ b/Octokit.GraphQL.Core/Octokit.GraphQL.Core.csproj
@@ -1,18 +1,13 @@
- netstandard2.0
+ net6.0
Octokit.GraphQL
true
..\key.snk
true
- bin\$(Configuration)\netstandard1.1\Octokit.GraphQL.Core.xml
- 7.2
+ true
-
-
-
-
-
+
diff --git a/Octokit.GraphQL.IntegrationTests/Octokit.GraphQL.IntegrationTests.csproj b/Octokit.GraphQL.IntegrationTests/Octokit.GraphQL.IntegrationTests.csproj
index 3b2f3cf3..f0ffe125 100644
--- a/Octokit.GraphQL.IntegrationTests/Octokit.GraphQL.IntegrationTests.csproj
+++ b/Octokit.GraphQL.IntegrationTests/Octokit.GraphQL.IntegrationTests.csproj
@@ -1,26 +1,18 @@
- netcoreapp3.1
- Octokit.GraphQL.IntegrationTests
- 7.2
+ net6.0
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+
+
+
+
+
-
-
-
diff --git a/Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj b/Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj
index 3f895b50..656eafef 100644
--- a/Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj
+++ b/Octokit.GraphQL.Pack/Octokit.GraphQL.Pack.csproj
@@ -1,6 +1,6 @@
- netstandard2.0
+ net6.0
true
false
../Octokit.GraphQL.nuspec
diff --git a/Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs b/Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs
index a90fd917..bc6cc205 100644
--- a/Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs
+++ b/Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs
@@ -11,9 +11,9 @@
namespace Octokit.GraphQL.UnitTests
{
- public class ExpressionRewiterTests
+ public class ExpressionRewriterTests
{
- public ExpressionRewiterTests()
+ public ExpressionRewriterTests()
{
ExpressionCompiler.IsUnitTesting = true;
}
diff --git a/Octokit.GraphQL.UnitTests/Octokit.GraphQL.UnitTests.csproj b/Octokit.GraphQL.UnitTests/Octokit.GraphQL.UnitTests.csproj
index c276fa61..55b5c1a7 100644
--- a/Octokit.GraphQL.UnitTests/Octokit.GraphQL.UnitTests.csproj
+++ b/Octokit.GraphQL.UnitTests/Octokit.GraphQL.UnitTests.csproj
@@ -1,29 +1,15 @@
- netcoreapp3.1
- 7.2
+ net6.0
-
-
- all
- runtime; build; native; contentfiles; analyzers
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
+
+
+
-
-
-
-
-
-
diff --git a/Octokit.GraphQL.nuspec b/Octokit.GraphQL.nuspec
index 68ed431a..9d565fdf 100644
--- a/Octokit.GraphQL.nuspec
+++ b/Octokit.GraphQL.nuspec
@@ -18,9 +18,9 @@
-
-
-
-
+
+
+
+
diff --git a/Octokit.GraphQL.sln.DotSettings b/Octokit.GraphQL.sln.DotSettings
index 7acf74fb..ced2c0d7 100644
--- a/Octokit.GraphQL.sln.DotSettings
+++ b/Octokit.GraphQL.sln.DotSettings
@@ -5,6 +5,7 @@
True
True
True
+ True
True
True
True
diff --git a/Octokit.GraphQL/Octokit.GraphQL.csproj b/Octokit.GraphQL/Octokit.GraphQL.csproj
index 1adc92e2..94f29070 100644
--- a/Octokit.GraphQL/Octokit.GraphQL.csproj
+++ b/Octokit.GraphQL/Octokit.GraphQL.csproj
@@ -1,16 +1,12 @@
- netstandard2.0
+ net6.0
true
..\key.snk
true
- bin\$(Configuration)\netstandard1.1\Octokit.GraphQL.xml
- 7.2
+ true
-
-
-
diff --git a/Tools/Generate/App.config b/Tools/Generate/App.config
deleted file mode 100644
index 88fa4027..00000000
--- a/Tools/Generate/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Tools/Generate/Generate.csproj b/Tools/Generate/Generate.csproj
index 5915e5ef..d7c40c27 100644
--- a/Tools/Generate/Generate.csproj
+++ b/Tools/Generate/Generate.csproj
@@ -1,8 +1,7 @@
Exe
- netcoreapp3.1
- 7.2
+ net6.0