diff --git a/.build/.build.csproj b/.build/.build.csproj index b158ccf34..859c216f5 100644 --- a/.build/.build.csproj +++ b/.build/.build.csproj @@ -2,12 +2,13 @@ Exe - net6.0 + net8.0 false False CS0649;CS0169 1 + true diff --git a/.build/Build.cs b/.build/Build.cs index 51e58f460..8097b5d06 100644 --- a/.build/Build.cs +++ b/.build/Build.cs @@ -3,20 +3,24 @@ using Nuke.Common.Execution; using Nuke.Common.Git; using Nuke.Common.IO; +using Nuke.Common.Tooling; using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.GitVersion; using Nuke.Common.Tools.MSBuild; +using Nuke.Common.Tools.Npm; using Rocket.Surgery.Nuke.DotNetCore; +namespace Build; + [PublicAPI] -[CheckBuildProjectConfigurations] [UnsetVisualStudioEnvironmentVariables] [PackageIcon("http://www.omnisharp.net/images/logo.png")] [EnsureReadmeIsUpdated] [DotNetVerbosityMapping] [MSBuildVerbosityMapping] [NuGetVerbosityMapping] -public partial class Solution : NukeBuild, +[LocalBuildConventions] +public sealed partial class Solution : NukeBuild, ICanRestoreWithDotNetCore, ICanBuildWithDotNetCore, ICanTestWithDotNetCore, @@ -27,6 +31,7 @@ public partial class Solution : NukeBuild, IGenerateCodeCoverageReport, IGenerateCodeCoverageSummary, IGenerateCodeCoverageBadges, + IGenerateDocFx, IHaveConfiguration { /// @@ -36,10 +41,7 @@ public partial class Solution : NukeBuild, /// - Microsoft VisualStudio https://nuke.build/visualstudio /// - Microsoft VSCode https://nuke.build/vscode /// - public static int Main() - { - return Execute(x => x.Default); - } + public static int Main() => Execute(x => x.Default); [OptionalGitRepository] public GitRepository? GitRepository { get; } @@ -61,6 +63,18 @@ public static int Main() public Target Test => _ => _.Inherit(x => x.CoreTest); + public Target NpmInstall => _ => _ + .Executes(() => + NpmTasks.NpmCi(s => s + .SetProcessWorkingDirectory(VscodeTestExtensionProjectDirectory))); + + public Target TestVscodeExtension => _ => _ + .DependsOn(NpmInstall) + .Executes(() => + NpmTasks.NpmRun(s => s + .SetProcessWorkingDirectory(VscodeTestExtensionProjectDirectory) + .SetCommand("test"))); + public Target BuildVersion => _ => _.Inherit(x => x.BuildVersion) .Before(Default) .Before(Clean); @@ -68,4 +82,6 @@ public static int Main() [Parameter("Configuration to build")] public Configuration Configuration { get; } = IsLocalBuild ? Configuration.Debug : Configuration.Release; AbsolutePath ICanUpdateReadme.ReadmeFilePath => RootDirectory / "README.md"; + + internal const string VscodeTestExtensionProjectDirectory = "vscode-testextension"; } diff --git a/.build/Configuration.cs b/.build/Configuration.cs index 57e9a8bf8..6f2fcceaf 100644 --- a/.build/Configuration.cs +++ b/.build/Configuration.cs @@ -1,11 +1,13 @@ ο»Ώusing System.ComponentModel; using Nuke.Common.Tooling; +namespace Build; + [TypeConverter(typeof(TypeConverter))] public class Configuration : Enumeration { - public static readonly Configuration Debug = new Configuration { Value = nameof(Debug) }; - public static readonly Configuration Release = new Configuration { Value = nameof(Release) }; + public static Configuration Debug = new() { Value = nameof(Debug) }; + public static Configuration Release = new() { Value = nameof(Release) }; public static implicit operator string(Configuration configuration) => configuration.Value; } diff --git a/.build/Solution.cs b/.build/Solution.cs index a3e9826d8..6bcbeab9a 100644 --- a/.build/Solution.cs +++ b/.build/Solution.cs @@ -1,15 +1,14 @@ -using System.Collections.Generic; -using System.Linq; using Nuke.Common.CI.GitHubActions; using Nuke.Common.CI.GitHubActions.Configuration; using Rocket.Surgery.Nuke.ContinuousIntegration; using Rocket.Surgery.Nuke.DotNetCore; using Rocket.Surgery.Nuke.GithubActions; +namespace Build; internal class LocalConstants { - public static string[] PathsIgnore = + public static string[] PathsIgnore => new[] { ".codecov.yml", ".editorconfig", @@ -37,7 +36,7 @@ internal class LocalConstants GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest, AutoGenerate = false, - On = new[] { GitHubActionsTrigger.Push }, + On = new[] { RocketSurgeonGitHubActionsTrigger.Push }, OnPushTags = new[] { "v*" }, OnPushBranches = new[] { "master", "main", "next" }, OnPullRequestBranches = new[] { "master", "main", "next" }, @@ -49,7 +48,7 @@ internal class LocalConstants GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest, AutoGenerate = false, - On = new[] { GitHubActionsTrigger.Push }, + On = new[] { RocketSurgeonGitHubActionsTrigger.Push }, OnPushTags = new[] { "v*" }, OnPushBranches = new[] { "master", "main", "next" }, OnPullRequestBranches = new[] { "master", "main", "next" }, @@ -71,18 +70,15 @@ internal class LocalConstants [PrintCIEnvironment] [UploadLogs] [TitleEvents] +[ContinuousIntegrationConventions] public partial class Solution { public static RocketSurgeonGitHubActionsConfiguration CiIgnoreMiddleware( RocketSurgeonGitHubActionsConfiguration configuration ) { - foreach (var item in configuration.DetailedTriggers.OfType()) - { - item.IncludePaths = LocalConstants.PathsIgnore; - } + configuration.IncludeRepositoryConfigurationFiles(); - configuration.Jobs.RemoveAt(1); ( (RocketSurgeonsGithubActionsJob)configuration.Jobs[0] ).Steps = new List { new RunStep("N/A") @@ -98,105 +94,35 @@ public static RocketSurgeonGitHubActionsConfiguration CiMiddleware( RocketSurgeonGitHubActionsConfiguration configuration ) { - foreach (var item in configuration.DetailedTriggers.OfType()) - { - item.ExcludePaths = LocalConstants.PathsIgnore; - } - - var buildJob = configuration.Jobs.OfType().First(z => z.Name == "Build"); - buildJob.FailFast = false; - var checkoutStep = buildJob.Steps.OfType().Single(); - // For fetch all - checkoutStep.FetchDepth = 0; - buildJob.Environment["NUGET_PACKAGES"] = "${{ github.workspace }}/.nuget/packages"; - buildJob.Steps.InsertRange( - buildJob.Steps.IndexOf(checkoutStep) + 1, - new BaseGitHubActionsStep[] - { - new RunStep("Fetch all history for all tags and branches") - { - Run = "git fetch --prune" - }, - new UsingStep("NuGet Cache") - { - Uses = "actions/cache@v2", - With = - { - ["path"] = "${{ github.workspace }}/.nuget/packages", - // keep in mind using central package versioning here - ["key"] = - "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}", - ["restore-keys"] = @"| - ${{ runner.os }}-nuget-" - } - }, - new SetupDotNetStep("Use .NET Core 3.1 SDK") - { - DotNetVersion = "3.1.x" - }, - new SetupDotNetStep("Use .NET Core 7.0 SDK") - { - DotNetVersion = "7.0.x" - }, - } - ); - - buildJob.Steps.Add( - new UsingStep("Publish Coverage") - { - Uses = "codecov/codecov-action@v1", - With = new Dictionary - { - ["name"] = "actions-${{ matrix.os }}", - } - } - ); - - buildJob.Steps.Add( - new UploadArtifactStep("Publish logs") - { - Name = "logs", - Path = "artifacts/logs/", - If = "always()" - } - ); - - buildJob.Steps.Add( - new UploadArtifactStep("Publish coverage data") - { - Name = "coverage", - Path = "coverage/", - If = "always()" - } - ); - - buildJob.Steps.Add( - new UploadArtifactStep("Publish test data") - { - Name = "test data", - Path = "artifacts/test/", - If = "always()" - } - ); - - buildJob.Steps.Add( - new UploadArtifactStep("Publish NuGet Packages") - { - Name = "nuget", - Path = "artifacts/nuget/", - If = "always()" - } - ); - - buildJob.Steps.Add( - new UploadArtifactStep("Publish Docs") - { - Name = "docs", - Path = "artifacts/docs/", - If = "always()" - } - ); + configuration + .ExcludeRepositoryConfigurationFiles() + .AddNugetPublish() + .Jobs.OfType() + .First(z => z.Name.Equals("Build", StringComparison.OrdinalIgnoreCase)) + .ConfigureStep(step => step.FetchDepth = 0) + .UseDotNetSdks("3.1", "6.0", "8.0", "9.0") + .AddNuGetCache() + .AddVscodeExtensionTests() + .PublishLogs() + .PublishArtifacts() + .FailFast = false; return configuration; } } + +public static class Extensions +{ + public static RocketSurgeonsGithubActionsJob AddVscodeExtensionTests(this RocketSurgeonsGithubActionsJob job) + { + return job + .AddStep(new RunStep("Npm install") { + Run = "npm ci", + WorkingDirectory = Solution.VscodeTestExtensionProjectDirectory + }) + .AddStep(new HeadlessRunStep("Vscode extension tests") { + Run = "npm run test", + WorkingDirectory = Solution.VscodeTestExtensionProjectDirectory + }); + } +} diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3426dac24..c4391a127 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -1,54 +1,34 @@ { - "version": 1, - "isRoot": true, - "tools": { - "dotnet-outdated": { - "version": "2.11.0", - "commands": [ - "dotnet-outdated" - ] - }, - "gitversion.tool": { - "version": "5.12.0", - "commands": [ - "dotnet-gitversion" - ] - }, - "dotnet-reportgenerator-globaltool": { - "version": "5.1.25", - "commands": [ - "reportgenerator" - ] - }, - "nuke.globaltool": { - "version": "7.0.5", - "commands": [ - "nuke" - ] - }, - "codecov.tool": { - "version": "1.13.0", - "commands": [ - "codecov" - ] - }, - "jetbrains.resharper.globaltools": { - "version": "2023.2.1", - "commands": [ - "jb" - ] - }, - "dotnet-format": { - "version": "5.1.250801", - "commands": [ - "dotnet-format" - ] - }, - "nukeeper": { - "version": "0.35.0", - "commands": [ - "nukeeper" - ] - } + "version": 1, + "isRoot": true, + "tools": { + "dotnet-outdated-tool": { + "version": "4.6.8", + "commands": [ + "dotnet-outdated" + ], + "rollForward": false + }, + "dotnet-reportgenerator-globaltool": { + "version": "5.4.7", + "commands": [ + "reportgenerator" + ], + "rollForward": false + }, + "nuke.globaltool": { + "version": "9.0.4", + "commands": [ + "nuke" + ], + "rollForward": false + }, + "jetbrains.resharper.globaltools": { + "version": "2025.1.2", + "commands": [ + "jb" + ], + "rollForward": false } -} + } +} \ No newline at end of file diff --git a/.github/workflows/ci-ignore.yml b/.github/workflows/ci-ignore.yml index a5c03cbb6..1826f2ffc 100644 --- a/.github/workflows/ci-ignore.yml +++ b/.github/workflows/ci-ignore.yml @@ -69,10 +69,10 @@ on: - '.github/renovate.json' jobs: - Build: + build: strategy: matrix: - os: [windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: N/A diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21e4d9c20..7b3920a9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,91 +69,122 @@ on: - '.github/renovate.json' jobs: - Build: + build: env: NUGET_PACKAGES: '${{ github.workspace }}/.nuget/packages' strategy: fail-fast: false matrix: - os: [macOS-latest, windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.2.2 with: clean: 'false' fetch-depth: '0' - - name: Fetch all history for all tags and branches - run: | - git fetch --prune - - name: NuGet Cache - uses: actions/cache@v3 + - name: Restore NuGet Cache + id: restore-nuget-cache + uses: actions/cache/restore@v4 with: path: '${{ github.workspace }}/.nuget/packages' - key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/Directory.Packages.support.props') }}" - restore-keys: | - ${{ runner.os }}-nuget- + key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/dotnet-tools.json') }}" - name: πŸ”¨ Use .NET Core 3.1 SDK - uses: actions/setup-dotnet@v3.2.0 + uses: actions/setup-dotnet@v4.3.1 with: dotnet-version: '3.1.x' - - name: πŸ”¨ Use .NET Core 7.0 SDK - uses: actions/setup-dotnet@v3.2.0 + - name: πŸ”¨ Use .NET Core 6.0 SDK + uses: actions/setup-dotnet@v4.3.1 + with: + dotnet-version: '6.0.x' + - name: πŸ”¨ Use .NET Core 8.0 SDK + uses: actions/setup-dotnet@v4.3.1 + with: + dotnet-version: '8.0.x' + - name: πŸ”¨ Use .NET Core 9.0 SDK + uses: actions/setup-dotnet@v4.3.1 with: - dotnet-version: '7.0.x' + dotnet-version: '9.0.x' - name: 🎁 dotnet tool restore run: | dotnet tool restore - name: 🎁 Restore + id: restore run: | dotnet nuke Restore --skip + - name: Update NuGet Cache + if: always() && steps.restore-nuget-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + key: "${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}-${{ hashFiles('**/dotnet-tools.json') }}" + path: '${{ github.workspace }}/.nuget/packages' - name: βš™ Build + id: build run: | dotnet nuke Build --skip - name: 🚦 Test + id: test run: | dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip - name: πŸ“¦ Pack + id: pack run: | dotnet nuke Pack --skip + - name: Npm install + working-directory: vscode-testextension + run: | + npm ci + - name: 🚦 Vscode extension tests + uses: coactions/setup-xvfb@v1 + with: + run: 'npm run test' + working-directory: 'vscode-testextension' + - name: 🏺 Publish coverage data + if: always() + uses: actions/upload-artifact@v4 + with: + name: 'coverage-${{ matrix.os }}' + path: 'coverage/' - name: 🐿 Publish Coverage + if: (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || ((github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.user.login != 'renovate[bot]' && github.event.pull_request.user.login != 'dependabot[bot]') uses: codecov/codecov-action@v4.0.0-beta.2 with: name: 'actions-${{ matrix.os }}' - name: 🏺 Publish logs if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: 'logs' + name: 'logs-${{ matrix.os }}' path: 'artifacts/logs/' - - name: 🏺 Publish coverage data - if: always() - uses: actions/upload-artifact@v3 - with: - name: 'coverage' - path: 'coverage/' - name: 🏺 Publish test data if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: 'test data' + name: 'test data-${{ matrix.os }}' path: 'artifacts/test/' - name: 🏺 Publish NuGet Packages if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: 'nuget' + name: 'nuget-${{ matrix.os }}' path: 'artifacts/nuget/' - - name: 🏺 Publish Docs - if: always() - uses: actions/upload-artifact@v3 + - name: 🏺 Publish Documentation + uses: actions/upload-artifact@v4 with: - name: 'docs' + name: 'docs-${{ matrix.os }}' path: 'artifacts/docs/' + Merge: + runs-on: ubuntu-latest + needs: build + steps: + - name: Merge Artifacts + uses: actions/upload-artifact/merge@v4 + with: + name: nuget + pattern: nuget-* Publish: - needs: - - Build + needs: Merge + uses: RocketSurgeonsGuild/actions/.github/workflows/publish-nuget.yml@v0.3.15 secrets: RSG_NUGET_API_KEY: '${{ secrets.RSG_NUGET_API_KEY }}' RSG_AZURE_DEVOPS: '${{ secrets.RSG_AZURE_DEVOPS }}' - uses: RocketSurgeonsGuild/actions/.github/workflows/publish-nuget.yml@v0.3.3 diff --git a/.github/workflows/close-milestone.yml b/.github/workflows/close-milestone.yml index 9a821f9f8..c2a952fce 100644 --- a/.github/workflows/close-milestone.yml +++ b/.github/workflows/close-milestone.yml @@ -10,25 +10,26 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.2.2 with: fetch-depth: 0 - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.10.2 + uses: gittools/actions/gitversion/setup@v3.2.1 with: - versionSpec: '5.x' + versionSpec: '6.0.x' + preferLatestVersion: true - name: Install GitReleaseManager - uses: gittools/actions/gitreleasemanager/setup@v0.10.2 + uses: gittools/actions/gitreleasemanager/setup@v3.2.1 with: - versionSpec: '0.15.x' + versionSpec: '0.18.x' - name: Use GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v0.10.2 + uses: gittools/actions/gitversion/execute@v3.2.1 # Ensure the milestone exists - name: Create Milestone @@ -41,7 +42,7 @@ jobs: # move any issues to that milestone in the event the release is renamed - name: sync milestones - uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.3 + uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.15 with: default-label: 'mysterious' github-token: ${{ secrets.OMNISHARP_BOT_TOKEN }} diff --git a/.github/workflows/dependabot-merge.yml b/.github/workflows/dependabot-merge.yml index 5da81288a..7cf7303fe 100644 --- a/.github/workflows/dependabot-merge.yml +++ b/.github/workflows/dependabot-merge.yml @@ -40,7 +40,7 @@ jobs: contains(github.event.pull_request.labels.*.name, ':shipit: merge') || contains(github.event.pull_request.labels.*.name, 'javascript') || contains(github.event.pull_request.labels.*.name, 'github-actions') - uses: alexwilson/enable-github-automerge-action@1.0.0 + uses: alexwilson/enable-github-automerge-action@2.0.0 continue-on-error: true with: github-token: '${{ secrets.OMNISHARP_BOT_TOKEN }}' diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index e313cf318..9b8321675 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -17,23 +17,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.2.2 with: fetch-depth: 0 - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 - name: Fetch all history for all tags and branches run: git fetch --prune - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.10.2 + uses: gittools/actions/gitversion/setup@v3.2.1 with: - versionSpec: '5.x' + versionSpec: '6.0.x' + preferLatestVersion: true - name: Use GitVersion id: gitversion - uses: gittools/actions/gitversion/execute@v0.10.2 + uses: gittools/actions/gitversion/execute@v3.2.1 - name: Create Milestone uses: WyriHaximus/github-action-create-milestone@v1 @@ -44,7 +45,7 @@ jobs: continue-on-error: true - name: sync milestones - uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.3 + uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.15 with: default-label: 'mysterious' github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index 586ed7dd5..184655771 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -19,13 +19,15 @@ jobs: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v2 with: - nuget-version: '5.x' + nuget-version: '6.x' - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: nuget + path: nuget + pattern: nuget-* + merge-multiple: true - name: nuget.org # continue-on-error: true diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 6b8e1de71..c606ef342 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -16,11 +16,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.2.2 - name: Run Labeler if: success() - uses: crazy-max/ghaction-github-labeler@v5.0.0 + uses: crazy-max/ghaction-github-labeler@v5.3.0 with: yaml-file: .github/labels.yml skip-delete: false diff --git a/.github/workflows/update-milestone.yml b/.github/workflows/update-milestone.yml index da8b696fa..bc9494c13 100644 --- a/.github/workflows/update-milestone.yml +++ b/.github/workflows/update-milestone.yml @@ -13,32 +13,33 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.0.0 + uses: actions/checkout@v4.2.2 with: ref: ${{ github.sha }} fetch-depth: 0 - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 - name: Fetch all history for all tags and branches run: git fetch --prune - name: Install GitVersion if: ${{ github.event.action == 'opened' }} - uses: gittools/actions/gitversion/setup@v0.10.2 + uses: gittools/actions/gitversion/setup@v3.2.1 with: - versionSpec: '5.x' + versionSpec: '6.0.x' + preferLatestVersion: true - name: Install GitReleaseManager if: ${{ github.event.action == 'opened' }} - uses: gittools/actions/gitreleasemanager/setup@v0.10.2 + uses: gittools/actions/gitreleasemanager/setup@v3.2.1 with: - versionSpec: '0.15.x' + versionSpec: '0.18.x' - name: Use GitVersion if: ${{ github.event.action == 'opened' }} id: gitversion - uses: gittools/actions/gitversion/execute@v0.10.2 + uses: gittools/actions/gitversion/execute@v3.2.1 - name: Create Milestone if: ${{ github.event.action == 'opened' }} @@ -50,7 +51,7 @@ jobs: continue-on-error: true - name: sync milestones - uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.3 + uses: RocketSurgeonsGuild/actions/sync-milestone@v0.3.15 with: default-label: 'mysterious' github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 470cfeef1..e18c1f5f0 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Build Schema", "$ref": "#/definitions/build", + "title": "Build Schema", "definitions": { "build": { "type": "object", @@ -74,6 +74,10 @@ "type": "string", "description": "Root directory during build execution" }, + "Serve": { + "type": "boolean", + "description": "serve the docs" + }, "Skip": { "type": "array", "description": "List of targets to be skipped. Empty list skips all dependencies", @@ -84,6 +88,7 @@ "BuildVersion", "Clean", "CoreBuild", + "CoreDocs", "CorePack", "CoreRestore", "CoreTest", @@ -98,9 +103,11 @@ "GenerateCodeCoverageReportCobertura", "GenerateCodeCoverageSummary", "GenerateReadme", + "NpmInstall", "Pack", "Restore", "Test", + "TestVscodeTestExtension", "Trigger_Code_Coverage_Reports", "TriggerCodeCoverageReports" ] @@ -120,6 +127,7 @@ "BuildVersion", "Clean", "CoreBuild", + "CoreDocs", "CorePack", "CoreRestore", "CoreTest", @@ -134,9 +142,11 @@ "GenerateCodeCoverageReportCobertura", "GenerateCodeCoverageSummary", "GenerateReadme", + "NpmInstall", "Pack", "Restore", "Test", + "TestVscodeTestExtension", "Trigger_Code_Coverage_Reports", "TriggerCodeCoverageReports" ] @@ -155,4 +165,4 @@ } } } -} \ No newline at end of file +} diff --git a/Directory.Packages.props b/Directory.Packages.props index 808cf3c09..eec229672 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,62 +4,62 @@ $(BaseIntermediateOutputPath)\GeneratedFiles - - - + + + - - - - - - - - - - - + - - - - + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/Directory.Packages.supports.props b/Directory.Packages.supports.props index bcf19562f..d354840f4 100644 --- a/Directory.Packages.supports.props +++ b/Directory.Packages.supports.props @@ -1,15 +1,13 @@ - - - + + + - - + + diff --git a/GitVersion.yml b/GitVersion.yml index d1aa3a074..ce103c93a 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -1,5 +1,7 @@ -assembly-versioning-scheme: MajorMinorPatch -mode: ContinuousDeployment +workflow: GitHubFlow/v1 +semantic-version-format: Loose + branches: - master: - tag: alpha + main: + mode: ContinuousDeployment + label: alpha \ No newline at end of file diff --git a/README.md b/README.md index 540a477d6..c47b1b6e0 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ This project is supported by the [.NET Foundation](http://www.dotnetfoundation.o [azurepipelines-history]: https://dev.azure.com/omnisharp/Builds/_build?definitionId=1&branchName=master [azurepipelines-history-badge]: https://buildstats.info/azurepipelines/chart/omnisharp/Builds/1?includeBuildsFromPullRequest=false "Azure Pipelines History" [github]: https://github.com/OmniSharp/csharp-language-server-protocol/actions?query=workflow%3Aci -[github-badge]: https://img.shields.io/github/workflow/status/OmniSharp/csharp-language-server-protocol/ci.svg?label=github&logo=github&color=b845fc&logoColor=b845fc&style=flat "GitHub Actions Status" +[github-badge]: https://img.shields.io/github/actions/workflow/status/OmniSharp/csharp-language-server-protocol/ci.yml?label=github&logo=github&color=b845fc&logoColor=b845fc&style=flat "GitHub Actions Status" [github-history-badge]: https://buildstats.info/github/chart/OmniSharp/csharp-language-server-protocol?includeBuildsFromPullRequest=false "GitHub Actions History" [nuget-hefb6om79mfg]: https://www.nuget.org/packages/OmniSharp.Extensions.DebugAdapter/ [nuget-version-hefb6om79mfg-badge]: https://img.shields.io/nuget/v/OmniSharp.Extensions.DebugAdapter.svg?color=004880&logo=nuget&style=flat-square "NuGet Version" diff --git a/benchmarks/Pipeline/Pipeline.csproj b/benchmarks/Pipeline/Pipeline.csproj index d11467700..0c559dd2c 100644 --- a/benchmarks/Pipeline/Pipeline.csproj +++ b/benchmarks/Pipeline/Pipeline.csproj @@ -1,15 +1,15 @@ - net472;netcoreapp3.1;net6.0 + net472;netcoreapp3.1;net6.0;net8.0< Exe false - - + + diff --git a/global.json b/global.json index 9bb9f62b0..ccbe73ca1 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "7.0.401", + "version": "9.0.300", "rollForward": "latestMinor" } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 13079217b..b3c015c05 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,16 +5,16 @@ "packages": { "": { "devDependencies": { - "@prettier/plugin-xml": "3.2.1", - "husky": "8.0.3", - "lint-staged": "14.0.1", - "prettier": "3.0.3" + "@prettier/plugin-xml": "3.4.1", + "husky": "9.1.7", + "lint-staged": "15.4.3", + "prettier": "3.5.3" } }, "node_modules/@prettier/plugin-xml": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@prettier/plugin-xml/-/plugin-xml-3.2.1.tgz", - "integrity": "sha512-DvwnQPf8FsczapBVDm54IhR+Pryt3DbPZSNtUb9gOuFtgoUUPbPN69f3nQBMF5BEqh4ZjZjTaHBmsVno3UnAXQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@prettier/plugin-xml/-/plugin-xml-3.4.1.tgz", + "integrity": "sha512-Uf/6/+9ez6z/IvZErgobZ2G9n1ybxF5BhCd7eMcKqfoWuOzzNUxBipNo3QAP8kRC1VD18TIo84no7LhqtyDcTg==", "dev": true, "dependencies": { "@xml-tools/parser": "^1.0.11" @@ -33,15 +33,16 @@ } }, "node_modules/ansi-escapes": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", - "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", "dev": true, + "license": "MIT", "dependencies": { - "type-fest": "^1.0.2" + "environment": "^1.0.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -72,22 +73,24 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", + "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", "dev": true, + "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -105,31 +108,32 @@ } }, "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, + "license": "MIT", "dependencies": { - "restore-cursor": "^4.0.0" + "restore-cursor": "^5.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "dependencies": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -142,12 +146,13 @@ "dev": true }, "node_modules/commander": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", - "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/cross-spawn": { @@ -165,12 +170,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -181,18 +187,25 @@ } } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -200,33 +213,34 @@ "dev": true }, "node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", "is-stream": "^3.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^5.1.0", "onetime": "^6.0.0", - "signal-exit": "^3.0.7", + "signal-exit": "^4.1.0", "strip-final-newline": "^3.0.0" }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + "node": ">=16.17" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -234,37 +248,50 @@ "node": ">=8" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true, "engines": { - "node": ">=14.18.0" + "node": ">=16.17.0" } }, "node_modules/husky": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", - "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", "dev": true, + "license": "MIT", "bin": { - "husky": "lib/bin.js" + "husky": "bin.js" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" @@ -287,6 +314,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -310,85 +338,117 @@ "dev": true }, "node_modules/lilconfig": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", - "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lint-staged": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-14.0.1.tgz", - "integrity": "sha512-Mw0cL6HXnHN1ag0mN/Dg4g6sr8uf8sn98w2Oc1ECtFto9tvRF7nkXGJRbx8gPlHyoR0pLyBr2lQHbWwmUHe1Sw==", + "version": "15.4.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.4.3.tgz", + "integrity": "sha512-FoH1vOeouNh1pw+90S+cnuoFwRfUD9ijY2GKy5h7HS3OR7JVir2N2xrsa0+Twc1B7cW72L+88geG5cW4wIhn7g==", "dev": true, + "license": "MIT", "dependencies": { - "chalk": "5.3.0", - "commander": "11.0.0", - "debug": "4.3.4", - "execa": "7.2.0", - "lilconfig": "2.1.0", - "listr2": "6.6.1", - "micromatch": "4.0.5", - "pidtree": "0.6.0", - "string-argv": "0.3.2", - "yaml": "2.3.1" + "chalk": "^5.4.1", + "commander": "^13.1.0", + "debug": "^4.4.0", + "execa": "^8.0.1", + "lilconfig": "^3.1.3", + "listr2": "^8.2.5", + "micromatch": "^4.0.8", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.7.0" }, "bin": { "lint-staged": "bin/lint-staged.js" }, "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": ">=18.12.0" }, "funding": { "url": "https://opencollective.com/lint-staged" } }, "node_modules/listr2": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-6.6.1.tgz", - "integrity": "sha512-+rAXGHh0fkEWdXBmX+L6mmfmXmXvDGEKzkjxO+8mP3+nI/r/CWznVBvsibXdxda9Zz0OW2e2ikphN3OwCT/jSg==", + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", + "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", "dev": true, + "license": "MIT", "dependencies": { - "cli-truncate": "^3.1.0", + "cli-truncate": "^4.0.0", "colorette": "^2.0.20", "eventemitter3": "^5.0.1", - "log-update": "^5.0.1", - "rfdc": "^1.3.0", - "wrap-ansi": "^8.1.0" + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" + } + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" + "engines": { + "node": ">=18" }, - "peerDependenciesMeta": { - "enquirer": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", - "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-escapes": "^5.0.0", - "cli-cursor": "^4.0.0", - "slice-ansi": "^5.0.0", - "strip-ansi": "^7.0.1", - "wrap-ansi": "^8.0.1" + "get-east-asian-width": "^1.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -396,12 +456,13 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -420,11 +481,25 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/npm-run-path": { "version": "5.1.0", @@ -482,6 +557,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -502,10 +578,11 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -523,50 +600,44 @@ "dev": true }, "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, + "license": "MIT", "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/restore-cursor/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/restore-cursor/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, + "license": "MIT", "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" }, "node_modules/shebang-command": { "version": "2.0.0", @@ -590,10 +661,17 @@ } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slice-ansi": { "version": "5.0.0", @@ -621,17 +699,17 @@ } }, "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", "dev": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -669,6 +747,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, @@ -676,18 +755,6 @@ "node": ">=8.0" } }, - "node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -704,27 +771,32 @@ } }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/yaml": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", - "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, "engines": { "node": ">= 14" } diff --git a/package.json b/package.json index bf8185995..dc9f42493 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "private": true, "devDependencies": { - "@prettier/plugin-xml": "3.2.1", - "husky": "8.0.3", - "lint-staged": "14.0.1", - "prettier": "3.0.3" + "@prettier/plugin-xml": "3.4.1", + "husky": "9.1.7", + "lint-staged": "15.4.3", + "prettier": "3.5.3" }, "scripts": { "prepare": "husky install" diff --git a/sample/SampleServer/SampleServer.csproj b/sample/SampleServer/SampleServer.csproj index 0300dcca5..3ccd54cf0 100644 --- a/sample/SampleServer/SampleServer.csproj +++ b/sample/SampleServer/SampleServer.csproj @@ -3,8 +3,8 @@ Exe false - net6.0 - win7-x64 + net8.0 + win-x64 latest diff --git a/src/Client/Client.csproj b/src/Client/Client.csproj index ebf3ae955..ccd049942 100644 --- a/src/Client/Client.csproj +++ b/src/Client/Client.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageClient OmniSharp.Extensions.LanguageServer.Client diff --git a/src/Dap.Client/Dap.Client.csproj b/src/Dap.Client/Dap.Client.csproj index 8997ffd64..c06983a14 100644 --- a/src/Dap.Client/Dap.Client.csproj +++ b/src/Dap.Client/Dap.Client.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter.Client OmniSharp.Extensions.DebugAdapter.Client diff --git a/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj b/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj index e03805d19..81dde6036 100644 --- a/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj +++ b/src/Dap.Protocol.Proposals/Dap.Protocol.Proposals.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter.Proposals OmniSharp.Extensions.DebugAdapter.Protocol diff --git a/src/Dap.Protocol/AbstractHandlers.cs b/src/Dap.Protocol/AbstractHandlers.cs index ab80046e9..ada21dc16 100644 --- a/src/Dap.Protocol/AbstractHandlers.cs +++ b/src/Dap.Protocol/AbstractHandlers.cs @@ -15,7 +15,7 @@ public abstract class Request : } public abstract class Notification : IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest { public abstract Task Handle(TParams request, CancellationToken cancellationToken); } diff --git a/src/Dap.Protocol/Dap.Protocol.csproj b/src/Dap.Protocol/Dap.Protocol.csproj index 52c4b5467..091aff8e0 100644 --- a/src/Dap.Protocol/Dap.Protocol.csproj +++ b/src/Dap.Protocol/Dap.Protocol.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter OmniSharp.Extensions.DebugAdapter.Protocol diff --git a/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs index de76a5862..d8e2f1080 100644 --- a/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs +++ b/src/Dap.Protocol/Feature/Events/BreakpointFeature.cs @@ -83,7 +83,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record BreakpointEvent : IRequest + public record BreakpointEvent : IRequest { /// /// The reason for the event. diff --git a/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs index 7d34b09b3..357935e27 100644 --- a/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs +++ b/src/Dap.Protocol/Feature/Events/CapabilitiesFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; @@ -238,7 +238,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record CapabilitiesEvent : IRequest + public record CapabilitiesEvent : IRequest { /// /// The set of updated capabilities. diff --git a/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs b/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs index 9c562ecb0..daea5316b 100644 --- a/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ContinuedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -15,7 +15,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record ContinuedEvent : IRequest + public record ContinuedEvent : IRequest { /// /// The thread which was continued. diff --git a/src/Dap.Protocol/Feature/Events/ExitedFeature.cs b/src/Dap.Protocol/Feature/Events/ExitedFeature.cs index 6473ee6fe..17f6d5c4e 100644 --- a/src/Dap.Protocol/Feature/Events/ExitedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ExitedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -14,7 +14,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record ExitedEvent : IRequest + public record ExitedEvent : IRequest { /// /// The exit code returned from the debuggee. diff --git a/src/Dap.Protocol/Feature/Events/InitializedFeature.cs b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs index 35fa55a40..0817a3681 100644 --- a/src/Dap.Protocol/Feature/Events/InitializedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/InitializedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -12,6 +12,6 @@ namespace Events [GenerateHandler(Name = "DebugAdapterInitialized")] [GenerateHandlerMethods] [GenerateRequestMethods] - public record InitializedEvent : IRequest; + public record InitializedEvent : IRequest; } } diff --git a/src/Dap.Protocol/Feature/Events/InvalidatedFeature.cs b/src/Dap.Protocol/Feature/Events/InvalidatedFeature.cs index 372f6e378..e6c1dc4ed 100644 --- a/src/Dap.Protocol/Feature/Events/InvalidatedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/InvalidatedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; @@ -16,7 +16,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record InvalidatedEvent : IRequest + public record InvalidatedEvent : IRequest { /// /// Optional set of logical areas that got invalidated. This property has a diff --git a/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs index f916d033d..889766f1c 100644 --- a/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs +++ b/src/Dap.Protocol/Feature/Events/LoadedSourceFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -13,7 +13,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record LoadedSourceEvent : IRequest + public record LoadedSourceEvent : IRequest { /// /// The reason for the event. diff --git a/src/Dap.Protocol/Feature/Events/ModuleFeature.cs b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs index 828af7c13..891e80dbf 100644 --- a/src/Dap.Protocol/Feature/Events/ModuleFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ModuleFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -13,7 +13,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record ModuleEvent : IRequest + public record ModuleEvent : IRequest { /// /// The reason for the event. diff --git a/src/Dap.Protocol/Feature/Events/OutputFeature.cs b/src/Dap.Protocol/Feature/Events/OutputFeature.cs index 0a5635579..da96154a6 100644 --- a/src/Dap.Protocol/Feature/Events/OutputFeature.cs +++ b/src/Dap.Protocol/Feature/Events/OutputFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; @@ -15,7 +15,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record OutputEvent : IRequest + public record OutputEvent : IRequest { /// /// The output category. If not specified, 'console' is assumed. diff --git a/src/Dap.Protocol/Feature/Events/ProcessFeature.cs b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs index fb5128ac6..a15ab73db 100644 --- a/src/Dap.Protocol/Feature/Events/ProcessFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ProcessFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -13,7 +13,7 @@ namespace Events [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record ProcessEvent : IRequest + public record ProcessEvent : IRequest { /// /// The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js. diff --git a/src/Dap.Protocol/Feature/Events/ProgressFeature.cs b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs index aca27ceaf..5bcbc27c8 100644 --- a/src/Dap.Protocol/Feature/Events/ProgressFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ProgressFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Models; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; @@ -28,7 +28,7 @@ public abstract record ProgressEvent [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record ProgressStartEvent : ProgressEvent, IRequest + public record ProgressStartEvent : ProgressEvent, IRequest { /// /// Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation. @@ -63,7 +63,7 @@ public record ProgressStartEvent : ProgressEvent, IRequest [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record ProgressUpdateEvent : ProgressEvent, IRequest + public record ProgressUpdateEvent : ProgressEvent, IRequest { /// /// Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown. @@ -77,6 +77,6 @@ public record ProgressUpdateEvent : ProgressEvent, IRequest [GenerateHandler] [GenerateHandlerMethods] [GenerateRequestMethods] - public record ProgressEndEvent : ProgressEvent, IRequest; + public record ProgressEndEvent : ProgressEvent, IRequest; } } diff --git a/src/Dap.Protocol/Feature/Events/StoppedFeature.cs b/src/Dap.Protocol/Feature/Events/StoppedFeature.cs index fbb5241b2..4582f7e82 100644 --- a/src/Dap.Protocol/Feature/Events/StoppedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/StoppedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -15,7 +15,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record StoppedEvent : IRequest + public record StoppedEvent : IRequest { /// /// The reason for the event. diff --git a/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs b/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs index 731f4bfaf..41f682563 100644 --- a/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs +++ b/src/Dap.Protocol/Feature/Events/TerminatedFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.DebugAdapter.Protocol.Serialization; @@ -17,7 +17,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record TerminatedEvent : IRequest + public record TerminatedEvent : IRequest { /// /// A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session. diff --git a/src/Dap.Protocol/Feature/Events/ThreadFeature.cs b/src/Dap.Protocol/Feature/Events/ThreadFeature.cs index e31651a16..be6f55f17 100644 --- a/src/Dap.Protocol/Feature/Events/ThreadFeature.cs +++ b/src/Dap.Protocol/Feature/Events/ThreadFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.JsonRpc.Generation; @@ -14,7 +14,7 @@ namespace Events GenerateHandlerMethods, GenerateRequestMethods ] - public record ThreadEvent : IRequest + public record ThreadEvent : IRequest { /// /// The reason for the event. diff --git a/src/Dap.Protocol/IDebugAdapterProtocolProxy.cs b/src/Dap.Protocol/IDebugAdapterProtocolProxy.cs index 5d8f4921e..0eb31f5b7 100644 --- a/src/Dap.Protocol/IDebugAdapterProtocolProxy.cs +++ b/src/Dap.Protocol/IDebugAdapterProtocolProxy.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; @@ -39,7 +39,7 @@ public void SendNotification(string method, T @params) _responseRouter.SendNotification(method, @params); } - public void SendNotification(IRequest request) + public void SendNotification(IRequest request) { _responseRouter.SendNotification(request); } diff --git a/src/Dap.Server/Dap.Server.csproj b/src/Dap.Server/Dap.Server.csproj index c3d82e895..767ab0412 100644 --- a/src/Dap.Server/Dap.Server.csproj +++ b/src/Dap.Server/Dap.Server.csproj @@ -1,7 +1,7 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter.Server OmniSharp.Extensions.DebugAdapter.Server diff --git a/src/Dap.Shared/Dap.Shared.csproj b/src/Dap.Shared/Dap.Shared.csproj index cabed9b52..0114080b8 100644 --- a/src/Dap.Shared/Dap.Shared.csproj +++ b/src/Dap.Shared/Dap.Shared.csproj @@ -1,7 +1,7 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter.Shared OmniSharp.Extensions.DebugAdapter.Shared diff --git a/src/Dap.Shared/DapResponseRouter.cs b/src/Dap.Shared/DapResponseRouter.cs index a41b86032..3c1bf3d41 100644 --- a/src/Dap.Shared/DapResponseRouter.cs +++ b/src/Dap.Shared/DapResponseRouter.cs @@ -49,7 +49,7 @@ public void SendNotification(string method, T @params) ); } - public void SendNotification(IRequest @params) + public void SendNotification(IRequest @params) { SendNotification(GetMethodName(@params.GetType()), @params); } diff --git a/src/Dap.Testing/Dap.Testing.csproj b/src/Dap.Testing/Dap.Testing.csproj index dec248cdd..315e99a5d 100644 --- a/src/Dap.Testing/Dap.Testing.csproj +++ b/src/Dap.Testing/Dap.Testing.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.DebugAdapter.Testing OmniSharp.Extensions.DebugAdapter.Testing diff --git a/src/JsonRpc.Generators/Helpers.cs b/src/JsonRpc.Generators/Helpers.cs index 7ce048f46..d4560ea34 100644 --- a/src/JsonRpc.Generators/Helpers.cs +++ b/src/JsonRpc.Generators/Helpers.cs @@ -17,9 +17,10 @@ public static bool IsNotification(TypeDeclarationSyntax symbol) => symbol.BaseList?.Types .Any( z => - z.Type is SimpleNameSyntax and ( - { Identifier: { Text: "IJsonRpcNotificationHandler" }, Arity: 0 or 1 } - or { Identifier: { Text: "IRequest" }, Arity: 0 } + z.Type is SimpleNameSyntax simpleNameSyntax && ( + (simpleNameSyntax.Identifier.Text == "IJsonRpcNotificationHandler" && (simpleNameSyntax.Arity == 0 || simpleNameSyntax.Arity == 1)) + || (simpleNameSyntax.Identifier.Text == "IRequest" && simpleNameSyntax.Arity == 0) + || (simpleNameSyntax.Identifier.Text == "IRequest" && simpleNameSyntax.Arity == 1 && IsUnitRequest(z.Type)) ) ) == true; @@ -27,16 +28,20 @@ public static bool IsRequest(TypeDeclarationSyntax symbol) => symbol.BaseList?.Types .Any( z => - z.Type is SimpleNameSyntax and ( - { Identifier: { Text: "IJsonRpcRequestHandler" }, Arity: 1 or 2 } - or { Identifier: { Text: "ICanBeResolvedHandler" }, Arity: 1 } - or { Identifier: { Text: "IPartialItemRequest" or "IPartialItemWithInitialValueRequest" }, Arity: 2 } - or { Identifier: { Text: "IPartialItemsRequest" or "IPartialItemsWithInitialValueRequest" }, Arity: 2 } - or { Identifier: { Text: "IRequest" }, Arity: 1 } - or { Identifier: { Text: "IJsonRpcRequest" }, Arity: 0 } + z.Type is SimpleNameSyntax simpleNameSyntax && ( + (simpleNameSyntax.Identifier.Text == "IJsonRpcRequestHandler" && (simpleNameSyntax.Arity is 1 or 2)) + || ( simpleNameSyntax.Identifier.Text == "ICanBeResolvedHandler" && simpleNameSyntax.Arity == 1 ) + || ( simpleNameSyntax.Identifier.Text is "IPartialItemRequest" or "IPartialItemWithInitialValueRequest" && simpleNameSyntax.Arity == 2 ) + || ( simpleNameSyntax.Identifier.Text is "IPartialItemsRequest" or "IPartialItemsWithInitialValueRequest" && simpleNameSyntax.Arity == 2 ) + || ( simpleNameSyntax.Identifier.Text == "IRequest" && simpleNameSyntax.Arity == 1 && !IsUnitRequest(simpleNameSyntax)) + || ( simpleNameSyntax.Identifier.Text == "IJsonRpcRequest" && simpleNameSyntax.Arity == 0 ) ) ) == true; + private static bool IsUnitRequest(TypeSyntax type) => + type is GenericNameSyntax gns && gns.Identifier.Text == "IRequest" && gns.TypeArgumentList.Arguments.Count == 1 && + gns.TypeArgumentList.Arguments[0] is SimpleNameSyntax sns && sns.Identifier.Text == "Unit"; + public static ExpressionSyntax GetJsonRpcMethodName(TypeDeclarationSyntax interfaceSyntax) { var methodAttribute = interfaceSyntax.AttributeLists diff --git a/src/JsonRpc.Testing/JsonRpc.Testing.csproj b/src/JsonRpc.Testing/JsonRpc.Testing.csproj index d02e92518..9684fe254 100644 --- a/src/JsonRpc.Testing/JsonRpc.Testing.csproj +++ b/src/JsonRpc.Testing/JsonRpc.Testing.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.JsonRpc.Testing OmniSharp.Extensions.JsonRpc.Testing diff --git a/src/JsonRpc.Testing/SettlePipeline.cs b/src/JsonRpc.Testing/SettlePipeline.cs index 2504578a2..7a32a3f1e 100644 --- a/src/JsonRpc.Testing/SettlePipeline.cs +++ b/src/JsonRpc.Testing/SettlePipeline.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Threading; +using System.Threading; using System.Threading.Tasks; using MediatR; @@ -11,7 +11,7 @@ public class SettlePipeline : IPipelineBehavior public SettlePipeline(IRequestSettler settler) => _settler = settler; - async Task IPipelineBehavior.Handle(T request, CancellationToken cancellationToken, RequestHandlerDelegate next) + async Task IPipelineBehavior.Handle(T request, RequestHandlerDelegate next, CancellationToken cancellationToken) { _settler.OnStartRequest(); try diff --git a/src/JsonRpc/CancelParams.cs b/src/JsonRpc/CancelParams.cs index 966dc8dcd..3c0f14a45 100644 --- a/src/JsonRpc/CancelParams.cs +++ b/src/JsonRpc/CancelParams.cs @@ -3,7 +3,7 @@ namespace OmniSharp.Extensions.JsonRpc { [Method(JsonRpcNames.CancelRequest)] - public partial class CancelParams : IRequest + public partial class CancelParams : IRequest { /// /// The request id to cancel. diff --git a/src/JsonRpc/DefaultJsonRpcServerFacade.cs b/src/JsonRpc/DefaultJsonRpcServerFacade.cs index 832446d68..81f6c0a27 100644 --- a/src/JsonRpc/DefaultJsonRpcServerFacade.cs +++ b/src/JsonRpc/DefaultJsonRpcServerFacade.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; @@ -30,7 +30,7 @@ public void SendNotification(string method, T @params) _responseRouter.SendNotification(method, @params); } - public void SendNotification(IRequest request) + public void SendNotification(IRequest request) { _responseRouter.SendNotification(request); } diff --git a/src/JsonRpc/DelegatingHandlers.cs b/src/JsonRpc/DelegatingHandlers.cs index aab304889..f410bbfdf 100644 --- a/src/JsonRpc/DelegatingHandlers.cs +++ b/src/JsonRpc/DelegatingHandlers.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Threading; using System.Threading.Tasks; using MediatR; @@ -22,7 +22,7 @@ Task IRequestHandler. public class Request : IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest { private readonly Func _handler; @@ -37,7 +37,7 @@ async Task IRequestHandler. } public class Notification : IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest { private readonly Func _handler; diff --git a/src/JsonRpc/DelegatingNotification.cs b/src/JsonRpc/DelegatingNotification.cs index 04a7b1cc4..37811c589 100644 --- a/src/JsonRpc/DelegatingNotification.cs +++ b/src/JsonRpc/DelegatingNotification.cs @@ -3,7 +3,7 @@ namespace OmniSharp.Extensions.JsonRpc { - public class DelegatingNotification : IRequest + public class DelegatingNotification : IRequest { public DelegatingNotification(object value) => Value = typeof(T) == typeof(Unit) || value is Unit ? new JObject() : JToken.FromObject(value); diff --git a/src/JsonRpc/IJsonRpcHandler.cs b/src/JsonRpc/IJsonRpcHandler.cs index d52448871..5d3d0b804 100644 --- a/src/JsonRpc/IJsonRpcHandler.cs +++ b/src/JsonRpc/IJsonRpcHandler.cs @@ -1,4 +1,4 @@ -ο»Ώusing MediatR; +using MediatR; namespace OmniSharp.Extensions.JsonRpc { @@ -12,7 +12,7 @@ public interface IJsonRpcHandler /// /// Marker interface for source generation to properly know that this IRequest is a real request and not a notification /// - public interface IJsonRpcRequest : IRequest + public interface IJsonRpcRequest : IRequest { } diff --git a/src/JsonRpc/IJsonRpcNotificationHandler.cs b/src/JsonRpc/IJsonRpcNotificationHandler.cs index b9331bb1b..51962ef0d 100644 --- a/src/JsonRpc/IJsonRpcNotificationHandler.cs +++ b/src/JsonRpc/IJsonRpcNotificationHandler.cs @@ -2,8 +2,8 @@ namespace OmniSharp.Extensions.JsonRpc { - public interface IJsonRpcNotificationHandler : IRequestHandler, IJsonRpcHandler - where TNotification : IRequest + public interface IJsonRpcNotificationHandler : IRequestHandler, IJsonRpcHandler + where TNotification : IRequest { } } diff --git a/src/JsonRpc/IJsonRpcRequestHandler.cs b/src/JsonRpc/IJsonRpcRequestHandler.cs index 59f4f3a46..e5fbabd4a 100644 --- a/src/JsonRpc/IJsonRpcRequestHandler.cs +++ b/src/JsonRpc/IJsonRpcRequestHandler.cs @@ -24,8 +24,8 @@ public interface IJsonRpcRequestHandler : IRequestHandle /// /// /// - public interface IJsonRpcRequestHandler : IRequestHandler, IJsonRpcHandler - where TRequest : IRequest + public interface IJsonRpcRequestHandler : IRequestHandler, IJsonRpcHandler + where TRequest : IRequest { } } diff --git a/src/JsonRpc/IResponseRouter.cs b/src/JsonRpc/IResponseRouter.cs index 6fa2ba15a..a66d1a6d1 100644 --- a/src/JsonRpc/IResponseRouter.cs +++ b/src/JsonRpc/IResponseRouter.cs @@ -10,7 +10,7 @@ public interface IResponseRouter { void SendNotification(string method); void SendNotification(string method, T @params); - void SendNotification(IRequest request); + void SendNotification(IRequest request); IResponseRouterReturns SendRequest(string method, T @params); IResponseRouterReturns SendRequest(string method); Task SendRequest(IRequest request, CancellationToken cancellationToken); diff --git a/src/JsonRpc/InputHandler.cs b/src/JsonRpc/InputHandler.cs index 38f4d25c3..cf733ebd0 100644 --- a/src/JsonRpc/InputHandler.cs +++ b/src/JsonRpc/InputHandler.cs @@ -4,6 +4,7 @@ using System.IO; using System.IO.Pipelines; using System.Linq; +using System.Net.Sockets; using System.Reactive; using System.Reactive.Concurrency; using System.Reactive.Disposables; @@ -144,9 +145,14 @@ public void Start() { await ProcessInputStream(_stopProcessing.Token).ConfigureAwait(false); } + catch (IOException e) + when (e.InnerException is SocketException { SocketErrorCode: SocketError.ConnectionReset }) + { + _logger.LogInformation(e, "Connection reset by client."); + } catch (Exception e) { - _logger.LogCritical(e, "unhandled exception"); + _logger.LogCritical(e, "Unhandled exception."); } } ).Subscribe(_inputActive) diff --git a/src/JsonRpc/JsonRpc.csproj b/src/JsonRpc/JsonRpc.csproj index efa5b2beb..4cb657da7 100644 --- a/src/JsonRpc/JsonRpc.csproj +++ b/src/JsonRpc/JsonRpc.csproj @@ -1,6 +1,6 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.JsonRpc OmniSharp.Extensions.JsonRpc diff --git a/src/JsonRpc/JsonRpcServerBase.cs b/src/JsonRpc/JsonRpcServerBase.cs index 2a5aeed03..ab7ea00b0 100644 --- a/src/JsonRpc/JsonRpcServerBase.cs +++ b/src/JsonRpc/JsonRpcServerBase.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using MediatR; @@ -27,7 +27,7 @@ public void SendNotification(string method, T @params) ResponseRouter.SendNotification(method, @params); } - public void SendNotification(IRequest @params) + public void SendNotification(IRequest @params) { ResponseRouter.SendNotification(@params); } diff --git a/src/JsonRpc/JsonRpcServerContainer.cs b/src/JsonRpc/JsonRpcServerContainer.cs index ccc645e85..5ac29f682 100644 --- a/src/JsonRpc/JsonRpcServerContainer.cs +++ b/src/JsonRpc/JsonRpcServerContainer.cs @@ -37,7 +37,7 @@ public static IContainer Create(IServiceProvider? outerServiceProvider) rules => rules.WithUnknownServiceResolvers( request => { var value = outerServiceProvider.GetService(request.ServiceType); - return value == null ? null : (Factory) InstanceFactory.Of(value, Reuse.Transient); + return value == null ? null : (Factory) InstanceFactory.Of(value); } ) ); diff --git a/src/JsonRpc/JsonRpcServerServiceCollectionExtensions.cs b/src/JsonRpc/JsonRpcServerServiceCollectionExtensions.cs index c24bb27d2..8a11cce2f 100644 --- a/src/JsonRpc/JsonRpcServerServiceCollectionExtensions.cs +++ b/src/JsonRpc/JsonRpcServerServiceCollectionExtensions.cs @@ -100,7 +100,8 @@ internal static IContainer AddJsonRpcMediatR(this IContainer container) { container.RegisterMany(new[] { typeof(IMediator).GetAssembly() }, Registrator.Interfaces, Reuse.ScopedOrSingleton); container.RegisterMany(Reuse.Scoped); - container.RegisterDelegate(context => context.Resolve, Reuse.ScopedOrSingleton); + // Select the desired constructor + container.Register(made: Made.Of(() => new Mediator(Arg.Of()))); container.Register(typeof(IRequestHandler<,>), typeof(RequestHandler<,>)); container.Register(typeof(IRequestHandler<,>), typeof(RequestHandlerDecorator<,>), setup: Setup.Decorator); diff --git a/src/JsonRpc/NoopResponseRouter.cs b/src/JsonRpc/NoopResponseRouter.cs index 7816d40d1..a2c3e89c5 100644 --- a/src/JsonRpc/NoopResponseRouter.cs +++ b/src/JsonRpc/NoopResponseRouter.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; using MediatR; @@ -25,7 +25,7 @@ public void SendNotification(string method, T @params) { } - public void SendNotification(IRequest request) + public void SendNotification(IRequest request) { } diff --git a/src/JsonRpc/NotificationHandler.cs b/src/JsonRpc/NotificationHandler.cs index 54f7228cb..e23ba9bc8 100644 --- a/src/JsonRpc/NotificationHandler.cs +++ b/src/JsonRpc/NotificationHandler.cs @@ -8,15 +8,15 @@ namespace OmniSharp.Extensions.JsonRpc public static class NotificationHandler { public static DelegatingHandlers.Notification For(Action handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); public static DelegatingHandlers.Notification For(Func handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); public static DelegatingHandlers.Notification For(Action handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); public static DelegatingHandlers.Notification For(Func handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); } } diff --git a/src/JsonRpc/RequestHandler.cs b/src/JsonRpc/RequestHandler.cs index 42684005b..2ba0a7c0a 100644 --- a/src/JsonRpc/RequestHandler.cs +++ b/src/JsonRpc/RequestHandler.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Threading; using System.Threading.Tasks; using MediatR; @@ -14,9 +14,9 @@ public static DelegatingHandlers.Request For where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); public static DelegatingHandlers.Request For(Func handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); public static DelegatingHandlers.Request For(Func handler) - where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); + where TParams : IRequest => new(HandlerAdapter.Adapt(handler)); } } diff --git a/src/JsonRpc/RequestRouterBase.cs b/src/JsonRpc/RequestRouterBase.cs index dcfafde60..51e652744 100644 --- a/src/JsonRpc/RequestRouterBase.cs +++ b/src/JsonRpc/RequestRouterBase.cs @@ -216,7 +216,7 @@ public static Task HandleRequest(IMediator mediator, IHandlerDescriptor descript } private static Task SendRequest(IMediator mediator, T request, CancellationToken token) - where T : IRequest => + where T : IRequest => mediator.Send(request, token); private static Task SendRequest(IMediator mediator, T request, CancellationToken token) diff --git a/src/JsonRpc/ResponseRouter.cs b/src/JsonRpc/ResponseRouter.cs index d66afc528..e64df4ef9 100644 --- a/src/JsonRpc/ResponseRouter.cs +++ b/src/JsonRpc/ResponseRouter.cs @@ -48,7 +48,7 @@ public void SendNotification(string method, T @params) ); } - public void SendNotification(IRequest @params) + public void SendNotification(IRequest @params) { SendNotification(GetMethodName(@params.GetType()), @params); } diff --git a/src/Protocol.Proposals/Protocol.Proposals.csproj b/src/Protocol.Proposals/Protocol.Proposals.csproj index 2e61bfaed..d56f5894f 100644 --- a/src/Protocol.Proposals/Protocol.Proposals.csproj +++ b/src/Protocol.Proposals/Protocol.Proposals.csproj @@ -1,6 +1,6 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageProtocol.Proposals OmniSharp.Extensions.LanguageServer.Protocol diff --git a/src/Protocol/AbstractHandlers.Notification.cs b/src/Protocol/AbstractHandlers.Notification.cs index 89b2c4f36..e0142a3cb 100644 --- a/src/Protocol/AbstractHandlers.Notification.cs +++ b/src/Protocol/AbstractHandlers.Notification.cs @@ -17,7 +17,7 @@ namespace OmniSharp.Extensions.LanguageServer.Protocol public static partial class AbstractHandlers { public abstract class Notification : IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest { public abstract Task Handle(TParams request, CancellationToken cancellationToken); } @@ -25,7 +25,7 @@ public abstract class Notification : IJsonRpcRequestHandler public abstract class Notification : Base, IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() where TCapability : ICapability { @@ -35,7 +35,7 @@ public abstract class Notification : public abstract class Notification : Base, IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() { public abstract Task Handle(TParams request, CancellationToken cancellationToken); @@ -44,7 +44,7 @@ public abstract class Notification : public abstract class NotificationCapability : BaseCapability, IJsonRpcRequestHandler - where TParams : IRequest + where TParams : IRequest where TCapability : ICapability { public abstract Task Handle(TParams request, CancellationToken cancellationToken); diff --git a/src/Protocol/Client/WorkDone/LanguageClientWorkDoneManager.cs b/src/Protocol/Client/WorkDone/LanguageClientWorkDoneManager.cs index fd7e2c1d5..9d2656314 100644 --- a/src/Protocol/Client/WorkDone/LanguageClientWorkDoneManager.cs +++ b/src/Protocol/Client/WorkDone/LanguageClientWorkDoneManager.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Collections.Concurrent; using System.Reactive.Disposables; using System.Threading; diff --git a/src/Protocol/Features/Client/LogTraceFeature.cs b/src/Protocol/Features/Client/LogTraceFeature.cs index 7c033130a..2b9b99215 100644 --- a/src/Protocol/Features/Client/LogTraceFeature.cs +++ b/src/Protocol/Features/Client/LogTraceFeature.cs @@ -14,7 +14,7 @@ namespace Models [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Client")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IClientLanguageServer), typeof(ILanguageServer))] - public record LogTraceParams : IRequest + public record LogTraceParams : IRequest { /// /// The message to be logged. diff --git a/src/Protocol/Features/Document/CodeLensFeature.cs b/src/Protocol/Features/Document/CodeLensFeature.cs index fa9af0f21..6c6aac133 100644 --- a/src/Protocol/Features/Document/CodeLensFeature.cs +++ b/src/Protocol/Features/Document/CodeLensFeature.cs @@ -118,7 +118,7 @@ public override StaticOptions Convert(CodeLensRegistrationOptions source) [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(CodeLensWorkspaceClientCapabilities))] - public partial record CodeLensRefreshParams : IRequest; + public partial record CodeLensRefreshParams : IRequest; } namespace Client.Capabilities diff --git a/src/Protocol/Features/Document/DiagnosticsFeature.cs b/src/Protocol/Features/Document/DiagnosticsFeature.cs index 1a79b7a70..3fcbae608 100644 --- a/src/Protocol/Features/Document/DiagnosticsFeature.cs +++ b/src/Protocol/Features/Document/DiagnosticsFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Collections.Immutable; +using System.Collections.Immutable; using MediatR; using Newtonsoft.Json; using OmniSharp.Extensions.JsonRpc; @@ -73,7 +73,7 @@ public partial record WorkspaceDiagnosticParams : IWorkDoneProgressParams, [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(CodeLensWorkspaceClientCapabilities))] - public partial record DiagnosticRefreshParams : IRequest; + public partial record DiagnosticRefreshParams : IRequest; public interface IDiagnosticReport { diff --git a/src/Protocol/Features/Document/InlayHintFeature.cs b/src/Protocol/Features/Document/InlayHintFeature.cs index ef8168687..02e6e4b8e 100644 --- a/src/Protocol/Features/Document/InlayHintFeature.cs +++ b/src/Protocol/Features/Document/InlayHintFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Collections.ObjectModel; +using System.Collections.ObjectModel; using System.Diagnostics; using MediatR; using Newtonsoft.Json; @@ -272,7 +272,7 @@ public enum InlayHintKind [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(InlayHintWorkspaceClientCapabilities))] - public partial record InlayHintRefreshParams : IRequest; + public partial record InlayHintRefreshParams : IRequest; [GenerateRegistrationOptions(nameof(ServerCapabilities.InlayHintProvider))] [RegistrationOptionsConverter(typeof(InlayHintRegistrationOptionsConverter))] diff --git a/src/Protocol/Features/Document/InlineValueFeature.cs b/src/Protocol/Features/Document/InlineValueFeature.cs index b904f531c..cc5922a55 100644 --- a/src/Protocol/Features/Document/InlineValueFeature.cs +++ b/src/Protocol/Features/Document/InlineValueFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Diagnostics; +using System.Diagnostics; using MediatR; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -70,7 +70,7 @@ public partial record InlineValueContext [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(InlineValueWorkspaceClientCapabilities))] - public partial record InlineValueRefreshParams : IRequest; + public partial record InlineValueRefreshParams : IRequest; [JsonConverter(typeof(Converter))] public abstract partial record InlineValueBase diff --git a/src/Protocol/Features/Document/NotebookDocumentSyncFeature.cs b/src/Protocol/Features/Document/NotebookDocumentSyncFeature.cs index ac8383d8d..d759bd8f3 100644 --- a/src/Protocol/Features/Document/NotebookDocumentSyncFeature.cs +++ b/src/Protocol/Features/Document/NotebookDocumentSyncFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Collections.ObjectModel; using System.Diagnostics; using System.Linq; @@ -37,7 +37,7 @@ namespace Models [GenerateRequestMethods(typeof(INotebookDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(NotebookDocumentSyncOptions))] [Capability(typeof(NotebookDocumentSyncClientCapabilities))] - public partial class DidOpenNotebookDocumentParams : IRequest + public partial class DidOpenNotebookDocumentParams : IRequest { /// /// The notebook document that got opened. @@ -63,7 +63,7 @@ public partial class DidOpenNotebookDocumentParams : IRequest [GenerateRequestMethods(typeof(INotebookDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(NotebookDocumentSyncOptions))] [Capability(typeof(NotebookDocumentSyncClientCapabilities))] - public partial record DidChangeNotebookDocumentParams : IRequest + public partial record DidChangeNotebookDocumentParams : IRequest { /// /// The notebook document that did change. The version number points @@ -94,7 +94,7 @@ public partial record DidChangeNotebookDocumentParams : IRequest [GenerateRequestMethods(typeof(INotebookDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(NotebookDocumentSyncOptions))] [Capability(typeof(NotebookDocumentSyncClientCapabilities))] - public partial class DidSaveNotebookDocumentParams : INotebookDocumentIdentifierParams, IRequest + public partial class DidSaveNotebookDocumentParams : INotebookDocumentIdentifierParams, IRequest { /// /// The notebook document that got saved. @@ -109,7 +109,7 @@ public partial class DidSaveNotebookDocumentParams : INotebookDocumentIdentifier [GenerateRequestMethods(typeof(INotebookDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(NotebookDocumentSyncOptions))] [Capability(typeof(NotebookDocumentSyncClientCapabilities))] - public partial class DidCloseNotebookDocumentParams : INotebookDocumentIdentifierParams, IRequest + public partial class DidCloseNotebookDocumentParams : INotebookDocumentIdentifierParams, IRequest { /// /// The notebook document that got closed. @@ -734,7 +734,7 @@ public interface INotebookDocumentRegistrationOptions : IRegistrationOptions /// /// The notebooks to be synced /// - NotebookSelector NotebookSelector { get; set; } + Container NotebookSelector { get; set; } } /// @@ -761,7 +761,7 @@ public partial class NotebookDocumentSyncOptions : INotebookDocumentRegistration /// value is provided it matches against the /// notebook type. '*' matches every notebook. /// - public NotebookSelector NotebookSelector { get; set; } + public Container NotebookSelector { get; set; } /// /// Whether save notification should be forwarded to diff --git a/src/Protocol/Features/Document/PublishDiagnosticsFeature.cs b/src/Protocol/Features/Document/PublishDiagnosticsFeature.cs index 2bce7efd0..15ed763c9 100644 --- a/src/Protocol/Features/Document/PublishDiagnosticsFeature.cs +++ b/src/Protocol/Features/Document/PublishDiagnosticsFeature.cs @@ -20,7 +20,7 @@ namespace Models GenerateRequestMethods(typeof(ITextDocumentLanguageServer), typeof(ILanguageServer)) ] [Capability(typeof(PublishDiagnosticsCapability))] - public record PublishDiagnosticsParams : IRequest + public record PublishDiagnosticsParams : IRequest { /// /// The URI for which diagnostic information is reported. diff --git a/src/Protocol/Features/Document/SemanticTokensFeature.cs b/src/Protocol/Features/Document/SemanticTokensFeature.cs index dc651b2ed..40d6d5b36 100644 --- a/src/Protocol/Features/Document/SemanticTokensFeature.cs +++ b/src/Protocol/Features/Document/SemanticTokensFeature.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.CodeAnalysis; @@ -99,7 +99,7 @@ public partial record SemanticTokensRangeParams : IWorkDoneProgressParams, IText [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(SemanticTokensWorkspaceCapability))] - public partial record SemanticTokensRefreshParams : IRequest; + public partial record SemanticTokensRefreshParams : IRequest; public interface ISemanticTokenResult { diff --git a/src/Protocol/Features/Document/TextDocumentSyncFeature.cs b/src/Protocol/Features/Document/TextDocumentSyncFeature.cs index bc2d14057..ce06f1a1c 100644 --- a/src/Protocol/Features/Document/TextDocumentSyncFeature.cs +++ b/src/Protocol/Features/Document/TextDocumentSyncFeature.cs @@ -30,7 +30,7 @@ namespace Models [GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(TextDocumentChangeRegistrationOptions))] [Capability(typeof(TextSynchronizationCapability))] - public partial record DidChangeTextDocumentParams : IRequest + public partial record DidChangeTextDocumentParams : IRequest { /// /// The document that did change. The version number points @@ -111,7 +111,7 @@ public record TextDocumentEdit [GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(TextDocumentOpenRegistrationOptions))] [Capability(typeof(TextSynchronizationCapability))] - public partial class DidOpenTextDocumentParams : IRequest + public partial class DidOpenTextDocumentParams : IRequest { /// /// The document that was opened. @@ -131,7 +131,7 @@ public partial class TextDocumentOpenRegistrationOptions : ITextDocumentRegistra [GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(TextDocumentCloseRegistrationOptions))] [Capability(typeof(TextSynchronizationCapability))] - public partial class DidCloseTextDocumentParams : ITextDocumentIdentifierParams, IRequest + public partial class DidCloseTextDocumentParams : ITextDocumentIdentifierParams, IRequest { /// /// The document that was closed. @@ -151,7 +151,7 @@ public partial class TextDocumentCloseRegistrationOptions : ITextDocumentRegistr [GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(TextDocumentSaveRegistrationOptions))] [Capability(typeof(TextSynchronizationCapability))] - public partial class DidSaveTextDocumentParams : ITextDocumentIdentifierParams, IRequest + public partial class DidSaveTextDocumentParams : ITextDocumentIdentifierParams, IRequest { /// /// The document that was saved. @@ -515,7 +515,7 @@ public static implicit operator TextDocumentCloseRegistrationOptions(TextDocumen [GenerateRequestMethods(typeof(ITextDocumentLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(TextDocumenWillSaveRegistrationOptions))] [Capability(typeof(TextSynchronizationCapability))] - public partial class WillSaveTextDocumentParams : IRequest + public partial class WillSaveTextDocumentParams : IRequest { /// /// The document that will be saved. diff --git a/src/Protocol/Features/FileOperationsFeature.cs b/src/Protocol/Features/FileOperationsFeature.cs index 158e0a40e..25604bdf1 100644 --- a/src/Protocol/Features/FileOperationsFeature.cs +++ b/src/Protocol/Features/FileOperationsFeature.cs @@ -20,7 +20,7 @@ namespace Models /// /// @since 3.16.0 /// - public abstract record FileOperationParams + public abstract record FileOperationsParams where T : FileOperationItem { /// @@ -40,33 +40,33 @@ public abstract record FileOperationItem public Uri Uri { get; init; } = null!; } - /// + /// [Parallel] [Method(WorkspaceNames.DidCreateFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(DidCreateFileRegistrationOptions))] + [RegistrationOptions(typeof(DidCreateFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record DidCreateFileParams : FileOperationParams, IRequest + public partial record DidCreateFilesParams : FileOperationsParams, IRequest { - public static implicit operator WillCreateFileParams(DidCreateFileParams @params) + public static implicit operator WillCreateFilesParams(DidCreateFilesParams @params) { return new() { Files = @params.Files }; } } - /// + /// [Parallel] [Method(WorkspaceNames.WillCreateFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(WillCreateFileRegistrationOptions))] + [RegistrationOptions(typeof(WillCreateFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record WillCreateFileParams : FileOperationParams, IRequest + public partial record WillCreateFilesParams : FileOperationsParams, IRequest { - public static implicit operator DidCreateFileParams(WillCreateFileParams @params) + public static implicit operator DidCreateFilesParams(WillCreateFilesParams @params) { return new() { Files = @params.Files }; } @@ -75,68 +75,96 @@ public static implicit operator DidCreateFileParams(WillCreateFileParams @params /// public partial record FileCreate : FileOperationItem; - /// + /// [Parallel] [Method(WorkspaceNames.DidRenameFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(DidRenameFileRegistrationOptions))] + [RegistrationOptions(typeof(DidRenameFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record DidRenameFileParams : FileOperationParams, IRequest + public partial record DidRenameFilesParams : RenameFilesOperationParams, IRequest { - public static implicit operator WillRenameFileParams(DidRenameFileParams @params) + public static implicit operator WillRenameFilesParams(DidRenameFilesParams @params) { return new() { Files = @params.Files }; } } - /// + /// [Parallel] [Method(WorkspaceNames.WillRenameFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(WillRenameFileRegistrationOptions))] + [RegistrationOptions(typeof(WillRenameFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record WillRenameFileParams : FileOperationParams, IRequest + public partial record WillRenameFilesParams : RenameFilesOperationParams, IRequest { - public static implicit operator DidRenameFileParams(WillRenameFileParams @params) + public static implicit operator DidRenameFilesParams(WillRenameFilesParams @params) { return new() { Files = @params.Files }; } } - /// - public partial record FileRename : FileOperationItem; + /// + /// The parameters sent in notifications/requests for user-initiated renames + /// of files. + /// + /// @since 3.16.0 + /// + public abstract record RenameFilesOperationParams + { + /// + /// An array of all files/folders renamed in this operation. + /// When a folder is renamed, only the folder will be included, and not its children. + /// + public Container Files { get; init; } = null!; + } + + /// + /// Represents information on a file/folder rename. + /// + public partial record FileRename + { + /// + /// A file:// URI for the original location of the file/folder being renamed. + /// + public Uri OldUri { get; init; } = null!; + + /// + /// A file:// URI for the new location of the file/folder being renamed. + /// + public Uri NewUri { get; init; } = null!; + } - /// + /// [Parallel] [Method(WorkspaceNames.DidDeleteFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(DidDeleteFileRegistrationOptions))] + [RegistrationOptions(typeof(DidDeleteFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record DidDeleteFileParams : FileOperationParams, IRequest + public partial record DidDeleteFilesParams : FileOperationsParams, IRequest { - public static implicit operator WillDeleteFileParams(DidDeleteFileParams @params) + public static implicit operator WillDeleteFilesParams(DidDeleteFilesParams @params) { return new() { Files = @params.Files }; } } - /// + /// [Parallel] [Method(WorkspaceNames.WillDeleteFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] - [RegistrationOptions(typeof(WillDeleteFileRegistrationOptions))] + [RegistrationOptions(typeof(WillDeleteFilesRegistrationOptions))] [Capability(typeof(FileOperationsWorkspaceClientCapabilities))] - public partial record WillDeleteFileParams : FileOperationParams, IRequest + public partial record WillDeleteFilesParams : FileOperationsParams, IRequest { - public static implicit operator DidDeleteFileParams(WillDeleteFileParams @params) + public static implicit operator DidDeleteFilesParams(WillDeleteFilesParams @params) { return new() { Files = @params.Files }; } @@ -151,7 +179,7 @@ public partial record FileDelete : FileOperationItem; nameof(FileOperationsWorkspaceServerCapabilities.WillCreate) )] [RegistrationName(WorkspaceNames.WillCreateFiles)] - public partial class WillCreateFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class WillCreateFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -165,7 +193,7 @@ public partial class WillCreateFileRegistrationOptions : IFileOperationRegistrat nameof(FileOperationsWorkspaceServerCapabilities.DidCreate) )] [RegistrationName(WorkspaceNames.DidCreateFiles)] - public partial class DidCreateFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class DidCreateFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -179,7 +207,7 @@ public partial class DidCreateFileRegistrationOptions : IFileOperationRegistrati nameof(FileOperationsWorkspaceServerCapabilities.WillRename) )] [RegistrationName(WorkspaceNames.WillRenameFiles)] - public partial class WillRenameFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class WillRenameFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -193,7 +221,7 @@ public partial class WillRenameFileRegistrationOptions : IFileOperationRegistrat nameof(FileOperationsWorkspaceServerCapabilities.DidRename) )] [RegistrationName(WorkspaceNames.DidRenameFiles)] - public partial class DidRenameFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class DidRenameFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -207,7 +235,7 @@ public partial class DidRenameFileRegistrationOptions : IFileOperationRegistrati nameof(FileOperationsWorkspaceServerCapabilities.WillDelete) )] [RegistrationName(WorkspaceNames.WillDeleteFiles)] - public partial class WillDeleteFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class WillDeleteFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -221,7 +249,7 @@ public partial class WillDeleteFileRegistrationOptions : IFileOperationRegistrat nameof(FileOperationsWorkspaceServerCapabilities.DidDelete) )] [RegistrationName(WorkspaceNames.DidDeleteFiles)] - public partial class DidDeleteFileRegistrationOptions : IFileOperationRegistrationOptions + public partial class DidDeleteFilesRegistrationOptions : IFileOperationRegistrationOptions { /// /// The actual filters. @@ -335,37 +363,37 @@ public class FileOperationsWorkspaceServerCapabilities /// The client has support for sending didCreateFiles notifications. /// [Optional] - public DidCreateFileRegistrationOptions.StaticOptions? DidCreate { get; set; } + public DidCreateFilesRegistrationOptions.StaticOptions? DidCreate { get; set; } /// /// The client has support for sending willCreateFiles requests. /// [Optional] - public WillCreateFileRegistrationOptions.StaticOptions? WillCreate { get; set; } + public WillCreateFilesRegistrationOptions.StaticOptions? WillCreate { get; set; } /// /// The client has support for sending didRenameFiles notifications. /// [Optional] - public DidRenameFileRegistrationOptions.StaticOptions? DidRename { get; set; } + public DidRenameFilesRegistrationOptions.StaticOptions? DidRename { get; set; } /// /// The client has support for sending willRenameFiles requests. /// [Optional] - public WillRenameFileRegistrationOptions.StaticOptions? WillRename { get; set; } + public WillRenameFilesRegistrationOptions.StaticOptions? WillRename { get; set; } /// /// The client has support for sending didDeleteFiles notifications. /// [Optional] - public DidDeleteFileRegistrationOptions.StaticOptions? DidDelete { get; set; } + public DidDeleteFilesRegistrationOptions.StaticOptions? DidDelete { get; set; } /// /// The client has support for sending willDeleteFiles requests. /// [Optional] - public WillDeleteFileRegistrationOptions.StaticOptions? WillDelete { get; set; } + public WillDeleteFilesRegistrationOptions.StaticOptions? WillDelete { get; set; } } } diff --git a/src/Protocol/Features/General/ExitFeature.cs b/src/Protocol/Features/General/ExitFeature.cs index 1da73948e..0c5c1fa0d 100644 --- a/src/Protocol/Features/General/ExitFeature.cs +++ b/src/Protocol/Features/General/ExitFeature.cs @@ -12,7 +12,7 @@ namespace Models [Serial] [Method(GeneralNames.Exit, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.General"), GenerateHandlerMethods, GenerateRequestMethods(typeof(ILanguageClient))] - public partial record ExitParams : IRequest + public partial record ExitParams : IRequest { public static ExitParams Instance { get; } = new ExitParams(); } diff --git a/src/Protocol/Features/General/InitializedFeature.cs b/src/Protocol/Features/General/InitializedFeature.cs index fdd35713a..d4d7d2cc4 100644 --- a/src/Protocol/Features/General/InitializedFeature.cs +++ b/src/Protocol/Features/General/InitializedFeature.cs @@ -14,6 +14,6 @@ namespace Models [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.General", Name = "LanguageProtocolInitialized")] [GenerateHandlerMethods(typeof(ILanguageServerRegistry))] [GenerateRequestMethods(typeof(ILanguageClient))] - public partial record InitializedParams : IRequest; + public partial record InitializedParams : IRequest; } } diff --git a/src/Protocol/Features/General/ShutdownFeature.cs b/src/Protocol/Features/General/ShutdownFeature.cs index 18ea4420c..e0c65ff95 100644 --- a/src/Protocol/Features/General/ShutdownFeature.cs +++ b/src/Protocol/Features/General/ShutdownFeature.cs @@ -14,7 +14,7 @@ namespace Models [Serial] [Method(GeneralNames.Shutdown, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.General"), GenerateHandlerMethods, GenerateRequestMethods(typeof(ILanguageClient))] - public partial record ShutdownParams : IRequest + public partial record ShutdownParams : IRequest { public static ShutdownParams Instance { get; } = new(); } diff --git a/src/Protocol/Features/ProgressFeature.cs b/src/Protocol/Features/ProgressFeature.cs index ee48a6187..80763e980 100644 --- a/src/Protocol/Features/ProgressFeature.cs +++ b/src/Protocol/Features/ProgressFeature.cs @@ -24,7 +24,7 @@ namespace Models [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IGeneralLanguageClient), typeof(ILanguageClient), typeof(IGeneralLanguageServer), typeof(ILanguageServer))] - public record ProgressParams : IRequest + public record ProgressParams : IRequest { public static ProgressParams Create(ProgressToken token, T value, JsonSerializer jsonSerializer) { diff --git a/src/Protocol/Features/Server/SetTraceFeature.cs b/src/Protocol/Features/Server/SetTraceFeature.cs index b3c6ce27e..33bec4b41 100644 --- a/src/Protocol/Features/Server/SetTraceFeature.cs +++ b/src/Protocol/Features/Server/SetTraceFeature.cs @@ -11,7 +11,7 @@ namespace Models [Parallel] [Method(GeneralNames.SetTrace, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Server"), GenerateHandlerMethods, GenerateRequestMethods(typeof(IClientLanguageClient), typeof(ILanguageClient))] - public record SetTraceParams : IRequest + public record SetTraceParams : IRequest { /// /// The new value that should be assigned to the trace setting. diff --git a/src/Protocol/Features/Window/LogMessageFeature.cs b/src/Protocol/Features/Window/LogMessageFeature.cs index 2fe2edfcd..e9ec0da08 100644 --- a/src/Protocol/Features/Window/LogMessageFeature.cs +++ b/src/Protocol/Features/Window/LogMessageFeature.cs @@ -14,7 +14,7 @@ namespace Models [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Window")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWindowLanguageServer), typeof(ILanguageServer))] - public record LogMessageParams : IRequest + public record LogMessageParams : IRequest { /// /// The message type. See {@link MessageType} diff --git a/src/Protocol/Features/Window/ShowMessageFeature.cs b/src/Protocol/Features/Window/ShowMessageFeature.cs index f116c56dd..d913520ee 100644 --- a/src/Protocol/Features/Window/ShowMessageFeature.cs +++ b/src/Protocol/Features/Window/ShowMessageFeature.cs @@ -17,7 +17,7 @@ namespace Models [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Window")] [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWindowLanguageServer), typeof(ILanguageServer))] - public record ShowMessageParams : IRequest + public record ShowMessageParams : IRequest { /// /// The message type. See {@link MessageType}. diff --git a/src/Protocol/Features/Window/ShowMessageRequestFeature.cs b/src/Protocol/Features/Window/ShowMessageRequestFeature.cs index d68c6aa64..6e7ab8f01 100644 --- a/src/Protocol/Features/Window/ShowMessageRequestFeature.cs +++ b/src/Protocol/Features/Window/ShowMessageRequestFeature.cs @@ -75,7 +75,7 @@ namespace Client.Capabilities /// @since 3.16.0 /// [CapabilityKey(nameof(ClientCapabilities.Window), nameof(WindowClientCapabilities.ShowMessage))] - public class ShowMessageRequestClientCapabilities + public class ShowMessageRequestClientCapabilities : ICapability { /// /// Capabilities specific to the `MessageActionItem` type. diff --git a/src/Protocol/Features/Window/TelemetryEventFeature.cs b/src/Protocol/Features/Window/TelemetryEventFeature.cs index 632b04b11..59415fee9 100644 --- a/src/Protocol/Features/Window/TelemetryEventFeature.cs +++ b/src/Protocol/Features/Window/TelemetryEventFeature.cs @@ -17,7 +17,7 @@ namespace Models GenerateHandlerMethods, GenerateRequestMethods(typeof(IWindowLanguageServer), typeof(ILanguageServer)) ] - public record TelemetryEventParams : IRequest + public record TelemetryEventParams : IRequest { [JsonExtensionData] public IDictionary ExtensionData { get; init; } = new Dictionary(); } diff --git a/src/Protocol/Features/Window/WorkDoneProgressFeature.cs b/src/Protocol/Features/Window/WorkDoneProgressFeature.cs index 79aed087e..10a552cb4 100644 --- a/src/Protocol/Features/Window/WorkDoneProgressFeature.cs +++ b/src/Protocol/Features/Window/WorkDoneProgressFeature.cs @@ -15,7 +15,7 @@ namespace Models [Method(WindowNames.WorkDoneProgressCreate, Direction.ServerToClient)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Window"), GenerateHandlerMethods, GenerateRequestMethods(typeof(IWindowLanguageServer), typeof(ILanguageServer))] - public partial record WorkDoneProgressCreateParams : IRequest + public partial record WorkDoneProgressCreateParams : IRequest { /// /// The token to be used to report progress. @@ -27,7 +27,7 @@ public partial record WorkDoneProgressCreateParams : IRequest [Method(WindowNames.WorkDoneProgressCancel, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Window"), GenerateHandlerMethods, GenerateRequestMethods(typeof(IWindowLanguageClient), typeof(ILanguageClient))] - public partial record WorkDoneProgressCancelParams : IRequest + public partial record WorkDoneProgressCancelParams : IRequest { /// /// The token to be used to report progress. diff --git a/src/Protocol/Features/Workspace/DidChangeConfigurationFeature.cs b/src/Protocol/Features/Workspace/DidChangeConfigurationFeature.cs index 83468c6b1..951981b79 100644 --- a/src/Protocol/Features/Workspace/DidChangeConfigurationFeature.cs +++ b/src/Protocol/Features/Workspace/DidChangeConfigurationFeature.cs @@ -15,7 +15,7 @@ namespace Models [Method(WorkspaceNames.DidChangeConfiguration, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace"), GenerateHandlerMethods, GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] [Capability(typeof(DidChangeConfigurationCapability))] - public partial record DidChangeConfigurationParams : IRequest + public partial record DidChangeConfigurationParams : IRequest { /// /// The actual changed settings diff --git a/src/Protocol/Features/Workspace/DidChangeWatchedFilesFeature.cs b/src/Protocol/Features/Workspace/DidChangeWatchedFilesFeature.cs index 7e02f041f..178f87ab3 100644 --- a/src/Protocol/Features/Workspace/DidChangeWatchedFilesFeature.cs +++ b/src/Protocol/Features/Workspace/DidChangeWatchedFilesFeature.cs @@ -15,7 +15,7 @@ namespace Models [Method(WorkspaceNames.DidChangeWatchedFiles, Direction.ClientToServer)] [GenerateHandler("OmniSharp.Extensions.LanguageServer.Protocol.Workspace"), GenerateHandlerMethods, GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient))] [RegistrationOptions(typeof(DidChangeWatchedFilesRegistrationOptions)), Capability(typeof(DidChangeWatchedFilesCapability))] - public partial record DidChangeWatchedFilesParams : IRequest + public partial record DidChangeWatchedFilesParams : IRequest { /// /// The actual file events. diff --git a/src/Protocol/Features/Workspace/WorkspaceFoldersFeature.cs b/src/Protocol/Features/Workspace/WorkspaceFoldersFeature.cs index 13b49b0df..2d61dc571 100644 --- a/src/Protocol/Features/Workspace/WorkspaceFoldersFeature.cs +++ b/src/Protocol/Features/Workspace/WorkspaceFoldersFeature.cs @@ -21,7 +21,7 @@ namespace Models GenerateRequestMethods(typeof(IWorkspaceLanguageClient), typeof(ILanguageClient)) ] [RegistrationOptions(typeof(DidChangeWorkspaceFolderRegistrationOptions))] - public partial record DidChangeWorkspaceFoldersParams : IRequest + public partial record DidChangeWorkspaceFoldersParams : IRequest { /// /// The actual workspace folder change event. diff --git a/src/Protocol/LanguageProtocolDelegatingHandlers.Notification.cs b/src/Protocol/LanguageProtocolDelegatingHandlers.Notification.cs index ca1b7a124..4dd5b3e4a 100644 --- a/src/Protocol/LanguageProtocolDelegatingHandlers.Notification.cs +++ b/src/Protocol/LanguageProtocolDelegatingHandlers.Notification.cs @@ -20,7 +20,7 @@ public sealed class Notification : AbstractHandlers.Base, IJsonRpcNotificationHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() where TCapability : ICapability { @@ -59,7 +59,7 @@ public sealed class Notification : AbstractHandlers.Base, IJsonRpcNotificationHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() { private readonly Func _handler; @@ -92,7 +92,7 @@ public sealed class NotificationCapability : AbstractHandlers.BaseCapability, IJsonRpcNotificationHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TCapability : ICapability { private readonly Func _handler; diff --git a/src/Protocol/LanguageProtocolDelegatingHandlers.Request.cs b/src/Protocol/LanguageProtocolDelegatingHandlers.Request.cs index b269ffe4f..ed4bd923a 100644 --- a/src/Protocol/LanguageProtocolDelegatingHandlers.Request.cs +++ b/src/Protocol/LanguageProtocolDelegatingHandlers.Request.cs @@ -58,7 +58,7 @@ public sealed class Request : AbstractHandlers.Base, IJsonRpcRequestHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() where TCapability : ICapability { @@ -136,7 +136,7 @@ public sealed class RequestRegistration : AbstractHandlers.Base, IJsonRpcRequestHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TRegistrationOptions : class, new() { private readonly Func _handler; @@ -202,7 +202,7 @@ public sealed class RequestCapability : AbstractHandlers.BaseCapability, IJsonRpcRequestHandler, ICanBeIdentifiedHandler - where TParams : IRequest + where TParams : IRequest where TCapability : ICapability { private readonly Func _handler; diff --git a/src/Protocol/LanguageProtocolProxy.cs b/src/Protocol/LanguageProtocolProxy.cs index df5ca6584..f81be7c8b 100644 --- a/src/Protocol/LanguageProtocolProxy.cs +++ b/src/Protocol/LanguageProtocolProxy.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; @@ -43,7 +43,7 @@ public void SendNotification(string method, T @params) _responseRouter.SendNotification(method, @params); } - public void SendNotification(IRequest request) + public void SendNotification(IRequest request) { _responseRouter.SendNotification(request); } diff --git a/src/Protocol/Protocol.csproj b/src/Protocol/Protocol.csproj index df8c95b85..643f3c301 100644 --- a/src/Protocol/Protocol.csproj +++ b/src/Protocol/Protocol.csproj @@ -1,6 +1,6 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageProtocol OmniSharp.Extensions.LanguageServer.Protocol diff --git a/src/Server/Matchers/NotebookDocumentMatcher.cs b/src/Server/Matchers/NotebookDocumentMatcher.cs index 62235e9c3..900831963 100644 --- a/src/Server/Matchers/NotebookDocumentMatcher.cs +++ b/src/Server/Matchers/NotebookDocumentMatcher.cs @@ -101,14 +101,15 @@ private IEnumerable GetHandler(IEnumerable s.IsMatch(attributes)); + _logger.LogTrace("Document Selector {NotebookDocumentSelector}", selector?.ToString()); + if (registrationOptions?.NotebookSelector is null || selector is not null) { _logger.LogTrace( "Handler Selected: {Handler} {Id} via {NotebookDocumentSelector} (targeting {HandlerInterface})", descriptor.ImplementationType.FullName, descriptor.Handler is ICanBeIdentifiedHandler h ? h.Id.ToString() : string.Empty, - registrationOptions?.NotebookSelector?.ToString(), + selector?.ToString(), descriptor.HandlerType.FullName ); yield return descriptor; diff --git a/src/Server/Pipelines/ResolveCommandPipeline.cs b/src/Server/Pipelines/ResolveCommandPipeline.cs index af075aa89..9bfb76ec3 100644 --- a/src/Server/Pipelines/ResolveCommandPipeline.cs +++ b/src/Server/Pipelines/ResolveCommandPipeline.cs @@ -24,7 +24,7 @@ public ResolveCommandPipeline(IRequestContext context, ILogger Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate next) + public async Task Handle(TRequest request, RequestHandlerDelegate next, CancellationToken cancellationToken) { var response = await next().ConfigureAwait(false); cancellationToken.ThrowIfCancellationRequested(); diff --git a/src/Server/Pipelines/SemanticTokensDeltaPipeline.cs b/src/Server/Pipelines/SemanticTokensDeltaPipeline.cs index 377e430a9..19af5ce44 100644 --- a/src/Server/Pipelines/SemanticTokensDeltaPipeline.cs +++ b/src/Server/Pipelines/SemanticTokensDeltaPipeline.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Diagnostics.CodeAnalysis; using System.Threading; using System.Threading.Tasks; @@ -10,7 +10,7 @@ namespace OmniSharp.Extensions.LanguageServer.Server.Pipelines internal class SemanticTokensDeltaPipeline : IPipelineBehavior where TRequest : notnull { - public async Task Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate next) + public async Task Handle(TRequest request, RequestHandlerDelegate next, CancellationToken cancellationToken) { if (request is SemanticTokensParams semanticTokensParams) { diff --git a/src/Server/Server.csproj b/src/Server/Server.csproj index f4e4483d4..f48ab4a52 100644 --- a/src/Server/Server.csproj +++ b/src/Server/Server.csproj @@ -1,6 +1,6 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageServer OmniSharp.Extensions.LanguageServer.Server diff --git a/src/Shared/Shared.csproj b/src/Shared/Shared.csproj index b42aa76a1..c7d7d66ca 100644 --- a/src/Shared/Shared.csproj +++ b/src/Shared/Shared.csproj @@ -1,6 +1,6 @@ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageServer.Shared OmniSharp.Extensions.LanguageServer.Shared diff --git a/src/Testing/Testing.csproj b/src/Testing/Testing.csproj index 4ce49a710..d1964f10d 100644 --- a/src/Testing/Testing.csproj +++ b/src/Testing/Testing.csproj @@ -1,7 +1,7 @@ ο»Ώ - netstandard2.1;netstandard2.0;net6.0 + netstandard2.1;netstandard2.0;net6.0;net8.0 AnyCPU OmniSharp.Extensions.LanguageProtocol.Testing OmniSharp.Extensions.LanguageProtocol.Testing diff --git a/test/Client.Tests/Client.Tests.csproj b/test/Client.Tests/Client.Tests.csproj index 190ea9ba0..384c2bfaf 100644 --- a/test/Client.Tests/Client.Tests.csproj +++ b/test/Client.Tests/Client.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 OmniSharp.Extensions.LanguageClient.Tests OmniSharp.Extensions.LanguageServer.Client.Tests diff --git a/test/Dap.Tests/Dap.Tests.csproj b/test/Dap.Tests/Dap.Tests.csproj index 68e5f8284..b3f146430 100644 --- a/test/Dap.Tests/Dap.Tests.csproj +++ b/test/Dap.Tests/Dap.Tests.csproj @@ -1,6 +1,6 @@ ο»Ώ - net6.0 + net8.0 true AnyCPU @@ -16,6 +16,6 @@ - + diff --git a/test/Dap.Tests/FoundationTests.cs b/test/Dap.Tests/FoundationTests.cs index f592e298a..a73c92d20 100644 --- a/test/Dap.Tests/FoundationTests.cs +++ b/test/Dap.Tests/FoundationTests.cs @@ -249,7 +249,7 @@ public void HandlersShouldHaveExpectedExtensionMethodsBasedOnDirection( extensionClass.GetMethods(BindingFlags.Static | BindingFlags.Public) .Where(z => z.Name == onMethodName) .Where(z => item.matcher(z.GetParameters()[0])) - .Should().HaveCountGreaterOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a registry implementation for {item.type}"); + .Should().HaveCountGreaterThanOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a registry implementation for {item.type}"); } foreach (var item in expectedRequestHandlers) @@ -257,7 +257,7 @@ public void HandlersShouldHaveExpectedExtensionMethodsBasedOnDirection( extensionClass.GetMethods(BindingFlags.Static | BindingFlags.Public) .Where(z => z.Name == sendMethodName) .Where(z => item.matcher(z.GetParameters()[0])) - .Should().HaveCountGreaterOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a request implementation for {item.type}"); + .Should().HaveCountGreaterThanOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a request implementation for {item.type}"); } { @@ -268,7 +268,7 @@ Func ForParameter(int index, Func m) return info => m(info.GetParameters()[index]); } - var containsCancellationToken = ForParameter(1, info => info.ParameterType.GetGenericArguments().Reverse().Take(2).Any(x => x == typeof(CancellationToken))); + var containsCancellationToken = ForParameter(1, info => info.ParameterType.GetGenericArguments().AsEnumerable().Reverse().Take(2).Any(x => x == typeof(CancellationToken))); var returnType = descriptor.HasResponseType ? typeof(Task<>).MakeGenericType(descriptor.ResponseType!) : typeof(Task); var returns = ForParameter(1, info => info.ParameterType.GetGenericArguments().LastOrDefault() == returnType); var isAction = ForParameter(1, info => info.ParameterType.Name.StartsWith(nameof(Action))); @@ -291,7 +291,7 @@ Func ForParameter(int index, Func m) } { var matcher = new MethodMatcher(sendMethodRegistries, descriptor, extensionClass, sendMethodName); - Func containsCancellationToken = info => info.GetParameters().Reverse().Take(2).Any(x => x.ParameterType == typeof(CancellationToken)); + Func containsCancellationToken = info => info.GetParameters().AsEnumerable().Reverse().Take(2).Any(x => x.ParameterType == typeof(CancellationToken)); var returnType = descriptor.HasResponseType ? typeof(Task<>).MakeGenericType(descriptor.ResponseType!) : typeof(Task); Func returns = info => info.ReturnType == returnType; Func isAction = info => info.ReturnType.Name == "Void"; diff --git a/test/Dap.Tests/Integration/RecursiveResolutionTests.cs b/test/Dap.Tests/Integration/RecursiveResolutionTests.cs index 9449dad99..d53eb04cc 100644 --- a/test/Dap.Tests/Integration/RecursiveResolutionTests.cs +++ b/test/Dap.Tests/Integration/RecursiveResolutionTests.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Threading; using System.Threading.Tasks; using DryIoc; @@ -185,7 +185,7 @@ public enum Side } [Method(nameof(ClassRequest))] - public class ClassRequest : IRequest + public class ClassRequest : IRequest { } @@ -204,7 +204,7 @@ public ClassHandler(T jsonRpcServer) } [Method(nameof(InterfaceRequest))] - public class InterfaceRequest : IRequest + public class InterfaceRequest : IRequest { } diff --git a/test/Generation.Tests/AutoImplementParamsGeneratorTests.cs b/test/Generation.Tests/AutoImplementParamsGeneratorTests.cs index 03653d58b..b4a5dfd5e 100644 --- a/test/Generation.Tests/AutoImplementParamsGeneratorTests.cs +++ b/test/Generation.Tests/AutoImplementParamsGeneratorTests.cs @@ -4,7 +4,6 @@ namespace Generation.Tests { - [UsesVerify] public class AutoImplementParamsGeneratorTests { [Fact] diff --git a/test/Generation.Tests/EnumLikeStringGeneratorTests.cs b/test/Generation.Tests/EnumLikeStringGeneratorTests.cs index 1bad0d8cd..c092ee8d9 100644 --- a/test/Generation.Tests/EnumLikeStringGeneratorTests.cs +++ b/test/Generation.Tests/EnumLikeStringGeneratorTests.cs @@ -4,7 +4,6 @@ namespace Generation.Tests { - [UsesVerify] public class EnumLikeStringGeneratorTests { [Fact] diff --git a/test/Generation.Tests/GeneratedRegistrationOptionsTests.cs b/test/Generation.Tests/GeneratedRegistrationOptionsTests.cs index 2a4e132f8..f86652347 100644 --- a/test/Generation.Tests/GeneratedRegistrationOptionsTests.cs +++ b/test/Generation.Tests/GeneratedRegistrationOptionsTests.cs @@ -4,7 +4,6 @@ namespace Generation.Tests { - [UsesVerify] public class GeneratedRegistrationOptionsTests { [Fact] diff --git a/test/Generation.Tests/Generation.Tests.csproj b/test/Generation.Tests/Generation.Tests.csproj index 4af9af6e5..19309997c 100644 --- a/test/Generation.Tests/Generation.Tests.csproj +++ b/test/Generation.Tests/Generation.Tests.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true AnyCPU diff --git a/test/Generation.Tests/JsonRpcGenerationTests.cs b/test/Generation.Tests/JsonRpcGenerationTests.cs index 614fd3cdf..4333085db 100644 --- a/test/Generation.Tests/JsonRpcGenerationTests.cs +++ b/test/Generation.Tests/JsonRpcGenerationTests.cs @@ -7,7 +7,6 @@ namespace Generation.Tests { - [UsesVerify] public class JsonRpcGenerationTests { [Fact] diff --git a/test/Generation.Tests/LspFeatureTests.cs b/test/Generation.Tests/LspFeatureTests.cs index 00b584610..2090084fe 100644 --- a/test/Generation.Tests/LspFeatureTests.cs +++ b/test/Generation.Tests/LspFeatureTests.cs @@ -4,7 +4,6 @@ namespace Generation.Tests { - [UsesVerify] public class LspFeatureTests { // [Fact(Skip = "for testing"] @@ -40,7 +39,7 @@ namespace Lsp.Tests.Integration.Fixtures GenerateRequestMethods(typeof(ILanguageClient)) ] [RegistrationOptions(typeof(UnitTestRegistrationOptions)), Capability(typeof(UnitTestCapability))] - public partial class UnitTest : IRequest + public partial class UnitTest : IRequest { public string Name { get; set; } = null!; } @@ -588,7 +587,7 @@ public override StaticOptions Convert(SubLensRegistrationOptions source) [GenerateHandlerMethods] [GenerateRequestMethods(typeof(IWorkspaceLanguageServer), typeof(ILanguageServer))] [Capability(typeof(SubLensWorkspaceClientCapabilities))] - public partial record SubLensRefreshParams : IRequest; + public partial record SubLensRefreshParams : IRequest; } namespace Client.Capabilities diff --git a/test/Generation.Tests/ModuleInitializer.cs b/test/Generation.Tests/ModuleInitializer.cs index 67d97e1a7..4ac0b1f2a 100644 --- a/test/Generation.Tests/ModuleInitializer.cs +++ b/test/Generation.Tests/ModuleInitializer.cs @@ -1,4 +1,4 @@ -ο»Ώusing System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using DiffEngine; using Microsoft.CodeAnalysis; @@ -7,12 +7,11 @@ public static class ModuleInitializer [ModuleInitializer] public static void Init() { - VerifySourceGenerators.Enable(); + VerifySourceGenerators.Initialize(); VerifierSettings.AddExtraSettings( - settings => { settings.Converters.Add(new SyntaxTreeConverter()); } - ); + settings => settings.Converters.Add(new SyntaxTreeConverter())); DiffRunner.Disabled = true; - VerifierSettings.DerivePathInfo( + DerivePathInfo( static (sourceFile, directory, type, method) => { static string GetTypeName(Type type) => type.IsNested ? $"{type.ReflectedType!.Name}.{type.Name}" : type.Name; diff --git a/test/Generation.Tests/TypedCanBeResolvedTests.cs b/test/Generation.Tests/TypedCanBeResolvedTests.cs index 2d0f91e00..c5af9ea5a 100644 --- a/test/Generation.Tests/TypedCanBeResolvedTests.cs +++ b/test/Generation.Tests/TypedCanBeResolvedTests.cs @@ -4,7 +4,6 @@ namespace Generation.Tests { - [UsesVerify] public class TypedCanBeResolvedTests { [Fact] diff --git a/test/Generation.Tests/snapshots/AutoImplementParamsGeneratorTests.Auto_Magically_Implements_Properties.verified.cs b/test/Generation.Tests/snapshots/AutoImplementParamsGeneratorTests.Auto_Magically_Implements_Properties#Test0_DeclarationParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/AutoImplementParamsGeneratorTests.Auto_Magically_Implements_Properties.verified.cs rename to test/Generation.Tests/snapshots/AutoImplementParamsGeneratorTests.Auto_Magically_Implements_Properties#Test0_DeclarationParams.verified.cs diff --git a/test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString.verified.cs b/test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString#Test0_ThreadEventReason.verified.cs similarity index 93% rename from test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString.verified.cs rename to test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString#Test0_ThreadEventReason.verified.cs index 106762da2..fec5dd6d5 100644 --- a/test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString.verified.cs +++ b/test/Generation.Tests/snapshots/EnumLikeStringGeneratorTests.Auto_Magically_Implements_IEnumLikeString#Test0_ThreadEventReason.verified.cs @@ -17,9 +17,14 @@ namespace Test { private static readonly Lazy> _defaults = new Lazy>(() => { - return new ThreadEventReason[]{Started, Exited}; + return new ThreadEventReason[] + { + Started, + Exited + }; }); public static IEnumerable Defaults => _defaults.Value; + private readonly string _value; public ThreadEventReason(string type) => _value = type; public static implicit operator ThreadEventReason(string kind) => new ThreadEventReason(kind); diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options.00AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options.00AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options.01CodeActionRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options#CodeActionRegistrationOptions.verified.cs similarity index 91% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options.01CodeActionRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options#CodeActionRegistrationOptions.verified.cs index 62d94c13b..afa450986 100644 --- a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options.01CodeActionRegistrationOptions.verified.cs +++ b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options#CodeActionRegistrationOptions.verified.cs @@ -36,7 +36,12 @@ public CodeActionRegistrationOptionsConverter() public override StaticOptions Convert(CodeActionRegistrationOptions source) { - return new StaticOptions{CodeActionKinds = source.CodeActionKinds, ResolveProvider = source.ResolveProvider, WorkDoneProgress = source.WorkDoneProgress}; + return new StaticOptions + { + CodeActionKinds = source.CodeActionKinds, + ResolveProvider = source.ResolveProvider, + WorkDoneProgress = source.WorkDoneProgress + }; } } @@ -51,6 +56,7 @@ public partial class StaticOptions : OmniSharp.Extensions.LanguageServer.Protoco /// [Optional] public Container? CodeActionKinds { get; set; } = new Container(); + /// /// The server provides support to resolve additional /// information for a code action. diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters.00AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters.00AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters.01CodeActionRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters#CodeActionRegistrationOptions.verified.cs similarity index 99% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters.01CodeActionRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters#CodeActionRegistrationOptions.verified.cs index 5a0e34232..f3c8c9084 100644 --- a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters.01CodeActionRegistrationOptions.verified.cs +++ b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_Registration_Options_With_Converters#CodeActionRegistrationOptions.verified.cs @@ -38,6 +38,7 @@ public partial class StaticOptions : IWorkDoneProgressOptions /// [Optional] public Container? CodeActionKinds { get; set; } = new Container(); + /// /// The server provides support to resolve additional /// information for a code action. diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options.00AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options.00AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options.01WorkspaceSymbolRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options#WorkspaceSymbolRegistrationOptions.verified.cs similarity index 91% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options.01WorkspaceSymbolRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options#WorkspaceSymbolRegistrationOptions.verified.cs index 95ed84ad2..dc8ea90ec 100644 --- a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options.01WorkspaceSymbolRegistrationOptions.verified.cs +++ b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options#WorkspaceSymbolRegistrationOptions.verified.cs @@ -22,7 +22,10 @@ public WorkspaceSymbolRegistrationOptionsConverter() public override StaticOptions Convert(WorkspaceSymbolRegistrationOptions source) { - return new StaticOptions{WorkDoneProgress = source.WorkDoneProgress}; + return new StaticOptions + { + WorkDoneProgress = source.WorkDoneProgress + }; } } diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface.00AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface.00AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface.01WorkspaceSymbolRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface#WorkspaceSymbolRegistrationOptions.verified.cs similarity index 91% rename from test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface.01WorkspaceSymbolRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface#WorkspaceSymbolRegistrationOptions.verified.cs index 6d824bc71..f883cebb1 100644 --- a/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface.01WorkspaceSymbolRegistrationOptions.verified.cs +++ b/test/Generation.Tests/snapshots/GeneratedRegistrationOptionsTests.Supports_Generating_Strongly_Typed_WorkDone_Registration_Options_Interface#WorkspaceSymbolRegistrationOptions.verified.cs @@ -23,7 +23,10 @@ public WorkspaceSymbolRegistrationOptionsConverter() public override StaticOptions Convert(WorkspaceSymbolRegistrationOptions source) { - return new StaticOptions{WorkDoneProgress = source.WorkDoneProgress}; + return new StaticOptions + { + WorkDoneProgress = source.WorkDoneProgress + }; } } diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.01AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.01AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.00.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.00.verified.txt deleted file mode 100644 index d9ba20eca..000000000 --- a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.00.verified.txt +++ /dev/null @@ -1,30 +0,0 @@ -ο»Ώ{ - Diagnostics: [ - { - Id: JRPC1003, - Title: Cannot infer request router(s), - Severity: Error, - WarningLevel: 0, - Location: Test0.cs: (15,66)-(15,88), - Description: , - HelpLink: , - MessageFormat: Could not infer the request router(s) to use, please specify the target interface(s)., - Message: Could not infer the request router(s) to use, please specify the target interface(s)., - Category: JsonRPC, - CustomTags: [] - }, - { - Id: JRPC1003, - Title: Cannot infer request router(s), - Severity: Error, - WarningLevel: 0, - Location: Test0.cs: (15,90)-(15,112), - Description: , - HelpLink: , - MessageFormat: Could not infer the request router(s) to use, please specify the target interface(s)., - Message: Could not infer the request router(s) to use, please specify the target interface(s)., - Category: JsonRPC, - CustomTags: [] - } - ] -} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.verified.txt new file mode 100644 index 000000000..8ca4b6b8d --- /dev/null +++ b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Should_Report_Diagnostic_If_Missing_Information.verified.txt @@ -0,0 +1,42 @@ +ο»Ώ{ + Diagnostics: [ + { + Location: /* +{ + [Serial, Method(GeneralNames.Exit, Direction.ClientToServer), GenerateHandlerMethods, GenerateRequestMethods] + ^^^^^^^^^^^^^^^^^^^^^^ + public interface IExitHandler : IJsonRpcNotificationHandler +*/ + Test0.cs: (15,66)-(15,88), + Message: Could not infer the request router(s) to use, please specify the target interface(s)., + Severity: Error, + Descriptor: { + Id: JRPC1003, + Title: Cannot infer request router(s), + MessageFormat: Could not infer the request router(s) to use, please specify the target interface(s)., + Category: JsonRPC, + DefaultSeverity: Error, + IsEnabledByDefault: true + } + }, + { + Location: /* +{ + [Serial, Method(GeneralNames.Exit, Direction.ClientToServer), GenerateHandlerMethods, GenerateRequestMethods] + ^^^^^^^^^^^^^^^^^^^^^^ + public interface IExitHandler : IJsonRpcNotificationHandler +*/ + Test0.cs: (15,90)-(15,112), + Message: Could not infer the request router(s) to use, please specify the target interface(s)., + Severity: Error, + Descriptor: { + Id: JRPC1003, + Title: Cannot infer request router(s), + MessageFormat: Could not infer the request router(s) to use, please specify the target interface(s)., + Category: JsonRPC, + DefaultSeverity: Error, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests.00AttachRequestArguments.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests#AttachRequestArguments.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests.00AttachRequestArguments.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests#AttachRequestArguments.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests.01GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests.01GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable.00GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable.00GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable.01LaunchRequestArguments.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable#LaunchRequestArguments.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable.01LaunchRequestArguments.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Derived_Requests_Nullable#LaunchRequestArguments.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types.00AttachRequestArguments.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types#AttachRequestArguments.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types.00AttachRequestArguments.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types#AttachRequestArguments.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types.01GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types.01GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allow_Generic_Types#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses.00AttachRequestArguments.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses#AttachRequestArguments.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses.00AttachRequestArguments.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses#AttachRequestArguments.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses.01GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses.01GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Allows_Nullable_Responses#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names.00AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names.00AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names.01ILanguageProtocolInitializeHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names#ILanguageProtocolInitializeHandler.verified.cs similarity index 99% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names.01ILanguageProtocolInitializeHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names#ILanguageProtocolInitializeHandler.verified.cs index 9baa8fc4c..fd9218d16 100644 --- a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names.01ILanguageProtocolInitializeHandler.verified.cs +++ b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Custom_Method_Names#ILanguageProtocolInitializeHandler.verified.cs @@ -29,4 +29,4 @@ public static partial class LanguageProtocolInitializeExtensions public static Task RequestLanguageProtocolInitialize(this ITextDocumentLanguageClient mediator, InitializeParams request, CancellationToken cancellationToken = default) => mediator.SendRequest(request, cancellationToken); } #nullable restore -} +} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.01ExecuteCommandParams1.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#ExecuteCommandParams1.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.01ExecuteCommandParams1.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#ExecuteCommandParams1.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.02GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.02GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.00Test0_ExecuteCommandParams1.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#Test0_ExecuteCommandParams1.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types.00Test0_ExecuteCommandParams1.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Generic_Response_Types#Test0_ExecuteCommandParams1.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler.00AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler.00AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler.01ICapabilitiesHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler#ICapabilitiesHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler.01ICapabilitiesHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_CapabilitiesHandler#ICapabilitiesHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.01AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.01AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.02IDidChangeTextDocumentHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler#IDidChangeTextDocumentHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.02IDidChangeTextDocumentHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler#IDidChangeTextDocumentHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.00.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.00.verified.txt deleted file mode 100644 index a8e983cca..000000000 --- a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.00.verified.txt +++ /dev/null @@ -1,17 +0,0 @@ -ο»Ώ{ - Diagnostics: [ - { - Id: JRPC1001, - Title: No Response Router Provided, - Severity: Info, - WarningLevel: 1, - Location: Test0.cs: (17,21)-(17,50), - Description: , - HelpLink: , - MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., - Message: No Response Router Provided for handler {0}, defaulting to {1}., - Category: JsonRPC, - CustomTags: [] - } - ] -} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.verified.txt new file mode 100644 index 000000000..b90ac0de2 --- /dev/null +++ b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_DidChangeTextHandler.verified.txt @@ -0,0 +1,24 @@ +ο»Ώ{ + Diagnostics: [ + { + Location: /* + [Serial, Method(TextDocumentNames.DidChange, Direction.ClientToServer), GenerateHandlerMethods, GenerateRequestMethods] + public interface IDidChangeTextDocumentHandler : IJsonRpcNotificationHandler, + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + IRegistration +*/ + Test0.cs: (17,21)-(17,50), + Message: No Response Router Provided for handler {0}, defaulting to {1}., + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: JRPC1001, + Title: No Response Router Provided, + MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., + Category: JsonRPC, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.01AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.01AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.02IExitHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler#IExitHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.02IExitHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler#IExitHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.00.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.00.verified.txt deleted file mode 100644 index 4b754600e..000000000 --- a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.00.verified.txt +++ /dev/null @@ -1,17 +0,0 @@ -ο»Ώ{ - Diagnostics: [ - { - Id: JRPC1001, - Title: No Response Router Provided, - Severity: Info, - WarningLevel: 1, - Location: Test0.cs: (16,21)-(16,33), - Description: , - HelpLink: , - MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., - Message: No Response Router Provided for handler {0}, defaulting to {1}., - Category: JsonRPC, - CustomTags: [] - } - ] -} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.verified.txt new file mode 100644 index 000000000..b5ad868da --- /dev/null +++ b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_ExitHandler.verified.txt @@ -0,0 +1,24 @@ +ο»Ώ{ + Diagnostics: [ + { + Location: /* + [Serial, Method(GeneralNames.Exit, Direction.ClientToServer), GenerateHandlerMethods, GenerateRequestMethods] + public interface IExitHandler : IJsonRpcNotificationHandler + ^^^^^^^^^^^^ + { +*/ + Test0.cs: (16,21)-(16,33), + Message: No Response Router Provided for handler {0}, defaulting to {1}., + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: JRPC1001, + Title: No Response Router Provided, + MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., + Category: JsonRPC, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler.00AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler.00AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler.01IFoldingRangeHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler#IFoldingRangeHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler.01IFoldingRangeHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_And_Infers_Direction_FoldingRangeHandler#IFoldingRangeHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler.00AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler.00AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler.01IExitHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler#IExitHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler.01IExitHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Notifications_ExitHandler#IExitHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests.00AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests.00AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests.01IDefinitionHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests#IDefinitionHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests.01IDefinitionHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests#IDefinitionHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.01AssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction#AssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.01AssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction#AssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.02IDefinitionHandler.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction#IDefinitionHandler.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.02IDefinitionHandler.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction#IDefinitionHandler.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.00.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.00.verified.txt deleted file mode 100644 index a88f4f32a..000000000 --- a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.00.verified.txt +++ /dev/null @@ -1,17 +0,0 @@ -ο»Ώ{ - Diagnostics: [ - { - Id: JRPC1001, - Title: No Response Router Provided, - Severity: Info, - WarningLevel: 1, - Location: Test0.cs: (17,21)-(17,39), - Description: , - HelpLink: , - MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., - Message: No Response Router Provided for handler {0}, defaulting to {1}., - Category: JsonRPC, - CustomTags: [] - } - ] -} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.verified.txt b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.verified.txt new file mode 100644 index 000000000..695992307 --- /dev/null +++ b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Generating_Requests_And_Infers_Direction.verified.txt @@ -0,0 +1,24 @@ +ο»Ώ{ + Diagnostics: [ + { + Location: /* + [Parallel, Method(TextDocumentNames.Definition, Direction.ClientToServer), GenerateHandlerMethods, GenerateRequestMethods, Obsolete("This is obsolete")] + public interface IDefinitionHandler : IJsonRpcRequestHandler, IRegistration { } + ^^^^^^^^^^^^^^^^^^ +} +*/ + Test0.cs: (17,21)-(17,39), + Message: No Response Router Provided for handler {0}, defaulting to {1}., + Severity: Info, + WarningLevel: 1, + Descriptor: { + Id: JRPC1001, + Title: No Response Router Provided, + MessageFormat: No Response Router Provided for handler {0}, defaulting to {1}., + Category: JsonRPC, + DefaultSeverity: Info, + IsEnabledByDefault: true + } + } + ] +} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source.00GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source.00GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source.01RenameParams.verified.cs b/test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source#RenameParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source.01RenameParams.verified.cs rename to test/Generation.Tests/snapshots/JsonRpcGenerationTests.Supports_Params_Type_As_Source#RenameParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.00AssemblyCapabilityKeys.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#AssemblyCapabilityKeys.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.00AssemblyCapabilityKeys.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#AssemblyCapabilityKeys.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.04AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.04AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.01DiscoverUnitTestsParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#DiscoverUnitTestsParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.01DiscoverUnitTestsParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#DiscoverUnitTestsParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.02GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.02GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.03UnitTest.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#UnitTest.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.03UnitTest.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#UnitTest.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.05UnitTestRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#UnitTestRegistrationOptions.verified.cs similarity index 89% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.05UnitTestRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#UnitTestRegistrationOptions.verified.cs index 5604552b9..81be6f002 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions.05UnitTestRegistrationOptions.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Custom_Language_Extensions#UnitTestRegistrationOptions.verified.cs @@ -29,7 +29,11 @@ public UnitTestRegistrationOptionsConverter() public override StaticOptions Convert(UnitTestRegistrationOptions source) { - return new StaticOptions{SupportsDebugging = source.SupportsDebugging, WorkDoneProgress = source.WorkDoneProgress}; + return new StaticOptions + { + SupportsDebugging = source.SupportsDebugging, + WorkDoneProgress = source.WorkDoneProgress + }; } } diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.00GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.00GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.02RegistrationContainer.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#RegistrationContainer.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.02RegistrationContainer.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#RegistrationContainer.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.01RegistrationParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#RegistrationParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return.01RegistrationParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Generating_Void_Task_Return#RegistrationParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.00AssemblyCapabilityKeys.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#AssemblyCapabilityKeys.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.00AssemblyCapabilityKeys.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#AssemblyCapabilityKeys.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.05AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.05AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.02GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.02GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.03OutlayHint.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHint.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.03OutlayHint.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHint.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.07OutlayHintContainer.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintContainer.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.07OutlayHintContainer.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintContainer.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.04OutlayHintParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintParams.verified.cs similarity index 99% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.04OutlayHintParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintParams.verified.cs index 81e903049..89d72c0a9 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.04OutlayHintParams.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintParams.verified.cs @@ -50,6 +50,7 @@ protected OutlayHintsHandlerBase() : this(Guid.NewGuid()) private readonly Guid _id; Guid ICanBeIdentifiedHandler.Id => _id; + public abstract Task Handle(OutlayHint request, CancellationToken cancellationToken); } diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.06OutlayHintRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.06OutlayHintRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#OutlayHintRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.01Test0_OutlayHintParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#Test0_OutlayHintParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.01Test0_OutlayHintParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#Test0_OutlayHintParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.08Test0_OutlayHintTyped.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#Test0_OutlayHintTyped.verified.cs similarity index 86% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.08Test0_OutlayHintTyped.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#Test0_OutlayHintTyped.verified.cs index 7adc1f307..76f208225 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.08Test0_OutlayHintTyped.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint#Test0_OutlayHintTyped.verified.cs @@ -28,7 +28,17 @@ public partial record OutlayHint public OutlayHint WithData(TData data) where TData : class?, IHandlerIdentity? { - return new OutlayHint{Position = Position, Label = Label, Kind = Kind, TextEdits = TextEdits, Tooltip = Tooltip, PaddingLeft = PaddingLeft, PaddingRight = PaddingRight, Data = data}; + return new OutlayHint + { + Position = Position, + Label = Label, + Kind = Kind, + TextEdits = TextEdits, + Tooltip = Tooltip, + PaddingLeft = PaddingLeft, + PaddingRight = PaddingRight, + Data = data + }; } [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] @@ -59,7 +69,6 @@ public partial record OutlayHint : ICanBeResolved where T : class?, IHandlerI /// The position of this hint. /// public Position Position { get; init; } - /// /// The label of this hint. A human readable string or an array of /// OutlayHintLabelPart label parts. @@ -67,7 +76,6 @@ public partial record OutlayHint : ICanBeResolved where T : class?, IHandlerI /// *Note* that neither the string nor the label part can be empty. /// public StringOrOutlayHintLabelParts Label { get; init; } - /// /// The kind of this hint. Can be omitted in which case the client /// should fall back to a reasonable default. @@ -122,23 +130,52 @@ public partial record OutlayHint : ICanBeResolved where T : class?, IHandlerI /// [Optional] public T Data { get => this.GetRawData()!; init => this.SetRawData(value); } - private string DebuggerDisplay => ToString(); + public OutlayHint WithData(TData data) where TData : class?, IHandlerIdentity? { - return new OutlayHint{Position = Position, Label = Label, Kind = Kind, TextEdits = TextEdits, Tooltip = Tooltip, PaddingLeft = PaddingLeft, PaddingRight = PaddingRight, Data = data}; + return new OutlayHint + { + Position = Position, + Label = Label, + Kind = Kind, + TextEdits = TextEdits, + Tooltip = Tooltip, + PaddingLeft = PaddingLeft, + PaddingRight = PaddingRight, + Data = data + }; } JToken? ICanBeResolved.Data { get; init; } - private JToken? JData { get => this.GetRawData(); init => this.SetRawData(value); } - public static implicit operator OutlayHint(OutlayHint value) => new OutlayHint{Position = value.Position, Label = value.Label, Kind = value.Kind, TextEdits = value.TextEdits, Tooltip = value.Tooltip, PaddingLeft = value.PaddingLeft, PaddingRight = value.PaddingRight, JData = value.Data}; + public static implicit operator OutlayHint(OutlayHint value) => new OutlayHint + { + Position = value.Position, + Label = value.Label, + Kind = value.Kind, + TextEdits = value.TextEdits, + Tooltip = value.Tooltip, + PaddingLeft = value.PaddingLeft, + PaddingRight = value.PaddingRight, + JData = value.Data + }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("value")] public static implicit operator OutlayHint? (OutlayHint? value) => value switch { - not null => new OutlayHint{Position = value.Position, Label = value.Label, Kind = value.Kind, TextEdits = value.TextEdits, Tooltip = value.Tooltip, PaddingLeft = value.PaddingLeft, PaddingRight = value.PaddingRight, Data = value.JData}, + not null => new OutlayHint + { + Position = value.Position, + Label = value.Label, + Kind = value.Kind, + TextEdits = value.TextEdits, + Tooltip = value.Tooltip, + PaddingLeft = value.PaddingLeft, + PaddingRight = value.PaddingRight, + Data = value.JData + }, _ => null }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.02Test0_OutlayHintParams1.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.02Test0_OutlayHintParams1.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.03GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.03GeneratedAssemblyJsonRpcHandlers.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.04OutlayHint.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.04OutlayHint.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.05OutlayHintParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.05OutlayHintParams.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.06OutlayHintParams1.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.06OutlayHintParams1.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.07AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.07AssemblyRegistrationOptions.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.08OutlayHintRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.08OutlayHintRegistrationOptions.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.09OutlayHintContainer.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.09OutlayHintContainer.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.10Test0_OutlayHintTyped.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Inlay_Hint.10Test0_OutlayHintTyped.verified.cs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.00AssemblyCapabilityKeys.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#AssemblyCapabilityKeys.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.00AssemblyCapabilityKeys.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#AssemblyCapabilityKeys.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.06AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.06AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.02GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.02GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.03SubLens.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLens.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.03SubLens.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLens.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.08SubLensContainer.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensContainer.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.08SubLensContainer.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensContainer.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.04SubLensParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensParams.verified.cs similarity index 99% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.04SubLensParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensParams.verified.cs index 083023a2d..09e82fb86 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.04SubLensParams.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensParams.verified.cs @@ -50,6 +50,7 @@ protected SubLensHandlerBase() : this(Guid.NewGuid()) private readonly Guid _id; Guid ICanBeIdentifiedHandler.Id => _id; + public abstract Task Handle(SubLens request, CancellationToken cancellationToken); } @@ -84,6 +85,7 @@ protected SubLensPartialHandlerBase(IProgressManager progressManager) : this(Gui private readonly Guid _id; Guid ICanBeIdentifiedHandler.Id => _id; + public abstract Task Handle(SubLens request, CancellationToken cancellationToken); } diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.05SubLensRefreshParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensRefreshParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.05SubLensRefreshParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensRefreshParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.07SubLensRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.07SubLensRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#SubLensRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.01Test0_SubLensParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#Test0_SubLensParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.01Test0_SubLensParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#Test0_SubLensParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.09Test0_SubLensTyped.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#Test0_SubLensTyped.verified.cs similarity index 92% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.09Test0_SubLensTyped.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#Test0_SubLensTyped.verified.cs index 19c4b8d68..02c7889dc 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data.09Test0_SubLensTyped.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Nullable_Params_With_Typed_Data#Test0_SubLensTyped.verified.cs @@ -26,7 +26,12 @@ public partial record SubLens public SubLens WithData(TData data) where TData : class?, IHandlerIdentity? { - return new SubLens{Range = Range, Command = Command, Data = data}; + return new SubLens + { + Range = Range, + Command = Command, + Data = data + }; } [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] @@ -59,6 +64,7 @@ public partial record SubLens : ICanBeResolved where T : class?, IHandlerIden /// The range in which this code lens is valid. Should only span a single line. /// public Range Range { get; init; } = null !; + /// /// The command this code lens represents. /// @@ -71,8 +77,8 @@ public partial record SubLens : ICanBeResolved where T : class?, IHandlerIden /// [Optional] public T Data { get => this.GetRawData()!; init => this.SetRawData(value); } - private string DebuggerDisplay => $"{Range}{(Command != null ? $" {Command}" : "")}"; + /// public override string ToString() { @@ -82,18 +88,32 @@ public override string ToString() public SubLens WithData(TData data) where TData : class?, IHandlerIdentity? { - return new SubLens{Range = Range, Command = Command, Data = data}; + return new SubLens + { + Range = Range, + Command = Command, + Data = data + }; } JToken? ICanBeResolved.Data { get; init; } - private JToken? JData { get => this.GetRawData(); init => this.SetRawData(value); } - public static implicit operator SubLens(SubLens value) => new SubLens{Range = value.Range, Command = value.Command, JData = value.Data}; + public static implicit operator SubLens(SubLens value) => new SubLens + { + Range = value.Range, + Command = value.Command, + JData = value.Data + }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("value")] public static implicit operator SubLens? (SubLens? value) => value switch { - not null => new SubLens{Range = value.Range, Command = value.Command, Data = value.JData}, + not null => new SubLens + { + Range = value.Range, + Command = value.Command, + Data = value.JData + }, _ => null }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.00AssemblyCapabilityKeys.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#AssemblyCapabilityKeys.verified.cs similarity index 97% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.00AssemblyCapabilityKeys.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#AssemblyCapabilityKeys.verified.cs index cb652ae8f..61f956aa0 100644 --- a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.00AssemblyCapabilityKeys.verified.cs +++ b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#AssemblyCapabilityKeys.verified.cs @@ -13,4 +13,4 @@ using OmniSharp.Extensions.LanguageServer.Protocol.Workspace; using System.Diagnostics; -[assembly: AssemblyCapabilityKey(typeof(OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities.WorkspaceSymbolCapability), nameof(ClientCapabilities.Workspace), nameof(WorkspaceClientCapabilities.Symbol))] +[assembly: AssemblyCapabilityKey(typeof(OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities.WorkspaceSymbolCapability), nameof(ClientCapabilities.Workspace), nameof(WorkspaceClientCapabilities.Symbol))] \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.07AssemblyRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#AssemblyRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.07AssemblyRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#AssemblyRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.03GeneratedAssemblyJsonRpcHandlers.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#GeneratedAssemblyJsonRpcHandlers.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.03GeneratedAssemblyJsonRpcHandlers.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#GeneratedAssemblyJsonRpcHandlers.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.04SymbolInformationParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#SymbolInformationParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.04SymbolInformationParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#SymbolInformationParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.01Test0_SymbolInformationParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#Test0_SymbolInformationParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.01Test0_SymbolInformationParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#Test0_SymbolInformationParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.02Test0_WorkspaceSymbolParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#Test0_WorkspaceSymbolParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.02Test0_WorkspaceSymbolParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#Test0_WorkspaceSymbolParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.05WorkspaceSymbol.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbol.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.05WorkspaceSymbol.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbol.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.06WorkspaceSymbolParams.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbolParams.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.06WorkspaceSymbolParams.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbolParams.verified.cs diff --git a/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.08WorkspaceSymbolRegistrationOptions.verified.cs b/test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbolRegistrationOptions.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source.08WorkspaceSymbolRegistrationOptions.verified.cs rename to test/Generation.Tests/snapshots/LspFeatureTests.Supports_Params_Type_As_Source#WorkspaceSymbolRegistrationOptions.verified.cs diff --git a/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_Container.verified.cs b/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_Container#CodeLensContainer.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_Container.verified.cs rename to test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_Container#CodeLensContainer.verified.cs diff --git a/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.00CodeLensContainer.verified.cs b/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data#CodeLensContainer.verified.cs similarity index 100% rename from test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.00CodeLensContainer.verified.cs rename to test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data#CodeLensContainer.verified.cs diff --git a/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01Test0_CodeLensTyped.verified.cs b/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data#Test0_CodeLensTyped.verified.cs similarity index 91% rename from test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01Test0_CodeLensTyped.verified.cs rename to test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data#Test0_CodeLensTyped.verified.cs index be79042af..0eb386f4c 100644 --- a/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01Test0_CodeLensTyped.verified.cs +++ b/test/Generation.Tests/snapshots/TypedCanBeResolvedTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data#Test0_CodeLensTyped.verified.cs @@ -27,7 +27,12 @@ public partial record CodeLens public CodeLens WithData(TData data) where TData : class?, IHandlerIdentity? { - return new CodeLens{Range = Range, Command = Command, Data = data}; + return new CodeLens + { + Range = Range, + Command = Command, + Data = data + }; } [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] @@ -64,24 +69,38 @@ public partial record CodeLens : ICanBeResolved where T : class?, IHandlerIde /// [Optional] public T Data { get => this.GetRawData()!; init => this.SetRawData(value); } - private string DebuggerDisplay => $"{Range}{(Command != null ? $" {Command}" : "")}"; + public override string ToString() => DebuggerDisplay; public CodeLens WithData(TData data) where TData : class?, IHandlerIdentity? { - return new CodeLens{Range = Range, Command = Command, Data = data}; + return new CodeLens + { + Range = Range, + Command = Command, + Data = data + }; } JToken? ICanBeResolved.Data { get; init; } - private JToken? JData { get => this.GetRawData(); init => this.SetRawData(value); } - public static implicit operator CodeLens(CodeLens value) => new CodeLens{Range = value.Range, Command = value.Command, JData = value.Data}; + public static implicit operator CodeLens(CodeLens value) => new CodeLens + { + Range = value.Range, + Command = value.Command, + JData = value.Data + }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("value")] public static implicit operator CodeLens? (CodeLens? value) => value switch { - not null => new CodeLens{Range = value.Range, Command = value.Command, Data = value.JData}, + not null => new CodeLens + { + Range = value.Range, + Command = value.Command, + Data = value.JData + }, _ => null }; [return: System.Diagnostics.CodeAnalysis.NotNullIfNotNull("item")] diff --git a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.00.received.txt b/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.00.received.txt deleted file mode 100644 index 0f206832a..000000000 --- a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.00.received.txt +++ /dev/null @@ -1,17 +0,0 @@ -ο»Ώ{ - Diagnostics: [ - { - Id: JRPC1003, - Title: Cannot infer request router(s), - Severity: Error, - WarningLevel: 0, - Location: Test0.cs: (16,4)-(16,26), - Description: , - HelpLink: , - MessageFormat: Could not infer the request router(s) to use, please specify the target interface(s)., - Message: Could not infer the request router(s) to use, please specify the target interface(s)., - Category: JsonRPC, - CustomTags: [] - } - ] -} \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01GeneratedAssemblyJsonRpcHandlers.received.cs b/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01GeneratedAssemblyJsonRpcHandlers.received.cs deleted file mode 100644 index 30d33a7db..000000000 --- a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.01GeneratedAssemblyJsonRpcHandlers.received.cs +++ /dev/null @@ -1,4 +0,0 @@ -ο»Ώ//HintName: GeneratedAssemblyJsonRpcHandlers.cs -using OmniSharp.Extensions.JsonRpc; - -[assembly: AssemblyJsonRpcHandlers(typeof(Test.Document.IPublishDiagnosticsHandler))] \ No newline at end of file diff --git a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.02PublishDiagnosticsParams.received.cs b/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.02PublishDiagnosticsParams.received.cs deleted file mode 100644 index 7acaed031..000000000 --- a/test/Generation.Tests/snapshots/TypedParamsTests.Supports_Generating_Strongly_Typed_ICanBeResolved_Data.02PublishDiagnosticsParams.received.cs +++ /dev/null @@ -1,49 +0,0 @@ -ο»Ώ//HintName: PublishDiagnosticsParams.cs -using MediatR; -using Microsoft.Extensions.DependencyInjection; -using OmniSharp.Extensions.DebugAdapter.Protocol; -using OmniSharp.Extensions.DebugAdapter.Protocol.Events; -using OmniSharp.Extensions.DebugAdapter.Protocol.Models; -using OmniSharp.Extensions.DebugAdapter.Protocol.Requests; -using OmniSharp.Extensions.JsonRpc; -using OmniSharp.Extensions.JsonRpc.Generation; -using OmniSharp.Extensions.LanguageServer.Protocol; -using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; -using OmniSharp.Extensions.LanguageServer.Protocol.Generation; -using OmniSharp.Extensions.LanguageServer.Protocol.Models; -using OmniSharp.Extensions.LanguageServer.Protocol.Serialization; -using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Test.Document; -using Test.Models; - -#nullable enable -namespace Test.Document -{ - [Parallel, Method(TextDocumentNames.PublishDiagnostics, Direction.ServerToClient)] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute] - public partial interface IPublishDiagnosticsHandler : IJsonRpcNotificationHandler, ICapability - { - } - - [System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] - abstract public partial class PublishDiagnosticsHandlerBase : AbstractHandlers.NotificationCapability, IPublishDiagnosticsHandler - { - } -} -#nullable restore - -namespace Test.Document -{ -#nullable enable - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute] - public static partial class PublishDiagnosticsExtensions - { - public static void PublishDiagnostics(this ITextDocumentLanguageServer mediator, PublishDiagnosticsParams request) => mediator.SendNotification(request); - public static void PublishDiagnostics(this ILanguageServer mediator, PublishDiagnosticsParams request) => mediator.SendNotification(request); - } -#nullable restore -} \ No newline at end of file diff --git a/test/JsonRpc.Tests/HandlerResolverTests.cs b/test/JsonRpc.Tests/HandlerResolverTests.cs index d9d706558..1a89492b1 100644 --- a/test/JsonRpc.Tests/HandlerResolverTests.cs +++ b/test/JsonRpc.Tests/HandlerResolverTests.cs @@ -11,7 +11,7 @@ namespace JsonRpc.Tests { public class HandlerResolverTests { - public class Request : IRequest, IRequest + public class Request : IRequest, IRequest { } @@ -19,7 +19,7 @@ public class Response { } - public class Notification : IRequest + public class Notification : IRequest { } diff --git a/test/JsonRpc.Tests/JsonRpc.Tests.csproj b/test/JsonRpc.Tests/JsonRpc.Tests.csproj index 315c78b25..0aab74f9e 100644 --- a/test/JsonRpc.Tests/JsonRpc.Tests.csproj +++ b/test/JsonRpc.Tests/JsonRpc.Tests.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 true AnyCPU diff --git a/test/JsonRpc.Tests/MediatorTestsNotificationHandler.cs b/test/JsonRpc.Tests/MediatorTestsNotificationHandler.cs index f492e853f..d7645a665 100644 --- a/test/JsonRpc.Tests/MediatorTestsNotificationHandler.cs +++ b/test/JsonRpc.Tests/MediatorTestsNotificationHandler.cs @@ -14,7 +14,7 @@ namespace JsonRpc.Tests public class MediatorTestsNotificationHandler : AutoTestBase { [Method("exit")] - public class ExitParams : IRequest + public class ExitParams : IRequest { } diff --git a/test/JsonRpc.Tests/MediatorTestsNotificationHandlerOfT.cs b/test/JsonRpc.Tests/MediatorTestsNotificationHandlerOfT.cs index bffd51124..a1026694a 100644 --- a/test/JsonRpc.Tests/MediatorTestsNotificationHandlerOfT.cs +++ b/test/JsonRpc.Tests/MediatorTestsNotificationHandlerOfT.cs @@ -21,7 +21,7 @@ public interface ICancelRequestHandler : IJsonRpcNotificationHandler { public object Id { get; set; } = null!; } diff --git a/test/JsonRpc.Tests/MediatorTestsRequestHandlerOfTRequest.cs b/test/JsonRpc.Tests/MediatorTestsRequestHandlerOfTRequest.cs index 00ec86b50..231dacbb6 100644 --- a/test/JsonRpc.Tests/MediatorTestsRequestHandlerOfTRequest.cs +++ b/test/JsonRpc.Tests/MediatorTestsRequestHandlerOfTRequest.cs @@ -21,7 +21,7 @@ public interface IExecuteCommandHandler : IJsonRpcRequestHandler { public string Command { get; set; } = null!; } diff --git a/test/JsonRpc.Tests/RecursiveResolutionTests.cs b/test/JsonRpc.Tests/RecursiveResolutionTests.cs index 0769ad859..bf11de4cc 100644 --- a/test/JsonRpc.Tests/RecursiveResolutionTests.cs +++ b/test/JsonRpc.Tests/RecursiveResolutionTests.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Threading; using System.Threading.Tasks; using DryIoc; @@ -110,7 +110,7 @@ public async Task Server_Facade_Can_Injected_Into_Handler_During_Creation_Using_ } [Method(nameof(ClassRequest))] - public class ClassRequest : IRequest + public class ClassRequest : IRequest { } @@ -132,7 +132,7 @@ public Task Handle(ClassRequest classRequest, CancellationToken cancellati } [Method(nameof(InterfaceRequest))] - public class InterfaceRequest : IRequest + public class InterfaceRequest : IRequest { } diff --git a/test/JsonRpc.Tests/ResponseRouterTests.cs b/test/JsonRpc.Tests/ResponseRouterTests.cs index d2ec2b1a2..1612cdf66 100644 --- a/test/JsonRpc.Tests/ResponseRouterTests.cs +++ b/test/JsonRpc.Tests/ResponseRouterTests.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -82,12 +82,12 @@ public class ItemResult } [Method("unit")] - public class UnitParams : IRequest + public class UnitParams : IRequest { } [Method("notification")] - public class NotificationParams : IRequest + public class NotificationParams : IRequest { } } diff --git a/test/Lsp.Integration.Tests/FileOperationTests.cs b/test/Lsp.Integration.Tests/FileOperationsTests.cs similarity index 74% rename from test/Lsp.Integration.Tests/FileOperationTests.cs rename to test/Lsp.Integration.Tests/FileOperationsTests.cs index 94f8851de..b86c2ba0a 100644 --- a/test/Lsp.Integration.Tests/FileOperationTests.cs +++ b/test/Lsp.Integration.Tests/FileOperationsTests.cs @@ -17,24 +17,24 @@ namespace Lsp.Integration.Tests { - public class FileOperationTests : LanguageProtocolTestBase + public class FileOperationsTests : LanguageProtocolTestBase { - private readonly Action _didCreateFileHandler = Substitute.For>(); + private readonly Action _didCreateFileHandler = Substitute.For>(); - private readonly Func> _willCreateFileHandler = - Substitute.For>>(); + private readonly Func> _willCreateFileHandler = + Substitute.For>>(); - private readonly Action _didRenameFileHandler = Substitute.For>(); + private readonly Action _didRenameFileHandler = Substitute.For>(); - private readonly Func> _willRenameFileHandler = - Substitute.For>>(); + private readonly Func> _willRenameFileHandler = + Substitute.For>>(); - private readonly Action _didDeleteFileHandler = Substitute.For>(); + private readonly Action _didDeleteFileHandler = Substitute.For>(); - private readonly Func> _willDeleteFileHandler = - Substitute.For>>(); + private readonly Func> _willDeleteFileHandler = + Substitute.For>>(); - public FileOperationTests(ITestOutputHelper outputHelper) : base(new JsonRpcTestOptions().ConfigureForXUnit(outputHelper, LogEventLevel.Verbose)) + public FileOperationsTests(ITestOutputHelper outputHelper) : base(new JsonRpcTestOptions().ConfigureForXUnit(outputHelper, LogEventLevel.Verbose)) { } @@ -43,14 +43,14 @@ public async Task Should_Handle_FileCreate() { var (client, server) = await Initialize(Configure, Configure); - await client.RequestWillCreateFile( - new WillCreateFileParams + await client.RequestWillCreateFiles( + new WillCreateFilesParams { Files = Container.From(new FileCreate { Uri = new Uri("file://asdf") }) } ); - client.DidCreateFile( - new DidCreateFileParams + client.DidCreateFiles( + new DidCreateFilesParams { Files = Container.From(new FileCreate { Uri = new Uri("file://asdf") }) } @@ -91,16 +91,22 @@ public async Task Should_Handle_FileRename() { var (client, server) = await Initialize(Configure, Configure); - await client.RequestWillRenameFile( - new WillRenameFileParams + await client.RequestWillRenameFiles( + new WillRenameFilesParams { - Files = Container.From(new FileRename { Uri = new Uri("file://asdf") }) + Files = Container.From(new FileRename { + OldUri = new Uri("file://asdf"), + NewUri = new Uri("file://zxcv"), + }) } ); - client.DidRenameFile( - new DidRenameFileParams + client.DidRenameFiles( + new DidRenameFilesParams { - Files = Container.From(new FileRename { Uri = new Uri("file://asdf") }) + Files = Container.From(new FileRename { + OldUri = new Uri("file://asdf"), + NewUri = new Uri("file://zxcv") + }) } ); @@ -139,14 +145,14 @@ public async Task Should_Handle_FileDelete() { var (client, server) = await Initialize(Configure, Configure); - await client.RequestWillDeleteFile( - new WillDeleteFileParams + await client.RequestWillDeleteFiles( + new WillDeleteFilesParams { Files = Container.From(new FileDelete { Uri = new Uri("file://asdf") }) } ); - client.DidDeleteFile( - new DidDeleteFileParams + client.DidDeleteFiles( + new DidDeleteFilesParams { Files = Container.From(new FileDelete { Uri = new Uri("file://asdf") }) } @@ -213,12 +219,12 @@ private void Configure(LanguageServerOptions options) } } ); - options.OnDidCreateFile(_didCreateFileHandler, (capability, capabilities) => new() { Filters = filters }); - options.OnWillCreateFile(_willCreateFileHandler, (capability, capabilities) => new() { Filters = filters }); - options.OnDidRenameFile(_didRenameFileHandler, (capability, capabilities) => new() { Filters = filters }); - options.OnWillRenameFile(_willRenameFileHandler, (capability, capabilities) => new() { Filters = filters }); - options.OnDidDeleteFile(_didDeleteFileHandler, (capability, capabilities) => new() { Filters = filters }); - options.OnWillDeleteFile(_willDeleteFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnDidCreateFiles(_didCreateFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnWillCreateFiles(_willCreateFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnDidRenameFiles(_didRenameFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnWillRenameFiles(_willRenameFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnDidDeleteFiles(_didDeleteFileHandler, (capability, capabilities) => new() { Filters = filters }); + options.OnWillDeleteFiles(_willDeleteFileHandler, (capability, capabilities) => new() { Filters = filters }); } } } diff --git a/test/Lsp.Integration.Tests/FluentAssertionsExtensions.cs b/test/Lsp.Integration.Tests/FluentAssertionsExtensions.cs index cbb682d93..49c450c92 100644 --- a/test/Lsp.Integration.Tests/FluentAssertionsExtensions.cs +++ b/test/Lsp.Integration.Tests/FluentAssertionsExtensions.cs @@ -9,7 +9,7 @@ namespace Lsp.Integration.Tests { public static class FluentAssertionsExtensions { - public static EquivalencyAssertionOptions ConfigureForSupports(this EquivalencyAssertionOptions options, ILogger? logger = null) + public static EquivalencyOptions ConfigureForSupports(this EquivalencyOptions options, ILogger? logger = null) { return options .WithTracing(new TraceWriter(logger ?? NullLogger.Instance)) diff --git a/test/Lsp.Integration.Tests/Lsp.Integration.Tests.csproj b/test/Lsp.Integration.Tests/Lsp.Integration.Tests.csproj index f60a716fd..a1f40f08e 100644 --- a/test/Lsp.Integration.Tests/Lsp.Integration.Tests.csproj +++ b/test/Lsp.Integration.Tests/Lsp.Integration.Tests.csproj @@ -1,6 +1,6 @@ ο»Ώ - net6.0 + net8.0 true AnyCPU diff --git a/test/Lsp.Integration.Tests/RecursiveResolutionTests.cs b/test/Lsp.Integration.Tests/RecursiveResolutionTests.cs index 7cc1a14f1..d86852174 100644 --- a/test/Lsp.Integration.Tests/RecursiveResolutionTests.cs +++ b/test/Lsp.Integration.Tests/RecursiveResolutionTests.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -348,7 +348,7 @@ public enum Side } [Method(nameof(ClassRequest))] - public class ClassRequest : IRequest + public class ClassRequest : IRequest { } @@ -370,7 +370,7 @@ public Task Handle(ClassRequest classRequest, CancellationToken cancellati } [Method(nameof(InterfaceRequest))] - public class InterfaceRequest : IRequest + public class InterfaceRequest : IRequest { } @@ -392,7 +392,7 @@ public Task Handle(InterfaceRequest request, CancellationToken cancellatio } [Method(nameof(NestedRequest))] - public class NestedRequest : IRequest + public class NestedRequest : IRequest { } diff --git a/test/Lsp.Tests/FluentAssertionsExtensions.cs b/test/Lsp.Tests/FluentAssertionsExtensions.cs index 7378b1acc..74afac78d 100644 --- a/test/Lsp.Tests/FluentAssertionsExtensions.cs +++ b/test/Lsp.Tests/FluentAssertionsExtensions.cs @@ -9,7 +9,7 @@ namespace Lsp.Tests { public static class FluentAssertionsExtensions { - public static EquivalencyAssertionOptions ConfigureForSupports(this EquivalencyAssertionOptions options, ILogger? logger = null) + public static EquivalencyOptions ConfigureForSupports(this EquivalencyOptions options, ILogger? logger = null) { return options .WithTracing(new TraceWriter(logger ?? NullLogger.Instance)) diff --git a/test/Lsp.Tests/FoundationTests.cs b/test/Lsp.Tests/FoundationTests.cs index a46838a9c..74d40e816 100644 --- a/test/Lsp.Tests/FoundationTests.cs +++ b/test/Lsp.Tests/FoundationTests.cs @@ -1,4 +1,4 @@ -ο»Ώusing System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO.Pipelines; @@ -262,13 +262,13 @@ public void HandlersShouldExtensionMethodClassWithMethods( { registries .Where(z => typeof(ILanguageClientProxy).IsAssignableFrom(z) || typeof(ILanguageServerRegistry).IsAssignableFrom(z)) - .Should().HaveCountGreaterOrEqualTo( + .Should().HaveCountGreaterThanOrEqualTo( 1, $"{descriptor.HandlerType.FullName} there should be methods for both handing the event and sending the event" ); registries .Where(z => typeof(ILanguageServerProxy).IsAssignableFrom(z) || typeof(ILanguageClientRegistry).IsAssignableFrom(z)) - .Should().HaveCountGreaterOrEqualTo( + .Should().HaveCountGreaterThanOrEqualTo( 1, $"{descriptor.HandlerType.FullName} there should be methods for both handing the event and sending the event" ); @@ -277,7 +277,7 @@ public void HandlersShouldExtensionMethodClassWithMethods( { registries .Where(z => typeof(ILanguageServerProxy).IsAssignableFrom(z) || typeof(ILanguageClientRegistry).IsAssignableFrom(z)) - .Should().HaveCountGreaterOrEqualTo( + .Should().HaveCountGreaterThanOrEqualTo( 1, $"{descriptor.HandlerType.FullName} there should be methods for both handing the event and sending the event" ); @@ -289,7 +289,7 @@ public void HandlersShouldExtensionMethodClassWithMethods( { registries .Where(z => typeof(ILanguageClientProxy).IsAssignableFrom(z) || typeof(ILanguageServerRegistry).IsAssignableFrom(z)) - .Should().HaveCountGreaterOrEqualTo( + .Should().HaveCountGreaterThanOrEqualTo( 1, $"{descriptor.HandlerType.FullName} there should be methods for both handing the event and sending the event" ); @@ -341,7 +341,7 @@ public void HandlersShouldHaveExpectedExtensionMethodsBasedOnDirection( extensionClass.GetMethods(BindingFlags.Static | BindingFlags.Public) .Where(z => z.Name == onMethodName) .Where(z => item.matcher(z.GetParameters()[0])) - .Should().HaveCountGreaterOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a registry implementation for {item.type}"); + .Should().HaveCountGreaterThanOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a registry implementation for {item.type}"); } foreach (var item in expectedRequestHandlers) @@ -349,7 +349,7 @@ public void HandlersShouldHaveExpectedExtensionMethodsBasedOnDirection( extensionClass.GetMethods(BindingFlags.Static | BindingFlags.Public) .Where(z => z.Name == sendMethodName) .Where(z => item.matcher(z.GetParameters()[0])) - .Should().HaveCountGreaterOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a request implementation for {item.type}"); + .Should().HaveCountGreaterThanOrEqualTo(1, $"{descriptor.HandlerType.FullName} is missing a request implementation for {item.type}"); } } @@ -386,7 +386,7 @@ Func ForAnyParameter(Func m) } var containsCancellationToken = ForAnyParameter( - info => info.ParameterType.GetGenericArguments().Reverse().Take(2).Any(x => x == typeof(CancellationToken)) + info => info.ParameterType.GetGenericArguments().AsEnumerable().Reverse().Take(2).Any(x => x == typeof(CancellationToken)) ); var returnType = descriptor.HasResponseType ? typeof(Task<>).MakeGenericType(descriptor.ResponseType!) : typeof(Task); var returns = ForAnyParameter(info => info.ParameterType.GetGenericArguments().LastOrDefault() == returnType); @@ -517,7 +517,7 @@ Func ForAnyParameter(Func m) { var matcher = new MethodMatcher(sendMethodRegistries, descriptor, extensionClass); Func containsCancellationToken = - info => info.GetParameters().Reverse().Take(2).Any(x => x.ParameterType == typeof(CancellationToken)); + info => info.GetParameters().AsEnumerable().Reverse().Take(2).Any(x => x.ParameterType == typeof(CancellationToken)); var returnType = descriptor.HasResponseType ? typeof(Task<>).MakeGenericType(descriptor.ResponseType!) : typeof(Task); Func returns = info => info.ReturnType == returnType; Func isAction = info => info.ReturnType.Name == "Void"; diff --git a/test/Lsp.Tests/Lsp.Tests.csproj b/test/Lsp.Tests/Lsp.Tests.csproj index 4d655de2e..105dbb540 100644 --- a/test/Lsp.Tests/Lsp.Tests.csproj +++ b/test/Lsp.Tests/Lsp.Tests.csproj @@ -1,6 +1,6 @@ ο»Ώ - net6.0 + net8.0 true AnyCPU diff --git a/test/Lsp.Tests/Matchers/ResolveCommandMatcherTests.cs b/test/Lsp.Tests/Matchers/ResolveCommandMatcherTests.cs index 3633d7007..b2b86c212 100644 --- a/test/Lsp.Tests/Matchers/ResolveCommandMatcherTests.cs +++ b/test/Lsp.Tests/Matchers/ResolveCommandMatcherTests.cs @@ -83,7 +83,7 @@ public async Task Should_Not_Throw_Given_Another_Descriptor() ); // When - Func a = async () => await handlerMatcher.Handle(new CodeLensParams(), CancellationToken.None, () => Task.FromResult(new CodeLensContainer())); + Func a = async () => await handlerMatcher.Handle(new CodeLensParams(), () => Task.FromResult(new CodeLensContainer()), CancellationToken.None); await a.Should().NotThrowAsync(); } @@ -272,7 +272,7 @@ public async Task Should_Update_CompletionItems_With_HandlerType() ( list is IEnumerable ).Should().BeTrue(); // When - var response = await handlerMatcher.Handle(new CompletionParams(), CancellationToken.None, () => Task.FromResult(list)); + var response = await handlerMatcher.Handle(new CompletionParams(), () => Task.FromResult(list), CancellationToken.None); // Then response.Should().BeEquivalentTo(list, x => x.UsingStructuralRecordEquality()); @@ -323,7 +323,7 @@ public async Task Should_Update_CodeLensContainer_With_HandlerType() ( list is IEnumerable ).Should().BeTrue(); // When - var response = await handlerMatcher.Handle(new CodeLensParams(), CancellationToken.None, () => Task.FromResult(list)); + var response = await handlerMatcher.Handle(new CodeLensParams(), () => Task.FromResult(list), CancellationToken.None); // Then response.Should().BeEquivalentTo(list, x => x.UsingStructuralRecordEquality()); @@ -370,7 +370,7 @@ public async Task Should_Update_CodeLens_Removing_HandlerType() }; // When - var response = await handlerMatcher.Handle(item, CancellationToken.None, () => Task.FromResult(item)); + var response = await handlerMatcher.Handle(item, () => Task.FromResult(item), CancellationToken.None); // Then response.Should().BeEquivalentTo(item, x => x.UsingStructuralRecordEquality()); diff --git a/test/Lsp.Tests/Models/PositionTests.cs b/test/Lsp.Tests/Models/PositionTests.cs index 180b0e8fd..81a525675 100644 --- a/test/Lsp.Tests/Models/PositionTests.cs +++ b/test/Lsp.Tests/Models/PositionTests.cs @@ -34,8 +34,8 @@ public void Is_Sortable_By_Character() a.CompareTo(c).Should().Be(0); - a.Should().BeLessOrEqualTo(c); - a.Should().BeGreaterOrEqualTo(c); + a.Should().BeLessThanOrEqualTo(c); + a.Should().BeGreaterThanOrEqualTo(c); } [Fact] @@ -50,8 +50,8 @@ public void Is_Sortable_By_Line() a.CompareTo(c).Should().Be(0); - a.Should().BeLessOrEqualTo(c); - a.Should().BeGreaterOrEqualTo(c); + a.Should().BeLessThanOrEqualTo(c); + a.Should().BeGreaterThanOrEqualTo(c); } [Fact] diff --git a/test/TestingUtils/RecordExtensions.cs b/test/TestingUtils/RecordExtensions.cs index a3c574d35..7e185f4c4 100644 --- a/test/TestingUtils/RecordExtensions.cs +++ b/test/TestingUtils/RecordExtensions.cs @@ -1,12 +1,12 @@ -ο»Ώusing FluentAssertions.Equivalency; +using FluentAssertions.Equivalency; namespace TestingUtils { public static class RecordExtensions { - public static EquivalencyAssertionOptions UsingStructuralRecordEquality(this EquivalencyAssertionOptions options) + public static EquivalencyOptions UsingStructuralRecordEquality(this EquivalencyOptions options) { return options.Using(new RecordStructuralEqualityEquivalencyStep()); } } -} \ No newline at end of file +} diff --git a/test/TestingUtils/RecordStructuralEqualityEquivalencyStep.cs b/test/TestingUtils/RecordStructuralEqualityEquivalencyStep.cs index c874e8499..5ebd63621 100644 --- a/test/TestingUtils/RecordStructuralEqualityEquivalencyStep.cs +++ b/test/TestingUtils/RecordStructuralEqualityEquivalencyStep.cs @@ -5,9 +5,9 @@ namespace TestingUtils { public class RecordStructuralEqualityEquivalencyStep : StructuralEqualityEquivalencyStep, IEquivalencyStep { - EquivalencyResult IEquivalencyStep.Handle(Comparands comparands, IEquivalencyValidationContext context, IEquivalencyValidator nestedValidator) + EquivalencyResult IEquivalencyStep.Handle(Comparands comparands, IEquivalencyValidationContext context, IValidateChildNodeEquivalency nestedValidator) { - return comparands.Subject?.GetType()?.GetMethod("$") != null ? EquivalencyResult.AssertionCompleted : EquivalencyResult.ContinueWithNext; + return comparands.Subject?.GetType()?.GetMethod("$") != null ? EquivalencyResult.EquivalencyProven : EquivalencyResult.ContinueWithNext; } } } diff --git a/test/TestingUtils/TestingUtils.csproj b/test/TestingUtils/TestingUtils.csproj index 5f9c8393f..e8296c701 100644 --- a/test/TestingUtils/TestingUtils.csproj +++ b/test/TestingUtils/TestingUtils.csproj @@ -1,7 +1,7 @@ - +ο»Ώ - netstandard2.0;netstandard2.1;net6.0 + net8.0 false diff --git a/vscode-testextension/.gitignore b/vscode-testextension/.gitignore index 6343560cd..455c87496 100644 --- a/vscode-testextension/.gitignore +++ b/vscode-testextension/.gitignore @@ -1,3 +1,3 @@ out -server -node_modules \ No newline at end of file +node_modules +.vscode-test/ \ No newline at end of file diff --git a/vscode-testextension/.vscode/launch.json b/vscode-testextension/.vscode/launch.json index d1e53d6c7..2a898e3cb 100644 --- a/vscode-testextension/.vscode/launch.json +++ b/vscode-testextension/.vscode/launch.json @@ -25,7 +25,7 @@ "args": [ "--disable-extensions", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test" + "--extensionTestsPath=${workspaceRoot}/out/test/suite/index" ], "stopOnEntry": false, "sourceMaps": true, diff --git a/vscode-testextension/package-lock.json b/vscode-testextension/package-lock.json index c54f9ee45..834c8f1a1 100644 --- a/vscode-testextension/package-lock.json +++ b/vscode-testextension/package-lock.json @@ -7,59 +7,317 @@ "": { "name": "language-client-example", "version": "0.0.1", - "hasInstallScript": true, "license": "MIT", "dependencies": { - "vscode-languageclient": "^9.0.0", - "vscode-languageserver-protocol": "^3.16.0-next.6" + "vscode-languageclient": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5" }, "devDependencies": { - "@types/mocha": "10.0.1", - "@types/node": "18.17.18", - "typescript": "3.9.10", - "vscode": "1.1.37" + "@types/glob": "^8.1.0", + "@types/mocha": "^10.0.2", + "@types/node": "^22.0.0", + "@types/vscode": "^1.82.0", + "@vscode/test-electron": "^2.3.4", + "glob": "^11.0.0", + "mocha": "^11.0.0", + "source-map-support": "^0.5.21", + "tmp-promise": "^3.0.3", + "typescript": "^5.2.2" }, "engines": { - "vscode": "^1.8.0" + "vscode": "^1.82.0" } }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, "engines": { - "node": ">= 6" + "node": ">=12" } }, - "node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "node_modules/@types/node": { - "version": "18.17.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.18.tgz", - "integrity": "sha512-/4QOuy3ZpV7Ya1GTRz5CYSz3DgkKpyUptXuQ5PPce7uuyJAOR7r9FhkmxJfvcNUXyklbC63a+YvB3jxy7s9ngw==", + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@types/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", + "dev": true, + "dependencies": { + "@types/minimatch": "^5.1.2", + "@types/node": "*" + } + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.13.17", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.17.tgz", + "integrity": "sha512-nAJuQXoyPj04uLgu+obZcSmsfOenUg6DxPKogeUy6yNCFwWaj5sBF8/G/pNo8EtBJjAfSVgfIlugR/BCOleO+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/vscode": { + "version": "1.98.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.98.0.tgz", + "integrity": "sha512-+KuiWhpbKBaG2egF+51KjbGWatTH5BbmWQjSLMDCssb4xF8FJnW4nGH4nuAdOOfMbpD0QlHtI+C3tPq+DoKElg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vscode/test-electron": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.1.tgz", + "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "jszip": "^3.10.1", + "ora": "^7.0.1", + "semver": "^7.6.2" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/agent-base": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.1.tgz", - "integrity": "sha512-01q25QQDwLSsyfhrKbn8yuur+JNw0H+0Y4JiGIKd3z9aYk/w/2kxD/Upc+t2ZBBSUNff50VjPsSW2YxM8QYKVg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, + "license": "MIT", "dependencies": { - "debug": "4" + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 8" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -71,89 +329,1229 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "node_modules/commander": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", - "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", - "dev": true + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.2.tgz", + "integrity": "sha512-YT7U7Vye+t5fZ/QMkBFrTJ7ZQxInIUjwyAjVj84CYXqgBdv30MFUPGnBR6sQaVq6Is15wYJUsnzTuWaGRBhBAQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jszip": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", + "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", + "dev": true, + "dependencies": { + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "setimmediate": "^1.0.5" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mocha": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.1.0.tgz", + "integrity": "sha512-8uJR5RTC2NgpY3GrYcgpZrsEd9zKbPDpob1RezyR2upGHRQtHWofmzTMzTMSV6dru3tj5Ukt0+Vnq1qhFEEwAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^10.4.5", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/mocha/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/mocha/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-7.0.1.tgz", + "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.9.0", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^1.3.0", + "log-symbols": "^5.1.0", + "stdin-discarder": "^0.1.0", + "string-width": "^6.1.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", + "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.0.0", + "is-unicode-supported": "^1.1.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/string-width": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", + "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^10.2.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "ms": "^2.1.1" + "safe-buffer": "^5.1.0" } }, - "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, - "engines": { - "node": ">=0.3.1" + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "es6-promise": "^4.0.3" + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" } }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=0.10.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, @@ -164,279 +1562,269 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=4.x" + "node": "*" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, - "bin": { - "he": "bin/he" + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" } }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/stdin-discarder": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", + "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", "dev": true, + "license": "MIT", "dependencies": { - "brace-expansion": "^1.1.7" + "bl": "^5.0.0" }, "engines": { - "node": "*" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "minimist": "0.0.8" - }, - "bin": { - "mkdirp": "bin/cmd.js" + "safe-buffer": "~5.1.0" } }, - "node_modules/mocha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", - "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", - "dev": true, - "dependencies": { - "browser-stdout": "1.3.1", - "commander": "2.15.1", - "debug": "3.1.0", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.5", - "he": "1.1.1", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "supports-color": "5.4.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">= 4.0.0" + "node": ">=8" } }, - "node_modules/mocha/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "ms": "2.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "wrappy": "1" + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" + "has-flag": "^4.0.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8.17.0" } }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "node_modules/tmp-promise": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-3.0.3.tgz", + "integrity": "sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "tmp": "^0.2.0" } }, - "node_modules/supports-color": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", - "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=4" + "node": ">=8.0" } }, "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, - "node_modules/vscode": { - "version": "1.1.37", - "resolved": "https://registry.npmjs.org/vscode/-/vscode-1.1.37.tgz", - "integrity": "sha512-vJNj6IlN7IJPdMavlQa1KoFB3Ihn06q1AiN3ZFI/HfzPNzbKZWPPuiU+XkpNOfGU5k15m4r80nxNPlM7wcc0wg==", - "deprecated": "This package is deprecated in favor of @types/vscode and vscode-test. For more information please read: https://code.visualstudio.com/updates/v1_36#_splitting-vscode-package-into-typesvscode-and-vscodetest", + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, - "dependencies": { - "glob": "^7.1.2", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "mocha": "^5.2.0", - "semver": "^5.4.1", - "source-map-support": "^0.5.0", - "vscode-test": "^0.4.1" - }, - "bin": { - "vscode-install": "bin/install" - }, - "engines": { - "node": ">=8.9.3" - } + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", @@ -447,137 +1835,160 @@ } }, "node_modules/vscode-languageclient": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.0.tgz", - "integrity": "sha512-EXP4vhSlEj0DtyxrcWVp5aiFrY0WczKSnKSyrMmSbU7qhASPhM+pfcUzY/z8TQCfOhKvq39fidbdTbq9LnBi7g==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", "dependencies": { "minimatch": "^5.1.0", "semver": "^7.3.7", - "vscode-languageserver-protocol": "3.17.4" + "vscode-languageserver-protocol": "3.17.5" }, "engines": { "vscode": "^1.82.0" } }, - "node_modules/vscode-languageclient/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "dependencies": { - "balanced-match": "^1.0.0" + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" } }, - "node_modules/vscode-languageclient/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { - "brace-expansion": "^2.0.1" + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" }, "engines": { - "node": ">=10" - } - }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.4.tgz", - "integrity": "sha512-IpaHLPft+UBWf4dOIH15YEgydTbXGz52EMU2h16SfFpYu/yOQt3pY14049mtpJu+4CBHn+hq7S67e7O0AwpRqQ==", - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.4" + "node": ">= 8" } }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.4.tgz", - "integrity": "sha512-9YXi5pA3XF2V+NUQg6g+lulNS0ncRCKASYdK3Cs7kiH9sVFXWq27prjkC/B8M/xJLRPPRSPCHVMuBTgRNFh2sQ==" + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" }, - "node_modules/vscode-test": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-0.4.3.tgz", - "integrity": "sha512-EkMGqBSefZH2MgW65nY05rdRSko15uvzq4VAPM5jVmwYuFQKE7eikKXNJDRxL+OITXHB6pI+a3XqqD32Y3KC5w==", - "deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name", + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { - "http-proxy-agent": "^2.1.0", - "https-proxy-agent": "^2.2.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8.9.3" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/vscode-test/node_modules/agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { - "es6-promisify": "^5.0.0" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 4.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/vscode-test/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=10" } }, - "node_modules/vscode-test/node_modules/http-proxy-agent": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", - "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { - "agent-base": "4", - "debug": "3.1.0" + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">= 4.5.0" + "node": ">=12" } }, - "node_modules/vscode-test/node_modules/https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "dependencies": { - "agent-base": "^4.3.0", - "debug": "^3.1.0" - }, + "license": "ISC", "engines": { - "node": ">= 4.5.0" + "node": ">=12" } }, - "node_modules/vscode-test/node_modules/ms": { + "node_modules/yargs-unparser": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/vscode/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/vscode-testextension/package.json b/vscode-testextension/package.json index 94d6d3634..bd0344768 100644 --- a/vscode-testextension/package.json +++ b/vscode-testextension/package.json @@ -6,7 +6,7 @@ "version": "0.0.1", "publisher": "vscode", "engines": { - "vscode": "^1.8.0" + "vscode": "^1.82.0" }, "categories": [ "Other" @@ -40,19 +40,26 @@ } }, "scripts": { - "vscode:prepublish": "tsc -p ./", + "vscode:prepublish": "npm run compile", "compile": "tsc -p ./", - "update-vscode": "node ./node_modules/vscode/bin/install", - "postinstall": "node ./node_modules/vscode/bin/install" + "watch": "tsc -watch -p ./", + "pretest": "npm run compile", + "test": "node ./out/test/runTest.js" }, "devDependencies": { - "@types/mocha": "10.0.1", - "@types/node": "18.17.18", - "typescript": "3.9.10", - "vscode": "1.1.37" + "@types/glob": "^8.1.0", + "@types/mocha": "^10.0.2", + "@types/node": "^22.0.0", + "@types/vscode": "^1.82.0", + "@vscode/test-electron": "^2.3.4", + "glob": "^11.0.0", + "mocha": "^11.0.0", + "source-map-support": "^0.5.21", + "tmp-promise": "^3.0.3", + "typescript": "^5.2.2" }, "dependencies": { - "vscode-languageclient": "^9.0.0", - "vscode-languageserver-protocol": "^3.16.0-next.6" + "vscode-languageclient": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5" } } diff --git a/vscode-testextension/src/extension.ts b/vscode-testextension/src/extension.ts index 722980405..1459c2a20 100644 --- a/vscode-testextension/src/extension.ts +++ b/vscode-testextension/src/extension.ts @@ -17,11 +17,13 @@ import { InitializeParams, StreamInfo, createServerPipeTransport, + Trace } from "vscode-languageclient/node"; -import { Trace, createClientPipeTransport } from "vscode-jsonrpc/node"; import { createConnection } from "net"; -export function activate(context: ExtensionContext) { +let client: LanguageClient; + +export async function activate(context: ExtensionContext) { // The server is implemented in node let serverExe = "dotnet"; @@ -36,13 +38,13 @@ export function activate(context: ExtensionContext) { // run: { command: serverExe, args: ['-lsp', '-d'] }, run: { command: serverExe, - args: ["D:/Development/Omnisharp/csharp-language-server-protocol/sample/SampleServer/bin/Debug/netcoreapp3.1/win7-x64/SampleServer.dll"], + args: ["D:/Development/Omnisharp/csharp-language-server-protocol/sample/SampleServer/bin/Debug/net8.0/win-x64/SampleServer.dll"], transport: TransportKind.pipe, }, // debug: { command: serverExe, args: ['-lsp', '-d'] } debug: { command: serverExe, - args: ["D:/Development/Omnisharp/csharp-language-server-protocol/sample/SampleServer/bin/Debug/netcoreapp3.1/win7-x64/SampleServer.dll"], + args: ["D:/Development/Omnisharp/csharp-language-server-protocol/sample/SampleServer/bin/Debug/net8.0/win-x64/SampleServer.dll"], transport: TransportKind.pipe, runtime: "", }, @@ -81,12 +83,12 @@ export function activate(context: ExtensionContext) { }; // Create the language client and start the client. - const client = new LanguageClient("languageServerExample", "Language Server Example", serverOptions, clientOptions); + client = new LanguageClient("languageServerExample", "Language Server Example", serverOptions, clientOptions); client.registerProposedFeatures(); - client.trace = Trace.Verbose; - let disposable = client.start(); + client.setTrace(Trace.Verbose); + await client.start(); +} - // Push the disposable to the context's subscriptions so that the - // client can be deactivated on extension deactivation - context.subscriptions.push(disposable); +export function deactivate() { + return client.stop(); } diff --git a/vscode-testextension/test/extension.test.ts b/vscode-testextension/test/extension.test.ts deleted file mode 100644 index cf47b2c33..000000000 --- a/vscode-testextension/test/extension.test.ts +++ /dev/null @@ -1,22 +0,0 @@ -// -// Note: This example test is leveraging the Mocha test framework. -// Please refer to their documentation on https://mochajs.org/ for help. -// - -// The module 'assert' provides assertion methods from node -import * as assert from 'assert'; - -// You can import and use all API from the 'vscode' module -// as well as import your extension to test it -import * as vscode from 'vscode'; -import * as myExtension from '../src/extension'; - -// Defines a Mocha test suite to group tests of similar kind together -suite("Extension Tests", () => { - - // Defines a Mocha unit test - test("Something 1", () => { - assert.equal(-1, [1, 2, 3].indexOf(5)); - assert.equal(-1, [1, 2, 3].indexOf(0)); - }); -}); \ No newline at end of file diff --git a/vscode-testextension/test/index.ts b/vscode-testextension/test/index.ts deleted file mode 100644 index e3cebd0d1..000000000 --- a/vscode-testextension/test/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -// -// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING -// -// This file is providing the test runner to use when running extension tests. -// By default the test runner in use is Mocha based. -// -// You can provide your own test runner if you want to override it by exporting -// a function run(testRoot: string, clb: (error:Error) => void) that the extension -// host can call to run the tests. The test runner is expected to use console.log -// to report the results back to the caller. When the tests are finished, return -// a possible error to the callback or null if none. - -var testRunner = require('vscode/lib/testrunner'); - -// You can directly control Mocha options by uncommenting the following lines -// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info -testRunner.configure({ - ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.) - useColors: true // colored output from test results -}); - -module.exports = testRunner; \ No newline at end of file diff --git a/vscode-testextension/test/runTest.ts b/vscode-testextension/test/runTest.ts new file mode 100644 index 000000000..be768ad87 --- /dev/null +++ b/vscode-testextension/test/runTest.ts @@ -0,0 +1,39 @@ +import * as path from 'path'; +import * as tmp from 'tmp-promise'; + +import { runTests } from '@vscode/test-electron'; + +async function main() { + try { + // The folder containing the Extension Manifest package.json + // Passed to `--extensionDevelopmentPath` + const extensionDevelopmentPath = path.resolve(__dirname, '../../'); + + // The path to the extension test script + // Passed to --extensionTestsPath + const extensionTestsPath = path.resolve(__dirname, './suite/index'); + + // The path to the user data directory used by vscode + // As the default one is too long (> 103 characters) on some CI setups, forcing it to a temporary and hopefully shorter one. + const userDataDir = await tmp.dir({ unsafeCleanup: true }); + + try { + // Download VS Code, unzip it and run the integration test + await runTests({ + extensionDevelopmentPath, + extensionTestsPath, + launchArgs: ["--user-data-dir", userDataDir.path] + }); + } + finally + { + await userDataDir.cleanup(); + } + } catch (err) { + console.error('Failed to run tests'); + console.error(err); + process.exit(1); + } +} + +main(); \ No newline at end of file diff --git a/vscode-testextension/test/suite/extension.test.ts b/vscode-testextension/test/suite/extension.test.ts new file mode 100644 index 000000000..a4b50bcf1 --- /dev/null +++ b/vscode-testextension/test/suite/extension.test.ts @@ -0,0 +1,15 @@ +import * as assert from 'assert'; + +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import * as vscode from 'vscode'; +// import * as myExtension from '../../extension'; + +suite('Extension Test Suite', () => { + vscode.window.showInformationMessage('Start all tests.'); + + test('Sample test', () => { + assert.strictEqual([1, 2, 3].indexOf(5), -1); + assert.strictEqual([1, 2, 3].indexOf(0), -1); + }); +}); \ No newline at end of file diff --git a/vscode-testextension/test/suite/index.ts b/vscode-testextension/test/suite/index.ts new file mode 100644 index 000000000..b1db95629 --- /dev/null +++ b/vscode-testextension/test/suite/index.ts @@ -0,0 +1,29 @@ +import * as path from 'path'; +import * as Mocha from 'mocha'; +import { glob } from 'glob'; + +export async function run(): Promise { + // Create the mocha test + const mocha = new Mocha({ + ui: 'tdd' + }); + + const testsRoot = path.resolve(__dirname, '..'); + + var files = await glob('**/**.test.js', { cwd: testsRoot }); + + // Add files to the test suite + files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); + + try { + // Run the mocha test + mocha.run(failures => { + if (failures > 0) { + throw new Error(`${failures} tests failed.`); + } + }); + } catch (err) { + console.error(err); + throw err; + } +} \ No newline at end of file diff --git a/vscode-testextension/tsconfig.json b/vscode-testextension/tsconfig.json index e8ded494b..f8c288e00 100644 --- a/vscode-testextension/tsconfig.json +++ b/vscode-testextension/tsconfig.json @@ -4,9 +4,9 @@ "module": "commonjs", "moduleResolution": "node", "outDir": "out", - "lib": ["es2016"], + "lib": ["es2020"], "sourceMap": true, "skipLibCheck": true }, - "exclude": ["node_modules", "server"] + "exclude": ["node_modules", ".vscode-test"] }