From 9e710ff1317f13b6733da5bd0b5309e037dd8f74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:32:01 +0000 Subject: [PATCH 1/7] chore(deps): bump Microsoft.Extensions.Configuration.Abstractions and Microsoft.Extensions.Configuration.EnvironmentVariables Bumps [Microsoft.Extensions.Configuration.Abstractions](https://github.com/dotnet/runtime) and [Microsoft.Extensions.Configuration.EnvironmentVariables](https://github.com/dotnet/runtime). These dependencies needed to be updated together. Updates `Microsoft.Extensions.Configuration.Abstractions` from 8.0.0 to 9.0.0 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v8.0.0...v9.0.0) Updates `Microsoft.Extensions.Configuration.EnvironmentVariables` from 8.0.0 to 9.0.0 - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v8.0.0...v9.0.0) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Configuration.Abstractions dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.Extensions.Configuration.EnvironmentVariables dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- src/kiota/kiota.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 57ec4596cc..2af9ef8b48 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -39,9 +39,9 @@ - + - + From 825d452352898ec94b133a0c97eb7253c8917b45 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:33:26 +0000 Subject: [PATCH 2/7] chore(deps): bump Microsoft.Extensions.Logging.Abstractions Bumps [Microsoft.Extensions.Logging.Abstractions](https://github.com/dotnet/runtime) from 8.0.2 to 9.0.0. - [Release notes](https://github.com/dotnet/runtime/releases) - [Commits](https://github.com/dotnet/runtime/compare/v8.0.2...v9.0.0) --- updated-dependencies: - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- src/Kiota.Builder/Kiota.Builder.csproj | 2 +- src/kiota/kiota.csproj | 2 +- .../Kiota.Builder.IntegrationTests.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index b23ec7bc4f..38465c70eb 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -37,7 +37,7 @@ - + diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 57ec4596cc..a21ebef245 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -43,7 +43,7 @@ - + diff --git a/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj b/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj index de043f8450..c432b4450a 100644 --- a/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj +++ b/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj @@ -14,7 +14,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + From 9fe73666dec48a1b52a80944371e8e842deebf87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:34:35 +0000 Subject: [PATCH 3/7] chore(deps): bump Microsoft.VisualStudio.Threading.Analyzers Bumps [Microsoft.VisualStudio.Threading.Analyzers](https://github.com/microsoft/vs-threading) from 17.11.20 to 17.12.19. - [Release notes](https://github.com/microsoft/vs-threading/releases) - [Commits](https://github.com/microsoft/vs-threading/commits) --- updated-dependencies: - dependency-name: Microsoft.VisualStudio.Threading.Analyzers dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Kiota.Builder/Kiota.Builder.csproj | 2 +- src/kiota/kiota.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index b23ec7bc4f..4907dc3014 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -49,7 +49,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 57ec4596cc..f5acd438c5 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -48,7 +48,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From c988b7d4a83220cd80dab4416eaf28e90d7ac7fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:43:13 +0000 Subject: [PATCH 4/7] chore(deps): bump StreamJsonRpc and Microsoft.VisualStudio.Threading.Analyzers Bumps [StreamJsonRpc](https://github.com/microsoft/vs-streamjsonrpc) and [Microsoft.VisualStudio.Threading.Analyzers](https://github.com/microsoft/vs-threading). These dependencies needed to be updated together. Updates `StreamJsonRpc` from 2.19.27 to 2.20.17 - [Release notes](https://github.com/microsoft/vs-streamjsonrpc/releases) - [Commits](https://github.com/microsoft/vs-streamjsonrpc/commits) Updates `Microsoft.VisualStudio.Threading.Analyzers` from 17.11.20 to 17.10.48 - [Release notes](https://github.com/microsoft/vs-threading/releases) - [Commits](https://github.com/microsoft/vs-threading/compare/v17.11.20...v17.10.48) --- updated-dependencies: - dependency-name: StreamJsonRpc dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: Microsoft.VisualStudio.Threading.Analyzers dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/kiota/kiota.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index f5acd438c5..62f7b0d9b0 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -52,7 +52,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + From 2aa1e6b8b1a6a4545219098b0c4c41fbb32711e7 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:53:29 -0500 Subject: [PATCH 5/7] fix: restores missing using for CLI generation Signed-off-by: Vincent Biret --- src/Kiota.Builder/Refiners/CliRefiner.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Kiota.Builder/Refiners/CliRefiner.cs b/src/Kiota.Builder/Refiners/CliRefiner.cs index d8fe315c45..aae91ea4f3 100644 --- a/src/Kiota.Builder/Refiners/CliRefiner.cs +++ b/src/Kiota.Builder/Refiners/CliRefiner.cs @@ -404,15 +404,17 @@ private static CodeType CreateCommandType(CodeTypeBase.CodeTypeCollectionKind co } private static readonly AdditionalUsingEvaluator[] additionalUsingEvaluators = - { - new(x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + [ + new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "System.CommandLine", "Command", "RootCommand", "IConsole"), - new(x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "Microsoft.Kiota.Cli.Commons.IO", "IOutputFormatter", "IOutputFormatterFactory", "FormatterType", "PageLinkData", "IPagingService"), - new(x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "System.Text", "Encoding"), - new(x => x is CodeMethod { Kind: CodeMethodKind.RequestExecutor or CodeMethodKind.RequestGenerator }, - "Microsoft.Kiota.Cli.Commons.Extensions", "GetRequestAdapter") - }; + new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + "System.Linq", "Enumerable"), + new (static x => x is CodeMethod { Kind: CodeMethodKind.RequestExecutor or CodeMethodKind.RequestGenerator }, + "Microsoft.Kiota.Cli.Commons.Extensions", "GetRequestAdapter"), + ]; } From 2e362f6ad6cce4ec8088418270d53ee45fb34f88 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:53:49 -0500 Subject: [PATCH 6/7] fix: switches to non-obsolete method in CLI generation Signed-off-by: Vincent Biret --- src/Kiota.Builder/Writers/CLI/CliCodeMethodWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Kiota.Builder/Writers/CLI/CliCodeMethodWriter.cs b/src/Kiota.Builder/Writers/CLI/CliCodeMethodWriter.cs index da96ec88a5..5372d7a114 100644 --- a/src/Kiota.Builder/Writers/CLI/CliCodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/CLI/CliCodeMethodWriter.cs @@ -641,7 +641,7 @@ protected virtual void WriteCommandHandlerBody(CodeMethod codeElement, CodeClass if (requestBodyParamType?.TypeDefinition is CodeClass) { writer.WriteLine($"using var stream = new MemoryStream(Encoding.UTF8.GetBytes({requestBodyParam.Name}));"); - writer.WriteLine($"var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode(\"{generatorMethod.RequestBodyContentType.SanitizeDoubleQuote()}\", stream);"); + writer.WriteLine($"var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync(\"{generatorMethod.RequestBodyContentType.SanitizeDoubleQuote()}\", stream, {CancellationTokenParamName});"); var typeString = conventions.GetTypeString(requestBodyParamType, requestBodyParam, false); From 3ac7ab43323e6184f7b1b3cd5297efe37924099a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 07:47:07 -0500 Subject: [PATCH 7/7] chore: formatting --- src/Kiota.Builder/Refiners/CliRefiner.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Kiota.Builder/Refiners/CliRefiner.cs b/src/Kiota.Builder/Refiners/CliRefiner.cs index aae91ea4f3..8db2891caa 100644 --- a/src/Kiota.Builder/Refiners/CliRefiner.cs +++ b/src/Kiota.Builder/Refiners/CliRefiner.cs @@ -405,16 +405,16 @@ private static CodeType CreateCommandType(CodeTypeBase.CodeTypeCollectionKind co private static readonly AdditionalUsingEvaluator[] additionalUsingEvaluators = [ - new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new(static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "System.CommandLine", "Command", "RootCommand", "IConsole"), - new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new(static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "Microsoft.Kiota.Cli.Commons.IO", "IOutputFormatter", "IOutputFormatterFactory", "FormatterType", "PageLinkData", "IPagingService"), - new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new(static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "System.Text", "Encoding"), - new (static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, + new(static x => x is CodeClass { Kind: CodeClassKind.RequestBuilder }, "System.Linq", "Enumerable"), - new (static x => x is CodeMethod { Kind: CodeMethodKind.RequestExecutor or CodeMethodKind.RequestGenerator }, + new(static x => x is CodeMethod { Kind: CodeMethodKind.RequestExecutor or CodeMethodKind.RequestGenerator }, "Microsoft.Kiota.Cli.Commons.Extensions", "GetRequestAdapter"), ]; }