diff --git a/.editorconfig b/.editorconfig index b1bfe93a1..0786fbe27 100644 --- a/.editorconfig +++ b/.editorconfig @@ -54,11 +54,11 @@ dotnet_diagnostic.CA1068.severity = error # CA1501: Avoid excessive inheritance dotnet_diagnostic.CA1501.severity = error # CA1502: Avoid excessive complexity -dotnet_diagnostic.CA1502.severity = warning +dotnet_diagnostic.CA1502.severity = silent # CA1505: Avoid unmaintainable code dotnet_diagnostic.CA1505.severity = error # CA1506: Avoid excessive class coupling -dotnet_diagnostic.CA1506.severity = warning +dotnet_diagnostic.CA1506.severity = silent # CA1507: Use nameof in place of string dotnet_diagnostic.CA1507.severity = error # CA1508: Avoid dead conditional code @@ -95,22 +95,22 @@ dotnet_diagnostic.RCS1210.severity = error # RCS1036: Remove unnecessary blank line dotnet_diagnostic.RCS1036.severity = error # RCS1075: Avoid empty catch clause that catches System.Exception -dotnet_diagnostic.RCS1075.severity = suggestion +dotnet_diagnostic.RCS1075.severity = error # RCS1170: Use read-only auto-implemented property dotnet_diagnostic.RCS1170.severity = error # VSTHRD002: Avoid problematic synchronous waits -dotnet_diagnostic.VSTHRD002.severity = suggestion +dotnet_diagnostic.VSTHRD002.severity = error # VSTHRD003: Avoid awaiting foreign Tasks -dotnet_diagnostic.VSTHRD003.severity = suggestion +dotnet_diagnostic.VSTHRD003.severity = error # VSTHRD105: Avoid method overloads that assume TaskScheduler.Current -dotnet_diagnostic.VSTHRD105.severity = suggestion +dotnet_diagnostic.VSTHRD105.severity = error # VSTHRD100: Avoid async void methods -dotnet_diagnostic.VSTHRD100.severity = suggestion +dotnet_diagnostic.VSTHRD100.severity = error # VSTHRD103: Call async methods when in an async method -dotnet_diagnostic.VSTHRD103.severity = suggestion +dotnet_diagnostic.VSTHRD103.severity = error # VSTHRD110: Observe result of async calls -dotnet_diagnostic.VSTHRD110.severity = suggestion +dotnet_diagnostic.VSTHRD110.severity = error # VSTHRD114: Avoid returning a null Task dotnet_diagnostic.VSTHRD114.severity = error # VSTHRD200: Use "Async" suffix for awaitable methods diff --git a/.pipelines/PowerShellEditorServices-Official.yml b/.pipelines/PowerShellEditorServices-Official.yml index e22560e72..f37bc0239 100644 --- a/.pipelines/PowerShellEditorServices-Official.yml +++ b/.pipelines/PowerShellEditorServices-Official.yml @@ -103,7 +103,7 @@ extends: displayName: Sign 1st-party files inputs: command: sign - signing_environment: external_distribution + signing_profile: external_distribution search_root: $(Build.SourcesDirectory)/module files_to_sign: | **/*.ps1; @@ -111,12 +111,11 @@ extends: **/*.psm1; **/*.ps1xml; **/Microsoft.PowerShell.EditorServices*.dll; - !Plaster/*; - task: onebranch.pipeline.signing@1 displayName: Sign 3rd-party files inputs: command: sign - signing_environment: 135020002 + signing_profile: 135020002 search_root: $(Build.SourcesDirectory)/module files_to_sign: | **/MediatR.dll; @@ -125,9 +124,6 @@ extends: **/OmniSharp.Extensions*.dll; **/Serilog*.dll; **/System.Reactive.dll; - Plaster/**/*.ps1; - Plaster/**/*.psd1; - Plaster/**/*.psm1; - stage: release dependsOn: build variables: diff --git a/CHANGELOG.md b/CHANGELOG.md index bf5c3f4ee..b50ec8ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # PowerShell Editor Services Release History +## v3.20.0 +### Tuesday, April 16, 2024 + +See more details at the GitHub Release for [v3.20.0](https://github.com/PowerShell/PowerShellEditorServices/releases/tag/v3.20.0). + +Hotfix for incorrect signing certificate, sorry about that! + +Also removed Plaster integration as we were unable to correctly sign it since we no longer own it. + ## v3.19.0 ### Wednesday, April 03, 2024 diff --git a/PowerShellEditorServices.Common.props b/PowerShellEditorServices.Common.props index 6681ee99a..28e7293ce 100644 --- a/PowerShellEditorServices.Common.props +++ b/PowerShellEditorServices.Common.props @@ -1,6 +1,6 @@ - 3.19.0 + 3.20.0 Microsoft © Microsoft Corporation. diff --git a/module/PowerShellEditorServices/PowerShellEditorServices.psd1 b/module/PowerShellEditorServices/PowerShellEditorServices.psd1 index 0dbfcdae0..4637aec33 100644 --- a/module/PowerShellEditorServices/PowerShellEditorServices.psd1 +++ b/module/PowerShellEditorServices/PowerShellEditorServices.psd1 @@ -19,7 +19,7 @@ RootModule = if ($PSEdition -eq 'Core') } # Version number of this module. -ModuleVersion = '3.19.0' +ModuleVersion = '3.20.0' # ID used to uniquely identify this module GUID = '9ca15887-53a2-479a-9cda-48d26bcb6c47' diff --git a/modules.json b/modules.json index a21a350b0..f72a38714 100644 --- a/modules.json +++ b/modules.json @@ -3,10 +3,6 @@ "Version": "1.22.0", "AllowPrerelease": false }, - "Plaster": { - "Version": "1.1.3", - "AllowPrerelease": false - }, "PSReadLine": { "Version": "2.4.0-beta0", "AllowPrerelease": true diff --git a/src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs b/src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs index 0eddc622b..69aa7b97f 100644 --- a/src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs +++ b/src/PowerShellEditorServices.Hosting/Commands/StartEditorServicesCommand.cs @@ -215,7 +215,7 @@ protected override void BeginProcessing() } #pragma warning restore IDE0022 - [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Uses ThrowTerminatingError() instead")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "We have to wait here, it's the whole program.")] protected override void EndProcessing() { _logger.Log(PsesLogLevel.Diagnostic, "Beginning EndProcessing block"); @@ -232,9 +232,7 @@ protected override void EndProcessing() using EditorServicesLoader psesLoader = EditorServicesLoader.Create(_logger, editorServicesConfig, SessionDetailsPath, _loggerUnsubscribers); _logger.Log(PsesLogLevel.Verbose, "Loading EditorServices"); // Synchronously start editor services and wait here until it shuts down. -#pragma warning disable VSTHRD002 psesLoader.LoadAndRunEditorServicesAsync().GetAwaiter().GetResult(); -#pragma warning restore VSTHRD002 } catch (Exception e) { diff --git a/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs b/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs index f2da0eb4e..cf5c45c75 100644 --- a/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs +++ b/src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs @@ -382,6 +382,7 @@ private void ValidateConfiguration() } } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA1825:Avoid zero-length array allocations", Justification = "Cannot use Array.Empty, since it must work in net452")] private static Version GetPSVersion() { // In order to read the $PSVersionTable variable, @@ -389,12 +390,10 @@ private static Version GetPSVersion() // which is expensive. // Rather than do that, we instead go straight to the source, // which is a static property, internal in WinPS and public in PS 6+ -#pragma warning disable CA1825 return typeof(PSObject).Assembly .GetType("System.Management.Automation.PSVersionInfo") .GetMethod("get_PSVersion", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) - .Invoke(null, new object[0] /* Cannot use Array.Empty, since it must work in net452 */) as Version; -#pragma warning restore CA1825 + .Invoke(null, new object[0]) as Version; } } } diff --git a/src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs b/src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs index 8f868d393..0f47bdad8 100644 --- a/src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs +++ b/src/PowerShellEditorServices.Hosting/Internal/EditorServicesRunner.cs @@ -201,6 +201,7 @@ private async Task RunTempDebugSessionAsync(HostStartupInfo hostDetails) await debugServer.WaitForShutdown().ConfigureAwait(false); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD003:Avoid awaiting foreign Tasks", Justification = "It's a wrapper.")] private async Task StartDebugServer(Task debugServerCreation) { PsesDebugServer debugServer = await debugServerCreation.ConfigureAwait(false); @@ -304,6 +305,7 @@ private void WriteStartupBanner() _config.PSHost.UI.WriteLine(_config.StartupBanner); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "Intentionally fire and forget.")] private void DebugServer_OnSessionEnded(object sender, EventArgs args) { _logger.Log(PsesLogLevel.Verbose, "Debug session ended, restarting debug service..."); diff --git a/src/PowerShellEditorServices/Extensions/EditorContext.cs b/src/PowerShellEditorServices/Extensions/EditorContext.cs index f2ab42e8c..e79eb8c3b 100644 --- a/src/PowerShellEditorServices/Extensions/EditorContext.cs +++ b/src/PowerShellEditorServices/Extensions/EditorContext.cs @@ -92,9 +92,8 @@ public void SetSelection( /// Sets a selection in the host editor's active buffer. /// /// The range of the selection. - #pragma warning disable VSTHRD002 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SetSelection(FileRange selectionRange) => editorOperations.SetSelectionAsync(selectionRange.ToBufferRange()).Wait(); - #pragma warning restore VSTHRD002 #endregion } diff --git a/src/PowerShellEditorServices/Extensions/EditorObject.cs b/src/PowerShellEditorServices/Extensions/EditorObject.cs index 17006baf2..a43ab2995 100644 --- a/src/PowerShellEditorServices/Extensions/EditorObject.cs +++ b/src/PowerShellEditorServices/Extensions/EditorObject.cs @@ -115,13 +115,12 @@ internal EditorObject( /// at the time this method is invoked. /// /// A instance of the EditorContext class. - #pragma warning disable VSTHRD002, VSTHRD104 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public EditorContext GetEditorContext() => _editorOperations.GetEditorContextAsync().Result; - #pragma warning restore VSTHRD002, VSTHRD104 internal void SetAsStaticInstance() { - EditorObject.Instance = this; + Instance = this; s_editorObjectReady.TrySetResult(true); } } diff --git a/src/PowerShellEditorServices/Extensions/EditorWindow.cs b/src/PowerShellEditorServices/Extensions/EditorWindow.cs index 8c9048c3c..6d9d4c3ff 100644 --- a/src/PowerShellEditorServices/Extensions/EditorWindow.cs +++ b/src/PowerShellEditorServices/Extensions/EditorWindow.cs @@ -43,24 +43,28 @@ internal EditorWindow(IEditorOperations editorOperations) /// Shows an informational message to the user. /// /// The message to be shown. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void ShowInformationMessage(string message) => editorOperations.ShowInformationMessageAsync(message).Wait(); /// /// Shows an error message to the user. /// /// The message to be shown. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void ShowErrorMessage(string message) => editorOperations.ShowErrorMessageAsync(message).Wait(); /// /// Shows a warning message to the user. /// /// The message to be shown. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void ShowWarningMessage(string message) => editorOperations.ShowWarningMessageAsync(message).Wait(); /// /// Sets the status bar message in the editor UI (if applicable). /// /// The message to be shown. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SetStatusBarMessage(string message) => editorOperations.SetStatusBarMessageAsync(message, null).Wait(); /// @@ -68,6 +72,7 @@ internal EditorWindow(IEditorOperations editorOperations) /// /// The message to be shown. /// A timeout in milliseconds for how long the message should remain visible. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SetStatusBarMessage(string message, int timeout) => editorOperations.SetStatusBarMessageAsync(message, timeout).Wait(); #endregion diff --git a/src/PowerShellEditorServices/Extensions/EditorWorkspace.cs b/src/PowerShellEditorServices/Extensions/EditorWorkspace.cs index b01c6eca7..e1e0824cb 100644 --- a/src/PowerShellEditorServices/Extensions/EditorWorkspace.cs +++ b/src/PowerShellEditorServices/Extensions/EditorWorkspace.cs @@ -42,12 +42,14 @@ public sealed class EditorWorkspace /// /// Creates a new file in the editor. /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void NewFile() => editorOperations.NewFileAsync(string.Empty).Wait(); /// /// Creates a new file in the editor. /// /// The content to place in the new file. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void NewFile(string content) => editorOperations.NewFileAsync(content).Wait(); /// @@ -55,6 +57,7 @@ public sealed class EditorWorkspace /// its buffer will be made active. /// /// The path to the file to be opened. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void OpenFile(string filePath) => editorOperations.OpenFileAsync(filePath).Wait(); /// @@ -64,18 +67,21 @@ public sealed class EditorWorkspace /// /// The path to the file to be opened. /// Determines wether the file is opened as a preview or as a durable editor. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void OpenFile(string filePath, bool preview) => editorOperations.OpenFileAsync(filePath, preview).Wait(); /// /// Closes a file in the workspace. /// /// The path to the file to be closed. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void CloseFile(string filePath) => editorOperations.CloseFileAsync(filePath).Wait(); /// /// Saves an open file in the workspace. /// /// The path to the file to be saved. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SaveFile(string filePath) => editorOperations.SaveFileAsync(filePath).Wait(); /// @@ -83,6 +89,7 @@ public sealed class EditorWorkspace /// /// The file to copy. /// The file to create. + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SaveFile(string oldFilePath, string newFilePath) => editorOperations.SaveFileAsync(oldFilePath, newFilePath).Wait(); #endregion diff --git a/src/PowerShellEditorServices/Extensions/FileContext.cs b/src/PowerShellEditorServices/Extensions/FileContext.cs index c8c32e58e..39a4a275e 100644 --- a/src/PowerShellEditorServices/Extensions/FileContext.cs +++ b/src/PowerShellEditorServices/Extensions/FileContext.cs @@ -208,14 +208,13 @@ public void InsertText( /// /// The text string to insert. /// The buffer range which will be replaced by the string. - #pragma warning disable VSTHRD002 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void InsertText(string textToInsert, IFileRange insertRange) { editorOperations .InsertTextAsync(scriptFile.DocumentUri.ToString(), textToInsert, insertRange.ToBufferRange()) .Wait(); } - #pragma warning restore VSTHRD002 #endregion @@ -224,6 +223,7 @@ public void InsertText(string textToInsert, IFileRange insertRange) /// /// Saves this file. /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "Supporting synchronous API.")] public void Save() => editorOperations.SaveFileAsync(scriptFile.FilePath); /// @@ -233,7 +233,7 @@ public void InsertText(string textToInsert, IFileRange insertRange) /// the path where the file should be saved, /// including the file name with extension as the leaf /// - #pragma warning disable VSTHRD002 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] public void SaveAs(string newFilePath) { // Do some validation here so that we can provide a helpful error if the path won't work @@ -248,7 +248,6 @@ public void SaveAs(string newFilePath) editorOperations.SaveFileAsync(scriptFile.FilePath, newFilePath).Wait(); } - #pragma warning restore VSTHRD002 #endregion } diff --git a/src/PowerShellEditorServices/GlobalSuppressions.cs b/src/PowerShellEditorServices/GlobalSuppressions.cs deleted file mode 100644 index 3c0be1568..000000000 --- a/src/PowerShellEditorServices/GlobalSuppressions.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Globalization", "CA1303:Do not pass literals as localized parameters", Justification = "PSES is not localized", Scope = "module")] diff --git a/src/PowerShellEditorServices/IsExternalInit.cs b/src/PowerShellEditorServices/IsExternalInit.cs index c2a9d8275..c690a1820 100644 --- a/src/PowerShellEditorServices/IsExternalInit.cs +++ b/src/PowerShellEditorServices/IsExternalInit.cs @@ -1,4 +1,6 @@ -#pragma warning disable IDE0073 +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + #if NET5_0_OR_GREATER [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsExternalInit))] #else diff --git a/src/PowerShellEditorServices/Server/PsesLanguageServer.cs b/src/PowerShellEditorServices/Server/PsesLanguageServer.cs index c2e25f64b..58d52bb3a 100644 --- a/src/PowerShellEditorServices/Server/PsesLanguageServer.cs +++ b/src/PowerShellEditorServices/Server/PsesLanguageServer.cs @@ -11,7 +11,6 @@ using Microsoft.PowerShell.EditorServices.Services; using Microsoft.PowerShell.EditorServices.Services.Extension; using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host; -using Microsoft.PowerShell.EditorServices.Services.Template; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.LanguageServer.Protocol.Server; @@ -70,9 +69,7 @@ public PsesLanguageServer( /// cref="PsesServiceCollectionExtensions.AddPsesLanguageServices"/>. /// /// A task that completes when the server is ready and listening. -#pragma warning disable CA1506 // Coupling complexity we don't care about public async Task StartAsync() -#pragma warning restore CA1506 { LanguageServer = await OmniSharp.Extensions.LanguageServer.Server.LanguageServer.From(options => { @@ -114,7 +111,6 @@ public async Task StartAsync() .WithHandler() .WithHandler() .WithHandler() - .WithHandler() .WithHandler() .WithHandler() .WithHandler() diff --git a/src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs b/src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs index 3c02510b9..82081c341 100644 --- a/src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs +++ b/src/PowerShellEditorServices/Server/PsesServiceCollectionExtensions.cs @@ -10,13 +10,13 @@ using Microsoft.PowerShell.EditorServices.Services.PowerShell.Debugging; using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host; using Microsoft.PowerShell.EditorServices.Services.PowerShell.Runspace; -using Microsoft.PowerShell.EditorServices.Services.Template; using OmniSharp.Extensions.LanguageServer.Protocol.Server; namespace Microsoft.PowerShell.EditorServices.Server { internal static class PsesServiceCollectionExtensions { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "Using lazy initialization.")] public static IServiceCollection AddPsesLanguageServices( this IServiceCollection collection, HostStartupInfo hostStartupInfo) @@ -33,7 +33,6 @@ public static IServiceCollection AddPsesLanguageServices( .AddSingleton() .AddSingleton( (provider) => provider.GetService().DebugContext) - .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton((provider) => @@ -48,9 +47,7 @@ public static IServiceCollection AddPsesLanguageServices( // is ready, it will be available. NOTE: We cannot await this because it // uses a lazy initialization to avoid a race with the dependency injection // framework, see the EditorObject class for that! -#pragma warning disable VSTHRD110 extensionService.InitializeAsync(); -#pragma warning restore VSTHRD110 return extensionService; }) .AddSingleton(); diff --git a/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs b/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs index 90faceda4..667a26bdd 100644 --- a/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs +++ b/src/PowerShellEditorServices/Services/DebugAdapter/DebugService.cs @@ -923,6 +923,7 @@ private static string TrimScriptListingLine(PSObject scriptLineObj, ref int pref /// public event EventHandler DebuggerStopped; + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "It has to be async.")] internal async void OnDebuggerStopAsync(object sender, DebuggerStopEventArgs e) { try diff --git a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs index 700c154b9..1ec1557ed 100644 --- a/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs +++ b/src/PowerShellEditorServices/Services/DebugAdapter/Handlers/LaunchAndAttachHandler.cs @@ -440,6 +440,7 @@ public async Task OnStarted(IDebugAdapterServer server, CancellationToken cancel // be sent to the client. await _debugStateService.ServerStarted.Task.ConfigureAwait(false); + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD003:Avoid awaiting foreign Tasks", Justification = "It's a wrapper.")] private async Task OnExecutionCompletedAsync(Task executeTask) { bool isRunspaceClosed = false; diff --git a/src/PowerShellEditorServices/Services/PowerShell/Console/LegacyReadLine.cs b/src/PowerShellEditorServices/Services/PowerShell/Console/LegacyReadLine.cs index 3c5e7a1d2..28d29baa1 100644 --- a/src/PowerShellEditorServices/Services/PowerShell/Console/LegacyReadLine.cs +++ b/src/PowerShellEditorServices/Services/PowerShell/Console/LegacyReadLine.cs @@ -35,9 +35,7 @@ public LegacyReadLine( _onIdleAction = onIdleAction; } -#pragma warning disable CA1502 // Cyclomatic complexity we don't care about public override string ReadLine(CancellationToken cancellationToken) -#pragma warning restore CA1502 { string inputBeforeCompletion = null; string inputAfterCompletion = null; @@ -394,6 +392,7 @@ protected override ConsoleKeyInfo ReadKey(CancellationToken cancellationToken) } } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "This is a legacy implementation.")] private ConsoleKeyInfo ReadKeyWithIdleSupport(CancellationToken cancellationToken) { // We run the readkey function on another thread so we can run an idle handler diff --git a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs index 6c77daa82..a2072b2d9 100644 --- a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs +++ b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs @@ -29,9 +29,7 @@ namespace Microsoft.PowerShell.EditorServices.Services.PowerShell.Host using Microsoft.PowerShell.EditorServices.Server; using OmniSharp.Extensions.DebugAdapter.Protocol.Server; -#pragma warning disable CA1506 // Coupling complexity we don't care about internal class PsesInternalHost : PSHost, IHostSupportsInteractiveSession, IRunspaceContext, IInternalPowerShellExecutionService -#pragma warning restore CA1506 { internal const string DefaultPrompt = "> "; diff --git a/src/PowerShellEditorServices/Services/Template/Handlers/ITemplateHandlers.cs b/src/PowerShellEditorServices/Services/Template/Handlers/ITemplateHandlers.cs deleted file mode 100644 index 88ae40789..000000000 --- a/src/PowerShellEditorServices/Services/Template/Handlers/ITemplateHandlers.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using MediatR; -using OmniSharp.Extensions.JsonRpc; - -namespace Microsoft.PowerShell.EditorServices.Services.Template -{ - [Serial] - [Method("powerShell/getProjectTemplates", Direction.ClientToServer)] - internal interface IGetProjectTemplatesHandler : IJsonRpcRequestHandler { } - - [Serial] - [Method("powerShell/newProjectFromTemplate", Direction.ClientToServer)] - internal interface INewProjectFromTemplateHandler : IJsonRpcRequestHandler { } - - internal class GetProjectTemplatesRequest : IRequest - { - public bool IncludeInstalledModules { get; set; } - } - - internal class GetProjectTemplatesResponse - { - public bool NeedsModuleInstall { get; set; } - - public TemplateDetails[] Templates { get; set; } - } - - /// - /// Provides details about a file or project template. - /// - internal class TemplateDetails - { - /// - /// Gets or sets the title of the template. - /// - public string Title { get; set; } - - /// - /// Gets or sets the author of the template. - /// - public string Author { get; set; } - - /// - /// Gets or sets the version of the template. - /// - public string Version { get; set; } - - /// - /// Gets or sets the description of the template. - /// - public string Description { get; set; } - - /// - /// Gets or sets the template's comma-delimited string of tags. - /// - public string Tags { get; set; } - - /// - /// Gets or sets the template's folder path. - /// - public string TemplatePath { get; set; } - } - - internal class NewProjectFromTemplateRequest : IRequest - { - public string DestinationPath { get; set; } - - public string TemplatePath { get; set; } - } - - internal class NewProjectFromTemplateResponse - { - public bool CreationSuccessful { get; set; } - } -} diff --git a/src/PowerShellEditorServices/Services/Template/Handlers/TemplateHandlers.cs b/src/PowerShellEditorServices/Services/Template/Handlers/TemplateHandlers.cs deleted file mode 100644 index 685fda762..000000000 --- a/src/PowerShellEditorServices/Services/Template/Handlers/TemplateHandlers.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using System; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Logging; - -namespace Microsoft.PowerShell.EditorServices.Services.Template -{ - internal class TemplateHandlers : IGetProjectTemplatesHandler, INewProjectFromTemplateHandler - { - private readonly ILogger _logger; - private readonly TemplateService _templateService; - - public TemplateHandlers( - ILoggerFactory factory, - TemplateService templateService) - { - _logger = factory.CreateLogger(); - _templateService = templateService; - } - - public async Task Handle(GetProjectTemplatesRequest request, CancellationToken cancellationToken) - { - bool plasterInstalled = await _templateService.ImportPlasterIfInstalledAsync().ConfigureAwait(false); - - if (plasterInstalled) - { - TemplateDetails[] availableTemplates = - await _templateService.GetAvailableTemplatesAsync( - request.IncludeInstalledModules).ConfigureAwait(false); - - return new GetProjectTemplatesResponse - { - Templates = availableTemplates - }; - } - - return new GetProjectTemplatesResponse - { - NeedsModuleInstall = true, - Templates = Array.Empty() - }; - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Want to log any exception")] - public async Task Handle(NewProjectFromTemplateRequest request, CancellationToken cancellationToken) - { - bool creationSuccessful; - try - { - await _templateService.CreateFromTemplateAsync(request.TemplatePath, request.DestinationPath).ConfigureAwait(false); - creationSuccessful = true; - } - catch (Exception e) - { - // We don't really care if this worked or not but we report status. - _logger.LogException("New plaster template failed.", e); - creationSuccessful = false; - } - - return new NewProjectFromTemplateResponse - { - CreationSuccessful = creationSuccessful - }; - } - } -} diff --git a/src/PowerShellEditorServices/Services/Template/TemplateService.cs b/src/PowerShellEditorServices/Services/Template/TemplateService.cs deleted file mode 100644 index e7295ec8c..000000000 --- a/src/PowerShellEditorServices/Services/Template/TemplateService.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Services.PowerShell; -using Microsoft.PowerShell.EditorServices.Services.PowerShell.Execution; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Management.Automation; -using System.Threading; -using System.Threading.Tasks; - -namespace Microsoft.PowerShell.EditorServices.Services.Template -{ - /// - /// Provides a service for listing PowerShell project templates and creating - /// new projects from those templates. This service leverages the Plaster - /// module for creating projects from templates. - /// - internal class TemplateService - { - #region Private Fields - - private readonly ILogger _logger; - private bool isPlasterLoaded; - private bool? isPlasterInstalled; - private readonly IInternalPowerShellExecutionService _executionService; - - #endregion - - #region Constructors - - /// - /// Creates a new instance of the TemplateService class. - /// - /// The PowerShellContext to use for this service. - /// An ILoggerFactory implementation used for writing log messages. - public TemplateService(IInternalPowerShellExecutionService executionService, ILoggerFactory factory) - { - _logger = factory.CreateLogger(); - _executionService = executionService; - } - - #endregion - - #region Public Methods - - /// - /// Checks if Plaster is installed on the user's machine. - /// - /// A Task that can be awaited until the check is complete. The result will be true if Plaster is installed. - public async Task ImportPlasterIfInstalledAsync() - { - if (!isPlasterInstalled.HasValue) - { - PSCommand psCommand = new(); - - psCommand - .AddCommand("Get-Module") - .AddParameter("ListAvailable") - .AddParameter("Name", "Plaster"); - - psCommand - .AddCommand("Sort-Object") - .AddParameter("Descending") - .AddParameter("Property", "Version"); - - psCommand - .AddCommand("Select-Object") - .AddParameter("First", 1); - - _logger.LogTrace("Checking if Plaster is installed..."); - - IReadOnlyList moduleObject = - await _executionService.ExecutePSCommandAsync( - psCommand, - CancellationToken.None, - new PowerShellExecutionOptions { ThrowOnError = false }) - .ConfigureAwait(false); - - isPlasterInstalled = moduleObject.Count > 0; - _logger.LogTrace("Plaster installed: " + isPlasterInstalled.Value); - - // Attempt to load plaster - if (isPlasterInstalled.Value && !isPlasterLoaded) - { - _logger.LogTrace("Loading Plaster..."); - - psCommand = new PSCommand(); - psCommand - .AddCommand(@"Microsoft.PowerShell.Core\Import-Module") - .AddParameter("ModuleInfo", (PSModuleInfo)moduleObject[0].ImmediateBaseObject) - .AddParameter("PassThru") - .AddParameter("ErrorAction", ActionPreference.Ignore); - - IReadOnlyList plasterModule = - await _executionService.ExecutePSCommandAsync( - psCommand, - CancellationToken.None, - new PowerShellExecutionOptions { ThrowOnError = false }) - .ConfigureAwait(false); - - isPlasterLoaded = plasterModule.Count > 0; - _logger.LogTrace("Plaster loaded: " + isPlasterLoaded); - } - } - - return isPlasterInstalled.Value; - } - - /// - /// Gets the available file or project templates on the user's - /// machine. - /// - /// - /// If true, searches the user's installed PowerShell modules for - /// included templates. - /// - /// A Task which can be awaited for the TemplateDetails list to be returned. - public async Task GetAvailableTemplatesAsync( - bool includeInstalledModules) - { - if (!isPlasterLoaded) - { - throw new InvalidOperationException("Plaster is not loaded, templates cannot be accessed."); - } - - PSCommand psCommand = new(); - psCommand.AddCommand("Get-PlasterTemplate"); - - if (includeInstalledModules) - { - psCommand.AddParameter("IncludeModules"); - } - - IReadOnlyList templateObjects = await _executionService.ExecutePSCommandAsync( - psCommand, - CancellationToken.None).ConfigureAwait(false); - - _logger.LogTrace($"Found {templateObjects.Count} Plaster templates"); - - return - templateObjects - .Select(CreateTemplateDetails) - .ToArray(); - } - - /// - /// Creates a new file or project from a specified template and - /// places it in the destination path. This ultimately calls - /// Invoke-Plaster in PowerShell. - /// - /// The folder path containing the template. - /// The folder path where the files will be created. - /// A boolean-returning Task which communicates success or failure. - public async Task CreateFromTemplateAsync( - string templatePath, - string destinationPath) - { - _logger.LogTrace( - $"Invoking Plaster...\n\n TemplatePath: {templatePath}\n DestinationPath: {destinationPath}"); - - PSCommand command = new PSCommand() - .AddCommand("Invoke-Plaster") - .AddParameter("TemplatePath", templatePath) - .AddParameter("DestinationPath", destinationPath); - - // This command is interactive so it requires the foreground. - await _executionService.ExecutePSCommandAsync( - command, - CancellationToken.None, - new PowerShellExecutionOptions - { - RequiresForeground = true, - WriteOutputToHost = true, - ThrowOnError = false - }).ConfigureAwait(false); - - // If any errors were written out, creation was not successful - return true; - } - - #endregion - - #region Private Methods - - private static TemplateDetails CreateTemplateDetails(PSObject psObject) - { - return new TemplateDetails - { - Title = psObject.Members["Title"].Value as string, - Author = psObject.Members["Author"].Value as string, - Version = psObject.Members["Version"].Value.ToString(), - Description = psObject.Members["Description"].Value as string, - TemplatePath = psObject.Members["TemplatePath"].Value as string, - Tags = - psObject.Members["Tags"].Value is object[] tags - ? string.Join(", ", tags) - : string.Empty - }; - } - - #endregion - } -} diff --git a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DidChangeWatchedFilesHandler.cs b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DidChangeWatchedFilesHandler.cs index edbe9b0ad..aa4c0a969 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/Handlers/DidChangeWatchedFilesHandler.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/Handlers/DidChangeWatchedFilesHandler.cs @@ -41,6 +41,7 @@ public DidChangeWatchedFilesHandler( public DidChangeWatchedFilesRegistrationOptions GetRegistrationOptions( DidChangeWatchedFilesCapability capability, ClientCapabilities clientCapabilities) +#pragma warning disable CS8601 // Possible null reference assignment (it's from the library). => new() { Watchers = new[] @@ -52,6 +53,7 @@ public DidChangeWatchedFilesRegistrationOptions GetRegistrationOptions( }, }, }; +#pragma warning restore CS8601 // Possible null reference assignment. public Task Handle(DidChangeWatchedFilesParams request, CancellationToken cancellationToken) { diff --git a/src/PowerShellEditorServices/Services/TextDocument/TokenOperations.cs b/src/PowerShellEditorServices/Services/TextDocument/TokenOperations.cs index 6a6f789ff..9ed65db20 100644 --- a/src/PowerShellEditorServices/Services/TextDocument/TokenOperations.cs +++ b/src/PowerShellEditorServices/Services/TextDocument/TokenOperations.cs @@ -25,9 +25,7 @@ internal static class TokenOperations /// /// Extracts all of the unique foldable regions in a script given the list tokens /// -#pragma warning disable CA1502 // Cyclomatic complexity we don't care about internal static FoldingReferenceList FoldableReferences(Token[] tokens) -#pragma warning restore CA1502 { FoldingReferenceList refList = new(); diff --git a/src/PowerShellEditorServices/Services/Workspace/RemoteFileManagerService.cs b/src/PowerShellEditorServices/Services/Workspace/RemoteFileManagerService.cs index a3e46f4f1..961338023 100644 --- a/src/PowerShellEditorServices/Services/Workspace/RemoteFileManagerService.cs +++ b/src/PowerShellEditorServices/Services/Workspace/RemoteFileManagerService.cs @@ -252,6 +252,7 @@ function New-EditorFile { /// /// The IEditorOperations instance to use for opening/closing files in the editor. /// + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "Intentionally fire and forget.")] public RemoteFileManagerService( ILoggerFactory factory, IRunspaceContext runspaceContext, @@ -275,7 +276,6 @@ public RemoteFileManagerService( // Delete existing temporary file cache path if it already exists TryDeleteTemporaryPath(); - // TODO: Do this somewhere other than the constructor and make it async // Register the psedit function in the current runspace RegisterPSEditFunctionAsync().HandleErrorsAsync(logger); } @@ -519,6 +519,8 @@ private RemotePathMappings GetPathMappings(IRunspaceInfo runspaceInfo) return remotePathMappings; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD002:Avoid problematic synchronous waits", Justification = "Supporting synchronous API.")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "Intentionally fire and forget.")] private void HandleRunspaceChanged(object sender, RunspaceChangedEventArgs e) { if (e.ChangeAction == RunspaceChangeAction.Enter) @@ -572,6 +574,7 @@ private static bool ShouldTearDownRemoteFiles(RunspaceChangedEventArgs runspaceC StringComparison.CurrentCultureIgnoreCase); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD100:Avoid async void methods", Justification = "It has to be async.")] private async void HandlePSEventReceivedAsync(object sender, PSEventArgs args) { if (!string.Equals(RemoteSessionOpenFile, args.SourceIdentifier, StringComparison.CurrentCultureIgnoreCase)) diff --git a/src/PowerShellEditorServices/Utility/AsyncUtils.cs b/src/PowerShellEditorServices/Utility/AsyncUtils.cs index c3f146bb7..c94023a7e 100644 --- a/src/PowerShellEditorServices/Utility/AsyncUtils.cs +++ b/src/PowerShellEditorServices/Utility/AsyncUtils.cs @@ -33,6 +33,7 @@ internal static Task HandleErrorsAsync( : LogTaskErrors(task, logger, callerName, callerSourceFile, callerLineNumber); } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD003:Avoid awaiting foreign Tasks", Justification = "It's a wrapper.")] private static async Task LogTaskErrors(Task task, ILogger logger, string callerName, string callerSourceFile, int callerLineNumber) { try diff --git a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs index 3c49ca805..6e8d3ff62 100644 --- a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs +++ b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs @@ -14,7 +14,6 @@ using Microsoft.PowerShell.EditorServices.Handlers; using Microsoft.PowerShell.EditorServices.Services.Configuration; using Microsoft.PowerShell.EditorServices.Services.PowerShell; -using Microsoft.PowerShell.EditorServices.Services.Template; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Protocol; using OmniSharp.Extensions.LanguageServer.Protocol.Client; @@ -1213,26 +1212,6 @@ await PsesLanguageClient Assert.Equal(33, locationOrLocationLink.Location.Range.End.Character); } - [SkippableFact] - public async Task CanSendGetProjectTemplatesRequestAsync() - { - Skip.If(PsesStdioProcess.RunningInConstrainedLanguageMode, - "Plaster doesn't work in Constrained Language Mode."); - - GetProjectTemplatesResponse getProjectTemplatesResponse = - await PsesLanguageClient - .SendRequest( - "powerShell/getProjectTemplates", - new GetProjectTemplatesRequest - { - IncludeInstalledModules = true - }) - .Returning(CancellationToken.None); - - Assert.Contains(getProjectTemplatesResponse.Templates, t => t.Title is "AddPSScriptAnalyzerSettings"); - Assert.Contains(getProjectTemplatesResponse.Templates, t => t.Title is "New PowerShell Manifest Module"); - } - [SkippableFact] public async Task CanSendGetCommentHelpRequestAsync() { diff --git a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj index 77eacbd87..ec30df02e 100644 --- a/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj +++ b/test/PowerShellEditorServices.Test.E2E/PowerShellEditorServices.Test.E2E.csproj @@ -9,7 +9,7 @@ - + diff --git a/test/PowerShellEditorServices.Test.E2E/Processes/StdioServerProcess.cs b/test/PowerShellEditorServices.Test.E2E/Processes/StdioServerProcess.cs index 0cfc516ec..9cc19810b 100644 --- a/test/PowerShellEditorServices.Test.E2E/Processes/StdioServerProcess.cs +++ b/test/PowerShellEditorServices.Test.E2E/Processes/StdioServerProcess.cs @@ -23,9 +23,8 @@ public class StdioServerProcess : ServerProcess /// /// The current server process (if any). /// -#pragma warning disable CA2213 + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2213:Disposable fields should be disposed", Justification = "It is diposed but with a lock.")] private Process _serverProcess; -#pragma warning restore CA2213 /// /// Create a new . diff --git a/test/PowerShellEditorServices.Test.E2E/packages.lock.json b/test/PowerShellEditorServices.Test.E2E/packages.lock.json index 59dfb28f8..91fccbf9e 100644 --- a/test/PowerShellEditorServices.Test.E2E/packages.lock.json +++ b/test/PowerShellEditorServices.Test.E2E/packages.lock.json @@ -41,13 +41,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -444,37 +444,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { diff --git a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs index 30b020c30..05386d43a 100644 --- a/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs @@ -33,21 +33,21 @@ internal class TestReadLine : IReadLine } [Trait("Category", "DebugService")] - public class DebugServiceTests : IDisposable + public class DebugServiceTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; - private readonly BreakpointService breakpointService; - private readonly DebugService debugService; + private PsesInternalHost psesHost; + private BreakpointService breakpointService; + private DebugService debugService; private readonly BlockingCollection debuggerStoppedQueue = new(); - private readonly WorkspaceService workspace; - private readonly ScriptFile debugScriptFile; - private readonly ScriptFile oddPathScriptFile; - private readonly ScriptFile variableScriptFile; + private WorkspaceService workspace; + private ScriptFile debugScriptFile; + private ScriptFile oddPathScriptFile; + private ScriptFile variableScriptFile; private readonly TestReadLine testReadLine = new(); - public DebugServiceTests() + public async Task InitializeAsync() { - psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); + psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance); // This is required for remote debugging, but we call it here to end up in the same // state as the usual startup path. psesHost.DebugContext.EnableDebugMode(); @@ -76,26 +76,24 @@ public DebugServiceTests() variableScriptFile = GetDebugScript("VariableTest.ps1"); } - public void Dispose() + + public async Task DisposeAsync() { debugService.Abort(); + await Task.Run(psesHost.StopAsync); debuggerStoppedQueue.Dispose(); -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); } /// - /// This event handler lets us test that the debugger stopped or paused as expected. It will - /// deadlock if called in the PSES Pipeline Thread, which can easily happen in this test - /// code when methods on are called. Hence we treat this test - /// code like UI code and use 'ConfigureAwait(true)' or 'Task.Run(...)' to ensure we stay - /// OFF the pipeline thread. + /// This event handler lets us test that the debugger stopped or paused + /// as expected. It will deadlock if called in the PSES Pipeline Thread. + /// Hence we use 'Task.Run(...)' when accessing the queue to ensure we + /// stay OFF the pipeline thread. /// /// /// - private void OnDebuggerStopped(object sender, DebuggerStoppedEventArgs e) => debuggerStoppedQueue.Add(e); + [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "VSTHRD110:Observe result of async calls", Justification = "This intentionally fires and forgets on another thread.")] + private void OnDebuggerStopped(object sender, DebuggerStoppedEventArgs e) => Task.Run(() => debuggerStoppedQueue.Add(e)); private ScriptFile GetDebugScript(string fileName) => workspace.GetFile(TestUtilities.GetSharedPath(Path.Combine("Debugging", fileName))); @@ -118,20 +116,20 @@ private Task ExecuteScriptFileAsync(string scriptFilePath, params string[] args) private Task ExecuteVariableScriptFileAsync() => ExecuteScriptFileAsync(variableScriptFile.FilePath); - private void AssertDebuggerPaused() + private async Task AssertDebuggerPaused() { using CancellationTokenSource cts = new(60000); - DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token); + DebuggerStoppedEventArgs eventArgs = await Task.Run(() => debuggerStoppedQueue.Take(cts.Token)); Assert.Empty(eventArgs.OriginalEvent.Breakpoints); } - private void AssertDebuggerStopped( + private async Task AssertDebuggerStopped( string scriptPath = "", int lineNumber = -1, CommandBreakpointDetails commandBreakpointDetails = default) { - using CancellationTokenSource cts = new(60000); - DebuggerStoppedEventArgs eventArgs = debuggerStoppedQueue.Take(cts.Token); + using CancellationTokenSource cts = new(30000); + DebuggerStoppedEventArgs eventArgs = await Task.Run(() => debuggerStoppedQueue.Take(cts.Token)); Assert.True(psesHost.DebugContext.IsStopped); @@ -176,8 +174,8 @@ await debugService.SetCommandBreakpointsAsync( Task> executeTask = psesHost.ExecutePSCommandAsync( new PSCommand().AddScript("Get-Random -SetSeed 42 -Maximum 100"), CancellationToken.None); - AssertDebuggerStopped("", 1); - await Task.Run(debugService.Continue); + await AssertDebuggerStopped("", 1); + debugService.Continue(); Assert.Equal(17, (await executeTask)[0]); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); @@ -218,7 +216,7 @@ public async Task DebuggerAcceptsScriptArgs(string[] args) Task _ = ExecuteScriptFileAsync(oddPathScriptFile.FilePath, args); - AssertDebuggerStopped(oddPathScriptFile.FilePath, 3); + await AssertDebuggerStopped(oddPathScriptFile.FilePath, 3); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -285,7 +283,7 @@ public async Task DebuggerStopsOnFunctionBreakpoints() new[] { CommandBreakpointDetails.Create("Write-Host") }); Task _ = ExecuteDebugFileAsync(); - AssertDebuggerStopped(debugScriptFile.FilePath, 6); + await AssertDebuggerStopped(debugScriptFile.FilePath, 6); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -296,8 +294,8 @@ public async Task DebuggerStopsOnFunctionBreakpoints() Assert.Equal("1", i.ValueString); // The function breakpoint should fire the next time through the loop. - await Task.Run(debugService.Continue); - AssertDebuggerStopped(debugScriptFile.FilePath, 6); + debugService.Continue(); + await AssertDebuggerStopped(debugScriptFile.FilePath, 6); variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -352,9 +350,9 @@ await debugService.SetLineBreakpointsAsync( }); Task _ = ExecuteDebugFileAsync(); - AssertDebuggerStopped(debugScriptFile.FilePath, 5); - await Task.Run(debugService.Continue); - AssertDebuggerStopped(debugScriptFile.FilePath, 7); + await AssertDebuggerStopped(debugScriptFile.FilePath, 5); + debugService.Continue(); + await AssertDebuggerStopped(debugScriptFile.FilePath, 7); } [Fact] @@ -370,7 +368,7 @@ await debugService.SetLineBreakpointsAsync( }); Task _ = ExecuteDebugFileAsync(); - AssertDebuggerStopped(debugScriptFile.FilePath, 7); + await AssertDebuggerStopped(debugScriptFile.FilePath, 7); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -382,8 +380,8 @@ await debugService.SetLineBreakpointsAsync( // The conditional breakpoint should not fire again, until the value of // i reaches breakpointValue2. - await Task.Run(debugService.Continue); - AssertDebuggerStopped(debugScriptFile.FilePath, 7); + debugService.Continue(); + await AssertDebuggerStopped(debugScriptFile.FilePath, 7); variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -406,7 +404,7 @@ await debugService.SetLineBreakpointsAsync( }); Task _ = ExecuteDebugFileAsync(); - AssertDebuggerStopped(debugScriptFile.FilePath, 6); + await AssertDebuggerStopped(debugScriptFile.FilePath, 6); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -427,7 +425,7 @@ await debugService.SetLineBreakpointsAsync( new[] { BreakpointDetails.Create(debugScriptFile.FilePath, 6, null, "$i % 2 -eq 0", $"{hitCount}") }); Task _ = ExecuteDebugFileAsync(); - AssertDebuggerStopped(debugScriptFile.FilePath, 6); + await AssertDebuggerStopped(debugScriptFile.FilePath, 6); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -495,18 +493,16 @@ public async Task DebuggerBreaksWhenRequested() IReadOnlyList confirmedBreakpoints = await GetConfirmedBreakpoints(debugScriptFile); Assert.Empty(confirmedBreakpoints); Task _ = ExecuteDebugFileAsync(); - // NOTE: This must be run on a separate thread so the async event handlers can fire. - await Task.Run(debugService.Break); - AssertDebuggerPaused(); + debugService.Break(); + await AssertDebuggerPaused(); } [Fact] public async Task DebuggerRunsCommandsWhileStopped() { Task _ = ExecuteDebugFileAsync(); - // NOTE: This must be run on a separate thread so the async event handlers can fire. - await Task.Run(debugService.Break); - AssertDebuggerPaused(); + debugService.Break(); + await AssertDebuggerPaused(); // Try running a command from outside the pipeline thread Task> executeTask = psesHost.ExecutePSCommandAsync( @@ -526,7 +522,7 @@ await debugService.SetCommandBreakpointsAsync( ScriptFile testScript = GetDebugScript("PSDebugContextTest.ps1"); Task _ = ExecuteScriptFileAsync(testScript.FilePath); - AssertDebuggerStopped(testScript.FilePath, 11); + await AssertDebuggerStopped(testScript.FilePath, 11); VariableDetails prompt = await debugService.EvaluateExpressionAsync("prompt", false, CancellationToken.None); Assert.Equal("True > ", prompt.ValueString); @@ -551,7 +547,7 @@ await debugService.SetCommandBreakpointsAsync( NullLoggerFactory.Instance, null, debugService, null, null, psesHost, workspace, null, psesHost); Task _ = configurationDoneHandler.LaunchScriptAsync(scriptPath); - AssertDebuggerStopped(scriptPath, 1); + await AssertDebuggerStopped(scriptPath, 1); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.CommandVariablesName); VariableDetailsBase myInvocation = Array.Find(variables, v => v.Name == "$MyInvocation"); @@ -629,7 +625,7 @@ await debugService.SetLineBreakpointsAsync( new[] { BreakpointDetails.Create(variableScriptFile.FilePath, 8) }); Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -647,7 +643,7 @@ await debugService.SetLineBreakpointsAsync( new[] { BreakpointDetails.Create(variableScriptFile.FilePath, 21) }); Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -697,7 +693,7 @@ await debugService.SetLineBreakpointsAsync( new[] { BreakpointDetails.Create(variableScriptFile.FilePath, 14) }); Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); VariableScope[] scopes = debugService.GetVariableScopes(0); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -723,8 +719,8 @@ await debugService.SetLineBreakpointsAsync( // The above just tests that the debug service returns the correct new value string. // Let's step the debugger and make sure the values got set to the new values. - await Task.Run(debugService.StepOver); - AssertDebuggerStopped(variableScriptFile.FilePath); + debugService.StepOver(); + await AssertDebuggerStopped(variableScriptFile.FilePath); // Test set of a local string variable (not strongly typed) variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -751,7 +747,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); VariableScope[] scopes = debugService.GetVariableScopes(0); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -779,8 +775,8 @@ await debugService.SetLineBreakpointsAsync( // The above just tests that the debug service returns the correct new value string. // Let's step the debugger and make sure the values got set to the new values. - await Task.Run(debugService.StepOver); - AssertDebuggerStopped(variableScriptFile.FilePath); + debugService.StepOver(); + await AssertDebuggerStopped(variableScriptFile.FilePath); // Test set of a local string variable (not strongly typed but force conversion) variables = await GetVariables(VariableContainerDetails.LocalScopeName); @@ -807,7 +803,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -827,7 +823,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -860,7 +856,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -880,7 +876,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -907,7 +903,7 @@ public async Task DebuggerEnumerableShowsRawView() // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(commandBreakpointDetails: breakpoint); + await AssertDebuggerStopped(commandBreakpointDetails: breakpoint); VariableDetailsBase simpleArrayVar = Array.Find( await GetVariables(VariableContainerDetails.ScriptScopeName), @@ -964,7 +960,7 @@ public async Task DebuggerDictionaryShowsRawView() // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(commandBreakpointDetails: breakpoint); + await AssertDebuggerStopped(commandBreakpointDetails: breakpoint); VariableDetailsBase simpleDictionaryVar = Array.Find( await GetVariables(VariableContainerDetails.ScriptScopeName), @@ -1027,7 +1023,7 @@ public async Task DebuggerDerivedDictionaryPropertyInRawView() // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(commandBreakpointDetails: breakpoint); + await AssertDebuggerStopped(commandBreakpointDetails: breakpoint); VariableDetailsBase sortedDictionaryVar = Array.Find( await GetVariables(VariableContainerDetails.ScriptScopeName), @@ -1076,7 +1072,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -1105,7 +1101,7 @@ await debugService.SetLineBreakpointsAsync( // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(variableScriptFile.FilePath); + await AssertDebuggerStopped(variableScriptFile.FilePath); StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync(); VariableDetailsBase[] variables = await debugService.GetVariables(stackFrames[0].AutoVariables.Id, CancellationToken.None); @@ -1134,7 +1130,7 @@ await debugService.SetCommandBreakpointsAsync( ScriptFile testScript = GetDebugScript("GetChildItemTest.ps1"); Task _ = ExecuteScriptFileAsync(testScript.FilePath); - AssertDebuggerStopped(testScript.FilePath, 2); + await AssertDebuggerStopped(testScript.FilePath, 2); VariableDetailsBase[] variables = await GetVariables(VariableContainerDetails.LocalScopeName); VariableDetailsBase var = Array.Find(variables, v => v.Name == "$file"); @@ -1154,7 +1150,7 @@ public async Task DebuggerToStringShouldMarshallToPipeline() // Execute the script and wait for the breakpoint to be hit Task _ = ExecuteVariableScriptFileAsync(); - AssertDebuggerStopped(commandBreakpointDetails: breakpoint); + await AssertDebuggerStopped(commandBreakpointDetails: breakpoint); VariableDetailsBase[] vars = await GetVariables(VariableContainerDetails.ScriptScopeName); VariableDetailsBase customToStrings = Array.Find(vars, i => i.Name is "$CustomToStrings"); diff --git a/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs b/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs index 190ee5aae..70e35d3dd 100644 --- a/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs +++ b/test/PowerShellEditorServices.Test/Extensions/ExtensionCommandTests.cs @@ -20,33 +20,25 @@ namespace PowerShellEditorServices.Test.Extensions { [Trait("Category", "Extensions")] - public class ExtensionCommandTests : IDisposable + public class ExtensionCommandTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; + private PsesInternalHost psesHost; - private readonly ExtensionCommandService extensionCommandService; + private ExtensionCommandService extensionCommandService; - public ExtensionCommandTests() + public async Task InitializeAsync() { - psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); + psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance); ExtensionService extensionService = new( languageServer: null, serviceProvider: null, editorOperations: null, executionService: psesHost); -#pragma warning disable VSTHRD002 - extensionService.InitializeAsync().Wait(); -#pragma warning restore VSTHRD002 + await extensionService.InitializeAsync(); extensionCommandService = new(extensionService); } - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanRegisterAndInvokeCommandWithCmdletName() diff --git a/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs b/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs index fae0f8104..35546cefe 100644 --- a/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs +++ b/test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -21,26 +20,20 @@ namespace PowerShellEditorServices.Test.Language { [Trait("Category", "Completions")] - public class CompletionHandlerTests : IDisposable + public class CompletionHandlerTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; - private readonly WorkspaceService workspace; - private readonly PsesCompletionHandler completionHandler; + private PsesInternalHost psesHost; + private WorkspaceService workspace; + private PsesCompletionHandler completionHandler; - public CompletionHandlerTests() + public async Task InitializeAsync() { - psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); + psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance); workspace = new WorkspaceService(NullLoggerFactory.Instance); completionHandler = new PsesCompletionHandler(NullLoggerFactory.Instance, psesHost, psesHost, workspace); } - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public async Task DisposeAsync() => await Task.Run(psesHost.StopAsync); private ScriptFile GetScriptFile(ScriptRegion scriptRegion) => workspace.GetFile(TestUtilities.GetSharedPath(scriptRegion.File)); diff --git a/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs b/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs index f078d8d42..630c8a018 100644 --- a/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs +++ b/test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; @@ -30,16 +29,16 @@ namespace PowerShellEditorServices.Test.Language { [Trait("Category", "Symbols")] - public class SymbolsServiceTests : IDisposable + public class SymbolsServiceTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; - private readonly WorkspaceService workspace; - private readonly SymbolsService symbolsService; + private PsesInternalHost psesHost; + private WorkspaceService workspace; + private SymbolsService symbolsService; private static readonly bool s_isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); - public SymbolsServiceTests() + public async Task InitializeAsync() { - psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); + psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance); workspace = new WorkspaceService(NullLoggerFactory.Instance); workspace.WorkspaceFolders.Add(new WorkspaceFolder { @@ -53,14 +52,11 @@ public SymbolsServiceTests() new ConfigurationService()); } - public void Dispose() + public async Task DisposeAsync() { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().GetAwaiter().GetResult(); -#pragma warning restore VSTHRD002 + psesHost.StopAsync(); CommandHelpers.s_cmdletToAliasCache.Clear(); CommandHelpers.s_aliasToCmdletCache.Clear(); - GC.SuppressFinalize(this); } private static void AssertIsRegion( diff --git a/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj b/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj index 5c2534509..548f36c3e 100644 --- a/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj +++ b/test/PowerShellEditorServices.Test/PowerShellEditorServices.Test.csproj @@ -18,17 +18,17 @@ - + - + - + @@ -38,7 +38,7 @@ - + diff --git a/test/PowerShellEditorServices.Test/PsesHostFactory.cs b/test/PowerShellEditorServices.Test/PsesHostFactory.cs index 0e02b6389..9f63236d4 100644 --- a/test/PowerShellEditorServices.Test/PsesHostFactory.cs +++ b/test/PowerShellEditorServices.Test/PsesHostFactory.cs @@ -7,6 +7,7 @@ using System.Management.Automation.Host; using System.Management.Automation.Runspaces; using System.Threading; +using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.PowerShell.EditorServices.Hosting; using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host; @@ -28,7 +29,7 @@ internal static class PsesHostFactory public static readonly string BundledModulePath = Path.GetFullPath(TestUtilities.NormalizePath("../../../../../module")); - public static PsesInternalHost Create(ILoggerFactory loggerFactory, bool loadProfiles = false) + public static async Task Create(ILoggerFactory loggerFactory, bool loadProfiles = false) { // We intentionally use `CreateDefault2()` as it loads `Microsoft.PowerShell.Core` only, // which is a more minimal and therefore safer state. @@ -62,9 +63,7 @@ public static PsesInternalHost Create(ILoggerFactory loggerFactory, bool loadPro PsesInternalHost psesHost = new(loggerFactory, null, testHostDetails); - #pragma warning disable VSTHRD002 // Because this is used by constructors it can't use await. - if (psesHost.TryStartAsync(new HostStartOptions { LoadProfiles = loadProfiles }, CancellationToken.None).GetAwaiter().GetResult()) - #pragma warning restore VSTHRD002 + if (await psesHost.TryStartAsync(new HostStartOptions { LoadProfiles = loadProfiles }, CancellationToken.None)) { return psesHost; } diff --git a/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs b/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs index d489704f4..617b610ed 100644 --- a/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs +++ b/test/PowerShellEditorServices.Test/Session/PsesInternalHostTests.cs @@ -20,19 +20,13 @@ namespace PowerShellEditorServices.Test.Session using System.Management.Automation.Runspaces; [Trait("Category", "PsesInternalHost")] - public class PsesInternalHostTests : IDisposable + public class PsesInternalHostTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; + private PsesInternalHost psesHost; - public PsesInternalHostTests() => psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance); + public async Task InitializeAsync() => psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance); - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanExecutePSCommand() @@ -88,7 +82,7 @@ public async Task CanQueueParallelPSCommands() public async Task CanCancelExecutionWithToken() { using CancellationTokenSource cancellationSource = new(millisecondsDelay: 1000); - _ = await Assert.ThrowsAsync(() => + await Assert.ThrowsAsync(() => { return psesHost.ExecutePSCommandAsync( new PSCommand().AddScript("Start-Sleep 10"), @@ -104,9 +98,8 @@ public async Task CanCancelExecutionWithMethod() new PSCommand().AddScript("Start-Sleep 10"), CancellationToken.None); - // Wait until our task has started. - Thread.Sleep(2000); - psesHost.CancelCurrentTask(); + // Cancel the task after 1 second in another thread. + Task.Run(() => { Thread.Sleep(1000); psesHost.CancelCurrentTask(); }); await Assert.ThrowsAsync(() => executeTask); Assert.True(executeTask.IsCanceled); } @@ -238,19 +231,13 @@ public async Task CanHandleBadInitialWorkingDirectory(string path) } [Trait("Category", "PsesInternalHost")] - public class PsesInternalHostWithProfileTests : IDisposable + public class PsesInternalHostWithProfileTests : IAsyncLifetime { - private readonly PsesInternalHost psesHost; + private PsesInternalHost psesHost; - public PsesInternalHostWithProfileTests() => psesHost = PsesHostFactory.Create(NullLoggerFactory.Instance, loadProfiles: true); + public async Task InitializeAsync() => psesHost = await PsesHostFactory.Create(NullLoggerFactory.Instance, loadProfiles: true); - public void Dispose() - { -#pragma warning disable VSTHRD002 - psesHost.StopAsync().Wait(); -#pragma warning restore VSTHRD002 - GC.SuppressFinalize(this); - } + public async Task DisposeAsync() => await psesHost.StopAsync(); [Fact] public async Task CanResolveAndLoadProfilesForHostId() diff --git a/test/PowerShellEditorServices.Test/packages.lock.json b/test/PowerShellEditorServices.Test/packages.lock.json index 10c7dcbe2..35e73f2b9 100644 --- a/test/PowerShellEditorServices.Test/packages.lock.json +++ b/test/PowerShellEditorServices.Test/packages.lock.json @@ -28,13 +28,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -496,37 +496,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -550,7 +550,7 @@ "Microsoft.PowerShell.EditorServices.Test.Shared": { "type": "Project", "dependencies": { - "Microsoft.PowerShell.EditorServices": "[3.17.0, )" + "Microsoft.PowerShell.EditorServices": "[3.19.0, )" } } }, @@ -567,23 +567,23 @@ }, "Microsoft.PowerShell.SDK": { "type": "Direct", - "requested": "[7.2.17, )", - "resolved": "7.2.17", - "contentHash": "ZzW3f5zCWA+aPmpovTVz1bMdmrq+yjkHdH3xd3KZlE0Rfb9lSuIBvXt9ktu2/sAaGPoLL4c0Rn2OPhGrRIm81A==", + "requested": "[7.2.18, )", + "resolved": "7.2.18", + "contentHash": "0rFp8M289yx/ArclYFgu0Hiu5545KeFGKj+u1wVe7x/UNnCjZKYJzZz30GB0+mdQ1JsMjRITNgkvOCjnRCS5Kw==", "dependencies": { "Microsoft.Extensions.ObjectPool": "5.0.17", - "Microsoft.Management.Infrastructure.CimCmdlets": "7.2.17", + "Microsoft.Management.Infrastructure.CimCmdlets": "7.2.18", "Microsoft.NETCore.Windows.ApiSets": "1.0.1", - "Microsoft.PowerShell.Commands.Diagnostics": "7.2.17", - "Microsoft.PowerShell.Commands.Management": "7.2.17", - "Microsoft.PowerShell.Commands.Utility": "7.2.17", - "Microsoft.PowerShell.ConsoleHost": "7.2.17", - "Microsoft.PowerShell.Security": "7.2.17", - "Microsoft.WSMan.Management": "7.2.17", + "Microsoft.PowerShell.Commands.Diagnostics": "7.2.18", + "Microsoft.PowerShell.Commands.Management": "7.2.18", + "Microsoft.PowerShell.Commands.Utility": "7.2.18", + "Microsoft.PowerShell.ConsoleHost": "7.2.18", + "Microsoft.PowerShell.Security": "7.2.18", + "Microsoft.WSMan.Management": "7.2.18", "Microsoft.Windows.Compatibility": "6.0.7", - "System.Data.SqlClient": "4.8.5", + "System.Data.SqlClient": "4.8.6", "System.IO.Packaging": "6.0.0", - "System.Management.Automation": "7.2.17", + "System.Management.Automation": "7.2.18", "System.Net.Http.WinHttpHandler": "6.0.1", "System.Private.ServiceModel": "4.9.0", "System.ServiceModel.Duplex": "4.9.0", @@ -596,13 +596,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -787,10 +787,10 @@ }, "Microsoft.Management.Infrastructure.CimCmdlets": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "Kbx9i64RgLvL8DUEADveHNpuY3MdX7VtPxMoAsxKjPvLVUIbUAEino3NCHKz7OGkduzDwyDH/rM4OSEoiyK5+A==", + "resolved": "7.2.18", + "contentHash": "nx2CXZTGtRP3tC+WCqr+A6hgq0UddHd6yjAbkh457yjNYQS5N0EP23rVoF2NfFeVgFy3Gdut3MB6LLeCTEW+EA==", "dependencies": { - "System.Management.Automation": "7.2.17" + "System.Management.Automation": "7.2.18" } }, "Microsoft.Management.Infrastructure.Runtime.Unix": { @@ -820,25 +820,25 @@ }, "Microsoft.PowerShell.Commands.Diagnostics": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "bY18hRl+fyAm8GZE/q5HG5X3aQqizuTfqfudcBK/+X3i+cO6iK7CSQbuxPjfFXWD6MSe/ljxVRAKdbIXDE/BuQ==", + "resolved": "7.2.18", + "contentHash": "3dYKtjevF/6gdm6yitIwGbqBPBPQ0/Rixtibb/4fab1UdmZjYjOFJDDdbLoG2hL+LLE8PmLIN5rCRKY6Yepriw==", "dependencies": { - "System.Management.Automation": "7.2.17" + "System.Management.Automation": "7.2.18" } }, "Microsoft.PowerShell.Commands.Management": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "5p9eoKORNcVyjWgxnTVU/3niZgdzuXz13U8qLCljHIceOjLuzI2mYKvJaB9isTxbSEuXDKuncqBNy8XjTTmR7g==", + "resolved": "7.2.18", + "contentHash": "+x3qjcQ9DvwKVbTDVIOVYal7FxuOdqqecbz/ngTqs/uJUcCPOv2p9YgE1NkoAAO9UT56ukxvbaLbMaLihOnI0Q==", "dependencies": { - "Microsoft.PowerShell.Security": "7.2.17", + "Microsoft.PowerShell.Security": "7.2.18", "System.ServiceProcess.ServiceController": "6.0.1" } }, "Microsoft.PowerShell.Commands.Utility": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "i1kmPVMvQuZx8XNNYeHNz140v/J0EcAet/PswFzWpnK5SlxzWL9j9ozC5XFNAhGsWJwN1lpute1baf0ZKOoaqA==", + "resolved": "7.2.18", + "contentHash": "Qut0tzMArwa5CEb4NDr8Pt/ZKeI18QdfFXIKgJYO4NN6E/15He4lWyoDxw0BDI9vORMGVgeP9uLz+L/i/w+ftA==", "dependencies": { "Markdig.Signed": "0.31.0", "Microsoft.CodeAnalysis.CSharp": "4.0.1", @@ -847,22 +847,22 @@ "NJsonSchema": "10.5.2", "Namotion.Reflection": "2.0.10", "System.Drawing.Common": "6.0.0", - "System.Management.Automation": "7.2.17", + "System.Management.Automation": "7.2.18", "System.Threading.AccessControl": "6.0.0" } }, "Microsoft.PowerShell.ConsoleHost": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "0ccO91QqNYCtXfRGVx6ajfKGyH0AAEDqWsyOUQHcrEtd3O8HyFsri0uspXcMfn5pn5zViNGVf852jECeAIQ/fA==", + "resolved": "7.2.18", + "contentHash": "xra5nMBncp0JPzoeCjpGqARAJkimxGBFpDY29+/0BIkeFHrlSVttI7ZSMrDamo6OCRUzpPn5gNZIP1LprWOgVw==", "dependencies": { - "System.Management.Automation": "7.2.17" + "System.Management.Automation": "7.2.18" } }, "Microsoft.PowerShell.CoreCLR.Eventing": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "MBUnwBfUzLDDtgPSb9vd2Irj83fC8nXBEBgbE04tgtIN8ofezWLuuRhopIPAi8tJpFfsTefYu8Vi7oEo7Wgj5w==", + "resolved": "7.2.18", + "contentHash": "n3zlvCVXT0vbs5NUZCGgP7bl6xdoB/rddiSnrvIqpW8eNrh8auImj8KKgVNW3iOmL2OzMPIrSCeaP2ZyOSTh3A==", "dependencies": { "System.Diagnostics.EventLog": "6.0.0" } @@ -882,10 +882,10 @@ }, "Microsoft.PowerShell.Security": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "HaMmLZtFPb/HuHm89j3g7d8MR0AaEMMFuvJnF4yxCukANkFiIFe3Tuyt1C+p4PJmooGDm3zkDX5UiCfDB4i4kg==", + "resolved": "7.2.18", + "contentHash": "nbp5NIsAoWC1jFIIG+PSXtfoEFN4Em90JIrDEro6gahQBMVh3QH60vFRqim5WthUbO4Q5IAyzlViGs8AZNSzZw==", "dependencies": { - "System.Management.Automation": "7.2.17" + "System.Management.Automation": "7.2.18" } }, "Microsoft.TestPlatform.ObjectModel": { @@ -994,18 +994,18 @@ }, "Microsoft.WSMan.Management": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "4WvKb8xQgs+EpDkWBCx2MMg8jdnf7yncuOOf/S2qMA6ISOCGIwla46/Faixp+d67pZhAMXkvNVx3C/ym5MkyXw==", + "resolved": "7.2.18", + "contentHash": "w2Wnb9M1uSG+JGbwG5bSbW1tCNh3XgA3hdA+/4320YR+jx63yEmySeG6wGxG0Z1sND7uhb6/8usw8bH0do2ZSg==", "dependencies": { - "Microsoft.WSMan.Runtime": "7.2.17", - "System.Management.Automation": "7.2.17", + "Microsoft.WSMan.Runtime": "7.2.18", + "System.Management.Automation": "7.2.18", "System.ServiceProcess.ServiceController": "6.0.1" } }, "Microsoft.WSMan.Runtime": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "Q/e/EwioaaufbinB2nFrIT+AkCiSJ3pRAV1zHCwWKjx4X26YYsNdamd+9EFWqAccQHZuBs9pOAWsLvMXwNzR0w==" + "resolved": "7.2.18", + "contentHash": "ye/1J/2VsrSBd67B/D68NYxRpAUdtx9aHdDeVGXaDzktf7/P+OgUXPlYmvHCEC5dDvsPli/KFtNWkMhoIwEKOw==" }, "Namotion.Reflection": { "type": "Transitive", @@ -1269,8 +1269,8 @@ }, "System.Data.SqlClient": { "type": "Transitive", - "resolved": "4.8.5", - "contentHash": "fRqxut4lrndPHrXD+ht1XRmCL3obuKldm4XjCRYS9p5f7FSR7shBxAwTkDrpFMsHC9BhNgjjmUtiIjvehn5zkg==", + "resolved": "4.8.6", + "contentHash": "2Ij/LCaTQRyAi5lAv7UUTV9R2FobC8xN9mE0fXBZohum/xLl8IZVmE98Rq5ugQHjCgTBRKqpXRb4ORulRdA6Ig==", "dependencies": { "Microsoft.Win32.Registry": "4.7.0", "System.Security.Principal.Windows": "4.7.0", @@ -1370,13 +1370,13 @@ }, "System.Management.Automation": { "type": "Transitive", - "resolved": "7.2.17", - "contentHash": "PY6LHEH3mjHzzHgtSdPp8uTiUcL4+lLwj3T6ZASNgZVw+BXdHQeMBSteIVV72DAQzk0DblS2xkVasoSem0ggIw==", + "resolved": "7.2.18", + "contentHash": "SEIWaTtkkajmCGEjOkWHubbQ0ndtrxOPLqG19ogmodjYo+U7jw7MmimOU4fUH2A3wpB1lwXCVqI79x/vvcIPtQ==", "dependencies": { "Microsoft.ApplicationInsights": "2.21.0", "Microsoft.CSharp": "4.7.0", "Microsoft.Management.Infrastructure": "2.0.0", - "Microsoft.PowerShell.CoreCLR.Eventing": "7.2.17", + "Microsoft.PowerShell.CoreCLR.Eventing": "7.2.18", "Microsoft.PowerShell.Native": "7.2.1", "Microsoft.Win32.Registry.AccessControl": "6.0.0", "Newtonsoft.Json": "13.0.3", @@ -1631,37 +1631,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -1685,7 +1685,7 @@ "Microsoft.PowerShell.EditorServices.Test.Shared": { "type": "Project", "dependencies": { - "Microsoft.PowerShell.EditorServices": "[3.17.0, )" + "Microsoft.PowerShell.EditorServices": "[3.19.0, )" } } }, @@ -1702,24 +1702,24 @@ }, "Microsoft.PowerShell.SDK": { "type": "Direct", - "requested": "[7.3.10, )", - "resolved": "7.3.10", - "contentHash": "3sxhHjdfcbMvg2kpjmXkZp2J7Tox61YOIXlpn0PUypSy6uI52Rvg2q3PHz9RqKVmZ0VvaETFQsyajltEdQjRXg==", + "requested": "[7.3.11, )", + "resolved": "7.3.11", + "contentHash": "QKeE4siV3o8CwIlIqxj2AV1GAm7yy+XEOtke1vdUT/IBs7QIPnzFqEFHN9+NJAJ3iiSQFFGq7Mryy3RExS6eJg==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "7.0.0", - "Microsoft.Extensions.ObjectPool": "7.0.14", - "Microsoft.Management.Infrastructure.CimCmdlets": "7.3.10", - "Microsoft.PowerShell.Commands.Diagnostics": "7.3.10", - "Microsoft.PowerShell.Commands.Management": "7.3.10", - "Microsoft.PowerShell.Commands.Utility": "7.3.10", - "Microsoft.PowerShell.ConsoleHost": "7.3.10", - "Microsoft.PowerShell.Security": "7.3.10", - "Microsoft.WSMan.Management": "7.3.10", + "Microsoft.Extensions.ObjectPool": "7.0.15", + "Microsoft.Management.Infrastructure.CimCmdlets": "7.3.11", + "Microsoft.PowerShell.Commands.Diagnostics": "7.3.11", + "Microsoft.PowerShell.Commands.Management": "7.3.11", + "Microsoft.PowerShell.Commands.Utility": "7.3.11", + "Microsoft.PowerShell.ConsoleHost": "7.3.11", + "Microsoft.PowerShell.Security": "7.3.11", + "Microsoft.WSMan.Management": "7.3.11", "Microsoft.Win32.Registry": "5.0.0", "Microsoft.Windows.Compatibility": "7.0.5", - "System.Data.SqlClient": "4.8.5", + "System.Data.SqlClient": "4.8.6", "System.IO.Packaging": "7.0.0", - "System.Management.Automation": "7.3.10", + "System.Management.Automation": "7.3.11", "System.Net.Http.WinHttpHandler": "7.0.0", "System.Private.ServiceModel": "4.10.3", "System.Security.Cryptography.ProtectedData": "7.0.1", @@ -1735,13 +1735,13 @@ }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -1883,8 +1883,8 @@ }, "Microsoft.Extensions.ObjectPool": { "type": "Transitive", - "resolved": "7.0.14", - "contentHash": "C2N75sDAj4xY1hex2Tzv6l8s5Wcuvh6v6kjkLwyahJb7l2V7mrWtlKbSP19Q0AxqGyvTkd7Is/M2DBTwCbKBSQ==" + "resolved": "7.0.15", + "contentHash": "eP9AS3epm6pOeviGKt2GT+sW1LtLA6lHiY2oQFthoGisGRxDKgxerwXgrsXvWv6YJ9w4Pz/ih3vI1njeSbYPBw==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -1923,10 +1923,10 @@ }, "Microsoft.Management.Infrastructure.CimCmdlets": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "RM1yPzl67HjotHMuaw2dBdlKLUBR3pmYQ+JGcw9z6Osls6WmKoQZcJKiItPAMZX38AaTB21VEutyBTI5LhpJ7Q==", + "resolved": "7.3.11", + "contentHash": "n4rOiTl9SUly/qPXXHtJygaaEt002W7dXN24CoZJllbtyY/dAuIIOTkqN397BGiluff9c1BrmhsjGx7sHoavjg==", "dependencies": { - "System.Management.Automation": "7.3.10" + "System.Management.Automation": "7.3.11" } }, "Microsoft.Management.Infrastructure.Runtime.Unix": { @@ -1951,25 +1951,25 @@ }, "Microsoft.PowerShell.Commands.Diagnostics": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "aopcVFcevPACu9il0zeIuGv0NU/cR7H9zHNAN5Ug4h7Q07eJM14mWGr4BcYwk7xRBK2Lk7AZmNWxC5CHvfKTAA==", + "resolved": "7.3.11", + "contentHash": "FS2k1cOEs7mL1qHg1xOshK6h083mCM+F9vPRQz9twPQG0mZU3nhs0+Fh9U4jJ74zdpBzebZbNgUQYwa0nRCo7g==", "dependencies": { - "System.Management.Automation": "7.3.10" + "System.Management.Automation": "7.3.11" } }, "Microsoft.PowerShell.Commands.Management": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "YN1NT9h/x/EiL4XnNtC4/1CsDAvmJwW/2RqaHMqMzCXRwq38+hAH1zeVy+N4BbLhAjMSvCAVHI+vh+KRgBylfw==", + "resolved": "7.3.11", + "contentHash": "/5h9m1knoXmQIbL9kSv65JarwdvZR49QjpQ7xPzDCQnUciTpRBSC1hrY5kgqWeI444xw+s4mEQhkMvyAyvTi8g==", "dependencies": { - "Microsoft.PowerShell.Security": "7.3.10", + "Microsoft.PowerShell.Security": "7.3.11", "System.ServiceProcess.ServiceController": "7.0.1" } }, "Microsoft.PowerShell.Commands.Utility": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "ayzddFHB7+o7UI33EziTiqitOUGCMhpenxrbjhD3neeqPHJj2SDQEh1SmCb4dHY2Gso/JIOR10qbjhQfWpKItQ==", + "resolved": "7.3.11", + "contentHash": "RA87scdTlsiVc6HEz9TjB5KunCWVyFTvz0VZKAET8xdhMeaTbiQKMj2zK3qBKI+fLw2O7xhqYsUJqyX9VrWjfg==", "dependencies": { "Markdig.Signed": "0.31.0", "Microsoft.CodeAnalysis.CSharp": "4.4.0", @@ -1977,22 +1977,22 @@ "NJsonSchema": "10.8.0", "Namotion.Reflection": "2.1.2", "System.Drawing.Common": "7.0.0", - "System.Management.Automation": "7.3.10", + "System.Management.Automation": "7.3.11", "System.Threading.AccessControl": "7.0.1" } }, "Microsoft.PowerShell.ConsoleHost": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "HxP8ZtGRIZYxLgWMIxCfY4FJimpVilcG7Gca0PPX91vua624OBt+IxpPtVz678uH/14YeJIbpSGzOAwh6xvQhg==", + "resolved": "7.3.11", + "contentHash": "2UdF1+vXCPo9nb6PTxNHJ4w+Gv5oMAhWV/4uG8kGIrR47dcDg1GNngdxi0LkZw1jFrTaYWJnG8LQ8Pl66KUAOw==", "dependencies": { - "System.Management.Automation": "7.3.10" + "System.Management.Automation": "7.3.11" } }, "Microsoft.PowerShell.CoreCLR.Eventing": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "/rU9EUbko0hftXg8Gor5xhpQipM0Y4CrxwanYR5/6ZLrZBkTroanOhhWTCjW0phI8d8a9sAQA2FECFzWO8kWKg==", + "resolved": "7.3.11", + "contentHash": "99s2ohi4HIsBE94yTr+ZFaktbhpnuJGHu+orrVb2lBTsM55mOMDcDodDy9t0Wi4bu1kJVr7cbr5guO22z++/VQ==", "dependencies": { "System.Diagnostics.EventLog": "7.0.0" } @@ -2012,10 +2012,10 @@ }, "Microsoft.PowerShell.Security": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "I8zMNzrEN8cCUQUTpwRzYtGi+vXoO5DvSfHT8+x2I6yrgAhyjzZyYQkvGm+n/hZBIA8Ayc6o67L7Ev0cLpW1cw==", + "resolved": "7.3.11", + "contentHash": "enBmNAktfPJS1Wlg/MmfgJGsI11oBbEpmwI8pMSCYu7pqh3Wq25h1Sp+eyJAy0Q0MxllIZAbeVVu9LCeu8TphA==", "dependencies": { - "System.Management.Automation": "7.3.10" + "System.Management.Automation": "7.3.11" } }, "Microsoft.Security.Extensions": { @@ -2125,18 +2125,18 @@ }, "Microsoft.WSMan.Management": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "uEfRWYS1FA2vipN16A/ZnT5hOA010AukAFJENxyTj7Xmb8m3IN0k915BkxO+n/abLMJ4PVRRi01vA0voodFVig==", + "resolved": "7.3.11", + "contentHash": "A9pD4KCByhco7PnlaTVYAczNGMIbb9yUB2heSZCWLw6b6nC6JMJiawRTwptUeJaw0RfWrB2a/6W2jkecB9UlQg==", "dependencies": { - "Microsoft.WSMan.Runtime": "7.3.10", - "System.Management.Automation": "7.3.10", + "Microsoft.WSMan.Runtime": "7.3.11", + "System.Management.Automation": "7.3.11", "System.ServiceProcess.ServiceController": "7.0.1" } }, "Microsoft.WSMan.Runtime": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "e2DHtDuYcDGj2s8q+UsqJM5u/dhxjfqxpO3ojSITz0zuMlrsaJytoiG9dn6R4eSKV9C1XuvrN1xAQCUWfVMl7Q==" + "resolved": "7.3.11", + "contentHash": "NUGKQ+OR9Ic0fBMn8kmh9f5YPTNDLIXJxHUDw4amJu6vGE6Zm7lvZZ5P9wQ3+QEU1D3ikpzDKoG+JCHrPsKKag==" }, "Namotion.Reflection": { "type": "Transitive", @@ -2404,8 +2404,8 @@ }, "System.Data.SqlClient": { "type": "Transitive", - "resolved": "4.8.5", - "contentHash": "fRqxut4lrndPHrXD+ht1XRmCL3obuKldm4XjCRYS9p5f7FSR7shBxAwTkDrpFMsHC9BhNgjjmUtiIjvehn5zkg==", + "resolved": "4.8.6", + "contentHash": "2Ij/LCaTQRyAi5lAv7UUTV9R2FobC8xN9mE0fXBZohum/xLl8IZVmE98Rq5ugQHjCgTBRKqpXRb4ORulRdA6Ig==", "dependencies": { "Microsoft.Win32.Registry": "4.7.0", "System.Security.Principal.Windows": "4.7.0", @@ -2503,13 +2503,13 @@ }, "System.Management.Automation": { "type": "Transitive", - "resolved": "7.3.10", - "contentHash": "EL9podZo6BKcC/B8WjpceDXDBrJEZzi+zelHkEo5opI8lOT/FSmm4Hg0WVGEHNWaQRShVxDVBYaftmy0J155Zw==", + "resolved": "7.3.11", + "contentHash": "PvAgBxHIyGN0rAtTLRmjGYo7qIRrdaLm/KFXoomTEHM4hjzLqzxDhT+jd0d7SyA0BYmhwUNVXxlTxTP+V6+swQ==", "dependencies": { "Microsoft.ApplicationInsights": "2.21.0", "Microsoft.CSharp": "4.7.0", "Microsoft.Management.Infrastructure": "2.0.0", - "Microsoft.PowerShell.CoreCLR.Eventing": "7.3.10", + "Microsoft.PowerShell.CoreCLR.Eventing": "7.3.11", "Microsoft.PowerShell.Native": "7.3.2", "Microsoft.Security.Extensions": "1.2.0", "Microsoft.Win32.Registry.AccessControl": "7.0.0", @@ -2754,37 +2754,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -2808,7 +2808,7 @@ "Microsoft.PowerShell.EditorServices.Test.Shared": { "type": "Project", "dependencies": { - "Microsoft.PowerShell.EditorServices": "[3.17.0, )" + "Microsoft.PowerShell.EditorServices": "[3.19.0, )" } } }, @@ -2825,21 +2825,22 @@ }, "Microsoft.PowerShell.SDK": { "type": "Direct", - "requested": "[7.4.0, )", - "resolved": "7.4.0", - "contentHash": "Dfq8X2csb/Lpfyf9AEgxPOb8zO5cjErdsoU2TPjfU8lnv0JJQxRFeaXtlfoxtZ1EWSV4CE3+J/i5II9y68J0xg==", - "dependencies": { - "Microsoft.Management.Infrastructure.CimCmdlets": "7.4.0", - "Microsoft.PowerShell.Commands.Diagnostics": "7.4.0", - "Microsoft.PowerShell.Commands.Management": "7.4.0", - "Microsoft.PowerShell.Commands.Utility": "7.4.0", - "Microsoft.PowerShell.ConsoleHost": "7.4.0", - "Microsoft.PowerShell.Security": "7.4.0", - "Microsoft.WSMan.Management": "7.4.0", - "Microsoft.Windows.Compatibility": "8.0.0", - "System.Data.SqlClient": "4.8.5", + "requested": "[7.4.1, )", + "resolved": "7.4.1", + "contentHash": "1h0KixYhgGUuRQssGWdqvMCxyHYerw8VPK0XEu2OllUj704yGNTsLb2MjUPV5m35UR/R3JSJL6l9VDx1DdG0fw==", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "5.0.17", + "Microsoft.Management.Infrastructure.CimCmdlets": "7.4.1", + "Microsoft.PowerShell.Commands.Diagnostics": "7.4.1", + "Microsoft.PowerShell.Commands.Management": "7.4.1", + "Microsoft.PowerShell.Commands.Utility": "7.4.1", + "Microsoft.PowerShell.ConsoleHost": "7.4.1", + "Microsoft.PowerShell.Security": "7.4.1", + "Microsoft.WSMan.Management": "7.4.1", + "Microsoft.Windows.Compatibility": "8.0.1", + "System.Data.SqlClient": "4.8.6", "System.IO.Packaging": "8.0.0", - "System.Management.Automation": "7.4.0", + "System.Management.Automation": "7.4.1", "System.Net.Http.WinHttpHandler": "8.0.0", "System.Private.ServiceModel": "4.10.3", "System.ServiceModel.Duplex": "4.10.3", @@ -2847,18 +2848,19 @@ "System.ServiceModel.NetTcp": "4.10.3", "System.ServiceModel.Primitives": "4.10.3", "System.ServiceModel.Security": "4.10.3", - "System.Text.Encodings.Web": "8.0.0" + "System.Text.Encodings.Web": "8.0.0", + "System.Web.Services.Description": "4.10.3" } }, "xunit": { "type": "Direct", - "requested": "[2.6.6, )", - "resolved": "2.6.6", - "contentHash": "MAbOOMtZIKyn2lrAmMlvhX0BhDOX/smyrTB+8WTXnSKkrmTGBS2fm8g1PZtHBPj91Dc5DJA7fY+/81TJ/yUFZw==", + "requested": "[2.7.0, )", + "resolved": "2.7.0", + "contentHash": "KcCI5zxh8zbUfQTeErc4oT7YokViVND2V0p4vDJ2VD4lhF9V5qCYMMDNixme7FdwYy3SwPHF+2xC2Dq4Z9GSlA==", "dependencies": { - "xunit.analyzers": "1.10.0", - "xunit.assert": "2.6.6", - "xunit.core": "[2.6.6]" + "xunit.analyzers": "1.11.0", + "xunit.assert": "2.7.0", + "xunit.core": "[2.7.0]" } }, "xunit.runner.visualstudio": { @@ -2884,8 +2886,8 @@ }, "Json.More.Net": { "type": "Transitive", - "resolved": "1.9.0", - "contentHash": "MMjd2dOh32hLbcZg9YyA+7aEH9gu2cMTEAWrQY17in4+aEsPg2NtYTcwgWHJS9Tt2WUx+4iN1mNegR2uiEwsVQ==", + "resolved": "1.9.3", + "contentHash": "BKIsKHXR2Jq+LdLdxPo3L09Lv0ld9xs1fAMvSAe2cf2YOl3at9vw0RrMlhC2ookDi7VtrgHXzc2Et5mVBOAUdw==", "dependencies": { "System.Text.Json": "6.0.2" } @@ -2900,8 +2902,8 @@ }, "JsonSchema.Net": { "type": "Transitive", - "resolved": "5.2.6", - "contentHash": "Zu+Zh6v7GVcqUxA2Ur1SifMMUIvaJULYZijscqiofEg6H6XuGuItXLZanaLp6PU2wtUoLVu4mcSPvyZvCEp5Lg==", + "resolved": "5.2.7", + "contentHash": "8un7Xq2MoKiWNo0HQtf2sPr3764W9NjNELIx3l9d3fIKEjg3tYtrZmxN+CgXKtzku4g52CqYUZuI+o0ue226vw==", "dependencies": { "JetBrains.Annotations": "2021.2.0", "Json.More.Net": "1.9.0", @@ -2938,8 +2940,8 @@ }, "Microsoft.CodeAnalysis.Common": { "type": "Transitive", - "resolved": "4.8.0-2.final", - "contentHash": "sH+5d3H18D8W13Kgusib4usJRWnDcZoJ3nU7MiIlytg7uiLA8DlAQKWEk+x8h8SJOD7CSeqqL9/D6c6ShqidLg==", + "resolved": "4.8.0", + "contentHash": "/jR+e/9aT+BApoQJABlVCKnnggGQbvGh7BKq2/wI1LamxC+LbzhcLj4Vj7gXCofl1n4E521YfF9w0WcASGg/KA==", "dependencies": { "Microsoft.CodeAnalysis.Analyzers": "3.3.4", "System.Collections.Immutable": "7.0.0", @@ -2949,10 +2951,10 @@ }, "Microsoft.CodeAnalysis.CSharp": { "type": "Transitive", - "resolved": "4.8.0-2.final", - "contentHash": "2HS51hRSY7NbyiQAOW/0WQArfqkUhVWqmN+Z/KEeqnm+6fk46HmYesvN/BS5RKa1KswcjYYK92xdne+WdhebiQ==", + "resolved": "4.8.0", + "contentHash": "+3+qfdb/aaGD8PZRCrsdobbzGs1m9u119SkkJt8e/mk3xLJz/udLtS2T6nY27OTXxBBw10HzAbC8Z9w08VyP/g==", "dependencies": { - "Microsoft.CodeAnalysis.Common": "[4.8.0-2.final]" + "Microsoft.CodeAnalysis.Common": "[4.8.0]" } }, "Microsoft.CodeCoverage": { @@ -3028,8 +3030,8 @@ }, "Microsoft.Extensions.ObjectPool": { "type": "Transitive", - "resolved": "5.0.10", - "contentHash": "pp9tbGqIhdEXL6Q1yJl+zevAJSq4BsxqhS1GXzBvEsEz9DDNu9GLNzgUy2xyFc4YjB4m4Ff2YEWTnvQvVYdkvQ==" + "resolved": "5.0.17", + "contentHash": "EkIghF7cRBcogXKrfhopcCRjMs6b19THqSvACV5Oppp0nDA8oNyTLpAsfBQJ1hLgOjHfc5eNKFaFocKdg9nmnA==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -3068,10 +3070,10 @@ }, "Microsoft.Management.Infrastructure.CimCmdlets": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "9L+s9tY/gAQPbbyhHUcnvyZMC19pcK3C1hIrCZ7tOGdhLu3VXeskpGb5juzIgMY5efAvRpNFhpM7o4CeuF6fEw==", + "resolved": "7.4.1", + "contentHash": "y8ssJEx6pd+8Nsebupt8dKyyc+kLutacaaZBIRLKfUc84BE0Pv88hs6v8TF1M3c7pk2xkZDmEXMdVDCpWdJ/YQ==", "dependencies": { - "System.Management.Automation": "7.4.0" + "System.Management.Automation": "7.4.1" } }, "Microsoft.Management.Infrastructure.Runtime.Unix": { @@ -3096,47 +3098,49 @@ }, "Microsoft.PowerShell.Commands.Diagnostics": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "4YAdmd7PoATLjq/SbKfKYrrf63fXPytcUVS1pe/xOEs2Wfoj66lnXbn1pnlkWMnUwiv3M6EmuqG227meS4iARQ==", + "resolved": "7.4.1", + "contentHash": "TSNoWEO9xQPcQG5TYgi3puJgpwjVbMe5VesgzfZ4+lGWJurgI3y2vanXZSQoyRzlreqEtjBNggS/8TpHOO3nZA==", "dependencies": { - "System.Management.Automation": "7.4.0" + "System.Management.Automation": "7.4.1" } }, "Microsoft.PowerShell.Commands.Management": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "couE0QnaJD8fbPrWid6CirSBFitCygvOJ0Hm68mzRp8wpgW6XS8zsJ8YOfggT/2+NEGdRzqdbD2YmFnICe06nA==", + "resolved": "7.4.1", + "contentHash": "LtyD1q6dHsiYeVsWLEbBajP1AKy83uXYNwyvRxU6uxO3q4N3+Ntt0wHQsZmSBoS3jvEvHDJklMxmW/SHoNgSKw==", "dependencies": { - "Microsoft.PowerShell.Security": "7.4.0", + "Microsoft.PowerShell.Security": "7.4.1", "System.ServiceProcess.ServiceController": "8.0.0" } }, "Microsoft.PowerShell.Commands.Utility": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "wJIRRORIYhKw7JSfaFoUg1NaT8nsqLAA3ZLcnD6TJUPcOAixZbZyEIVGVMoTTP7IzInx4znyaAV8A4aXtVdfGQ==", + "resolved": "7.4.1", + "contentHash": "P2Fynn9+ooRiAKP5zB2e/fo0hhp/Ss81fqASAHH3mevYZPmnAPNxZMAkvMiayA8Pe6o6GVswXj3vyf5JUtN+mg==", "dependencies": { - "JsonSchema.Net": "5.2.6", + "Json.More.Net": "1.9.3", + "JsonSchema.Net": "5.2.7", "Markdig.Signed": "0.33.0", - "Microsoft.CodeAnalysis.CSharp": "4.8.0-2.final", + "Microsoft.CodeAnalysis.CSharp": "4.8.0", "Microsoft.PowerShell.MarkdownRender": "7.2.1", - "System.Drawing.Common": "8.0.0", - "System.Management.Automation": "7.4.0", + "System.Drawing.Common": "8.0.1", + "System.Management.Automation": "7.4.1", + "System.Text.Json": "6.0.9", "System.Threading.AccessControl": "8.0.0" } }, "Microsoft.PowerShell.ConsoleHost": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "dp8FYY7sZHMluy2g7T9Ky75yPnUBfsE0eJdkgy4/oCpTquGqEqInEbDJaMWiU82oRYsUW6gAKOc/lXgz6SVqww==", + "resolved": "7.4.1", + "contentHash": "IXyTckU0QE0+YdHyR7MvcUXPUQAGMQISX0M0594fV1gemkiIgRQ2Q7la3lEjE09GGwxAkDEfWFxE3Z/cDjV77w==", "dependencies": { - "System.Management.Automation": "7.4.0" + "System.Management.Automation": "7.4.1" } }, "Microsoft.PowerShell.CoreCLR.Eventing": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "WHcqfVoaP2dZuf93GS7dk117+/CuLNCqiJN8JUhMthtJuA/lvIzblIzUf3yiEppm1QnINvF1wjy4sB1nXUuGqQ==", + "resolved": "7.4.1", + "contentHash": "uyByMNZ3XVUrJAxdHrXM/75vcKdfbs04J5iIZfDA8m9z8TJDViRMjyHNcp8K/ZXyzpT2Lua2d7g+dP47E9wAcg==", "dependencies": { "System.Diagnostics.EventLog": "8.0.0" } @@ -3156,10 +3160,10 @@ }, "Microsoft.PowerShell.Security": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "rS0LAR62Qp0Idj7oIlRJEDKg4LjzMtMbcfG/Q7gSHYZ0FvqH8WHc3koWIeh7LQBZEtTuR5Ba8mDBE0CLa1fB7w==", + "resolved": "7.4.1", + "contentHash": "fEMvsyVqDdGFMSLjNpFHdEGo/OGO2WaQlpyqUCKgRknpnpO+MBaWZBGcLu81sidN3iDtTotClzQOQwVXMeNEVQ==", "dependencies": { - "System.Management.Automation": "7.4.0" + "System.Management.Automation": "7.4.1" } }, "Microsoft.Security.Extensions": { @@ -3227,8 +3231,8 @@ }, "Microsoft.Windows.Compatibility": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "4hIR9/0mJe1YWCPJ8ChPf6V+R0SjxF5Uj5RhviRoUk3gri0hQeRrdeGFGjJjAKQRu1OgpF2GnbHIwBTRvZGUuQ==", + "resolved": "8.0.1", + "contentHash": "Gr6QvHy9Y5PK5/ijl+cnCnfLr9HdCVByHtbPR5CxOAPeshURdJ/SNMi1t7qbUMBFCU9zsBlXSE1q/TsOUS0u8A==", "dependencies": { "Microsoft.Win32.Registry.AccessControl": "8.0.0", "Microsoft.Win32.SystemEvents": "8.0.0", @@ -3244,7 +3248,7 @@ "System.DirectoryServices": "8.0.0", "System.DirectoryServices.AccountManagement": "8.0.0", "System.DirectoryServices.Protocols": "8.0.0", - "System.Drawing.Common": "8.0.0", + "System.Drawing.Common": "8.0.1", "System.IO.Packaging": "8.0.0", "System.IO.Ports": "8.0.0", "System.Management": "8.0.0", @@ -3269,18 +3273,18 @@ }, "Microsoft.WSMan.Management": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "PeqTiiHECoWxBJG/Gs9bjAmmTYznhD+97aU3NKU6N7pkah6soIFLV3UQZDDnMD6cZp7m8L9vjT3DWFmZly3HSg==", + "resolved": "7.4.1", + "contentHash": "fkngCgs8WB0yk4vB+2Q3r3GQWkWq5y1X6Cn3/Y/UFxmpeSm6UFG10Tl5gi0rD2ZNvQgBP9++VVfxoQgSGqqTNQ==", "dependencies": { - "Microsoft.WSMan.Runtime": "7.4.0", - "System.Management.Automation": "7.4.0", + "Microsoft.WSMan.Runtime": "7.4.1", + "System.Management.Automation": "7.4.1", "System.ServiceProcess.ServiceController": "8.0.0" } }, "Microsoft.WSMan.Runtime": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "f4GCYLXzmL5WNBF829uMDLSg2D2r6ok8RhtX8INDUBstjprbsbH2ZwlAUNdkZQIvcTDVZXh7vq+aB8X+LCh+9g==" + "resolved": "7.4.1", + "contentHash": "m7NZmuQ7WHcosiU1Fpu82VV7bfI36p4bvMmhZOp2ECCgPYy3RvxVPf/SFKJQ5y721e3Ruindb5mVXxXQZ05TaA==" }, "Nerdbank.Streams": { "type": "Transitive", @@ -3527,8 +3531,8 @@ }, "System.Data.SqlClient": { "type": "Transitive", - "resolved": "4.8.5", - "contentHash": "fRqxut4lrndPHrXD+ht1XRmCL3obuKldm4XjCRYS9p5f7FSR7shBxAwTkDrpFMsHC9BhNgjjmUtiIjvehn5zkg==", + "resolved": "4.8.6", + "contentHash": "2Ij/LCaTQRyAi5lAv7UUTV9R2FobC8xN9mE0fXBZohum/xLl8IZVmE98Rq5ugQHjCgTBRKqpXRb4ORulRdA6Ig==", "dependencies": { "Microsoft.Win32.Registry": "4.7.0", "System.Security.Principal.Windows": "4.7.0", @@ -3575,8 +3579,8 @@ }, "System.Drawing.Common": { "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "JkbHJjtI/dWc5dfmEdJlbe3VwgZqCkZRtfuWFh5GOv0f+gGCfBtzMpIVkmdkj2AObO9y+oiOi81UGwH3aBYuqA==", + "resolved": "8.0.1", + "contentHash": "x0rAZECxIGx/YVjN28YRdpqka0+H7YMN9741FUDzipXPDzesd60gef/LI0ZCOcYSDsacTLTHvMAvxHG+TjbNNQ==", "dependencies": { "Microsoft.Win32.SystemEvents": "8.0.0" } @@ -3623,12 +3627,12 @@ }, "System.Management.Automation": { "type": "Transitive", - "resolved": "7.4.0", - "contentHash": "nWsPB750tBAA6+08kcRY9fiV2eiRK6JYmySL4/IllocnA+gCUP2+sHX1enzy4uQ5DHE4SgFNv9yW+7tKX7uqsw==", + "resolved": "7.4.1", + "contentHash": "EYUMyAoYAw4Zt+cxKRMjZxzoa6gI++O4sK+cSg8HUhC1HfrJoMhD1u1Fo5CvlGv1KX3OmoJSyukgkDmRHFLQiw==", "dependencies": { "Microsoft.ApplicationInsights": "2.21.0", "Microsoft.Management.Infrastructure": "3.0.0", - "Microsoft.PowerShell.CoreCLR.Eventing": "7.4.0", + "Microsoft.PowerShell.CoreCLR.Eventing": "7.4.1", "Microsoft.PowerShell.Native": "7.4.0", "Microsoft.Security.Extensions": "1.2.0", "Microsoft.Win32.Registry.AccessControl": "8.0.0", @@ -3637,7 +3641,7 @@ "System.Diagnostics.DiagnosticSource": "8.0.0", "System.DirectoryServices": "8.0.0", "System.Management": "8.0.0", - "System.Security.AccessControl": "6.0.2-mauipre.1.22102.15", + "System.Security.AccessControl": "6.0.0", "System.Security.Cryptography.Pkcs": "8.0.0", "System.Security.Permissions": "8.0.0", "System.Text.Encoding.CodePages": "8.0.0" @@ -3713,8 +3717,8 @@ }, "System.Security.AccessControl": { "type": "Transitive", - "resolved": "6.0.2-mauipre.1.22102.15", - "contentHash": "ny0SrGGm/O1Q889Zzx1tLP8X0UjkOHjDPN0omy3onMwU1qPrPq90kWvMY8gmh6eHtRkRAGzlJlEer64ii7GMrg==" + "resolved": "6.0.0", + "contentHash": "AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ==" }, "System.Security.Cryptography.Pkcs": { "type": "Transitive", @@ -3832,8 +3836,8 @@ }, "System.Text.Json": { "type": "Transitive", - "resolved": "6.0.2", - "contentHash": "0nE2gwXLn3PTBOPwORLqwuYvWB+Beomt9ZBX+6LmogMNKUvfD1SoDb/ycB1vBntT94rGaB/SvxEyeLu14H6aEg==", + "resolved": "6.0.9", + "contentHash": "2j16oUgtIzl7Xtk7demG0i/v5aU/ZvULcAnJvPb63U3ZhXJ494UYcxuEj5Fs49i3XDrk5kU/8I+6l9zRCw3cJw==", "dependencies": { "System.Runtime.CompilerServices.Unsafe": "6.0.0", "System.Text.Encodings.Web": "6.0.0" @@ -3856,8 +3860,8 @@ }, "System.Web.Services.Description": { "type": "Transitive", - "resolved": "4.10.0", - "contentHash": "Dwr64geRujAwnI+wPMJP1rf4pFaYRITrAS7EIGd0GVMwQ8OayM6ypwmnAPzQG4YTyN84w6KD5Rv8LJywYK+vUA==" + "resolved": "4.10.3", + "contentHash": "ORCkTkUo9f1o4ACG+H6SV+0XSxVZ461w3cHzYxEU41y6aKWp1CeNTMYbtdxMw1we6c6t4Hqq15PdcLVcdqno/g==" }, "System.Windows.Extensions": { "type": "Transitive", @@ -3876,37 +3880,37 @@ }, "xunit.analyzers": { "type": "Transitive", - "resolved": "1.10.0", - "contentHash": "Lw8CiDy5NaAWcO6keqD7iZHYUTIuCOcoFrUHw5Sv84ITZ9gFeDybdkVdH0Y2maSlP9fUjtENyiykT44zwFQIHA==" + "resolved": "1.11.0", + "contentHash": "SCv+Ihxv+fCqotGeM8sVwLhw8nzAJ2aFRN5lcoKn9QtGdbVJ79JqDc+4u8/Ddnp2udxtmv+xYFWkHNlb/sk01w==" }, "xunit.assert": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "74Cm9lAZOk5TKCz2MvCBCByKsS23yryOKDIMxH3XRDHXmfGM02jKZWzRA7g4mGB41GnBnv/pcWP3vUYkrCtEcg==" + "resolved": "2.7.0", + "contentHash": "CCTs3bUhmIS4tDwK6Cn/IiabG3RhYzdf65eIkO7u9/grKoN9MrN780LzVED3E8v+vwmmj7b5TW3/GFuZHPAzWA==" }, "xunit.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "tqi7RfaNBqM7t8zx6QHryuBPzmotsZXKGaWnopQG2Ez5UV7JoWuyoNdT6gLpDIcKdGYey6YTXJdSr9IXDMKwjg==", + "resolved": "2.7.0", + "contentHash": "98tzqYAbtc/p/2Ba455XTNbD12Qoo8kPehjC4oDT46CAsLli5JOCU9hFF2MV3HHWMw/Y3yFUV2Vcukplbs6kuA==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]", - "xunit.extensibility.execution": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]", + "xunit.extensibility.execution": "[2.7.0]" } }, "xunit.extensibility.core": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "ty6VKByzbx4Toj4/VGJLEnlmOawqZiMv0in/tLju+ftA+lbWuAWDERM+E52Jfhj4ZYHrAYVa14KHK5T+dq0XxA==", + "resolved": "2.7.0", + "contentHash": "JLnx4PI0vn1Xr1Ust6ydrp2t/ktm2dyGPAVoDJV5gQuvBMSbd2K7WGzODa2ttiz030CeQ8nbsXl05+cvf7QNyA==", "dependencies": { "xunit.abstractions": "2.0.3" } }, "xunit.extensibility.execution": { "type": "Transitive", - "resolved": "2.6.6", - "contentHash": "UDjIVGj2TepVKN3n32/qXIdb3U6STwTb9L6YEwoQO2A8OxiJS5QAVv2l1aT6tDwwv/9WBmm8Khh/LyHALipcng==", + "resolved": "2.7.0", + "contentHash": "bjY+crT1jOyxKagFjCMdEVzoenO2v66ru8+CK/0UaXvyG4U9Q3UTieJkbQXbi7/1yZIK1sGh01l5/jh2CwLJtQ==", "dependencies": { - "xunit.extensibility.core": "[2.6.6]" + "xunit.extensibility.core": "[2.7.0]" } }, "Microsoft.PowerShell.EditorServices": { @@ -3930,7 +3934,7 @@ "Microsoft.PowerShell.EditorServices.Test.Shared": { "type": "Project", "dependencies": { - "Microsoft.PowerShell.EditorServices": "[3.17.0, )" + "Microsoft.PowerShell.EditorServices": "[3.19.0, )" } } }