From f6f0df79ee8f255175c10075f7eddf66fa90b2ba Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 14 May 2025 13:23:58 -0700 Subject: [PATCH 1/4] Bump Node.js packages --- .npmrc | 1 - package-lock.json | 836 ++++++++++++++++++++-------------------------- package.json | 28 +- 3 files changed, 385 insertions(+), 480 deletions(-) diff --git a/.npmrc b/.npmrc index 3a65acc502..5baab7bcc5 100644 --- a/.npmrc +++ b/.npmrc @@ -2,6 +2,5 @@ save=true ; We use a public Azure Artifacts mirror registry=https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/ -always-auth=true ; But we don't want references to it in the lockfile omit-lockfile-registry-resolved=true diff --git a/package-lock.json b/package-lock.json index 3f4322f053..30654e5a8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,57 +1,57 @@ { "name": "powershell", - "version": "2025.0.0", + "version": "2025.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "powershell", - "version": "2025.0.0", + "version": "2025.3.0", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { - "@vscode/extension-telemetry": "^0.9.8", + "@vscode/extension-telemetry": "^0.9.9", "node-fetch": "^2.7.0", - "semver": "^7.7.1", + "semver": "^7.7.2", "untildify": "^4.0.0", "uuid": "^9.0.1", "vscode-languageclient": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5" }, "devDependencies": { - "@vscode/vsce": "^3.3.0", - "esbuild": "^0.25.1" + "@vscode/vsce": "^3.3.2", + "esbuild": "^0.25.4" }, "engines": { "vscode": "^1.96.0" }, "optionalDependencies": { - "@tsconfig/node20": "^20.1.4", + "@tsconfig/node20": "^20.1.5", "@types/mocha": "^10.0.10", "@types/mock-fs": "^4.13.4", - "@types/node": "^20.17.24", + "@types/node": "^20.17.47", "@types/node-fetch": "^2.6.12", "@types/rewire": "^2.5.30", - "@types/semver": "^7.5.8", + "@types/semver": "^7.7.0", "@types/sinon": "^17.0.4", "@types/ungap__structured-clone": "^1.2.0", "@types/uuid": "^9.0.8", "@types/vscode": "~1.96.0", - "@typescript-eslint/eslint-plugin": "^8.26.1", - "@typescript-eslint/parser": "^8.26.1", + "@typescript-eslint/eslint-plugin": "^8.32.1", + "@typescript-eslint/parser": "^8.32.1", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", - "@vscode/test-electron": "^2.4.1", + "@vscode/test-electron": "^2.5.2", "eslint": "^8.57.0", "eslint-plugin-header": "^3.1.1", - "glob": "^11.0.1", - "mocha": "^11.1.0", + "glob": "^11.0.2", + "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", "mock-fs": "^5.5.0", "rewire": "^7.0.0", - "sinon": "^19.0.2", + "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "typescript": "^5.8.2" + "typescript": "^5.8.3" } }, "node_modules/@azure/abort-controller": { @@ -81,14 +81,14 @@ } }, "node_modules/@azure/core-client": { - "version": "1.9.3", - "integrity": "sha1-nKjzvccw0Q1Y9lycLJypkrwVu2c=", + "version": "1.9.4", + "integrity": "sha1-u5u4Xtx4D8ZWMLbY/6Fyw2M8qP4=", "dev": true, "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", "@azure/core-auth": "^1.4.0", - "@azure/core-rest-pipeline": "^1.9.1", + "@azure/core-rest-pipeline": "^1.20.0", "@azure/core-tracing": "^1.0.0", "@azure/core-util": "^1.6.1", "@azure/logger": "^1.0.0", @@ -99,8 +99,8 @@ } }, "node_modules/@azure/core-rest-pipeline": { - "version": "1.19.1", - "integrity": "sha1-50BnZER3egTcVWVthmATHf2SaSQ=", + "version": "1.20.0", + "integrity": "sha1-kW2NbJz/a1VvCwv9W5I1JtWQ4tk=", "dev": true, "license": "MIT", "dependencies": { @@ -109,8 +109,7 @@ "@azure/core-tracing": "^1.0.1", "@azure/core-util": "^1.11.0", "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "@typespec/ts-http-runtime": "^0.2.2", "tslib": "^2.6.2" }, "engines": { @@ -130,12 +129,13 @@ } }, "node_modules/@azure/core-util": { - "version": "1.11.0", - "integrity": "sha1-9TD8Z+c4rqhy+90cyEFucCGfrac=", + "version": "1.12.0", + "integrity": "sha1-C4woN+bWfD+66uIN80zwf2azSA0=", "dev": true, "license": "MIT", "dependencies": { "@azure/abort-controller": "^2.0.0", + "@typespec/ts-http-runtime": "^0.2.2", "tslib": "^2.6.2" }, "engines": { @@ -143,8 +143,8 @@ } }, "node_modules/@azure/identity": { - "version": "4.8.0", - "integrity": "sha1-aGaCaDpHDM9NuyWX7iNPnFxIOkA=", + "version": "4.9.1", + "integrity": "sha1-7kuUNfG5a+pZhefeyYl2CmfZoRk=", "dev": true, "license": "MIT", "dependencies": { @@ -156,11 +156,8 @@ "@azure/core-util": "^1.11.0", "@azure/logger": "^1.0.0", "@azure/msal-browser": "^4.2.0", - "@azure/msal-node": "^3.2.3", - "events": "^3.0.0", - "jws": "^4.0.0", + "@azure/msal-node": "^3.5.0", "open": "^10.1.0", - "stoppable": "^1.1.0", "tslib": "^2.2.0" }, "engines": { @@ -168,11 +165,12 @@ } }, "node_modules/@azure/logger": { - "version": "1.1.4", - "integrity": "sha1-Ijy/K0JN+mZHjOmk9XX1nG83l2g=", + "version": "1.2.0", + "integrity": "sha1-p5rvzdV9KpZgP6tZyaZuDZAipWQ=", "dev": true, "license": "MIT", "dependencies": { + "@typespec/ts-http-runtime": "^0.2.2", "tslib": "^2.6.2" }, "engines": { @@ -180,20 +178,20 @@ } }, "node_modules/@azure/msal-browser": { - "version": "4.7.0", - "integrity": "sha1-Zw2paD8QRqyzbuLYdJHz8suQrAE=", + "version": "4.12.0", + "integrity": "sha1-D2VoxA/BvvQVOh8p/OH8b/CddbQ=", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.2.1" + "@azure/msal-common": "15.6.0" }, "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-common": { - "version": "15.2.1", - "integrity": "sha1-XgVifQOLahGT7px3hsWMaQMeuOs=", + "version": "15.6.0", + "integrity": "sha1-B2TWRG7v85cCIZleJfJl/bIY2mY=", "dev": true, "license": "MIT", "engines": { @@ -201,12 +199,12 @@ } }, "node_modules/@azure/msal-node": { - "version": "3.3.0", - "integrity": "sha1-mW/uUq0neuBVj3SCrCZX9RZPyfE=", + "version": "3.5.3", + "integrity": "sha1-AveiNEosKZQ1SgzsElue+ajnEJs=", "dev": true, "license": "MIT", "dependencies": { - "@azure/msal-common": "15.2.1", + "@azure/msal-common": "15.6.0", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, @@ -224,8 +222,8 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.1", - "integrity": "sha1-wzz2u+40l1YmsBuARRy7crTGyR0=", + "version": "0.25.4", + "integrity": "sha1-gw1kdsu8oMAFE2rwcwNka0GfEWI=", "cpu": [ "ppc64" ], @@ -240,8 +238,8 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.1", - "integrity": "sha1-6E0r8v4uYXeg+s2jpXWyE5/Ty5w=", + "version": "0.25.4", + "integrity": "sha1-VmC9JQgFU90qKEOPKkAaKZWb2bE=", "cpu": [ "arm" ], @@ -256,8 +254,8 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.1", - "integrity": "sha1-6nZgFcfSZVFk8iEA0z1/AwiijW0=", + "version": "0.25.4", + "integrity": "sha1-0R1PwpkiTnKeIZDKytvMAOep/Wc=", "cpu": [ "arm64" ], @@ -272,8 +270,8 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.1", - "integrity": "sha1-WDN77jvG140QQl5VAL0RNwz9++0=", + "version": "0.25.4", + "integrity": "sha1-GN3ecFv5hOjNnv7FThmawYvHvuE=", "cpu": [ "x64" ], @@ -288,8 +286,8 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.1", - "integrity": "sha1-pGgFwcWF1FGqg75yUAvW6Eld1ZE=", + "version": "0.25.4", + "integrity": "sha1-sLf7VduPxvXeWgIHrphuucR2bmc=", "cpu": [ "arm64" ], @@ -304,8 +302,8 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.1", - "integrity": "sha1-BkPgA7sjjGP8k92+59JqADvjzZg=", + "version": "0.25.4", + "integrity": "sha1-5oE/3roLujVss1CkuAVD++Zr8m8=", "cpu": [ "x64" ], @@ -320,8 +318,8 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.1", - "integrity": "sha1-z/GNpUacCZhrk+h5ed5daHL+j44=", + "version": "0.25.4", + "integrity": "sha1-3BGnPTzNwwhWe5CLQ8ZpjoUHWb4=", "cpu": [ "arm64" ], @@ -336,8 +334,8 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.1", - "integrity": "sha1-Ni/AnC3hSYdiHBh4rxkgPEY2Xd4=", + "version": "0.25.4", + "integrity": "sha1-kdoI24vRv/XzGSTFeoHasm6ToUM=", "cpu": [ "x64" ], @@ -352,8 +350,8 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.1", - "integrity": "sha1-3878usYKIJGLGVabS2V4RNOds1o=", + "version": "0.25.4", + "integrity": "sha1-m5PD5UrEmi7eb5BucF1dkG9tueg=", "cpu": [ "arm" ], @@ -368,8 +366,8 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.1", - "integrity": "sha1-qpDVsC78l6Jx4STm0c6kkGNPdJg=", + "version": "0.25.4", + "integrity": "sha1-78FeRclFoIJwj5qfc7+o1NtJcoo=", "cpu": [ "arm64" ], @@ -384,8 +382,8 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.1", - "integrity": "sha1-b5UnB3zLeVPtKvAuAT1LrGnxN1Q=", + "version": "0.25.4", + "integrity": "sha1-vo7yw+HZn8otJcQWspfQA2BiNZY=", "cpu": [ "ia32" ], @@ -400,8 +398,8 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.1", - "integrity": "sha1-KH0kEqVFblhgwoOdQqS1EoTRaXw=", + "version": "0.25.4", + "integrity": "sha1-sIQKJwfD/ALuwojT+d76OCfNeoc=", "cpu": [ "loong64" ], @@ -416,8 +414,8 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.1", - "integrity": "sha1-UwV0ueG8XSD3pPRMXwReJvN4PVc=", + "version": "0.25.4", + "integrity": "sha1-KhmOWkWMnw51iBpOY9JroM+d858=", "cpu": [ "mips64el" ], @@ -432,8 +430,8 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.1", - "integrity": "sha1-XX5rKDoLMh6kLGvAq+ueuZwfVYk=", + "version": "0.25.4", + "integrity": "sha1-ZPSuC5I9fdcvuGC5si7bQgB8+PU=", "cpu": [ "ppc64" ], @@ -448,8 +446,8 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.1", - "integrity": "sha1-FPoM0HPCa07iRl0YzR4Y7qeFn6g=", + "version": "0.25.4", + "integrity": "sha1-+yhEsR/d3TninSkcfPgPmbDVFY0=", "cpu": [ "riscv64" ], @@ -464,8 +462,8 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.1", - "integrity": "sha1-5ne0udGzhAmHUiZsyqDVKkINwao=", + "version": "0.25.4", + "integrity": "sha1-FGaHbgqjVgx2c+Y/3ryCeHB7x1A=", "cpu": [ "s390x" ], @@ -480,8 +478,8 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.1", - "integrity": "sha1-8ceWt4//XOOTZYMT6MWGExmNmVQ=", + "version": "0.25.4", + "integrity": "sha1-wQ/eiZRV23y6XxGzvM+g5Bv00M0=", "cpu": [ "x64" ], @@ -496,8 +494,8 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.1", - "integrity": "sha1-DSgLff45c/ERsC1f6fMGO5J5bSk=", + "version": "0.25.4", + "integrity": "sha1-AuSD+8vj8Y8LAmEqlBt3vnbBEaQ=", "cpu": [ "arm64" ], @@ -512,8 +510,8 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.1", - "integrity": "sha1-vmY4k5MaS7PzoAnFzCT6loHMccA=", + "version": "0.25.4", + "integrity": "sha1-7EAfsLHtCsAdl4VkxfyGNO0dwu0=", "cpu": [ "x64" ], @@ -528,8 +526,8 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.1", - "integrity": "sha1-2QIbiEIzZzoF3BzCbeC/Ml2CQhc=", + "version": "0.25.4", + "integrity": "sha1-8nLC9Bz+odkbk9SHpRtcXKeoyMQ=", "cpu": [ "arm64" ], @@ -544,8 +542,8 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.1", - "integrity": "sha1-nx3BeG7S4pOMQEsGvMSL6aEyUN4=", + "version": "0.25.4", + "integrity": "sha1-LiWVC8EPqdseXIaOPVDET3wVD9c=", "cpu": [ "x64" ], @@ -560,8 +558,8 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.1", - "integrity": "sha1-iarCSktBFZWbP3kBks8TA5ZpbCc=", + "version": "0.25.4", + "integrity": "sha1-zVlvplpns7etxezVLZ9XM4MuGr0=", "cpu": [ "x64" ], @@ -576,8 +574,8 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.1", - "integrity": "sha1-NUNYZHpuqY6m0kO/SL3XpDSZlYI=", + "version": "0.25.4", + "integrity": "sha1-tNvLV7Ie6vgzHkJMOZm4nYlR3Ig=", "cpu": [ "arm64" ], @@ -592,8 +590,8 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.1", - "integrity": "sha1-jOpzQPJkfrqVGgQdyVZR45CM1Ms=", + "version": "0.25.4", + "integrity": "sha1-QQhC5dZtTs4XV2NOKXqHY164L3o=", "cpu": [ "ia32" ], @@ -608,8 +606,8 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.1", - "integrity": "sha1-fXmSLLLYj5BI8GOT2/YtLkrMtYQ=", + "version": "0.25.4", + "integrity": "sha1-CxfsinCyOFgn1SMUwSUxYKC5usw=", "cpu": [ "x64" ], @@ -624,8 +622,8 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.5.1", - "integrity": "sha1-sPx+BtDJT4AVN/1CN+3CcG07jkw=", + "version": "4.7.0", + "integrity": "sha1-YHCEYwxsAzmSoILebm+8GotSF1o=", "license": "MIT", "optional": true, "dependencies": { @@ -683,6 +681,15 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", @@ -804,11 +811,11 @@ } }, "node_modules/@microsoft/1ds-core-js": { - "version": "4.3.6", - "integrity": "sha1-ij5kU7+tdRYWVXVuaFV3ADBkTLI=", + "version": "4.3.7", + "integrity": "sha1-FJxFFfZdj+8/rUFHBAPCXyjBtTg=", "license": "MIT", "dependencies": { - "@microsoft/applicationinsights-core-js": "3.3.6", + "@microsoft/applicationinsights-core-js": "3.3.7", "@microsoft/applicationinsights-shims": "3.0.1", "@microsoft/dynamicproto-js": "^2.0.3", "@nevware21/ts-async": ">= 0.5.4 < 2.x", @@ -816,11 +823,11 @@ } }, "node_modules/@microsoft/1ds-post-js": { - "version": "4.3.6", - "integrity": "sha1-LqtgfXjzvgbo7sENHdj+LfCYW44=", + "version": "4.3.7", + "integrity": "sha1-WZMmulgiDEvJ15mv6qpIUTYMOmI=", "license": "MIT", "dependencies": { - "@microsoft/1ds-core-js": "4.3.6", + "@microsoft/1ds-core-js": "4.3.7", "@microsoft/applicationinsights-shims": "3.0.1", "@microsoft/dynamicproto-js": "^2.0.3", "@nevware21/ts-async": ">= 0.5.4 < 2.x", @@ -828,12 +835,12 @@ } }, "node_modules/@microsoft/applicationinsights-channel-js": { - "version": "3.3.6", - "integrity": "sha1-j2Xy0nKjoQzmLiQbvwxU4ggl9LA=", + "version": "3.3.7", + "integrity": "sha1-L2bpGOKmpj04dFVHVTV+B4iAwoM=", "license": "MIT", "dependencies": { - "@microsoft/applicationinsights-common": "3.3.6", - "@microsoft/applicationinsights-core-js": "3.3.6", + "@microsoft/applicationinsights-common": "3.3.7", + "@microsoft/applicationinsights-core-js": "3.3.7", "@microsoft/applicationinsights-shims": "3.0.1", "@microsoft/dynamicproto-js": "^2.0.3", "@nevware21/ts-async": ">= 0.5.4 < 2.x", @@ -844,11 +851,11 @@ } }, "node_modules/@microsoft/applicationinsights-common": { - "version": "3.3.6", - "integrity": "sha1-ztsTFhkPULKJ7qdwpA5m13dvLQo=", + "version": "3.3.7", + "integrity": "sha1-9DMqFxRh6rcEnAMuhWsFxCORQoE=", "license": "MIT", "dependencies": { - "@microsoft/applicationinsights-core-js": "3.3.6", + "@microsoft/applicationinsights-core-js": "3.3.7", "@microsoft/applicationinsights-shims": "3.0.1", "@microsoft/dynamicproto-js": "^2.0.3", "@nevware21/ts-utils": ">= 0.11.8 < 2.x" @@ -858,8 +865,8 @@ } }, "node_modules/@microsoft/applicationinsights-core-js": { - "version": "3.3.6", - "integrity": "sha1-H67qk13J6gu4UNdivPzPwBxvvXE=", + "version": "3.3.7", + "integrity": "sha1-K1qgXl8bq9kIctqkzhIHU5gHxrE=", "license": "MIT", "dependencies": { "@microsoft/applicationinsights-shims": "3.0.1", @@ -880,13 +887,13 @@ } }, "node_modules/@microsoft/applicationinsights-web-basic": { - "version": "3.3.6", - "integrity": "sha1-pbzH8lkvh50hs5BASydJPaz4aQ0=", + "version": "3.3.7", + "integrity": "sha1-k+LmSE7JmUgmWI+aROu84lQs2uU=", "license": "MIT", "dependencies": { - "@microsoft/applicationinsights-channel-js": "3.3.6", - "@microsoft/applicationinsights-common": "3.3.6", - "@microsoft/applicationinsights-core-js": "3.3.6", + "@microsoft/applicationinsights-channel-js": "3.3.7", + "@microsoft/applicationinsights-common": "3.3.7", + "@microsoft/applicationinsights-core-js": "3.3.7", "@microsoft/applicationinsights-shims": "3.0.1", "@microsoft/dynamicproto-js": "^2.0.3", "@nevware21/ts-async": ">= 0.5.4 < 2.x", @@ -913,8 +920,8 @@ } }, "node_modules/@nevware21/ts-utils": { - "version": "0.11.8", - "integrity": "sha1-WMk0qcPOq900v6AFVQOaYlV4Blw=", + "version": "0.12.3", + "integrity": "sha1-Rh/QUF/VeUh8hLNjzbtWvmFUid0=", "license": "MIT" }, "node_modules/@nodelib/fs.scandir": { @@ -1006,8 +1013,8 @@ "optional": true }, "node_modules/@tsconfig/node20": { - "version": "20.1.4", - "integrity": "sha1-NFfULt3xLTveOXYYarDNIrhd+Sg=", + "version": "20.1.5", + "integrity": "sha1-bl3DyQCIhlZpxVWhViUvddGoTAo=", "license": "MIT", "optional": true }, @@ -1027,8 +1034,8 @@ } }, "node_modules/@types/node": { - "version": "20.17.24", - "integrity": "sha1-IyVHaVTm/IwvEbnGHia6brfT9bY=", + "version": "20.17.47", + "integrity": "sha1-+cs3WZP//a5gnI4X0rPdjTxL+hQ=", "license": "MIT", "optional": true, "dependencies": { @@ -1052,8 +1059,8 @@ "optional": true }, "node_modules/@types/semver": { - "version": "7.5.8", - "integrity": "sha1-gmioxXo+Sr0lwWXs02I323lIpV4=", + "version": "7.7.0", + "integrity": "sha1-ZMRBva4DOzeLbu99DD13wym5N44=", "license": "MIT", "optional": true }, @@ -1091,20 +1098,20 @@ "optional": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.26.1", - "integrity": "sha1-PkjrhHkkFhhDsJLIeptlF2tTeC8=", + "version": "8.32.1", + "integrity": "sha1-kYWz6qOwg9gxiRDhLVbGizxPRbQ=", "license": "MIT", "optional": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.26.1", - "@typescript-eslint/type-utils": "8.26.1", - "@typescript-eslint/utils": "8.26.1", - "@typescript-eslint/visitor-keys": "8.26.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1120,15 +1127,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.26.1", - "integrity": "sha1-Di+RWkl1GfxD9Szy7L+mB/9W9y4=", + "version": "8.32.1", + "integrity": "sha1-GLDlMxXgvCKyYZ05iuSaloNwk14=", "license": "MIT", "optional": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.26.1", - "@typescript-eslint/types": "8.26.1", - "@typescript-eslint/typescript-estree": "8.26.1", - "@typescript-eslint/visitor-keys": "8.26.1", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -1144,13 +1151,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.26.1", - "integrity": "sha1-XmrQrCWMz3lGLpHD9Do/H38xpsw=", + "version": "8.32.1", + "integrity": "sha1-mmv1+yxTgOFP6dOMysbku+F+ivw=", "license": "MIT", "optional": true, "dependencies": { - "@typescript-eslint/types": "8.26.1", - "@typescript-eslint/visitor-keys": "8.26.1" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1161,15 +1168,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.26.1", - "integrity": "sha1-Ri8Lrgnecqxujhry6+WIwjIk1/g=", + "version": "8.32.1", + "integrity": "sha1-uSkqRfaezbfbdNFpblfRqJUU0h4=", "license": "MIT", "optional": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.26.1", - "@typescript-eslint/utils": "8.26.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1184,8 +1191,8 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.26.1", - "integrity": "sha1-1ZeHIWcM/yYzSNUGJ3M4kjGmQTI=", + "version": "8.32.1", + "integrity": "sha1-sZ/krA3Agxe64M6ewRaBI1dsHUs=", "license": "MIT", "optional": true, "engines": { @@ -1197,19 +1204,19 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.26.1", - "integrity": "sha1-6w5M4xdTaD2DvlNEGkCf1fCzSv0=", + "version": "8.32.1", + "integrity": "sha1-kCNyDKTs9PWcJ1oFtf7WmxJ2+s4=", "license": "MIT", "optional": true, "dependencies": { - "@typescript-eslint/types": "8.26.1", - "@typescript-eslint/visitor-keys": "8.26.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1223,15 +1230,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.26.1", - "integrity": "sha1-VMxYRplV8lV39ll1O3Gg4RegU58=", + "version": "8.32.1", + "integrity": "sha1-TW1dKbnlGemoXpp06fe9tYq+lwQ=", "license": "MIT", "optional": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.26.1", - "@typescript-eslint/types": "8.26.1", - "@typescript-eslint/typescript-estree": "8.26.1" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1246,12 +1253,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.26.1", - "integrity": "sha1-xSZ/zIJ5XPECgDYwI4N96srSZHw=", + "version": "8.32.1", + "integrity": "sha1-QyE5XMVcLrRgNsu7A+EBmU0R3co=", "license": "MIT", "optional": true, "dependencies": { - "@typescript-eslint/types": "8.26.1", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1274,6 +1281,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.2.2", + "integrity": "sha1-oMdFjtmarm1+si78F6g5zsC0obM=", + "dev": true, + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "integrity": "sha1-0Gu7OE689sUF/eHD0O1N3/4Kr/g=", @@ -1287,8 +1308,8 @@ "optional": true }, "node_modules/@vscode/extension-telemetry": { - "version": "0.9.8", - "integrity": "sha1-EJqdteCdWwX5QDo/72DVljtmj8M=", + "version": "0.9.9", + "integrity": "sha1-WIROcqx4YOsEl4mFRcLE9YCWRl4=", "license": "MIT", "dependencies": { "@microsoft/1ds-core-js": "^4.3.4", @@ -1300,15 +1321,15 @@ } }, "node_modules/@vscode/test-electron": { - "version": "2.4.1", - "integrity": "sha1-XCdgZAv2ku+9qhi6/NNftRloiUE=", + "version": "2.5.2", + "integrity": "sha1-99QHjoIwzpyUMi8qKcwWwXlUCF0=", "license": "MIT", "optional": true, "dependencies": { "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", "jszip": "^3.10.1", - "ora": "^7.0.1", + "ora": "^8.1.0", "semver": "^7.6.2" }, "engines": { @@ -1316,8 +1337,8 @@ } }, "node_modules/@vscode/vsce": { - "version": "3.3.0", - "integrity": "sha1-gD5BNoqV01aTzgSQdlA/NPif3gk=", + "version": "3.3.2", + "integrity": "sha1-G7hiIph4FNuzIXw/i+/WPyScgQE=", "dev": true, "license": "MIT", "dependencies": { @@ -1559,15 +1580,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.3", - "integrity": "sha1-N2ETQOsiQ+cMxgTK011jJw1IeBs=", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", @@ -1589,19 +1601,6 @@ "node": ">=4" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "integrity": "sha1-eQxYsZuhcgqEIFtXxhjVrYUklz4=", - "license": "ISC", - "optional": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", @@ -1632,6 +1631,7 @@ "node_modules/base64-js": { "version": "1.5.1", "integrity": "sha1-GxtEAWClv3rUC2UPCVljSBkDkwo=", + "dev": true, "funding": [ { "type": "github", @@ -1649,25 +1649,14 @@ "license": "MIT", "optional": true }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "integrity": "sha1-9uFKl4WNMnJSIAJC1Mz+UixEVSI=", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bl": { - "version": "5.1.0", - "integrity": "sha1-GDcV9njHGI7O+f5HXZAglABiQnM=", + "version": "4.1.0", + "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", + "dev": true, "license": "MIT", "optional": true, "dependencies": { - "buffer": "^6.0.3", + "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } @@ -1675,6 +1664,7 @@ "node_modules/bl/node_modules/readable-stream": { "version": "3.6.2", "integrity": "sha1-VqmzbqllwAxak+8x6xEaDxEFaWc=", + "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -1719,8 +1709,9 @@ "optional": true }, "node_modules/buffer": { - "version": "6.0.3", - "integrity": "sha1-Ks5XhFnMj74qcKqo9S7mO2p0xsY=", + "version": "5.7.1", + "integrity": "sha1-umLnwTEzBTWCGXFghRqPZI6Z7tA=", + "dev": true, "funding": [ { "type": "github", @@ -1739,7 +1730,7 @@ "optional": true, "dependencies": { "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "ieee754": "^1.1.13" } }, "node_modules/buffer-crc32": { @@ -1885,39 +1876,18 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "integrity": "sha1-GXxsxmnvKo3F57TZfuTgksPrDVs=", + "version": "4.0.3", + "integrity": "sha1-e+N6TAPJruHs/oYqSiOyxwwgXTA=", "license": "MIT", "optional": true, "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" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "integrity": "sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=", - "license": "ISC", - "optional": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/chownr": { @@ -1928,15 +1898,15 @@ "optional": true }, "node_modules/cli-cursor": { - "version": "4.0.0", - "integrity": "sha1-POz+NzS/T+Aqg2HL3A9v4oxqV+o=", + "version": "5.0.0", + "integrity": "sha1-JKSDHs9aawHd6zL7caSyCIsNzjg=", "license": "MIT", "optional": true, "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" @@ -2138,8 +2108,8 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "integrity": "sha1-Kz8q6i/+t3ZHdGAmc3fchxD6uoo=", + "version": "4.4.1", + "integrity": "sha1-5ai8bLxMbNPmQwiwaTo9T6VQGJs=", "devOptional": true, "license": "MIT", "dependencies": { @@ -2248,8 +2218,8 @@ } }, "node_modules/detect-libc": { - "version": "2.0.3", - "integrity": "sha1-8M1QO0D5k5uJRpfRmtUIleMM9wA=", + "version": "2.0.4", + "integrity": "sha1-8EcVuLqBXlO02BCWVbZQimhlp+g=", "dev": true, "license": "Apache-2.0", "optional": true, @@ -2449,8 +2419,8 @@ } }, "node_modules/esbuild": { - "version": "0.25.1", - "integrity": "sha1-oWuNBwtq1IcZNSd72mzP6FLj+i8=", + "version": "0.25.4", + "integrity": "sha1-u5oWM01O8sM8cwGpJLi4YzUaCFQ=", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -2461,31 +2431,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.1", - "@esbuild/android-arm": "0.25.1", - "@esbuild/android-arm64": "0.25.1", - "@esbuild/android-x64": "0.25.1", - "@esbuild/darwin-arm64": "0.25.1", - "@esbuild/darwin-x64": "0.25.1", - "@esbuild/freebsd-arm64": "0.25.1", - "@esbuild/freebsd-x64": "0.25.1", - "@esbuild/linux-arm": "0.25.1", - "@esbuild/linux-arm64": "0.25.1", - "@esbuild/linux-ia32": "0.25.1", - "@esbuild/linux-loong64": "0.25.1", - "@esbuild/linux-mips64el": "0.25.1", - "@esbuild/linux-ppc64": "0.25.1", - "@esbuild/linux-riscv64": "0.25.1", - "@esbuild/linux-s390x": "0.25.1", - "@esbuild/linux-x64": "0.25.1", - "@esbuild/netbsd-arm64": "0.25.1", - "@esbuild/netbsd-x64": "0.25.1", - "@esbuild/openbsd-arm64": "0.25.1", - "@esbuild/openbsd-x64": "0.25.1", - "@esbuild/sunos-x64": "0.25.1", - "@esbuild/win32-arm64": "0.25.1", - "@esbuild/win32-ia32": "0.25.1", - "@esbuild/win32-x64": "0.25.1" + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" } }, "node_modules/escalade": { @@ -2678,6 +2648,15 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", @@ -2761,15 +2740,6 @@ "node": ">=0.10.0" } }, - "node_modules/events": { - "version": "3.3.0", - "integrity": "sha1-Mala0Kkk4tLEGagTrrLE6HjqdAA=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/expand-template": { "version": "2.0.3", "integrity": "sha1-bhSz/O4POmNA7LV9LokYaSBSpHw=", @@ -2957,19 +2927,6 @@ "license": "ISC", "optional": true }, - "node_modules/fsevents": { - "version": "2.3.3", - "integrity": "sha1-ysZAd4XQNnWipeGlMFxpezR9kNY=", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "integrity": "sha1-LALYZNl/PqbIgwxGTL0Rq26rehw=", @@ -2988,6 +2945,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "integrity": "sha1-IbQHHuWO0E7g22UzcbVbQpmHU4k=", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "integrity": "sha1-dD8OO2lkqTpUke0b/6rgVNf5jQE=", @@ -3033,8 +3002,8 @@ "optional": true }, "node_modules/glob": { - "version": "11.0.1", - "integrity": "sha1-HDrvmlnWgOYRtT3NJLuGOc7wZNk=", + "version": "11.0.2", + "integrity": "sha1-MmHjiXu8YDAwsEH9d7pjYCLVHOA=", "devOptional": true, "license": "ISC", "dependencies": { @@ -3244,6 +3213,7 @@ "node_modules/ieee754": { "version": "1.2.1", "integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I=", + "dev": true, "funding": [ { "type": "github", @@ -3262,8 +3232,8 @@ "optional": true }, "node_modules/ignore": { - "version": "5.3.2", - "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", + "version": "7.0.4", + "integrity": "sha1-oSxw0PJgfFv1CPtlpAx18DfXoHg=", "license": "MIT", "optional": true, "engines": { @@ -3324,18 +3294,6 @@ "license": "ISC", "optional": true }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "integrity": "sha1-6h9/O4DwZCNug0cPhsCcJU+0Wwk=", - "license": "MIT", - "optional": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-docker": { "version": "3.0.0", "integrity": "sha1-kAk6oxBid9inelkQ265xdH4VogA=", @@ -3550,27 +3508,6 @@ "npm": ">=6" } }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "integrity": "sha1-dDwymFy56YZVUw1TZBtmyGRbA5o=", - "dev": true, - "license": "MIT", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jsonwebtoken/node_modules/jws": { - "version": "3.2.2", - "integrity": "sha1-ABCZ82OUaMlBQADpmZX6UvtHgwQ=", - "dev": true, - "license": "MIT", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, "node_modules/jszip": { "version": "3.10.1", "integrity": "sha1-NK7nDrGOofrsL1iSCKFX0f6wkcI=", @@ -3590,23 +3527,23 @@ "optional": true }, "node_modules/jwa": { - "version": "2.0.0", - "integrity": "sha1-p+nD8p2ulAJ+vK9Jl1yTRVk0EPw=", + "version": "1.4.2", + "integrity": "sha1-FgEaxttI3nsQJ3fleJeQFSDux7k=", "dev": true, "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "node_modules/jws": { - "version": "4.0.0", - "integrity": "sha1-LU6M9qMY/6oSYV6d7H6G5slzEPQ=", + "version": "3.2.2", + "integrity": "sha1-ABCZ82OUaMlBQADpmZX6UvtHgwQ=", "dev": true, "license": "MIT", "dependencies": { - "jwa": "^2.0.0", + "jwa": "^1.4.1", "safe-buffer": "^5.0.1" } }, @@ -3931,13 +3868,16 @@ "node": ">= 0.6" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "integrity": "sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=", + "node_modules/mimic-function": { + "version": "5.0.1", + "integrity": "sha1-rL4rM0n5m53qyn+3Dki4PpTmcHY=", "license": "MIT", "optional": true, "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mimic-response": { @@ -3995,14 +3935,13 @@ "optional": true }, "node_modules/mocha": { - "version": "11.1.0", - "integrity": "sha1-INfGrE1ta8tgqKpHlx/KdMZcPGY=", + "version": "11.2.2", + "integrity": "sha1-Lf78llLedGOJ9ShoiANCObZIYjE=", "license": "MIT", "optional": true, "dependencies": { - "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", - "chokidar": "^3.5.3", + "chokidar": "^4.0.1", "debug": "^4.3.5", "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", @@ -4013,6 +3952,7 @@ "log-symbols": "^4.1.0", "minimatch": "^5.1.6", "ms": "^2.1.3", + "picocolors": "^1.1.1", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", @@ -4222,8 +4162,8 @@ } }, "node_modules/node-abi": { - "version": "3.74.0", - "integrity": "sha1-W/tEJCZOrrkUMtKtudojxjowHtA=", + "version": "3.75.0", + "integrity": "sha1-L5KakakKDQKzJcQ3MTFIAjV+12Q=", "dev": true, "license": "MIT", "optional": true, @@ -4260,15 +4200,6 @@ } } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "integrity": "sha1-Dc1p/yOhybEf0JeDFmRKA4ghamU=", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/nth-check": { "version": "2.1.1", "integrity": "sha1-yeq0KO/842zWuSySS9sADvHx7R0=", @@ -4303,23 +4234,23 @@ } }, "node_modules/onetime": { - "version": "5.1.2", - "integrity": "sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=", + "version": "7.0.0", + "integrity": "sha1-nxbJLYye9RIOOs2d2ZV8zuzBq2A=", "license": "MIT", "optional": true, "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/open": { - "version": "10.1.0", - "integrity": "sha1-p3lebl1Rmr5ChtmTe7JLURIlmOE=", + "version": "10.1.2", + "integrity": "sha1-1d9AmEdVyanDyT34FWoSRn6IKSU=", "dev": true, "license": "MIT", "dependencies": { @@ -4353,23 +4284,23 @@ } }, "node_modules/ora": { - "version": "7.0.1", - "integrity": "sha1-zdUw7Nhl/jnkUaDnaXhlZpyxGTA=", + "version": "8.2.0", + "integrity": "sha1-j7u3FRr+M7VA3RU/Fx/6i9OOmGE=", "license": "MIT", "optional": true, "dependencies": { "chalk": "^5.3.0", - "cli-cursor": "^4.0.0", - "cli-spinners": "^2.9.0", + "cli-cursor": "^5.0.0", + "cli-spinners": "^2.9.2", "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", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.2", + "string-width": "^7.2.0", "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4406,26 +4337,38 @@ "optional": true }, "node_modules/ora/node_modules/is-unicode-supported": { - "version": "1.3.0", - "integrity": "sha1-2CSYS2FsKSouGYIH1KYJmDhC9xQ=", + "version": "2.1.0", + "integrity": "sha1-CfCrDebTdE1I0mXruY9l0R8qmzo=", "license": "MIT", "optional": true, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ora/node_modules/log-symbols": { - "version": "5.1.0", - "integrity": "sha1-og47ml9T+sauuOK7IsB88sjxbZM=", + "version": "6.0.0", + "integrity": "sha1-u5Xl8FMiZRysMMD+tkBPnyqKlDk=", "license": "MIT", "optional": true, "dependencies": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "integrity": "sha1-2CSYS2FsKSouGYIH1KYJmDhC9xQ=", + "license": "MIT", + "optional": true, "engines": { "node": ">=12" }, @@ -4434,17 +4377,17 @@ } }, "node_modules/ora/node_modules/string-width": { - "version": "6.1.0", - "integrity": "sha1-lkiNbtI/mtXYLRNSKvnkxMP9dRg=", + "version": "7.2.0", + "integrity": "sha1-tbuOIWXOJ11NQ0dt0nAK2Qkdttw=", "license": "MIT", "optional": true, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^10.2.1", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4538,12 +4481,12 @@ } }, "node_modules/parse5": { - "version": "7.2.1", - "integrity": "sha1-iSj1WRXmEl9DDMRDCXZb8XVWozo=", + "version": "7.3.0", + "integrity": "sha1-1+Ik+nI5nHoXUJn0X8KtAksF7AU=", "dev": true, "license": "MIT", "dependencies": { - "entities": "^4.5.0" + "entities": "^6.0.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -4574,6 +4517,18 @@ "url": "https://github.com/inikulin/parse5?sponsor=1" } }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.0", + "integrity": "sha1-CcninLebCmRZqbnbnvtBisW7jlE=", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/path-exists": { "version": "4.0.0", "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", @@ -4618,8 +4573,8 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.0.2", - "integrity": "sha1-+9jnz4IR9efl2RkFxBWj9VdVyjk=", + "version": "11.1.0", + "integrity": "sha1-r6+wYGBxCBMtvBz4rmYa+2lIYRc=", "devOptional": true, "license": "ISC", "engines": { @@ -4641,6 +4596,12 @@ "dev": true, "license": "MIT" }, + "node_modules/picocolors": { + "version": "1.1.1", + "integrity": "sha1-PTIa8+q5ObCDyPkpodEs2oHCa2s=", + "license": "ISC", + "optional": true + }, "node_modules/picomatch": { "version": "2.3.1", "integrity": "sha1-O6ODNzNkbZ0+SZWUbBNlpn+wekI=", @@ -4828,15 +4789,16 @@ "optional": true }, "node_modules/readdirp": { - "version": "3.6.0", - "integrity": "sha1-dKNwvYVxFuJFspzJc0DNQxoCpsc=", + "version": "4.1.2", + "integrity": "sha1-64WAFDX78qfuWPGeCSGwaPxplI0=", "license": "MIT", "optional": true, - "dependencies": { - "picomatch": "^2.2.1" - }, "engines": { - "node": ">=8.10.0" + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/require-directory": { @@ -4858,27 +4820,21 @@ } }, "node_modules/restore-cursor": { - "version": "4.0.0", - "integrity": "sha1-UZVgpDGJdQlt725gnUQQDtqkzLk=", + "version": "5.1.0", + "integrity": "sha1-B2bZVpnvrLFBUJk/VbrwlT6h6+c=", "license": "MIT", "optional": true, "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/signal-exit": { - "version": "3.0.7", - "integrity": "sha1-qaF2f4r4QVURTqq9c/mSc8j1mtk=", - "license": "ISC", - "optional": true - }, "node_modules/reusify": { "version": "1.1.0", "integrity": "sha1-D+E7lSLhRz9RtVjueW4I8R+bSJ8=", @@ -5023,8 +4979,8 @@ "license": "ISC" }, "node_modules/semver": { - "version": "7.7.1", - "integrity": "sha1-q9UJjYKxjGyB9gdP8mR/0+ciDJ8=", + "version": "7.7.2", + "integrity": "sha1-Z9mf3NNc7CHm+Lh6f9UVoz+YK1g=", "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -5201,13 +5157,13 @@ } }, "node_modules/sinon": { - "version": "19.0.2", - "integrity": "sha1-lEz3cdIiNqqE/Bq3DOW//DohXa0=", + "version": "19.0.5", + "integrity": "sha1-ZP0vhHhqBD9yEkbECza+9MS3azw=", "license": "BSD-3-Clause", "optional": true, "dependencies": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.2", + "@sinonjs/fake-timers": "^13.0.5", "@sinonjs/samsam": "^8.0.1", "diff": "^7.0.0", "nise": "^6.1.1", @@ -5280,30 +5236,17 @@ } }, "node_modules/stdin-discarder": { - "version": "0.1.0", - "integrity": "sha1-IrPkADk6jijr9T+ZWPOIBiLv3iE=", + "version": "0.2.2", + "integrity": "sha1-OQA39ExK4aGuU1xf443Dq6jZl74=", "license": "MIT", "optional": true, - "dependencies": { - "bl": "^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/stoppable": { - "version": "1.1.0", - "integrity": "sha1-MtpWjoPqSIsI5NfqLDvMnXUBXVs=", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", @@ -5463,43 +5406,6 @@ "node": ">=6" } }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.1.0", - "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/buffer": { - "version": "5.7.1", - "integrity": "sha1-umLnwTEzBTWCGXFghRqPZI6Z7tA=", - "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", - "optional": true, - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/tar-stream/node_modules/readable-stream": { "version": "3.6.2", "integrity": "sha1-VqmzbqllwAxak+8x6xEaDxEFaWc=", @@ -5554,8 +5460,8 @@ "license": "MIT" }, "node_modules/ts-api-utils": { - "version": "2.0.1", - "integrity": "sha1-ZgcpOFtiW5OaqlgFT0XAWPM/EM0=", + "version": "2.1.0", + "integrity": "sha1-WV9wlORu7TZME/0j51+VE9Kbr5E=", "license": "MIT", "optional": true, "engines": { @@ -5637,8 +5543,8 @@ } }, "node_modules/typescript": { - "version": "5.8.2", - "integrity": "sha1-gXCzcC90t52y5aliB8FeZYB5meQ=", + "version": "5.8.3", + "integrity": "sha1-kvij5ePPSXNW9BeMNM1lp/XoRA4=", "license": "Apache-2.0", "optional": true, "bin": { @@ -5662,8 +5568,8 @@ "license": "MIT" }, "node_modules/undici": { - "version": "6.21.2", - "integrity": "sha1-ScWITo+QOcZaie6QGO88ji8fSSg=", + "version": "6.21.3", + "integrity": "sha1-GFdSrZLD0O/np9H2hUpQ+DtVLXo=", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 07a84d1130..c468d16fb4 100644 --- a/package.json +++ b/package.json @@ -60,46 +60,46 @@ "onCommand:PowerShell.SpecifyScriptArgs" ], "dependencies": { - "@vscode/extension-telemetry": "^0.9.8", + "@vscode/extension-telemetry": "^0.9.9", "node-fetch": "^2.7.0", - "semver": "^7.7.1", + "semver": "^7.7.2", "untildify": "^4.0.0", "uuid": "^9.0.1", "vscode-languageclient": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5" }, "devDependencies": { - "@vscode/vsce": "^3.3.0", - "esbuild": "^0.25.1" + "@vscode/vsce": "^3.3.2", + "esbuild": "^0.25.4" }, "optionalDependencies": { - "@tsconfig/node20": "^20.1.4", + "@tsconfig/node20": "^20.1.5", "@types/mocha": "^10.0.10", "@types/mock-fs": "^4.13.4", - "@types/node": "^20.17.24", + "@types/node": "^20.17.47", "@types/node-fetch": "^2.6.12", "@types/rewire": "^2.5.30", - "@types/semver": "^7.5.8", + "@types/semver": "^7.7.0", "@types/sinon": "^17.0.4", "@types/ungap__structured-clone": "^1.2.0", "@types/uuid": "^9.0.8", "@types/vscode": "~1.96.0", - "@typescript-eslint/eslint-plugin": "^8.26.1", - "@typescript-eslint/parser": "^8.26.1", + "@typescript-eslint/eslint-plugin": "^8.32.1", + "@typescript-eslint/parser": "^8.32.1", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", - "@vscode/test-electron": "^2.4.1", + "@vscode/test-electron": "^2.5.2", "eslint": "^8.57.0", "eslint-plugin-header": "^3.1.1", - "glob": "^11.0.1", - "mocha": "^11.1.0", + "glob": "^11.0.2", + "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", "mock-fs": "^5.5.0", "rewire": "^7.0.0", - "sinon": "^19.0.2", + "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "typescript": "^5.8.2" + "typescript": "^5.8.3" }, "extensionDependencies": [ "vscode.powershell" From c41078fdbf52b29a059b31c3e8ffadde7bd9fdf3 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 14 May 2025 15:59:28 -0700 Subject: [PATCH 2/4] WIP: Upgrading --- .eslintrc.json | 75 --- .mocharc.json | 8 +- .prettierignore | 0 .prettierrc | 4 + eslint.config.mjs | 48 ++ package-lock.json | 1223 ++++++++++++++++++++++++++++-------- package.json | 21 +- src/platform.ts | 4 +- test/core/platform.test.ts | 327 ++++++---- test/runTests.ts | 4 +- test/runTestsInner.ts | 5 +- tsconfig.json | 26 +- 12 files changed, 1229 insertions(+), 516 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 369478b085..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/stylistic-type-checked", - "plugin:@typescript-eslint/strict-type-checked" - ], - "overrides": [], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module", - "tsconfigRootDir": ".", - "project": true - }, - "plugins": [ - "@typescript-eslint", - "header" - ], - "rules": { - "indent": [ - "error", - 4 - ], - "quotes": [ - "error", - "double" - ], - "semi": [ - "error", - "always" - ], - "@typescript-eslint/explicit-function-return-type": "error", - "@typescript-eslint/no-empty-object-type": "off", - "@typescript-eslint/no-floating-promises": [ - "error", - { - "ignoreVoid": true - } - ], - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-require-imports": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_" - } - ], - "@typescript-eslint/no-unsafe-argument": "off", - "@typescript-eslint/no-unsafe-assignment": "off", - "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/prefer-nullish-coalescing": [ - "error", - { - "ignoreConditionalTests": true, - "ignoreMixedLogicalExpressions": true - } - ], - "header/header": [ - 2, - "line", - [ - " Copyright (c) Microsoft Corporation.", - " Licensed under the MIT License." - ], - 2 - ] - } -} diff --git a/.mocharc.json b/.mocharc.json index 38eeea86ca..d2812863bc 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,12 +1,8 @@ { + "require": "tsx", "color": true, "enable-source-maps": true, - "extensions": [ - ".js", - ".jsx" - ], - "require": "source-map-support/register", "timeout": 600000, "slow": 2000, - "spec": "test/**/*.test.js" + "spec": "test/**/*.test.ts" } diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000000..aa0e168c9f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "tabWidth": 2, + "plugins": ["prettier-plugin-organize-imports"] +} diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000000..2defcb800f --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,48 @@ +import eslint from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier/flat"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + eslint.configs.recommended, + tseslint.configs.strictTypeChecked, + eslintConfigPrettier, + { + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + rules: { + "@typescript-eslint/explicit-function-return-type": "error", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-floating-promises": [ + "error", + { + ignoreVoid: true, + }, + ], + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + argsIgnorePattern: "^_", + }, + ], + "@typescript-eslint/no-unsafe-argument": "off", + "@typescript-eslint/no-unsafe-assignment": "off", + "@typescript-eslint/no-unsafe-call": "off", + "@typescript-eslint/no-unsafe-member-access": "off", + "@typescript-eslint/no-unsafe-return": "off", + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/prefer-nullish-coalescing": [ + "error", + { + ignoreConditionalTests: true, + ignoreMixedLogicalExpressions: true, + }, + ], + }, + }, +); diff --git a/package-lock.json b/package-lock.json index 30654e5a8a..a1f280b2a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "vscode": "^1.96.0" }, "optionalDependencies": { - "@tsconfig/node20": "^20.1.5", + "@eslint/js": "^9.26.0", "@types/mocha": "^10.0.10", "@types/mock-fs": "^4.13.4", "@types/node": "^20.17.47", @@ -36,22 +36,23 @@ "@types/ungap__structured-clone": "^1.2.0", "@types/uuid": "^9.0.8", "@types/vscode": "~1.96.0", - "@typescript-eslint/eslint-plugin": "^8.32.1", - "@typescript-eslint/parser": "^8.32.1", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", "@vscode/test-electron": "^2.5.2", - "eslint": "^8.57.0", - "eslint-plugin-header": "^3.1.1", + "eslint": "^9.26.0", + "eslint-config-prettier": "^10.1.5", "glob": "^11.0.2", "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", "mock-fs": "^5.5.0", - "rewire": "^7.0.0", + "prettier": "^3.5.3", + "prettier-plugin-organize-imports": "^4.1.0", "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "typescript": "^5.8.3" + "tsx": "^4.19.4", + "typescript": "^5.8.3", + "typescript-eslint": "^8.32.1" } }, "node_modules/@azure/abort-controller": { @@ -227,7 +228,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -243,7 +243,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -259,7 +258,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -275,7 +273,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -291,7 +288,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -307,7 +303,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -323,7 +318,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -339,7 +333,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -355,7 +348,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -371,7 +363,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -387,7 +378,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -403,7 +393,6 @@ "cpu": [ "loong64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -419,7 +408,6 @@ "cpu": [ "mips64el" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -435,7 +423,6 @@ "cpu": [ "ppc64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -451,7 +438,6 @@ "cpu": [ "riscv64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -467,7 +453,6 @@ "cpu": [ "s390x" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -483,7 +468,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -499,7 +483,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -515,7 +498,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -531,7 +513,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -547,7 +528,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -563,7 +543,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -579,7 +558,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -595,7 +573,6 @@ "cpu": [ "ia32" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -611,7 +588,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -648,16 +624,73 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.20.0", + "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "optional": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.2.2", + "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.13.0", + "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "integrity": "sha1-OIomnw8lwbatwxe1osVXFIlMcK0=", + "version": "3.3.1", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", "license": "MIT", "optional": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", @@ -665,7 +698,7 @@ "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -673,7 +706,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { "version": "1.1.11", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "license": "MIT", "optional": true, "dependencies": { @@ -683,7 +716,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "5.3.2", - "integrity": "sha1-PNQOcp82Q/2HywTlC/DrcivFlvU=", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "license": "MIT", "optional": true, "engines": { @@ -692,7 +725,7 @@ }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { "version": "3.1.2", - "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "license": "ISC", "optional": true, "dependencies": { @@ -703,48 +736,69 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "integrity": "sha1-pUF66EJ4c/HdCLcLNXS0U+Z7X38=", + "version": "9.26.0", + "integrity": "sha512-I9XlJawFdSMvWjDt6wksMCrgns5ggLNfFwFvnShsleWruvXM514Qxk8V246efTw+eo9JABvVz+u3q2RiAowKxQ==", "license": "MIT", "optional": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "integrity": "sha1-145IGgOfdWbsyWYLTqf+ax/sRCs=", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.8", + "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", "license": "Apache-2.0", "optional": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.13.0", + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "license": "MIT", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "license": "Apache-2.0", "optional": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", - "license": "ISC", + "node_modules/@humanfs/node": { + "version": "0.16.6", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "license": "Apache-2.0", "optional": true, "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/module-importer": { @@ -760,11 +814,18 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "integrity": "sha1-Siho111taWPkI7z5C3/RvjQ0CdM=", - "license": "BSD-3-Clause", - "optional": true + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", @@ -911,6 +972,27 @@ "@nevware21/ts-utils": ">= 0.10.4 < 2.x" } }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.11.2", + "integrity": "sha512-H9vwztj5OAqHg9GockCQC06k1natgcxWQSRpQcPJf6i5+MWBzfKkRtxGbjQf0X2ihii0ffLZCRGbYV2f2bjNCQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.3", + "eventsource": "^3.0.2", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.23.8", + "zod-to-json-schema": "^3.24.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@nevware21/ts-async": { "version": "0.5.4", "integrity": "sha1-UvhEndCzsWqjF6GLRmL2+xOhNfE=", @@ -1012,9 +1094,15 @@ "license": "(Unlicense OR Apache-2.0)", "optional": true }, - "node_modules/@tsconfig/node20": { - "version": "20.1.5", - "integrity": "sha1-bl3DyQCIhlZpxVWhViUvddGoTAo=", + "node_modules/@types/estree": { + "version": "1.0.7", + "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "license": "MIT", + "optional": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT", "optional": true }, @@ -1534,9 +1622,43 @@ "node": "*" } }, + "node_modules/accepts": { + "version": "2.0.0", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "optional": true, + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-db": { + "version": "1.54.0", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/mime-types": { + "version": "3.0.1", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.14.1", - "integrity": "sha1-ch1dwQ99W1YJqJF3PUdzF5aTXfs=", + "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", "license": "MIT", "optional": true, "bin": { @@ -1548,7 +1670,7 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "integrity": "sha1-ftW7VZCLOy8bxVxq8WU7rafweTc=", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "license": "MIT", "optional": true, "peerDependencies": { @@ -1566,7 +1688,7 @@ }, "node_modules/ajv": { "version": "6.12.6", - "integrity": "sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "license": "MIT", "optional": true, "dependencies": { @@ -1676,6 +1798,26 @@ "node": ">= 6" } }, + "node_modules/body-parser": { + "version": "2.2.0", + "integrity": "sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==", + "license": "MIT", + "optional": true, + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.0", + "http-errors": "^2.0.0", + "iconv-lite": "^0.6.3", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.0", + "type-is": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/boolbase": { "version": "1.0.0", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", @@ -1769,6 +1911,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bytes": { + "version": "3.1.2", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "integrity": "sha1-S1QowiK+mF15w9gmV0edvgtZstY=", @@ -1785,7 +1936,7 @@ "node_modules/call-bound": { "version": "1.0.4", "integrity": "sha1-I43pNdKippKSjFOMfM+pEGf9Bio=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -1800,7 +1951,7 @@ }, "node_modules/callsites": { "version": "3.1.0", - "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "license": "MIT", "optional": true, "engines": { @@ -2059,12 +2210,64 @@ "devOptional": true, "license": "MIT" }, + "node_modules/content-disposition": { + "version": "1.0.0", + "integrity": "sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==", + "license": "MIT", + "optional": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6.6.0" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "integrity": "sha1-pgQtNjTCsn6TKPg3uWX6yDgI24U=", "license": "MIT", "optional": true }, + "node_modules/cors": { + "version": "2.8.5", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "optional": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "integrity": "sha1-ilj+ePANzXDDcEUXWd+/rwPo7p8=", @@ -2217,6 +2420,15 @@ "node": ">=0.4.0" } }, + "node_modules/depd": { + "version": "2.0.0", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/detect-libc": { "version": "2.0.4", "integrity": "sha1-8EcVuLqBXlO02BCWVbZQimhlp+g=", @@ -2236,18 +2448,6 @@ "node": ">=0.3.1" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "integrity": "sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=", - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-serializer": { "version": "2.0.0", "integrity": "sha1-5BuALh7t+fbK4YPOXmIteJ19jlM=", @@ -2332,12 +2532,27 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/ee-first": { + "version": "1.1.1", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT", + "optional": true + }, "node_modules/emoji-regex": { "version": "9.2.2", "integrity": "sha1-hAyIA7DYBH9P8M+WMXazLU7z7XI=", "devOptional": true, "license": "MIT" }, + "node_modules/encodeurl": { + "version": "2.0.0", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/encoding-sniffer": { "version": "0.2.0", "integrity": "sha1-eZVp1m1EO6voKvGMn0A0mDZe8dU=", @@ -2421,7 +2636,7 @@ "node_modules/esbuild": { "version": "0.25.4", "integrity": "sha1-u5oWM01O8sM8cwGpJLi4YzUaCFQ=", - "dev": true, + "devOptional": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -2467,6 +2682,12 @@ "node": ">=6" } }, + "node_modules/escape-html": { + "version": "1.0.3", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT", + "optional": true + }, "node_modules/escape-string-regexp": { "version": "1.0.5", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", @@ -2477,72 +2698,85 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "integrity": "sha1-x4am/Q4LaJQar2JFlvuYcIkZVmg=", + "version": "9.26.0", + "integrity": "sha512-Hx0MOjPh6uK9oq9nVsATZKE/Wlbai7KFjfCuw9UHaguDW3x+HF0O5nIi3ud39TWgrTjTO5nHxmL3R1eANinWHQ==", "license": "MIT", "optional": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.20.0", + "@eslint/config-helpers": "^0.2.1", + "@eslint/core": "^0.13.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.26.0", + "@eslint/plugin-kit": "^0.2.8", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@modelcontextprotocol/sdk": "^1.8.0", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.3.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "zod": "^3.24.2" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/eslint-plugin-header": { - "version": "3.1.1", - "integrity": "sha1-bOUSQy1XZ1Jl+sRykrUNHv8RrNY=", + "node_modules/eslint-config-prettier": { + "version": "10.1.5", + "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", "license": "MIT", "optional": true, - "peerDependencies": { - "eslint": ">=7.7.0" + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" } }, "node_modules/eslint-scope": { - "version": "7.2.2", - "integrity": "sha1-3rT5JWM5DzIAaJSvYqItuhxGQj8=", + "version": "8.3.0", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "license": "BSD-2-Clause", "optional": true, "dependencies": { @@ -2550,7 +2784,7 @@ "estraverse": "^5.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2639,6 +2873,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", @@ -2682,17 +2928,29 @@ } }, "node_modules/espree": { - "version": "9.6.1", - "integrity": "sha1-oqF7jkNGkKVDLy+AGM5x0zGkjG8=", + "version": "10.3.0", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "license": "BSD-2-Clause", "optional": true, "dependencies": { - "acorn": "^8.9.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "license": "Apache-2.0", + "optional": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -2712,7 +2970,7 @@ }, "node_modules/esrecurse": { "version": "4.3.0", - "integrity": "sha1-eteWTWeauyi+5yzsY3WLHF0smSE=", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "license": "BSD-2-Clause", "optional": true, "dependencies": { @@ -2733,13 +2991,43 @@ }, "node_modules/esutils": { "version": "2.0.3", - "integrity": "sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "license": "BSD-2-Clause", "optional": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/etag": { + "version": "1.8.1", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "optional": true, + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.2", + "integrity": "sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/expand-template": { "version": "2.0.3", "integrity": "sha1-bhSz/O4POmNA7LV9LokYaSBSpHw=", @@ -2750,9 +3038,87 @@ "node": ">=6" } }, + "node_modules/express": { + "version": "5.1.0", + "integrity": "sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==", + "license": "MIT", + "optional": true, + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.0", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "7.5.0", + "integrity": "sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": "^4.11 || 5 || ^5.0.0-beta.1" + } + }, + "node_modules/express/node_modules/mime-db": { + "version": "1.54.0", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/mime-types": { + "version": "3.0.1", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "integrity": "sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT", "optional": true }, @@ -2786,7 +3152,7 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "integrity": "sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "license": "MIT", "optional": true }, @@ -2815,15 +3181,15 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "integrity": "sha1-IRst2WWcsDlLBz5zI6w8kz1SICc=", + "version": "8.0.0", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "license": "MIT", "optional": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -2838,6 +3204,23 @@ "node": ">=8" } }, + "node_modules/finalhandler": { + "version": "2.1.0", + "integrity": "sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/find-up": { "version": "5.0.0", "integrity": "sha1-TJKBnstwg1YeT0okCoa+UZj1Nvw=", @@ -2864,22 +3247,21 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "integrity": "sha1-LAwtUEDJmxYydxqdEFclwBFTY+4=", + "version": "4.0.1", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "license": "MIT", "optional": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { "version": "3.3.3", - "integrity": "sha1-Z8j62VRUp8er6/dLt47nSkQCM1g=", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", "license": "ISC", "optional": true }, @@ -2914,6 +3296,24 @@ "node": ">= 6" } }, + "node_modules/forwarded": { + "version": "0.2.0", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/fs-constants": { "version": "1.0.0", "integrity": "sha1-a+Dem+mYzhavivwkSXue6bfM2a0=", @@ -2921,11 +3321,18 @@ "license": "MIT", "optional": true }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "license": "ISC", - "optional": true + "node_modules/fsevents": { + "version": "2.3.3", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, "node_modules/function-bind": { "version": "1.1.2", @@ -2994,6 +3401,18 @@ "node": ">= 0.4" } }, + "node_modules/get-tsconfig": { + "version": "4.10.0", + "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", + "license": "MIT", + "optional": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", @@ -3052,15 +3471,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "integrity": "sha1-hDKhnXjODB6DOUnDats0VAC7EXE=", + "version": "14.0.0", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "license": "MIT", "optional": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3172,6 +3588,22 @@ "entities": "^4.5.0" } }, + "node_modules/http-errors": { + "version": "2.0.0", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/http-proxy-agent": { "version": "7.0.2", "integrity": "sha1-mosfJGhmwChQlIZYX2K48sGMJw4=", @@ -3201,7 +3633,7 @@ "node_modules/iconv-lite": { "version": "0.6.3", "integrity": "sha1-pS+AvzjaGVLrXGgXkHGYcaGnJQE=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -3248,7 +3680,7 @@ }, "node_modules/import-fresh": { "version": "3.3.1", - "integrity": "sha1-nOy1ZQPAraHydB271lRuSxO1fM8=", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "license": "MIT", "optional": true, "dependencies": { @@ -3271,16 +3703,6 @@ "node": ">=0.8.19" } }, - "node_modules/inflight": { - "version": "1.0.6", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "license": "ISC", - "optional": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, "node_modules/inherits": { "version": "2.0.4", "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", @@ -3294,6 +3716,15 @@ "license": "ISC", "optional": true }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/is-docker": { "version": "3.0.0", "integrity": "sha1-kAk6oxBid9inelkQ265xdH4VogA=", @@ -3378,15 +3809,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "integrity": "sha1-0jE2LlOgf/Kw4Op/7QSRYf/RYoM=", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "2.1.0", "integrity": "sha1-ReQuN/zPH0Dajl927iFRWEDAkoc=", @@ -3396,6 +3818,12 @@ "node": ">=8" } }, + "node_modules/is-promise": { + "version": "4.0.0", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT", + "optional": true + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "integrity": "sha1-PybHaoCVk7Ur+i7LVxDtJ3m1Iqc=", @@ -3464,13 +3892,13 @@ }, "node_modules/json-buffer": { "version": "3.0.1", - "integrity": "sha1-kziAKjDTtmBfvgYT4JQAjKjAWhM=", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "license": "MIT", "optional": true }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "license": "MIT", "optional": true }, @@ -3561,7 +3989,7 @@ }, "node_modules/keyv": { "version": "4.5.4", - "integrity": "sha1-qHmpnilFL5QkOfKkBeOvizHU3pM=", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "license": "MIT", "optional": true, "dependencies": { @@ -3813,6 +4241,27 @@ "dev": true, "license": "MIT" }, + "node_modules/media-typer": { + "version": "1.1.0", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/merge2": { "version": "1.4.1", "integrity": "sha1-Q2iJL4hekHRVpv19xVwMnUBJkK4=", @@ -4148,6 +4597,15 @@ "license": "MIT", "optional": true }, + "node_modules/negotiator": { + "version": "1.0.0", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/nise": { "version": "6.1.1", "integrity": "sha1-eOqTzEm+Ei5Ey3yP31l7Dod4tko=", @@ -4212,10 +4670,19 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "integrity": "sha1-g3UmXiG8IND6WCwi4bE0hdbgAhM=", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -4224,6 +4691,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/on-finished": { + "version": "2.4.1", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "optional": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/once": { "version": "1.4.0", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", @@ -4452,7 +4931,7 @@ }, "node_modules/parent-module": { "version": "1.0.1", - "integrity": "sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "license": "MIT", "optional": true, "dependencies": { @@ -4529,22 +5008,22 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/path-exists": { - "version": "4.0.0", - "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", + "node_modules/parseurl": { + "version": "1.3.3", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "license": "MIT", "optional": true, "engines": { - "node": ">=8" + "node": ">= 0.8" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/path-exists": { + "version": "4.0.0", + "integrity": "sha1-UTvb4tO5XXdi6METfvoZXGxhtbM=", "license": "MIT", "optional": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/path-key": { @@ -4614,6 +5093,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pkce-challenge": { + "version": "5.0.0", + "integrity": "sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=16.20.0" + } + }, "node_modules/prebuild-install": { "version": "7.1.3", "integrity": "sha1-1jCrrSsUdEPyCiEpF76uaLgJLuw=", @@ -4650,12 +5138,56 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.5.3", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "license": "MIT", + "optional": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-organize-imports": { + "version": "4.1.0", + "integrity": "sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A==", + "license": "MIT", + "optional": true, + "peerDependencies": { + "prettier": ">=2.0", + "typescript": ">=2.9", + "vue-tsc": "^2.1.0" + }, + "peerDependenciesMeta": { + "vue-tsc": { + "optional": true + } + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", "license": "MIT", "optional": true }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "optional": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/pump": { "version": "3.0.2", "integrity": "sha1-g28+3WvC7lmSVskk/+DYhXPdy/g=", @@ -4669,7 +5201,7 @@ }, "node_modules/punycode": { "version": "2.3.1", - "integrity": "sha1-AnQi4vrsCyXhVJw+G9gwm5EztuU=", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "license": "MIT", "optional": true, "engines": { @@ -4688,7 +5220,7 @@ "node_modules/qs": { "version": "6.14.0", "integrity": "sha1-xj+kBoDSxclBQSoOiZyJr2DAqTA=", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -4729,6 +5261,30 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/range-parser": { + "version": "1.2.1", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.0", + "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "license": "MIT", + "optional": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.6.3", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/rc": { "version": "1.2.8", "integrity": "sha1-zZJL9SAKB1uDwYjNa54hG3/A0+0=", @@ -4812,13 +5368,22 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "integrity": "sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "license": "MIT", "optional": true, "engines": { "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "license": "MIT", + "optional": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/restore-cursor": { "version": "5.1.0", "integrity": "sha1-B2bZVpnvrLFBUJk/VbrwlT6h6+c=", @@ -4845,70 +5410,20 @@ "node": ">=0.10.0" } }, - "node_modules/rewire": { - "version": "7.0.0", - "integrity": "sha1-QdtUgjcMiHWP/Jpxn3ySp2H6j78=", - "license": "MIT", - "optional": true, - "dependencies": { - "eslint": "^8.47.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "integrity": "sha1-8aVAK6YiCtUswSgrrBrjqkn9Bho=", - "license": "ISC", - "optional": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "node_modules/router": { + "version": "2.2.0", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", "license": "MIT", "optional": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "integrity": "sha1-uN8PuAK7+o6JvR2Ti04WV47UTys=", - "license": "ISC", - "optional": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "integrity": "sha1-Gc0ZS/0+Qo8EmnCBfAONiatL41s=", - "license": "ISC", - "optional": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "node": ">= 18" } }, "node_modules/run-applescript": { @@ -4969,7 +5484,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/sax": { @@ -4989,6 +5504,49 @@ "node": ">=10" } }, + "node_modules/send": { + "version": "1.2.0", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/send/node_modules/mime-db": { + "version": "1.54.0", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/send/node_modules/mime-types": { + "version": "3.0.1", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/serialize-javascript": { "version": "6.0.2", "integrity": "sha1-3voeBVyDv21Z6oBdjahiJU62psI=", @@ -4998,12 +5556,33 @@ "randombytes": "^2.1.0" } }, + "node_modules/serve-static": { + "version": "2.2.0", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "license": "MIT", "optional": true }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC", + "optional": true + }, "node_modules/shebang-command": { "version": "2.0.0", "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", @@ -5028,7 +5607,7 @@ "node_modules/side-channel": { "version": "1.1.0", "integrity": "sha1-w/z/nE2pMnhIczNeyXZfqU/2a8k=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -5047,7 +5626,7 @@ "node_modules/side-channel-list": { "version": "1.0.0", "integrity": "sha1-EMtZhCYxFdO3oOM2WR4pCoMK+K0=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -5063,7 +5642,7 @@ "node_modules/side-channel-map": { "version": "1.0.1", "integrity": "sha1-1rtrN5Asb+9RdOX1M/q0xzKib0I=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -5081,7 +5660,7 @@ "node_modules/side-channel-weakmap": { "version": "1.0.2", "integrity": "sha1-Ed2hnVNo5Azp7CvcH7DsvAeQ7Oo=", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -5235,6 +5814,15 @@ "node": "*" } }, + "node_modules/statuses": { + "version": "2.0.1", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/stdin-discarder": { "version": "0.2.2", "integrity": "sha1-OQA39ExK4aGuU1xf443Dq6jZl74=", @@ -5421,12 +6009,6 @@ "node": ">= 6" } }, - "node_modules/text-table": { - "version": "0.2.0", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "license": "MIT", - "optional": true - }, "node_modules/through": { "version": "2.3.8", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", @@ -5454,6 +6036,15 @@ "node": ">=8.0" } }, + "node_modules/toidentifier": { + "version": "1.0.1", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.6" + } + }, "node_modules/tr46": { "version": "0.0.3", "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", @@ -5476,6 +6067,25 @@ "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", "license": "0BSD" }, + "node_modules/tsx": { + "version": "4.19.4", + "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, "node_modules/tunnel": { "version": "0.0.6", "integrity": "sha1-cvExSzSlsZLbASMk3yzFh8pH+Sw=", @@ -5519,16 +6129,39 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "integrity": "sha1-G/IH9LKPkVg2ZstfvTJ4hzAc1fQ=", - "license": "(MIT OR CC0-1.0)", + "node_modules/type-is": { + "version": "2.0.1", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", "optional": true, + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, "engines": { - "node": ">=10" + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-db": { + "version": "1.54.0", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/type-is/node_modules/mime-types": { + "version": "3.0.1", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "license": "MIT", + "optional": true, + "dependencies": { + "mime-db": "^1.54.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">= 0.6" } }, "node_modules/typed-rest-client": { @@ -5555,6 +6188,28 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.32.1", + "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", + "license": "MIT", + "optional": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.32.1", + "@typescript-eslint/parser": "8.32.1", + "@typescript-eslint/utils": "8.32.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/uc.micro": { "version": "2.1.0", "integrity": "sha1-+NP30OxMPeo1p+PI76TLi0XJ5+4=", @@ -5582,6 +6237,15 @@ "license": "MIT", "optional": true }, + "node_modules/unpipe": { + "version": "1.0.0", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/untildify": { "version": "4.0.0", "integrity": "sha1-K8lHuVNlJIfkYAlJ+wkeOujNkZs=", @@ -5592,7 +6256,7 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "integrity": "sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "license": "BSD-2-Clause", "optional": true, "dependencies": { @@ -5623,6 +6287,15 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/vary": { + "version": "1.1.2", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "integrity": "sha1-9D36NftR52PRfNlNzKDJRY81q/k=", @@ -6016,6 +6689,24 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.24.4", + "integrity": "sha512-OdqJE9UDRPwWsrHjLN2F8bPxvwJBK22EHLWtanu0LSYr5YqzsaaW3RMgmjwr8Rypg5k+meEJdSPXJZXE/yqOMg==", + "license": "MIT", + "optional": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.5", + "integrity": "sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==", + "license": "ISC", + "optional": true, + "peerDependencies": { + "zod": "^3.24.1" + } } } } diff --git a/package.json b/package.json index c468d16fb4..22422fa1d8 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "esbuild": "^0.25.4" }, "optionalDependencies": { - "@tsconfig/node20": "^20.1.5", + "@eslint/js": "^9.26.0", "@types/mocha": "^10.0.10", "@types/mock-fs": "^4.13.4", "@types/node": "^20.17.47", @@ -84,22 +84,23 @@ "@types/ungap__structured-clone": "^1.2.0", "@types/uuid": "^9.0.8", "@types/vscode": "~1.96.0", - "@typescript-eslint/eslint-plugin": "^8.32.1", - "@typescript-eslint/parser": "^8.32.1", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", "@vscode/test-electron": "^2.5.2", - "eslint": "^8.57.0", - "eslint-plugin-header": "^3.1.1", + "eslint": "^9.26.0", + "eslint-config-prettier": "^10.1.5", "glob": "^11.0.2", "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", "mock-fs": "^5.5.0", - "rewire": "^7.0.0", + "prettier": "^3.5.3", + "prettier-plugin-organize-imports": "^4.1.0", "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "typescript": "^5.8.3" + "tsx": "^4.19.4", + "typescript": "^5.8.3", + "typescript-eslint": "^8.32.1" }, "extensionDependencies": [ "vscode.powershell" @@ -111,9 +112,9 @@ "lint": "eslint src test --ext .ts", "package": "vsce package --out out/ --no-gitHubIssueLinking", "publish": "vsce publish", - "compile-test": "npm run compile && tsc --incremental", - "watch-tests": "npm run compile-test -- --watch", - "test": "npm run compile-test && node ./test/runTests.js" + "compile-test": "esbuild ./test/runTestsInner.ts --outdir=dist --bundle --external:vscode --platform=node", + "pretest": "npm run compile && npm run compile-test", + "test": "tsx ./test/runTests.ts" }, "contributes": { "breakpoints": [ diff --git a/src/platform.ts b/src/platform.ts index 74f2bb94df..b0b0ec9a0e 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -92,7 +92,7 @@ export class PowerShellExeFinder { private platformDetails: IPlatformDetails, // Additional configured PowerShells private additionalPowerShellExes: PowerShellAdditionalExePathSettings, - private logger: ILogger) { } + private logger?: ILogger) { } /** * Returns the first available PowerShell executable found in the search order. @@ -244,7 +244,7 @@ export class PowerShellExeFinder { * Iterates through the configured additional PowerShell executable locations, * without checking for their existence. */ - private async *enumerateAdditionalPowerShellInstallations(): AsyncIterable { + public async *enumerateAdditionalPowerShellInstallations(): AsyncIterable { for (const versionName in this.additionalPowerShellExes) { if (Object.prototype.hasOwnProperty.call(this.additionalPowerShellExes, versionName)) { let exePath: string | undefined = utils.stripQuotePair(this.additionalPowerShellExes[versionName]); diff --git a/test/core/platform.test.ts b/test/core/platform.test.ts index f5c22941cc..20be7109a9 100644 --- a/test/core/platform.test.ts +++ b/test/core/platform.test.ts @@ -6,51 +6,49 @@ import mockFS = require("mock-fs"); import FileSystem = require("mock-fs/lib/filesystem"); import * as os from "os"; import * as path from "path"; -import rewire = require("rewire"); import * as sinon from "sinon"; import * as platform from "../../src/platform"; import * as fs from "fs"; // NOTE: Necessary for mock-fs. import * as vscode from "vscode"; -import { stripQuotePair } from "../../src/utils"; - -// We have to rewire the platform module so that mock-fs can be used, as it -// overrides the fs module but not the vscode.workspace.fs module. -const platformMock = rewire("../../src/platform"); +import * as utils from "../../src/utils"; // eslint-disable-next-line @typescript-eslint/require-await -async function fakeCheckIfFileExists(targetPath: string | vscode.Uri): Promise { - try { - const stat = fs.lstatSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); - return stat.isFile(); - } catch { - return false; - } +async function fakeCheckIfFileExists( + targetPath: string | vscode.Uri, +): Promise { + try { + const stat = fs.lstatSync( + targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, + ); + return stat.isFile(); + } catch { + return false; + } } // eslint-disable-next-line @typescript-eslint/require-await -async function fakeCheckIfDirectoryExists(targetPath: string | vscode.Uri): Promise { - try { - const stat = fs.lstatSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); - return stat.isDirectory(); - } catch { - return false; - } +async function fakeCheckIfDirectoryExists( + targetPath: string | vscode.Uri, +): Promise { + try { + const stat = fs.lstatSync( + targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, + ); + return stat.isDirectory(); + } catch { + return false; + } } // eslint-disable-next-line @typescript-eslint/require-await -async function fakeReadDirectory(targetPath: string | vscode.Uri): Promise { - return fs.readdirSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); +async function fakeReadDirectory( + targetPath: string | vscode.Uri, +): Promise { + return fs.readdirSync( + targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, + ); } -const utilsMock = { - checkIfFileExists: fakeCheckIfFileExists, - checkIfDirectoryExists: fakeCheckIfDirectoryExists, - readDirectory: fakeReadDirectory, - stripQuotePair: stripQuotePair -}; - -platformMock.__set__("utils", utilsMock); - /** * Describes a platform on which the PowerShell extension should work, * including the test conditions (filesystem, environment variables). @@ -847,8 +845,22 @@ function setupTestEnvironment(testPlatform: ITestPlatform): void { } describe("Platform module", function () { + beforeEach(function () { + sinon.stub(utils, "checkIfFileExists").callsFake(fakeCheckIfFileExists); + sinon + .stub(utils, "checkIfDirectoryExists") + .callsFake(fakeCheckIfDirectoryExists); + sinon.stub(utils, "readDirectory").callsFake(fakeReadDirectory); + }); + + afterEach(function () { + sinon.restore(); + mockFS.restore(); + }); + it("Gets the correct platform details", function () { - const platformDetails: platform.IPlatformDetails = platformMock.getPlatformDetails(); + const platformDetails: platform.IPlatformDetails = + platform.getPlatformDetails(); switch (process.platform) { case "darwin": assert.strictEqual( @@ -901,144 +913,181 @@ describe("Platform module", function () { }); describe("Default PowerShell installation", function () { - afterEach(function () { - sinon.restore(); - mockFS.restore(); - }); - - for (const testPlatform of successTestCases) { - it(`Finds it on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successTestCases) { + it(`Finds it on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails); + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, {} + ); - const defaultPowerShell = await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); - const expectedPowerShell = testPlatform.expectedPowerShellSequence[0]; + const defaultPowerShell = + await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); + const expectedPowerShell = testPlatform.expectedPowerShellSequence[0]; - assert.strictEqual(defaultPowerShell.exePath, expectedPowerShell.exePath); - assert.strictEqual(defaultPowerShell.displayName, expectedPowerShell.displayName); - assert.strictEqual(defaultPowerShell.supportsProperArguments, expectedPowerShell.supportsProperArguments); - }); - } + assert.strictEqual( + defaultPowerShell!.exePath, + expectedPowerShell.exePath, + ); + assert.strictEqual( + defaultPowerShell!.displayName, + expectedPowerShell.displayName, + ); + assert.strictEqual( + defaultPowerShell!.supportsProperArguments, + expectedPowerShell.supportsProperArguments, + ); + }); + } - for (const testPlatform of errorTestCases) { - it(`Fails gracefully on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of errorTestCases) { + it(`Fails gracefully on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails); + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, {} + ); - const defaultPowerShell = await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); - assert.strictEqual(defaultPowerShell, undefined); - }); - } + const defaultPowerShell = + await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); + assert.strictEqual(defaultPowerShell, undefined); + }); + } }); describe("Expected PowerShell installation list", function () { - afterEach(function () { - sinon.restore(); - mockFS.restore(); - }); + for (const testPlatform of successTestCases) { + it(`Finds them on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - for (const testPlatform of successTestCases) { - it(`Finds them on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, {} + ); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails); + const foundPowerShells = + await powerShellExeFinder.getAllAvailablePowerShellInstallations(); - const foundPowerShells = await powerShellExeFinder.getAllAvailablePowerShellInstallations(); + for ( + let i = 0; + i < testPlatform.expectedPowerShellSequence.length; + i++ + ) { + const foundPowerShell = foundPowerShells[i]; + const expectedPowerShell = + testPlatform.expectedPowerShellSequence[i]; - for (let i = 0; i < testPlatform.expectedPowerShellSequence.length; i++) { - const foundPowerShell = foundPowerShells[i]; - const expectedPowerShell = testPlatform.expectedPowerShellSequence[i]; - - assert.strictEqual(foundPowerShell?.exePath, expectedPowerShell.exePath); - assert.strictEqual(foundPowerShell?.displayName, expectedPowerShell.displayName); - assert.strictEqual(foundPowerShell?.supportsProperArguments, expectedPowerShell.supportsProperArguments); - } + assert.strictEqual( + foundPowerShell.exePath, + expectedPowerShell.exePath, + ); + assert.strictEqual( + foundPowerShell.displayName, + expectedPowerShell.displayName, + ); + assert.strictEqual( + foundPowerShell.supportsProperArguments, + expectedPowerShell.supportsProperArguments, + ); + } - assert.strictEqual( - foundPowerShells.length, - testPlatform.expectedPowerShellSequence.length, - "Number of expected PowerShells found does not match"); - }); - } + assert.strictEqual( + foundPowerShells.length, + testPlatform.expectedPowerShellSequence.length, + "Number of expected PowerShells found does not match", + ); + }); + } - for (const testPlatform of errorTestCases) { - it(`Fails gracefully on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of errorTestCases) { + it(`Fails gracefully on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails); + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, {} + ); - const foundPowerShells = await powerShellExeFinder.getAllAvailablePowerShellInstallations(); - assert.strictEqual(foundPowerShells.length, 0); - }); - } + const foundPowerShells = + await powerShellExeFinder.getAllAvailablePowerShellInstallations(); + assert.strictEqual(foundPowerShells.length, 0); + }); + } }); describe("Windows PowerShell path fix", function () { - afterEach(function () { - sinon.restore(); - mockFS.restore(); - }); + for (const testPlatform of successTestCases.filter( + (tp) => + tp.platformDetails.operatingSystem === + platform.OperatingSystem.Windows, + )) { + it(`Corrects the Windows PowerShell path on ${testPlatform.name}`, function () { + setupTestEnvironment(testPlatform); - for (const testPlatform of successTestCases - .filter((tp) => tp.platformDetails.operatingSystem === platform.OperatingSystem.Windows)) { + function getWinPSPath(systemDir: string): string { + return path.join( + testPlatform.environmentVars.windir, + systemDir, + "WindowsPowerShell", + "v1.0", + "powershell.exe", + ); + } - it(`Corrects the Windows PowerShell path on ${testPlatform.name}`, function () { - setupTestEnvironment(testPlatform); + const winPSPath = getWinPSPath("System32"); - function getWinPSPath(systemDir: string): string { - return path.join( - testPlatform.environmentVars.windir, - systemDir, - "WindowsPowerShell", - "v1.0", - "powershell.exe"); - } - - const winPSPath = getWinPSPath("System32"); + let altWinPSPath; + if (testPlatform.platformDetails.isProcess64Bit) { + altWinPSPath = getWinPSPath("SysWOW64"); + } else if (testPlatform.platformDetails.isOS64Bit) { + altWinPSPath = getWinPSPath("Sysnative"); + } else { + altWinPSPath = null; + } - let altWinPSPath; - if (testPlatform.platformDetails.isProcess64Bit) { - altWinPSPath = getWinPSPath("SysWOW64"); - } else if (testPlatform.platformDetails.isOS64Bit) { - altWinPSPath = getWinPSPath("Sysnative"); - } else { - altWinPSPath = null; - } + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, {} + ); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails); + assert.strictEqual( + powerShellExeFinder.fixWindowsPowerShellPath(winPSPath), + winPSPath, + ); - assert.strictEqual(powerShellExeFinder.fixWindowsPowerShellPath(winPSPath), winPSPath); - - if (altWinPSPath) { - assert.strictEqual(powerShellExeFinder.fixWindowsPowerShellPath(altWinPSPath), winPSPath); - } - }); - } + if (altWinPSPath) { + assert.strictEqual( + powerShellExeFinder.fixWindowsPowerShellPath(altWinPSPath), + winPSPath, + ); + } + }); + } }); describe("PowerShell executables from 'powerShellAdditionalExePaths' are found", function () { - afterEach(function () { - sinon.restore(); - mockFS.restore(); - }); - - for (const testPlatform of successAdditionalTestCases) { - it(`Guesses for ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successAdditionalTestCases) { + it(`Guesses for ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platformMock.PowerShellExeFinder(testPlatform.platformDetails, additionalPowerShellExes); + const powerShellExeFinder = new platform.PowerShellExeFinder( + testPlatform.platformDetails, + additionalPowerShellExes, + ); - let i = 0; - for await (const additionalPwsh of powerShellExeFinder.enumerateAdditionalPowerShellInstallations()) { - const expectedPowerShell = testPlatform.expectedPowerShellSequence[i]; - i++; + let i = 0; + for await (const additionalPwsh of powerShellExeFinder.enumerateAdditionalPowerShellInstallations()) { + const expectedPowerShell = + testPlatform.expectedPowerShellSequence[i]; + i++; - assert.strictEqual(additionalPwsh.exePath, expectedPowerShell.exePath); - assert.strictEqual(additionalPwsh.displayName, expectedPowerShell.displayName); - } - }); - } + assert.strictEqual( + additionalPwsh.exePath, + expectedPowerShell.exePath, + ); + assert.strictEqual( + additionalPwsh.displayName, + expectedPowerShell.displayName, + ); + } + }); + } }); }); diff --git a/test/runTests.ts b/test/runTests.ts index 87a27182bd..507a85470c 100644 --- a/test/runTests.ts +++ b/test/runTests.ts @@ -17,7 +17,7 @@ import { spawnSync } from "child_process"; * */ async function main(): Promise { // Verify that the extension is built - const compiledExtensionPath = path.resolve(__dirname, "../src/extension.js"); + const compiledExtensionPath = path.resolve(__dirname, "../dist/extension.js"); if (!existsSync(compiledExtensionPath)) { console.error("ERROR: The extension is not built yet. Please run a build first, using either the 'Run Build Task' in VSCode or ./build.ps1 in PowerShell."); process.exit(1); @@ -28,7 +28,7 @@ async function main(): Promise { const extensionDevelopmentPath = path.resolve(__dirname, "../"); /** The path to the test script that will run inside the vscode instance. Passed to --extensionTestsPath */ - const extensionTestsPath = path.resolve(__dirname, "./runTestsInner"); + const extensionTestsPath = path.resolve(extensionDevelopmentPath, "dist", "runTestsInner"); /** The starting workspace/folder to open in vscode. By default this is a testing instance pointed to the Examples folder */ const workspacePath = process.env.__TEST_WORKSPACE_PATH ?? "test/TestEnvironment.code-workspace"; diff --git a/test/runTestsInner.ts b/test/runTestsInner.ts index ea3d46f0ef..f1c70df2c7 100644 --- a/test/runTestsInner.ts +++ b/test/runTestsInner.ts @@ -39,8 +39,9 @@ function runTestsInner(testsRoot: string): Promise { // Test if files is empty const files = globSync(config.spec, { cwd: rootDir }); if (files.length === 0) { - console.log("No tests found for glob pattern: test.ts in directory: " + rootDir); - throw new Error("No tests found for glob pattern: test.ts in directory: " + rootDir); + const msg = `No tests found for glob pattern: ${config.spec} in directory: ${rootDir}`; + console.log(msg); + throw new Error(msg); } // Add files to the test suite diff --git a/tsconfig.json b/tsconfig.json index 638345adf1..f4cfb37fb7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,16 @@ -// NOTE: The TypeScript compiler is only used for building the tests (and -// the sources which the tests need). The extension is built with `esbuild`. { - "extends": "@tsconfig/node20/tsconfig.json", "compilerOptions": { - "sourceMap": true, - "rootDir": ".", - "noFallthroughCasesInSwitch": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "allowSyntheticDefaultImports": true, - "useUnknownInCatchVariables": true + "target": "ESNext", + "esModuleInterop": true, + "skipLibCheck": true, + "allowJs": true, + "resolveJsonModule": true, + "moduleDetection": "force", + "verbatimModuleSyntax": true, + "strict": true, + "noEmit": true, + "module": "Preserve" }, - "include": [ "src", "test" ], - "exclude": [ "node_modules/@ungap/structured-clone" ] + "include": ["src/**/*.ts", "test/**/*.ts", "*.mjs"], + "exclude": ["node_modules"] } From 215ad6bde74a1dd691a89a576d8e4d97521fdfd4 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Wed, 14 May 2025 16:39:49 -0700 Subject: [PATCH 3/4] WIP: Switching to vscode-cli --- .mocharc.json | 2 +- .vscode-test.mjs | 15 + package-lock.json | 761 +++++++++++++++++++++++-- package.json | 10 +- src/extension.ts | 4 +- src/features/DebugSession.ts | 4 +- src/features/ExpandAlias.ts | 6 +- src/features/ExtensionCommands.ts | 2 +- src/features/HelpCompletion.ts | 10 +- src/features/PesterTests.ts | 6 +- src/features/RemoteFiles.ts | 2 +- src/features/ShowHelp.ts | 4 +- src/logging.ts | 6 +- src/platform.ts | 11 +- src/session.ts | 2 +- test/core/platform.test.ts | 291 ++++------ test/features/DebugSession.test.ts | 1 + test/features/ExternalApi.test.ts | 2 +- test/features/UpdatePowerShell.test.ts | 2 +- test/runTests.ts | 115 ---- test/runTestsInner.ts | 72 --- test/utils.ts | 2 +- vscode-powershell.build.ps1 | 4 +- 23 files changed, 868 insertions(+), 466 deletions(-) create mode 100644 .vscode-test.mjs delete mode 100644 test/runTests.ts delete mode 100644 test/runTestsInner.ts diff --git a/.mocharc.json b/.mocharc.json index d2812863bc..3e44d1a7de 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,5 +1,5 @@ { - "require": "tsx", + "require": "esbuild-register", "color": true, "enable-source-maps": true, "timeout": 600000, diff --git a/.vscode-test.mjs b/.vscode-test.mjs new file mode 100644 index 0000000000..dbe9967060 --- /dev/null +++ b/.vscode-test.mjs @@ -0,0 +1,15 @@ +import os from "os"; +import path from "path"; +import { defineConfig } from "@vscode/test-cli"; + +export default defineConfig({ + files: "test/**/*.test.ts", + // The default user data directory had too many characters for the IPC connection on macOS in CI. + launchArgs: [ "--profile-temp", "--user-data-dir", path.join(os.tmpdir(), "vscode-user-data") ], + workspaceFolder: "test/TestEnvironment.code-workspace", + mocha: { + ui: "bdd", // describe, it, etc. + require: "esbuild-register", + timeout: 60 * 1000 // 10 minutes to allow for debugging + }, +}); diff --git a/package-lock.json b/package-lock.json index a1f280b2a5..d76b2f4736 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,6 @@ "@types/mock-fs": "^4.13.4", "@types/node": "^20.17.47", "@types/node-fetch": "^2.6.12", - "@types/rewire": "^2.5.30", "@types/semver": "^7.7.0", "@types/sinon": "^17.0.4", "@types/ungap__structured-clone": "^1.2.0", @@ -38,10 +37,11 @@ "@types/vscode": "~1.96.0", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", + "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.5.2", + "esbuild-register": "^3.6.0", "eslint": "^9.26.0", "eslint-config-prettier": "^10.1.5", - "glob": "^11.0.2", "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", @@ -50,7 +50,6 @@ "prettier-plugin-organize-imports": "^4.1.0", "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "tsx": "^4.19.4", "typescript": "^5.8.3", "typescript-eslint": "^8.32.1" } @@ -222,6 +221,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "license": "MIT", + "optional": true + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.4", "integrity": "sha1-gw1kdsu8oMAFE2rwcwNka0GfEWI=", @@ -871,6 +876,40 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "license": "MIT", + "optional": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@microsoft/1ds-core-js": { "version": "4.3.7", "integrity": "sha1-FJxFFfZdj+8/rUFHBAPCXyjBtTg=", @@ -1100,6 +1139,12 @@ "license": "MIT", "optional": true }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "license": "MIT", + "optional": true + }, "node_modules/@types/json-schema": { "version": "7.0.15", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", @@ -1140,12 +1185,6 @@ "form-data": "^4.0.0" } }, - "node_modules/@types/rewire": { - "version": "2.5.30", - "integrity": "sha1-da8QbSlOyIriEij+/jqlee/sJ24=", - "license": "MIT", - "optional": true - }, "node_modules/@types/semver": { "version": "7.7.0", "integrity": "sha1-ZMRBva4DOzeLbu99DD13wym5N44=", @@ -1405,7 +1444,358 @@ "@microsoft/applicationinsights-web-basic": "^3.3.4" }, "engines": { - "vscode": "^1.75.0" + "vscode": "^1.75.0" + } + }, + "node_modules/@vscode/test-cli": { + "version": "0.0.10", + "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", + "license": "MIT", + "optional": true, + "dependencies": { + "@types/mocha": "^10.0.2", + "c8": "^9.1.0", + "chokidar": "^3.5.3", + "enhanced-resolve": "^5.15.0", + "glob": "^10.3.10", + "minimatch": "^9.0.3", + "mocha": "^10.2.0", + "supports-color": "^9.4.0", + "yargs": "^17.7.2" + }, + "bin": { + "vscode-test": "out/bin.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@vscode/test-cli/node_modules/ansi-styles": { + "version": "4.3.0", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@vscode/test-cli/node_modules/chokidar": { + "version": "3.6.0", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "license": "MIT", + "optional": true, + "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" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/@vscode/test-cli/node_modules/cliui": { + "version": "7.0.4", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "license": "ISC", + "optional": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/color-convert": { + "version": "2.0.1", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "optional": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/color-name": { + "version": "1.1.4", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT", + "optional": true + }, + "node_modules/@vscode/test-cli/node_modules/emoji-regex": { + "version": "8.0.0", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT", + "optional": true + }, + "node_modules/@vscode/test-cli/node_modules/escape-string-regexp": { + "version": "4.0.0", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@vscode/test-cli/node_modules/glob": { + "version": "10.4.5", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "license": "ISC", + "optional": true, + "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/@vscode/test-cli/node_modules/glob-parent": { + "version": "5.1.2", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "optional": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@vscode/test-cli/node_modules/has-flag": { + "version": "4.0.0", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vscode/test-cli/node_modules/jackspeak": { + "version": "3.4.3", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "optional": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/lru-cache": { + "version": "10.4.3", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC", + "optional": true + }, + "node_modules/@vscode/test-cli/node_modules/mocha": { + "version": "10.8.2", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "license": "MIT", + "optional": true, + "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": "^8.1.0", + "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": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vscode/test-cli/node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "optional": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vscode/test-cli/node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@vscode/test-cli/node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "license": "MIT", + "optional": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vscode/test-cli/node_modules/path-scurry": { + "version": "1.11.1", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "optional": true, + "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/@vscode/test-cli/node_modules/readdirp": { + "version": "3.6.0", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "license": "MIT", + "optional": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/string-width": { + "version": "4.2.3", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "optional": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@vscode/test-cli/node_modules/supports-color": { + "version": "9.4.0", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@vscode/test-cli/node_modules/wrap-ansi": { + "version": "7.0.0", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "optional": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@vscode/test-cli/node_modules/yargs-parser": { + "version": "20.2.9", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "license": "ISC", + "optional": true, + "engines": { + "node": ">=10" } }, "node_modules/@vscode/test-electron": { @@ -1702,6 +2092,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "integrity": "sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=", @@ -1723,6 +2122,19 @@ "node": ">=4" } }, + "node_modules/anymatch": { + "version": "3.1.3", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "license": "ISC", + "optional": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/argparse": { "version": "2.0.1", "integrity": "sha1-JG9Q88p4oyQPbJl+ipvR6sSeSzg=", @@ -1771,6 +2183,18 @@ "license": "MIT", "optional": true }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/bl": { "version": "4.1.0", "integrity": "sha1-RRU1JkGCvsL7vIOmKrmM8R2fezo=", @@ -1920,6 +2344,31 @@ "node": ">= 0.8" } }, + "node_modules/c8": { + "version": "9.1.0", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", + "license": "ISC", + "optional": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^3.1.1", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.1", + "istanbul-reports": "^3.1.6", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^17.7.2", + "yargs-parser": "^21.1.1" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "integrity": "sha1-S1QowiK+mF15w9gmV0edvgtZstY=", @@ -2231,6 +2680,12 @@ "node": ">= 0.6" } }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "license": "MIT", + "optional": true + }, "node_modules/cookie": { "version": "0.7.2", "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", @@ -2576,6 +3031,19 @@ "once": "^1.4.0" } }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "license": "MIT", + "optional": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.5.0", "integrity": "sha1-XSaOpecRPsdMTQM7eepaNaSI+0g=", @@ -2673,6 +3141,18 @@ "@esbuild/win32-x64": "0.25.4" } }, + "node_modules/esbuild-register": { + "version": "3.6.0", + "integrity": "sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==", + "license": "MIT", + "optional": true, + "dependencies": { + "debug": "^4.3.4" + }, + "peerDependencies": { + "esbuild": ">=0.12 <1" + } + }, "node_modules/escalade": { "version": "3.2.0", "integrity": "sha1-ARo/aYVroYnf+n3I/M6Z0qh5A+U=", @@ -3321,6 +3801,12 @@ "license": "MIT", "optional": true }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC", + "optional": true + }, "node_modules/fsevents": { "version": "2.3.3", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", @@ -3401,18 +3887,6 @@ "node": ">= 0.4" } }, - "node_modules/get-tsconfig": { - "version": "4.10.0", - "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==", - "license": "MIT", - "optional": true, - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" - } - }, "node_modules/github-from-package": { "version": "0.0.0", "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", @@ -3423,7 +3897,7 @@ "node_modules/glob": { "version": "11.0.2", "integrity": "sha1-MmHjiXu8YDAwsEH9d7pjYCLVHOA=", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", @@ -3458,7 +3932,7 @@ "node_modules/glob/node_modules/minimatch": { "version": "10.0.1", "integrity": "sha1-zgUhhWtFPIbiXyxMDQPm/33cRAs=", - "devOptional": true, + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -3494,6 +3968,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", + "optional": true + }, "node_modules/graphemer": { "version": "1.4.0", "integrity": "sha1-+y8dVeDjoYSa7/yQxPoN1ToOZsY=", @@ -3569,6 +4049,12 @@ "node": ">=10" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "license": "MIT", + "optional": true + }, "node_modules/htmlparser2": { "version": "9.1.0", "integrity": "sha1-zbSY2KdaUfc5th0/cYE2w2m8jCM=", @@ -3703,6 +4189,17 @@ "node": ">=0.8.19" } }, + "node_modules/inflight": { + "version": "1.0.6", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "optional": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, "node_modules/inherits": { "version": "2.0.4", "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", @@ -3725,6 +4222,18 @@ "node": ">= 0.10" } }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "license": "MIT", + "optional": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-docker": { "version": "3.0.0", "integrity": "sha1-kAk6oxBid9inelkQ265xdH4VogA=", @@ -3863,10 +4372,67 @@ "devOptional": true, "license": "ISC" }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "license": "BSD-3-Clause", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "license": "MIT", + "optional": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "license": "BSD-3-Clause", + "optional": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jackspeak": { "version": "4.1.0", "integrity": "sha1-xInAefK2NtxMvpsDEqE/8SguVhs=", - "devOptional": true, + "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -4209,6 +4775,21 @@ "node": ">=10" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "license": "MIT", + "optional": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/markdown-it": { "version": "14.1.0", "integrity": "sha1-PDxZkog8Yz20cUzLTXtZNdmLfUU=", @@ -4658,6 +5239,15 @@ } } }, + "node_modules/normalize-path": { + "version": "3.0.0", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nth-check": { "version": "2.1.1", "integrity": "sha1-yeq0KO/842zWuSySS9sADvHx7R0=", @@ -5026,6 +5616,15 @@ "node": ">=8" } }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/path-key": { "version": "3.1.1", "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", @@ -5038,7 +5637,7 @@ "node_modules/path-scurry": { "version": "2.0.0", "integrity": "sha1-nwUiifI62L+Tl6KgQl57hhXFhYA=", - "devOptional": true, + "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "lru-cache": "^11.0.0", @@ -5054,7 +5653,7 @@ "node_modules/path-scurry/node_modules/lru-cache": { "version": "11.1.0", "integrity": "sha1-r6+wYGBxCBMtvBz4rmYa+2lIYRc=", - "devOptional": true, + "dev": true, "license": "ISC", "engines": { "node": "20 || >=22" @@ -5375,15 +5974,6 @@ "node": ">=4" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "license": "MIT", - "optional": true, - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, "node_modules/restore-cursor": { "version": "5.1.0", "integrity": "sha1-B2bZVpnvrLFBUJk/VbrwlT6h6+c=", @@ -5964,6 +6554,15 @@ "node": ">=4" } }, + "node_modules/tapable": { + "version": "2.2.1", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6" + } + }, "node_modules/tar-fs": { "version": "2.1.2", "integrity": "sha1-Ql8VTzQEyxbLj/bmcdRasu2VlsU=", @@ -6009,6 +6608,63 @@ "node": ">= 6" } }, + "node_modules/test-exclude": { + "version": "6.0.0", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "license": "ISC", + "optional": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "license": "MIT", + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "license": "ISC", + "optional": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/through": { "version": "2.3.8", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", @@ -6067,25 +6723,6 @@ "integrity": "sha1-YS7+TtI11Wfoq6Xypfq3AoCt6D8=", "license": "0BSD" }, - "node_modules/tsx": { - "version": "4.19.4", - "integrity": "sha512-gK5GVzDkJK1SI1zwHf32Mqxf2tSJkNx+eYcNly5+nHvWqXUJYUkWBQtKauoESz3ymezAI++ZwT855x5p5eop+Q==", - "license": "MIT", - "optional": true, - "dependencies": { - "esbuild": "~0.25.0", - "get-tsconfig": "^4.7.5" - }, - "bin": { - "tsx": "dist/cli.mjs" - }, - "engines": { - "node": ">=18.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.3" - } - }, "node_modules/tunnel": { "version": "0.0.6", "integrity": "sha1-cvExSzSlsZLbASMk3yzFh8pH+Sw=", @@ -6287,6 +6924,20 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "license": "ISC", + "optional": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/vary": { "version": "1.1.2", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", diff --git a/package.json b/package.json index 22422fa1d8..5417340855 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "@types/mock-fs": "^4.13.4", "@types/node": "^20.17.47", "@types/node-fetch": "^2.6.12", - "@types/rewire": "^2.5.30", "@types/semver": "^7.7.0", "@types/sinon": "^17.0.4", "@types/ungap__structured-clone": "^1.2.0", @@ -86,10 +85,11 @@ "@types/vscode": "~1.96.0", "@ungap/structured-clone": "^1.3.0", "@vscode/debugprotocol": "^1.68.0", + "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.5.2", + "esbuild-register": "^3.6.0", "eslint": "^9.26.0", "eslint-config-prettier": "^10.1.5", - "glob": "^11.0.2", "mocha": "^11.2.2", "mocha-explorer-launcher-scripts": "^0.4.0", "mocha-multi-reporters": "^1.5.1", @@ -98,7 +98,6 @@ "prettier-plugin-organize-imports": "^4.1.0", "sinon": "^19.0.5", "source-map-support": "^0.5.21", - "tsx": "^4.19.4", "typescript": "^5.8.3", "typescript-eslint": "^8.32.1" }, @@ -112,9 +111,8 @@ "lint": "eslint src test --ext .ts", "package": "vsce package --out out/ --no-gitHubIssueLinking", "publish": "vsce publish", - "compile-test": "esbuild ./test/runTestsInner.ts --outdir=dist --bundle --external:vscode --platform=node", - "pretest": "npm run compile && npm run compile-test", - "test": "tsx ./test/runTests.ts" + "pretest": "npm run compile", + "test": "vscode-test" }, "contributes": { "breakpoints": [ diff --git a/src/extension.ts b/src/extension.ts index 80a13657a2..a2c9eaf414 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -82,7 +82,7 @@ export async function activate(context: vscode.ExtensionContext): Promise( "editor/getEditorContext"); -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface IGetEditorContextRequestArguments { } diff --git a/src/features/HelpCompletion.ts b/src/features/HelpCompletion.ts index a5dc47459d..e33f4cd32a 100644 --- a/src/features/HelpCompletion.ts +++ b/src/features/HelpCompletion.ts @@ -10,11 +10,11 @@ import { LanguageClient } from "vscode-languageclient/node"; import { Settings, CommentType, getSettings } from "../settings"; import { LanguageClientConsumer } from "../languageClientConsumer"; -// eslint-disable-next-line @typescript-eslint/no-empty-interface + interface ICommentHelpRequestArguments { } -// eslint-disable-next-line @typescript-eslint/no-empty-interface + interface ICommentHelpRequestResponse { content: string[] } @@ -88,7 +88,7 @@ class TriggerFinder { public updateState(document: TextDocument, changeText: string): void { switch (this.state) { case SearchState.Searching: - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with + if (changeText.length === 1 && changeText[0] === this.triggerCharacters[this.count]) { this.state = SearchState.Locked; this.document = document; @@ -97,7 +97,7 @@ class TriggerFinder { break; case SearchState.Locked: - // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with + if (document === this.document && changeText.length === 1 && changeText[0] === this.triggerCharacters[this.count]) { this.count++; if (this.count === this.triggerCharacters.length) { @@ -136,7 +136,7 @@ class HelpCompletionProvider extends LanguageClientConsumer { return this.triggerFinderHelpComment.found; } - // eslint-disable-next-line @typescript-eslint/no-empty-function + public override onLanguageClientSet(_languageClient: LanguageClient): void {} public updateState(document: TextDocument, changeText: string, changeRange: Range): void { diff --git a/src/features/PesterTests.ts b/src/features/PesterTests.ts index f5bd839c94..a2f4c10148 100644 --- a/src/features/PesterTests.ts +++ b/src/features/PesterTests.ts @@ -3,7 +3,7 @@ import * as path from "path"; import vscode = require("vscode"); -import { ILogger } from "../logging"; +import type { ILogger } from "../logging"; import { SessionManager } from "../session"; import { getSettings, getChosenWorkspace } from "../settings"; import utils = require("../utils"); @@ -53,9 +53,7 @@ export class PesterTestsFeature implements vscode.Disposable { launchType: LaunchType, fileUri?: vscode.Uri): Promise { - if (fileUri === undefined) { - fileUri = vscode.window.activeTextEditor?.document.uri; - } + fileUri ??= vscode.window.activeTextEditor?.document.uri; if (fileUri === undefined) { return false; diff --git a/src/features/RemoteFiles.ts b/src/features/RemoteFiles.ts index 765b6d99a6..1f854d1a72 100644 --- a/src/features/RemoteFiles.ts +++ b/src/features/RemoteFiles.ts @@ -49,7 +49,7 @@ export class RemoteFilesFeature extends LanguageClientConsumer { }); } - // eslint-disable-next-line @typescript-eslint/no-empty-function + public override onLanguageClientSet(_languageClient: LanguageClient): void {} public dispose(): void { diff --git a/src/features/ShowHelp.ts b/src/features/ShowHelp.ts index 6e73050924..ccdacec991 100644 --- a/src/features/ShowHelp.ts +++ b/src/features/ShowHelp.ts @@ -6,7 +6,7 @@ import { NotificationType } from "vscode-languageclient"; import { LanguageClientConsumer } from "../languageClientConsumer"; import type { LanguageClient } from "vscode-languageclient/node"; -// eslint-disable-next-line @typescript-eslint/no-empty-interface + interface IShowHelpNotificationArguments { } @@ -40,7 +40,7 @@ export class ShowHelpFeature extends LanguageClientConsumer { }); } - // eslint-disable-next-line @typescript-eslint/no-empty-function + public override onLanguageClientSet(_languageClient: LanguageClient): void {} public dispose(): void { diff --git a/src/logging.ts b/src/logging.ts index 7ce8d09e16..37fc74072f 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { LogOutputChannel, LogLevel, window, Event } from "vscode"; +import { type LogOutputChannel, LogLevel, window, type Event } from "vscode"; /** Interface for logging operations. New features should use this interface for the "type" of logger. * This will allow for easy mocking of the logger during unit tests. @@ -140,9 +140,7 @@ export class Logger implements ILogger { export class LanguageClientOutputChannelAdapter implements LogOutputChannel { private _channel: LogOutputChannel | undefined; private get channel(): LogOutputChannel { - if (!this._channel) { - this._channel = window.createOutputChannel(this.channelName, {log: true}); - } + this._channel ??= window.createOutputChannel(this.channelName, {log: true}); return this._channel; } diff --git a/src/platform.ts b/src/platform.ts index b0b0ec9a0e..96ef61cfb0 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -6,12 +6,11 @@ import * as path from "path"; import * as process from "process"; import vscode = require("vscode"); import { integer } from "vscode-languageserver-protocol"; -import { ILogger } from "./logging"; -import { changeSetting, getSettings, PowerShellAdditionalExePathSettings } from "./settings"; +import type { ILogger } from "./logging"; +import { changeSetting, getSettings, type PowerShellAdditionalExePathSettings } from "./settings"; import untildify from "untildify"; // This uses require so we can rewire it in unit tests! -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires const utils = require("./utils"); const WindowsPowerShell64BitLabel = "Windows PowerShell (x64)"; @@ -157,7 +156,7 @@ export class PowerShellExeFinder { yield additionalPwsh; } else if (!additionalPwsh.suppressWarning) { const message = `Additional PowerShell '${additionalPwsh.displayName}' not found at '${additionalPwsh.exePath}'!`; - this.logger.writeWarning(message); + this.logger?.writeWarning(message); if (!getSettings().suppressAdditionalExeNotFoundWarning) { const selection = await vscode.window.showWarningMessage(message, "Don't Show Again"); @@ -631,9 +630,7 @@ class PossiblePowerShellExe implements IPossiblePowerShellExe { public readonly suppressWarning = false) { } public async exists(): Promise { - if (this.knownToExist === undefined) { - this.knownToExist = await utils.checkIfFileExists(this.exePath); - } + this.knownToExist ??= await utils.checkIfFileExists(this.exePath); return this.knownToExist ?? false; } } diff --git a/src/session.ts b/src/session.ts index ed96dae80f..759b7053e5 100644 --- a/src/session.ts +++ b/src/session.ts @@ -1067,7 +1067,7 @@ class SessionMenuItem implements vscode.QuickPickItem { constructor( public readonly label: string, - // eslint-disable-next-line @typescript-eslint/no-empty-function + public readonly callback = async (): Promise => { }) { } } diff --git a/test/core/platform.test.ts b/test/core/platform.test.ts index 20be7109a9..ecc3b83254 100644 --- a/test/core/platform.test.ts +++ b/test/core/platform.test.ts @@ -8,45 +8,33 @@ import * as os from "os"; import * as path from "path"; import * as sinon from "sinon"; import * as platform from "../../src/platform"; +import * as utils from "../../src/utils"; import * as fs from "fs"; // NOTE: Necessary for mock-fs. import * as vscode from "vscode"; -import * as utils from "../../src/utils"; // eslint-disable-next-line @typescript-eslint/require-await -async function fakeCheckIfFileExists( - targetPath: string | vscode.Uri, -): Promise { - try { - const stat = fs.lstatSync( - targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, - ); - return stat.isFile(); - } catch { - return false; - } +async function fakeCheckIfFileExists(targetPath: string | vscode.Uri): Promise { + try { + const stat = fs.lstatSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); + return stat.isFile(); + } catch { + return false; + } } // eslint-disable-next-line @typescript-eslint/require-await -async function fakeCheckIfDirectoryExists( - targetPath: string | vscode.Uri, -): Promise { - try { - const stat = fs.lstatSync( - targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, - ); - return stat.isDirectory(); - } catch { - return false; - } +async function fakeCheckIfDirectoryExists(targetPath: string | vscode.Uri): Promise { + try { + const stat = fs.lstatSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); + return stat.isDirectory(); + } catch { + return false; + } } // eslint-disable-next-line @typescript-eslint/require-await -async function fakeReadDirectory( - targetPath: string | vscode.Uri, -): Promise { - return fs.readdirSync( - targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath, - ); +async function fakeReadDirectory(targetPath: string | vscode.Uri): Promise { + return fs.readdirSync(targetPath instanceof vscode.Uri ? targetPath.fsPath : targetPath); } /** @@ -845,22 +833,22 @@ function setupTestEnvironment(testPlatform: ITestPlatform): void { } describe("Platform module", function () { - beforeEach(function () { + before(function () { sinon.stub(utils, "checkIfFileExists").callsFake(fakeCheckIfFileExists); - sinon - .stub(utils, "checkIfDirectoryExists") - .callsFake(fakeCheckIfDirectoryExists); + sinon.stub(utils, "checkIfDirectoryExists").callsFake(fakeCheckIfDirectoryExists); sinon.stub(utils, "readDirectory").callsFake(fakeReadDirectory); }); - afterEach(function () { + after(function () { sinon.restore(); + }) + + afterEach(function () { mockFS.restore(); }); it("Gets the correct platform details", function () { - const platformDetails: platform.IPlatformDetails = - platform.getPlatformDetails(); + const platformDetails: platform.IPlatformDetails = platform.getPlatformDetails(); switch (process.platform) { case "darwin": assert.strictEqual( @@ -913,181 +901,124 @@ describe("Platform module", function () { }); describe("Default PowerShell installation", function () { - for (const testPlatform of successTestCases) { - it(`Finds it on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successTestCases) { + it(`Finds it on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, {} - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, {}); - const defaultPowerShell = - await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); - const expectedPowerShell = testPlatform.expectedPowerShellSequence[0]; + const defaultPowerShell = await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); + const expectedPowerShell = testPlatform.expectedPowerShellSequence[0]; - assert.strictEqual( - defaultPowerShell!.exePath, - expectedPowerShell.exePath, - ); - assert.strictEqual( - defaultPowerShell!.displayName, - expectedPowerShell.displayName, - ); - assert.strictEqual( - defaultPowerShell!.supportsProperArguments, - expectedPowerShell.supportsProperArguments, - ); - }); - } + assert.strictEqual(defaultPowerShell!.exePath, expectedPowerShell.exePath); + assert.strictEqual(defaultPowerShell!.displayName, expectedPowerShell.displayName); + assert.strictEqual(defaultPowerShell!.supportsProperArguments, expectedPowerShell.supportsProperArguments); + }); + } - for (const testPlatform of errorTestCases) { - it(`Fails gracefully on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of errorTestCases) { + it(`Fails gracefully on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, {} - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, {}); - const defaultPowerShell = - await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); - assert.strictEqual(defaultPowerShell, undefined); - }); - } + const defaultPowerShell = await powerShellExeFinder.getFirstAvailablePowerShellInstallation(); + assert.strictEqual(defaultPowerShell, undefined); + }); + } }); describe("Expected PowerShell installation list", function () { - for (const testPlatform of successTestCases) { - it(`Finds them on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successTestCases) { + it(`Finds them on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, {} - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, {}); - const foundPowerShells = - await powerShellExeFinder.getAllAvailablePowerShellInstallations(); + const foundPowerShells = await powerShellExeFinder.getAllAvailablePowerShellInstallations(); - for ( - let i = 0; - i < testPlatform.expectedPowerShellSequence.length; - i++ - ) { - const foundPowerShell = foundPowerShells[i]; - const expectedPowerShell = - testPlatform.expectedPowerShellSequence[i]; + for (let i = 0; i < testPlatform.expectedPowerShellSequence.length; i++) { + const foundPowerShell = foundPowerShells[i]; + const expectedPowerShell = testPlatform.expectedPowerShellSequence[i]; - assert.strictEqual( - foundPowerShell.exePath, - expectedPowerShell.exePath, - ); - assert.strictEqual( - foundPowerShell.displayName, - expectedPowerShell.displayName, - ); - assert.strictEqual( - foundPowerShell.supportsProperArguments, - expectedPowerShell.supportsProperArguments, - ); - } + assert.strictEqual(foundPowerShell.exePath, expectedPowerShell.exePath); + assert.strictEqual(foundPowerShell.displayName, expectedPowerShell.displayName); + assert.strictEqual(foundPowerShell.supportsProperArguments, expectedPowerShell.supportsProperArguments); + } - assert.strictEqual( - foundPowerShells.length, - testPlatform.expectedPowerShellSequence.length, - "Number of expected PowerShells found does not match", - ); - }); - } + assert.strictEqual( + foundPowerShells.length, + testPlatform.expectedPowerShellSequence.length, + "Number of expected PowerShells found does not match"); + }); + } - for (const testPlatform of errorTestCases) { - it(`Fails gracefully on ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of errorTestCases) { + it(`Fails gracefully on ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, {} - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, {}); - const foundPowerShells = - await powerShellExeFinder.getAllAvailablePowerShellInstallations(); - assert.strictEqual(foundPowerShells.length, 0); - }); - } + const foundPowerShells = await powerShellExeFinder.getAllAvailablePowerShellInstallations(); + assert.strictEqual(foundPowerShells.length, 0); + }); + } }); describe("Windows PowerShell path fix", function () { - for (const testPlatform of successTestCases.filter( - (tp) => - tp.platformDetails.operatingSystem === - platform.OperatingSystem.Windows, - )) { - it(`Corrects the Windows PowerShell path on ${testPlatform.name}`, function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successTestCases + .filter((tp) => tp.platformDetails.operatingSystem === platform.OperatingSystem.Windows)) { + + it(`Corrects the Windows PowerShell path on ${testPlatform.name}`, function () { + setupTestEnvironment(testPlatform); - function getWinPSPath(systemDir: string): string { - return path.join( - testPlatform.environmentVars.windir, - systemDir, - "WindowsPowerShell", - "v1.0", - "powershell.exe", - ); - } + function getWinPSPath(systemDir: string): string { + return path.join( + testPlatform.environmentVars.windir, + systemDir, + "WindowsPowerShell", + "v1.0", + "powershell.exe"); + } - const winPSPath = getWinPSPath("System32"); + const winPSPath = getWinPSPath("System32"); - let altWinPSPath; - if (testPlatform.platformDetails.isProcess64Bit) { - altWinPSPath = getWinPSPath("SysWOW64"); - } else if (testPlatform.platformDetails.isOS64Bit) { - altWinPSPath = getWinPSPath("Sysnative"); - } else { - altWinPSPath = null; - } + let altWinPSPath; + if (testPlatform.platformDetails.isProcess64Bit) { + altWinPSPath = getWinPSPath("SysWOW64"); + } else if (testPlatform.platformDetails.isOS64Bit) { + altWinPSPath = getWinPSPath("Sysnative"); + } else { + altWinPSPath = null; + } - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, {} - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, {}); - assert.strictEqual( - powerShellExeFinder.fixWindowsPowerShellPath(winPSPath), - winPSPath, - ); + assert.strictEqual(powerShellExeFinder.fixWindowsPowerShellPath(winPSPath), winPSPath); - if (altWinPSPath) { - assert.strictEqual( - powerShellExeFinder.fixWindowsPowerShellPath(altWinPSPath), - winPSPath, - ); - } - }); - } + if (altWinPSPath) { + assert.strictEqual(powerShellExeFinder.fixWindowsPowerShellPath(altWinPSPath), winPSPath); + } + }); + } }); describe("PowerShell executables from 'powerShellAdditionalExePaths' are found", function () { - for (const testPlatform of successAdditionalTestCases) { - it(`Guesses for ${testPlatform.name}`, async function () { - setupTestEnvironment(testPlatform); + for (const testPlatform of successAdditionalTestCases) { + it(`Guesses for ${testPlatform.name}`, async function () { + setupTestEnvironment(testPlatform); - const powerShellExeFinder = new platform.PowerShellExeFinder( - testPlatform.platformDetails, - additionalPowerShellExes, - ); + const powerShellExeFinder = new platform.PowerShellExeFinder(testPlatform.platformDetails, additionalPowerShellExes); - let i = 0; - for await (const additionalPwsh of powerShellExeFinder.enumerateAdditionalPowerShellInstallations()) { - const expectedPowerShell = - testPlatform.expectedPowerShellSequence[i]; - i++; + let i = 0; + for await (const additionalPwsh of powerShellExeFinder.enumerateAdditionalPowerShellInstallations()) { + const expectedPowerShell = testPlatform.expectedPowerShellSequence[i]; + i++; - assert.strictEqual( - additionalPwsh.exePath, - expectedPowerShell.exePath, - ); - assert.strictEqual( - additionalPwsh.displayName, - expectedPowerShell.displayName, - ); - } - }); - } + assert.strictEqual(additionalPwsh.exePath, expectedPowerShell.exePath); + assert.strictEqual(additionalPwsh.displayName, expectedPowerShell.displayName); + } + }); + } }); }); diff --git a/test/features/DebugSession.test.ts b/test/features/DebugSession.test.ts index e27ef85274..4b83478809 100644 --- a/test/features/DebugSession.test.ts +++ b/test/features/DebugSession.test.ts @@ -167,6 +167,7 @@ describe("DebugSessionFeature", () => { assert.equal(actual, undefined); assert.match(logger.writeAndShowError.firstCall.args[0], /debugging this file type/); + Sinon.restore(); }); it("Prevents debugging untitled files in a temp console", async () => { diff --git a/test/features/ExternalApi.test.ts b/test/features/ExternalApi.test.ts index 84fe48af96..6d82b17cba 100644 --- a/test/features/ExternalApi.test.ts +++ b/test/features/ExternalApi.test.ts @@ -3,7 +3,7 @@ import * as assert from "assert"; import utils = require("../utils"); -import { IExternalPowerShellDetails, IPowerShellExtensionClient } from "../../src/features/ExternalApi"; +import type { IExternalPowerShellDetails, IPowerShellExtensionClient } from "../../src/features/ExternalApi"; describe("ExternalApi feature", function () { describe("External extension registration", function () { diff --git a/test/features/UpdatePowerShell.test.ts b/test/features/UpdatePowerShell.test.ts index 6023e56bbd..c4eff1aa11 100644 --- a/test/features/UpdatePowerShell.test.ts +++ b/test/features/UpdatePowerShell.test.ts @@ -4,7 +4,7 @@ import assert from "assert"; import { UpdatePowerShell } from "../../src/features/UpdatePowerShell"; import { Settings } from "../../src/settings"; -import { IPowerShellVersionDetails } from "../../src/session"; +import type { IPowerShellVersionDetails } from "../../src/session"; import { testLogger } from "../utils"; describe("UpdatePowerShell feature", function () { diff --git a/test/runTests.ts b/test/runTests.ts deleted file mode 100644 index 507a85470c..0000000000 --- a/test/runTests.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -// NOTE: This code is borrowed under permission from: -// https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-test-sample/src/test - -import * as path from "path"; -import { makeConsoleReporter, downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from "@vscode/test-electron"; -import { existsSync } from "fs"; -import { spawnSync } from "child_process"; - -/** This is the main test entrypoint that: - * - Prepares the test environment by downloading a testing instance of vscode and any additional extensions - * - Starts the test environment with runTestsInner injected into the extensionsTestsPath which will in turn start the Mocha test runner inside the environment. - * - * Tools like npm run test and vscode tasks should point to this script to begin the testing process. It is assumed you have built the extension prior to this step, it will error if it does not find the built extension or related test scaffolding. - * */ -async function main(): Promise { - // Verify that the extension is built - const compiledExtensionPath = path.resolve(__dirname, "../dist/extension.js"); - if (!existsSync(compiledExtensionPath)) { - console.error("ERROR: The extension is not built yet. Please run a build first, using either the 'Run Build Task' in VSCode or ./build.ps1 in PowerShell."); - process.exit(1); - } - - try { - /** The folder containing the Extension Manifest package.json. Passed to `--extensionDevelopmentPath */ - const extensionDevelopmentPath = path.resolve(__dirname, "../"); - - /** The path to the test script that will run inside the vscode instance. Passed to --extensionTestsPath */ - const extensionTestsPath = path.resolve(extensionDevelopmentPath, "dist", "runTestsInner"); - - /** The starting workspace/folder to open in vscode. By default this is a testing instance pointed to the Examples folder */ - const workspacePath = process.env.__TEST_WORKSPACE_PATH ?? "test/TestEnvironment.code-workspace"; - const workspaceToOpen = path.resolve(extensionDevelopmentPath, workspacePath); - - /** The version to test. By default we test on insiders. */ - const vsCodeVersion = process.env.__TEST_VSCODE_VERSION ?? "insiders"; - - /** Install a temporary vscode. This must be done ahead of RunTests in order to install extensions ahead of time. @see https://github.com/microsoft/vscode-test/blob/addc23e100b744de598220adbbf0761da870eda9/README.md?plain=1#L71-L89 **/ - const testVSCodePath = await downloadAndUnzipVSCode(vsCodeVersion, undefined, await makeConsoleReporter()); - InstallExtension(testVSCodePath, "ms-dotnettools.csharp"); - - const launchArgs = [ - workspaceToOpen - ]; - - /** This is fed to runTestsInner so it knows the extension context to find config files */ - const extensionTestsEnv: Record = { - __TEST_EXTENSION_DEVELOPMENT_PATH: extensionDevelopmentPath - }; - - // This info is provided by the Mocha test explorer so it can communicate with the mocha running inside the vscode test instance. - // Adapted from: https://github.com/hbenl/mocha-explorer-launcher-scripts/blob/bd3ace403e729de1be31f46afddccc477f82a178/vscode-test/index.ts#L33-L37 - if (process.argv[2]) { - const mochaIPCInfo = JSON.parse(process.argv[2]); - extensionTestsEnv.MOCHA_WORKER_IPC_ROLE = mochaIPCInfo.role; - extensionTestsEnv.MOCHA_WORKER_IPC_HOST = mochaIPCInfo.host; - extensionTestsEnv.MOCHA_WORKER_IPC_PORT = String(mochaIPCInfo.port); - } - - /** This env var should be passed by launch configurations for debugging the extension tests. If specified, we should wait for it to connect because it means something explicitly asked for debugging **/ - const debugPort = process.env.__TEST_DEBUG_INSPECT_PORT; - console.log("DebugPort", debugPort); - if (debugPort !== undefined) { - console.log(`__TEST_DEBUG_INSPECT_PORT is set to ${debugPort}`); - launchArgs.push(`--inspect-brk-extensions=${debugPort}`); - } else { - // Make debugger optionally available. Mocha Test adapter will use this when debugging because it provides no indicator when it is debugging vs. just running - // FIXME: Because the mocha test explorer often doesn't attach until after the tests start and it provides no indicator of debug vs run, it may be flaky for debug until https://github.com/hbenl/vscode-mocha-test-adapter/pull/240 is merged. To workaround, start debugging sessions using "Test Extensions" launch config. We could use a timeout here but it would slow down everything including normal runs. - launchArgs.push("--inspect-extensions=59229"); - } - - // Download VS Code, unzip it and run the integration test - await runTests({ - extensionDevelopmentPath, - extensionTestsPath, - launchArgs: launchArgs, - // This is necessary because the tests fail if more than once - // instance of Code is running. - version: vsCodeVersion, - extensionTestsEnv: extensionTestsEnv - }); - } catch (err) { - console.error(`RunTests failed to run tests: ${err}`); - process.exit(1); - } finally { - // Clean this up because runTests sets it on the current process, not the child one. - process.env.__TEST_DEBUG_INSPECT_PORT = undefined; - } -} - -/** Installs an extension into an existing vscode instance. Returns the output result */ -function InstallExtension(vscodeExePath: string, extensionIdOrVSIXPath: string): string { - // Install the csharp extension which is required for the dotnet debugger testing - const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExePath); - - args.push("--install-extension", extensionIdOrVSIXPath); - - // Install the extension. There is no API for this, we must use the executable. This is the recommended sample in the vscode-test repo. - console.log(`Installing extension: ${cli} ${args.join(" ")}`); - const installResult = spawnSync(cli, args, { - encoding: "utf8", - stdio: "inherit" - }); - - if (installResult.status !== 0) { - console.error(`Failed to install extension: ${installResult.stderr}`); - console.log("Binary Module Tests will fail if not skipped!"); - } - - return installResult.stdout; -} - -void main(); diff --git a/test/runTestsInner.ts b/test/runTestsInner.ts deleted file mode 100644 index f1c70df2c7..0000000000 --- a/test/runTestsInner.ts +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -import { globSync } from "glob"; -import path from "path"; -import Mocha from "mocha"; -/** This is the entrypoint into the standalone vscode instance that should be passed to the --extensionsTestPath parameter of the test VSCode instance. */ -export function run(testsRoot: string): Promise { - return runTestsInner(testsRoot); -} - -/** Runs inside of the test vscode instance, and should set up and activate the test runner */ -function runTestsInner(testsRoot: string): Promise { - // Allow tools like Mocha Test Explorer to inject their own Mocha worker - if (process.env.MOCHA_WORKER_PATH) { - return require(process.env.MOCHA_WORKER_PATH); - } - - console.log(`\n\n=====\nTest Runner START\n${testsRoot}\n=====`); - - /** Passed from RunTests */ - const rootDir = process.env.__TEST_EXTENSION_DEVELOPMENT_PATH; - if (!rootDir) { - throw new Error("Missing environment variable __TEST_EXTENSIONDEVELOPMENTPATH, this is probably a bug in runTests.ts"); - } - - interface MochaOptionsWithFiles extends Mocha.MochaOptions { - spec?: string; - } - - // eslint-disable-next-line @typescript-eslint/no-var-requires - const config: MochaOptionsWithFiles = require(path.resolve(rootDir, ".mocharc.json")); - if (config.spec === undefined) { - throw new Error("spec must be specified in the config options when running vscode launch tests"); - } - - const mocha = new Mocha(config); - - // Test if files is empty - const files = globSync(config.spec, { cwd: rootDir }); - if (files.length === 0) { - const msg = `No tests found for glob pattern: ${config.spec} in directory: ${rootDir}`; - console.log(msg); - throw new Error(msg); - } - - // Add files to the test suite - for (const file of files) { - const testFile = path.resolve(rootDir, file); - mocha.addFile(testFile); - } - - mocha.reporter("mocha-multi-reporters", { - reporterEnabled: "spec, xunit", - xunitReporterOptions: { - output: path.resolve(rootDir, "test-results.xml"), - } - }); - - return new Promise((resolve) => { - mocha.run(failures => { - console.log(`Mocha Run Finished with ${failures} failures.`); - if (failures > 0) { - throw new Error(`${failures} tests failed.`); - } else { - console.log("\n\n=====\nTest Runner STOP\n====="); - resolve(); - return; - } - }); - }); -} diff --git a/test/utils.ts b/test/utils.ts index e62de2d87e..d58d2dee41 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -10,7 +10,7 @@ import { execSync } from "child_process"; // This lets us test the rest of our path assumptions against the baseline of // this test file existing at `/test/utils.js`. export const rootPath = path.resolve(__dirname, "../"); -// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-var-requires +// eslint-disable-next-line @typescript-eslint/no-explicit-any const packageJSON: any = require(path.resolve(rootPath, "package.json")); export const extensionId = `${packageJSON.publisher}.${packageJSON.name}`; diff --git a/vscode-powershell.build.ps1 b/vscode-powershell.build.ps1 index 7006cd1a73..d79e4e157b 100644 --- a/vscode-powershell.build.ps1 +++ b/vscode-powershell.build.ps1 @@ -24,12 +24,12 @@ function Get-EditorServicesPath { task RestoreNode -If { !(Test-Path ./node_modules/esbuild) } { Write-Build DarkGreen "Restoring build dependencies" - Invoke-BuildExec { & npm ci --omit=optional } + Invoke-BuildExec { & npm ci --omit optional } } task RestoreNodeOptional -If { !(Test-Path ./node_modules/eslint) } { Write-Build DarkMagenta "Restoring build, test, and lint dependencies" - Invoke-BuildExec { & npm ci --include=optional } + Invoke-BuildExec { & npm ci --include optional } } task RestoreEditorServices -If (Get-EditorServicesPath) { From fc2bafe009aad36792c03ac1465377db29563a24 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Thu, 15 May 2025 09:36:58 -0700 Subject: [PATCH 4/4] Fix all types --- src/extension.ts | 7 +- src/features/CodeActions.ts | 2 +- src/features/Console.ts | 7 +- src/features/DebugSession.ts | 1405 +++++++++++++++------------- src/features/ExtensionCommands.ts | 4 +- src/features/ExternalApi.ts | 2 +- src/features/HelpCompletion.ts | 12 +- src/features/UpdatePowerShell.ts | 4 +- src/process.ts | 4 +- src/session.ts | 46 +- src/settings.ts | 2 +- test/core/paths.test.ts | 2 +- test/features/DebugSession.test.ts | 34 +- test/utils.ts | 4 +- 14 files changed, 871 insertions(+), 664 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index a2c9eaf414..63d207ad8f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -10,7 +10,10 @@ import { DebugSessionFeature } from "./features/DebugSession"; import { ExamplesFeature } from "./features/Examples"; import { ExpandAliasFeature } from "./features/ExpandAlias"; import { ExtensionCommandsFeature } from "./features/ExtensionCommands"; -import { ExternalApiFeature, IPowerShellExtensionClient } from "./features/ExternalApi"; +import { + ExternalApiFeature, + type IPowerShellExtensionClient, +} from "./features/ExternalApi"; import { GenerateBugReportFeature } from "./features/GenerateBugReport"; import { GetCommandsFeature } from "./features/GetCommands"; import { HelpCompletionFeature } from "./features/HelpCompletion"; @@ -82,7 +85,7 @@ export async function activate(context: vscode.ExtensionContext): Promise("powerShell/startDebugger"); +export const StartDebuggerNotificationType = new NotificationType( + "powerShell/startDebugger", +); -export const StopDebuggerNotificationType = - new NotificationType("powerShell/stopDebugger"); +export const StopDebuggerNotificationType = new NotificationType( + "powerShell/stopDebugger", +); export enum DebugConfig { - LaunchCurrentFile, - LaunchScript, - InteractiveSession, - AttachHostProcess, - RunPester, - ModuleInteractiveSession, - BinaryModule, - BinaryModulePester, + LaunchCurrentFile, + LaunchScript, + InteractiveSession, + AttachHostProcess, + RunPester, + ModuleInteractiveSession, + BinaryModule, + BinaryModulePester, } /** Make the implicit behavior of undefined and null in the debug api more explicit */ type PREVENT_DEBUG_START = undefined; type PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG = null; -type ResolveDebugConfigurationResult = DebugConfiguration | PREVENT_DEBUG_START | PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; +type ResolveDebugConfigurationResult = + | DebugConfiguration + | PREVENT_DEBUG_START + | PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; const PREVENT_DEBUG_START = undefined; const PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG = null; @@ -67,662 +72,810 @@ const PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG = null; /** Represents the various built-in debug configurations that will be advertised to the user if they choose "Add Config" from the launch debug config window */ // NOTE: These are duplicated with what is in package.json until https://github.com/microsoft/vscode/issues/150663#issuecomment-1506134754 is resolved. export const DebugConfigurations: Record = { - [DebugConfig.LaunchCurrentFile]: { - name: "PowerShell: Launch Current File", - type: "PowerShell", - request: "launch", - script: "${file}", - args: [], - }, - [DebugConfig.LaunchScript]: { - name: "PowerShell: Launch Script", - type: "PowerShell", - request: "launch", - script: "Enter path or command to execute, for example: \"${workspaceFolder}/src/foo.ps1\" or \"Invoke-Pester\"", - args: [], - }, - [DebugConfig.InteractiveSession]: { - name: "PowerShell: Interactive Session", - type: "PowerShell", - request: "launch", - }, - [DebugConfig.AttachHostProcess]: { - name: "PowerShell: Attach to PowerShell Host Process", - type: "PowerShell", - request: "attach", - }, - [DebugConfig.RunPester]: { - name: "PowerShell: Run Pester Tests", - type: "PowerShell", - request: "launch", - script: "Invoke-Pester", - createTemporaryIntegratedConsole: true, - attachDotnetDebugger: true, - }, - [DebugConfig.ModuleInteractiveSession]: { - name: "PowerShell: Module Interactive Session", - type: "PowerShell", - request: "launch", - script: "Enter command to import your binary module, for example: \"Import-Module -Force ${workspaceFolder}/path/to/module.psd1|dll\"", - }, - [DebugConfig.BinaryModule]: { - name: "PowerShell: Binary Module Interactive", - type: "PowerShell", - request: "launch", - script: "Enter command to import your binary module, for example: \"Import-Module -Force ${workspaceFolder}/path/to/module.psd1|dll\"", - createTemporaryIntegratedConsole: true, - attachDotnetDebugger: true, - }, - [DebugConfig.BinaryModulePester]: { - name: "PowerShell: Binary Module Pester Tests", - type: "PowerShell", - request: "launch", - script: "Invoke-Pester", - createTemporaryIntegratedConsole: true, - attachDotnetDebugger: true, - } + [DebugConfig.LaunchCurrentFile]: { + name: "PowerShell: Launch Current File", + type: "PowerShell", + request: "launch", + script: "${file}", + args: [], + }, + [DebugConfig.LaunchScript]: { + name: "PowerShell: Launch Script", + type: "PowerShell", + request: "launch", + script: + 'Enter path or command to execute, for example: "${workspaceFolder}/src/foo.ps1" or "Invoke-Pester"', + args: [], + }, + [DebugConfig.InteractiveSession]: { + name: "PowerShell: Interactive Session", + type: "PowerShell", + request: "launch", + }, + [DebugConfig.AttachHostProcess]: { + name: "PowerShell: Attach to PowerShell Host Process", + type: "PowerShell", + request: "attach", + }, + [DebugConfig.RunPester]: { + name: "PowerShell: Run Pester Tests", + type: "PowerShell", + request: "launch", + script: "Invoke-Pester", + createTemporaryIntegratedConsole: true, + attachDotnetDebugger: true, + }, + [DebugConfig.ModuleInteractiveSession]: { + name: "PowerShell: Module Interactive Session", + type: "PowerShell", + request: "launch", + script: + 'Enter command to import your binary module, for example: "Import-Module -Force ${workspaceFolder}/path/to/module.psd1|dll"', + }, + [DebugConfig.BinaryModule]: { + name: "PowerShell: Binary Module Interactive", + type: "PowerShell", + request: "launch", + script: + 'Enter command to import your binary module, for example: "Import-Module -Force ${workspaceFolder}/path/to/module.psd1|dll"', + createTemporaryIntegratedConsole: true, + attachDotnetDebugger: true, + }, + [DebugConfig.BinaryModulePester]: { + name: "PowerShell: Binary Module Pester Tests", + type: "PowerShell", + request: "launch", + script: "Invoke-Pester", + createTemporaryIntegratedConsole: true, + attachDotnetDebugger: true, + }, }; -export class DebugSessionFeature extends LanguageClientConsumer - implements DebugConfigurationProvider, DebugAdapterDescriptorFactory { - private tempDebugProcess: PowerShellProcess | undefined; - private tempSessionDetails: IEditorServicesSessionDetails | undefined; - private commands: Disposable[] = []; - private handlers: Disposable[] = []; - private adapterName = "PowerShell"; - - constructor(context: ExtensionContext, private sessionManager: SessionManager, private logger: ILogger) { - super(); - - this.activateDebugAdaptor(context); - - // NOTE: While process and runspace IDs are numbers, command - // substitutions in VS Code debug configurations are required to return - // strings. Hence to the `toString()` on these. - this.commands = [ - commands.registerCommand("PowerShell.PickPSHostProcess", async () => { - const processId = await this.pickPSHostProcess(); - return processId?.toString(); - }), - - commands.registerCommand("PowerShell.PickRunspace", async (processId) => { - const runspace = await this.pickRunspace(processId); - return runspace?.toString(); - }, this), - ]; +export class DebugSessionFeature + extends LanguageClientConsumer + implements DebugConfigurationProvider, DebugAdapterDescriptorFactory +{ + private tempDebugProcess: PowerShellProcess | undefined; + private tempSessionDetails: IEditorServicesSessionDetails | undefined; + private commands: Disposable[] = []; + private handlers: Disposable[] = []; + private adapterName = "PowerShell"; + + constructor( + context: ExtensionContext, + private sessionManager: SessionManager, + private logger: ILogger, + ) { + super(); + + this.activateDebugAdaptor(context); + + // NOTE: While process and runspace IDs are numbers, command + // substitutions in VS Code debug configurations are required to return + // strings. Hence to the `toString()` on these. + this.commands = [ + commands.registerCommand("PowerShell.PickPSHostProcess", async () => { + const processId = await this.pickPSHostProcess(); + return processId?.toString(); + }), + + commands.registerCommand( + "PowerShell.PickRunspace", + async (processId) => { + const runspace = await this.pickRunspace(processId); + return runspace?.toString(); + }, + this, + ), + ]; + } + + public dispose(): void { + for (const command of this.commands) { + command.dispose(); } - public dispose(): void { - for (const command of this.commands) { - command.dispose(); - } - - for (const handler of this.handlers) { - handler.dispose(); - } + for (const handler of this.handlers) { + handler.dispose(); + } + } + + // This "activates" the debug adapter. You can only do this once. + public activateDebugAdaptor(context: ExtensionContext): void { + const triggers = [ + DebugConfigurationProviderTriggerKind.Initial, + DebugConfigurationProviderTriggerKind.Dynamic, + ]; + + for (const triggerKind of triggers) { + context.subscriptions.push( + debug.registerDebugConfigurationProvider( + this.adapterName, + this, + triggerKind, + ), + ); } - // This "activates" the debug adapter. You can only do this once. - public activateDebugAdaptor(context: ExtensionContext): void { - const triggers = [ - DebugConfigurationProviderTriggerKind.Initial, - DebugConfigurationProviderTriggerKind.Dynamic - ]; - + context.subscriptions.push( + debug.registerDebugAdapterTrackerFactory( + this.adapterName, + new PowerShellDebugAdapterTrackerFactory(this.adapterName), + ), + debug.registerDebugAdapterDescriptorFactory(this.adapterName, this), + ); + } + + public override onLanguageClientSet(languageClient: LanguageClient): void { + this.handlers = [ + languageClient.onNotification( + StartDebuggerNotificationType, + () => + void debug.startDebugging( + undefined, + DebugConfigurations[DebugConfig.InteractiveSession], + ), + ), + + languageClient.onNotification( + StopDebuggerNotificationType, + () => void debug.stopDebugging(undefined), + ), + ]; + } + + public async provideDebugConfigurations( + _folder: WorkspaceFolder | undefined, + _token?: CancellationToken, + ): Promise { + const debugConfigPickItems = [ + { + id: DebugConfig.LaunchCurrentFile, + label: "Launch Current File", + description: + "Launch and debug the file in the currently active editor window", + }, + { + id: DebugConfig.LaunchScript, + label: "Launch Script", + description: "Launch and debug the specified file or command", + }, + { + id: DebugConfig.InteractiveSession, + label: "Interactive Session", + description: + "Debug commands executed from the PowerShell Extension Terminal", + }, + { + id: DebugConfig.AttachHostProcess, + label: "Attach", + description: "Attach the debugger to a running PowerShell Host Process", + }, + { + id: DebugConfig.RunPester, + label: "Run Pester Tests", + description: + "Debug Pester Tests detected in your current directory (runs Invoke-Pester)", + }, + { + id: DebugConfig.ModuleInteractiveSession, + label: "Interactive Session (Module)", + description: + "Debug commands executed from the PowerShell Extension Terminal after auto-loading your module", + }, + { + id: DebugConfig.BinaryModule, + label: "Interactive Session (Binary Module)", + description: + "Debug a .NET binary or hybrid module loaded into a PowerShell session. Breakpoints you set in your .NET (C#/F#/VB/etc.) code will be hit upon command execution. You may want to add a compile or watch action as a pre-launch task to this configuration.", + }, + { + id: DebugConfig.RunPester, + label: "Run Pester Tests (Binary Module)", + description: + "Debug a .NET binary or hybrid module by running Pester tests. Breakpoints you set in your .NET (C#/F#/VB/etc.) code will be hit upon command execution. You may want to add a compile or watch action as a pre-launch task to this configuration.", + }, + ]; + + const launchSelection = await window.showQuickPick(debugConfigPickItems, { + placeHolder: "Select a PowerShell debug configuration", + }); + + if (launchSelection) { + return [DebugConfigurations[launchSelection.id]]; + } - for (const triggerKind of triggers) { - context.subscriptions.push( - debug.registerDebugConfigurationProvider(this.adapterName, this, triggerKind) - ); - } + return [DebugConfigurations[DebugConfig.LaunchCurrentFile]]; + } + + // We don't use await here but we are returning a promise and the return syntax is easier in an async function + // eslint-disable-next-line @typescript-eslint/require-await + public async resolveDebugConfiguration( + _folder: WorkspaceFolder | undefined, + config: DebugConfiguration, + _token?: CancellationToken, + ): Promise { + // NOTE: We intentionally do not touch the `cwd` setting of the config. + + if (!config.request) { + // No launch.json, create the default configuration for both unsaved + // (Untitled) and saved documents. + const LaunchCurrentFileConfig = + DebugConfigurations[DebugConfig.LaunchCurrentFile]; + config = { ...config, ...LaunchCurrentFileConfig }; + config.current_document = true; + } - context.subscriptions.push( - debug.registerDebugAdapterTrackerFactory(this.adapterName, new PowerShellDebugAdapterTrackerFactory(this.adapterName)), - debug.registerDebugAdapterDescriptorFactory(this.adapterName, this) + if (config.script === "${file}" || config.script === "${relativeFile}") { + if (window.activeTextEditor === undefined) { + void this.logger.writeAndShowError( + "To debug the 'Current File', you must first open a PowerShell script file in the editor.", ); + return PREVENT_DEBUG_START; + } + config.current_document = true; + // Special case using the URI for untitled documents. + const currentDocument = window.activeTextEditor.document; + if (currentDocument.isUntitled) { + config.untitled_document = true; + config.script = currentDocument.uri.toString(); + } } - public override onLanguageClientSet(languageClient: LanguageClient): void { - this.handlers = [ - languageClient.onNotification( - StartDebuggerNotificationType, - () => void debug.startDebugging(undefined, DebugConfigurations[DebugConfig.InteractiveSession])), - - languageClient.onNotification( - StopDebuggerNotificationType, - () => void debug.stopDebugging(undefined)) - ]; + return config; + } + + public async resolveDebugConfigurationWithSubstitutedVariables( + _folder: WorkspaceFolder | undefined, + config: DebugConfiguration, + _token?: CancellationToken, + ): Promise { + let resolvedConfig: ResolveDebugConfigurationResult; + + // Prevent the Debug Console from opening + config.internalConsoleOptions = "neverOpen"; + + const settings = getSettings(); + config.createTemporaryIntegratedConsole ??= + settings.debugging.createTemporaryIntegratedConsole; + config.executeMode ??= settings.debugging.executeMode; + if (config.request === "attach") { + resolvedConfig = await this.resolveAttachDebugConfiguration(config); + } else if (config.request === "launch") { + resolvedConfig = await this.resolveLaunchDebugConfiguration(config); + } else { + void this.logger.writeAndShowError( + `PowerShell debug configuration's request type was invalid: '${config.request}'.`, + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; } - public async provideDebugConfigurations( - _folder: WorkspaceFolder | undefined, - _token?: CancellationToken): Promise { - - const debugConfigPickItems = [ - { - id: DebugConfig.LaunchCurrentFile, - label: "Launch Current File", - description: "Launch and debug the file in the currently active editor window", - }, - { - id: DebugConfig.LaunchScript, - label: "Launch Script", - description: "Launch and debug the specified file or command", - }, - { - id: DebugConfig.InteractiveSession, - label: "Interactive Session", - description: "Debug commands executed from the PowerShell Extension Terminal", - }, - { - id: DebugConfig.AttachHostProcess, - label: "Attach", - description: "Attach the debugger to a running PowerShell Host Process", - }, - { - id: DebugConfig.RunPester, - label: "Run Pester Tests", - description: "Debug Pester Tests detected in your current directory (runs Invoke-Pester)", - }, - { - id: DebugConfig.ModuleInteractiveSession, - label: "Interactive Session (Module)", - description: "Debug commands executed from the PowerShell Extension Terminal after auto-loading your module", - }, - { - id: DebugConfig.BinaryModule, - label: "Interactive Session (Binary Module)", - description: "Debug a .NET binary or hybrid module loaded into a PowerShell session. Breakpoints you set in your .NET (C#/F#/VB/etc.) code will be hit upon command execution. You may want to add a compile or watch action as a pre-launch task to this configuration.", - }, - { - id: DebugConfig.RunPester, - label: "Run Pester Tests (Binary Module)", - description: "Debug a .NET binary or hybrid module by running Pester tests. Breakpoints you set in your .NET (C#/F#/VB/etc.) code will be hit upon command execution. You may want to add a compile or watch action as a pre-launch task to this configuration.", - }, - ]; - - const launchSelection = - await window.showQuickPick( - debugConfigPickItems, - { placeHolder: "Select a PowerShell debug configuration" }); - - if (launchSelection) { - return [DebugConfigurations[launchSelection.id]]; - } - - return [DebugConfigurations[DebugConfig.LaunchCurrentFile]]; + return resolvedConfig; + } + + // This is our factory entrypoint hook to when a debug session starts, and + // where we will lazy initialize everything needed to do the debugging such + // as a temporary console if required. + // + // NOTE: A Promise meets the shape of a ProviderResult, which allows us to + // make this method async. + public async createDebugAdapterDescriptor( + session: DebugSession, + _executable: DebugAdapterExecutable | undefined, + ): Promise { + await this.sessionManager.start(); + + const sessionDetails = session.configuration + .createTemporaryIntegratedConsole + ? await this.createTemporaryIntegratedConsole(session) + : this.sessionManager.getSessionDetails(); + + if (sessionDetails === undefined) { + return undefined; } - // We don't use await here but we are returning a promise and the return syntax is easier in an async function - // eslint-disable-next-line @typescript-eslint/require-await - public async resolveDebugConfiguration( - _folder: WorkspaceFolder | undefined, - config: DebugConfiguration, - _token?: CancellationToken): Promise { - - // NOTE: We intentionally do not touch the `cwd` setting of the config. - - if (!config.request) { - // No launch.json, create the default configuration for both unsaved - // (Untitled) and saved documents. - const LaunchCurrentFileConfig = DebugConfigurations[DebugConfig.LaunchCurrentFile]; - config = { ...config, ...LaunchCurrentFileConfig }; - config.current_document = true; - } - - if (config.script === "${file}" || config.script === "${relativeFile}") { - if (window.activeTextEditor === undefined) { - void this.logger.writeAndShowError("To debug the 'Current File', you must first open a PowerShell script file in the editor."); - return PREVENT_DEBUG_START; - } - config.current_document = true; - // Special case using the URI for untitled documents. - const currentDocument = window.activeTextEditor.document; - if (currentDocument.isUntitled) { - config.untitled_document = true; - config.script = currentDocument.uri.toString(); - } + // Create or show the debug terminal (either temporary or session). + this.sessionManager.showDebugTerminal(true); + + this.logger.writeDebug( + `Connecting to pipe: ${sessionDetails.debugServicePipeName}`, + ); + this.logger.writeDebug( + `Debug configuration: ${JSON.stringify(session.configuration, undefined, 2)}`, + ); + + return new DebugAdapterNamedPipeServer(sessionDetails.debugServicePipeName); + } + + private async resolveLaunchDebugConfiguration( + config: DebugConfiguration, + ): Promise { + // Check the languageId and file extension only for current documents + // (which includes untitled documents). This prevents accidentally + // running the debugger for an open non-PowerShell file. + if (config.current_document) { + const currentDocument = window.activeTextEditor?.document; + if (currentDocument?.languageId !== "powershell") { + void this.logger.writeAndShowError( + `PowerShell does not support debugging this language mode: '${currentDocument?.languageId}'.`, + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; + } + + if (await checkIfFileExists(config.script)) { + const ext = path.extname(config.script).toLowerCase(); + if (!(ext === ".ps1" || ext === ".psm1")) { + void this.logger.writeAndShowError( + `PowerShell does not support debugging this file type: '${path.basename(config.script)}'.`, + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; } - - return config; + } } - public async resolveDebugConfigurationWithSubstitutedVariables( - _folder: WorkspaceFolder | undefined, - config: DebugConfiguration, - _token?: CancellationToken): Promise { - - let resolvedConfig: ResolveDebugConfigurationResult; - - // Prevent the Debug Console from opening - config.internalConsoleOptions = "neverOpen"; - - const settings = getSettings(); - config.createTemporaryIntegratedConsole ??= settings.debugging.createTemporaryIntegratedConsole; - config.executeMode ??= settings.debugging.executeMode; - if (config.request === "attach") { - resolvedConfig = await this.resolveAttachDebugConfiguration(config); - } else if (config.request === "launch") { - resolvedConfig = await this.resolveLaunchDebugConfiguration(config); - } else { - void this.logger.writeAndShowError(`PowerShell debug configuration's request type was invalid: '${config.request}'.`); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - - return resolvedConfig; + if (config.untitled_document && config.createTemporaryIntegratedConsole) { + void this.logger.writeAndShowError( + "PowerShell does not support debugging untitled files in a temporary console.", + ); + return PREVENT_DEBUG_START; } - // This is our factory entrypoint hook to when a debug session starts, and - // where we will lazy initialize everything needed to do the debugging such - // as a temporary console if required. - // - // NOTE: A Promise meets the shape of a ProviderResult, which allows us to - // make this method async. - public async createDebugAdapterDescriptor( - session: DebugSession, - _executable: DebugAdapterExecutable | undefined): Promise { - - await this.sessionManager.start(); - - const sessionDetails = session.configuration.createTemporaryIntegratedConsole - ? await this.createTemporaryIntegratedConsole(session) - : this.sessionManager.getSessionDetails(); - - if (sessionDetails === undefined) { - return undefined; - } - - // Create or show the debug terminal (either temporary or session). - this.sessionManager.showDebugTerminal(true); - - this.logger.writeDebug(`Connecting to pipe: ${sessionDetails.debugServicePipeName}`); - this.logger.writeDebug(`Debug configuration: ${JSON.stringify(session.configuration, undefined, 2)}`); - - return new DebugAdapterNamedPipeServer(sessionDetails.debugServicePipeName); + if ( + !config.createTemporaryIntegratedConsole && + config.attachDotnetDebugger + ) { + void this.logger.writeAndShowError( + "dotnet debugging without using a temporary console is currently not supported. Please updated your launch config to include createTemporaryIntegratedConsole: true.", + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; } - private async resolveLaunchDebugConfiguration(config: DebugConfiguration): Promise { - // Check the languageId and file extension only for current documents - // (which includes untitled documents). This prevents accidentally - // running the debugger for an open non-PowerShell file. - if (config.current_document) { - const currentDocument = window.activeTextEditor?.document; - if (currentDocument?.languageId !== "powershell") { - void this.logger.writeAndShowError(`PowerShell does not support debugging this language mode: '${currentDocument?.languageId}'.`); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - - if (await checkIfFileExists(config.script)) { - const ext = path.extname(config.script).toLowerCase(); - if (!(ext === ".ps1" || ext === ".psm1")) { - void this.logger.writeAndShowError(`PowerShell does not support debugging this file type: '${path.basename(config.script)}'.`); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - } - } - - if (config.untitled_document && config.createTemporaryIntegratedConsole) { - void this.logger.writeAndShowError("PowerShell does not support debugging untitled files in a temporary console."); - return PREVENT_DEBUG_START; - } - - if (!config.createTemporaryIntegratedConsole && config.attachDotnetDebugger) { - void this.logger.writeAndShowError("dotnet debugging without using a temporary console is currently not supported. Please updated your launch config to include createTemporaryIntegratedConsole: true."); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - - if (config.attachDotnetDebugger) { - return this.resolveAttachDotnetDebugConfiguration(config); - } - - return config; + if (config.attachDotnetDebugger) { + return this.resolveAttachDotnetDebugConfiguration(config); } - private resolveAttachDotnetDebugConfiguration(config: DebugConfiguration): ResolveDebugConfigurationResult { - if (!extensions.getExtension("ms-dotnettools.csharp")) { - void this.logger.writeAndShowError("You specified attachDotnetDebugger in your PowerShell Launch configuration but the C# extension is not installed. Please install the C# extension and try again."); - return PREVENT_DEBUG_START; - } - - const dotnetDebuggerConfig = this.getDotnetNamedConfigOrDefault(config.dotnetDebuggerConfigName); - - if (dotnetDebuggerConfig === undefined) { - void this.logger.writeAndShowError(`You specified dotnetDebuggerConfigName in your PowerShell Launch configuration but a matching launch config was not found. Please ensure you have a coreclr attach config with the name ${config.dotnetDebuggerConfigName} in your launch.json file or remove dotnetDebuggerConfigName from your PowerShell Launch configuration to use the defaults`); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - - config.dotnetAttachConfig = dotnetDebuggerConfig; - return config; + return config; + } + + private resolveAttachDotnetDebugConfiguration( + config: DebugConfiguration, + ): ResolveDebugConfigurationResult { + if (!extensions.getExtension("ms-dotnettools.csharp")) { + void this.logger.writeAndShowError( + "You specified attachDotnetDebugger in your PowerShell Launch configuration but the C# extension is not installed. Please install the C# extension and try again.", + ); + return PREVENT_DEBUG_START; } - private async createTemporaryIntegratedConsole(session: DebugSession): Promise { - const settings = getSettings(); - this.tempDebugProcess = await this.sessionManager.createDebugSessionProcess(settings); - // TODO: Maybe set a timeout on the cancellation token? - const cancellationTokenSource = new CancellationTokenSource(); - this.tempSessionDetails = await this.tempDebugProcess.start(cancellationTokenSource.token); - - // NOTE: Dotnet attach debugging is only currently supported if a temporary debug terminal is used, otherwise we get lots of lock conflicts from loading the assemblies. - if (session.configuration.attachDotnetDebugger) { - const dotnetAttachConfig = session.configuration.dotnetAttachConfig; - - // Will wait until the process is started and available before attaching - const pid = await this.tempDebugProcess.getPid(); - if (pid === undefined) { - void this.logger.writeAndShowError("Attach Dotnet Debugger was specified but the PowerShell temporary debug session failed to start. This is probably a bug."); - return PREVENT_DEBUG_START; - } - dotnetAttachConfig.processId = pid; - - // Ensure the .NET session stops before the PowerShell session so that the .NET debug session doesn't emit an error about the process unexpectedly terminating. - let tempConsoleDotnetAttachSession: DebugSession; - const startDebugEvent = debug.onDidStartDebugSession(dotnetAttachSession => { - if (dotnetAttachSession.configuration.name != dotnetAttachConfig.name) { return; } - - // Makes the event one-time - // HACK: This seems like you would be calling a method on a variable not assigned yet, but it does work in the flow. - // The dispose shorthand demonry for making an event one-time courtesy of: https://github.com/OmniSharp/omnisharp-vscode/blob/b8b07bb12557b4400198895f82a94895cb90c461/test/integrationTests/launchConfiguration.integration.test.ts#L41-L45 - startDebugEvent.dispose(); - - this.logger.writeDebug(`Debugger session detected: ${dotnetAttachSession.name} (${dotnetAttachSession.id})`); - - tempConsoleDotnetAttachSession = dotnetAttachSession; - - const stopDebugEvent = debug.onDidTerminateDebugSession(async tempConsoleSession => { - if (tempConsoleDotnetAttachSession.parentSession?.id !== tempConsoleSession.id) { return; } - - // Makes the event one-time - stopDebugEvent.dispose(); - - this.logger.writeDebug(`Debugger session terminated: ${tempConsoleSession.name} (${tempConsoleSession.id})`); - - // HACK: As of 2023-08-17, there is no vscode debug API to request the C# debugger to detach, so we send it a custom DAP request instead. - const disconnectRequest: DebugProtocol.DisconnectRequest = { - command: "disconnect", - seq: 0, - type: "request", - arguments: { - restart: false, - terminateDebuggee: false, - suspendDebuggee: false - } - }; - - try { - await dotnetAttachSession.customRequest( - disconnectRequest.command, - disconnectRequest.arguments - ); - } catch (err) { - this.logger.writeWarning(`Disconnect request to dotnet debugger failed: ${err}`); - } - }); - }); - - // Start a child debug session to attach the dotnet debugger - // TODO: Accommodate multi-folder workspaces if the C# code is in a different workspace folder - await debug.startDebugging(undefined, dotnetAttachConfig, session); - this.logger.writeDebug(`Dotnet attach debug configuration: ${JSON.stringify(dotnetAttachConfig, undefined, 2)}`); - this.logger.writeDebug(`Attached dotnet debugger to process: ${pid}`); - } + const dotnetDebuggerConfig = this.getDotnetNamedConfigOrDefault( + config.dotnetDebuggerConfigName, + ); - return this.tempSessionDetails; + if (dotnetDebuggerConfig === undefined) { + void this.logger.writeAndShowError( + `You specified dotnetDebuggerConfigName in your PowerShell Launch configuration but a matching launch config was not found. Please ensure you have a coreclr attach config with the name ${config.dotnetDebuggerConfigName} in your launch.json file or remove dotnetDebuggerConfigName from your PowerShell Launch configuration to use the defaults`, + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; } - private getDotnetNamedConfigOrDefault(configName?: string): ResolveDebugConfigurationResult { - if (configName) { - const debugConfigs = this.getLaunchConfigurations(); - return debugConfigs.find(({ type, request, name }) => - type === "coreclr" && - request === "attach" && - name === configName - ); - } - - // Default debugger config if none provided - // TODO: Type this appropriately from the C# extension? - return { - name: "Dotnet Debugger: Temporary Extension Terminal", - type: "coreclr", - request: "attach", - processId: undefined, - logging: { - moduleLoad: false - } - }; + config.dotnetAttachConfig = dotnetDebuggerConfig; + return config; + } + + private async createTemporaryIntegratedConsole( + session: DebugSession, + ): Promise { + const settings = getSettings(); + this.tempDebugProcess = + await this.sessionManager.createDebugSessionProcess(settings); + // TODO: Maybe set a timeout on the cancellation token? + const cancellationTokenSource = new CancellationTokenSource(); + this.tempSessionDetails = await this.tempDebugProcess.start( + cancellationTokenSource.token, + ); + + // NOTE: Dotnet attach debugging is only currently supported if a temporary debug terminal is used, otherwise we get lots of lock conflicts from loading the assemblies. + if (session.configuration.attachDotnetDebugger) { + const dotnetAttachConfig = session.configuration.dotnetAttachConfig; + + // Will wait until the process is started and available before attaching + const pid = await this.tempDebugProcess.getPid(); + if (pid === undefined) { + void this.logger.writeAndShowError( + "Attach Dotnet Debugger was specified but the PowerShell temporary debug session failed to start. This is probably a bug.", + ); + return PREVENT_DEBUG_START; + } + dotnetAttachConfig.processId = pid; + + // Ensure the .NET session stops before the PowerShell session so that the .NET debug session doesn't emit an error about the process unexpectedly terminating. + let tempConsoleDotnetAttachSession: DebugSession; + const startDebugEvent = debug.onDidStartDebugSession( + (dotnetAttachSession) => { + if ( + dotnetAttachSession.configuration.name != dotnetAttachConfig.name + ) { + return; + } + + // Makes the event one-time + // HACK: This seems like you would be calling a method on a variable not assigned yet, but it does work in the flow. + // The dispose shorthand demonry for making an event one-time courtesy of: https://github.com/OmniSharp/omnisharp-vscode/blob/b8b07bb12557b4400198895f82a94895cb90c461/test/integrationTests/launchConfiguration.integration.test.ts#L41-L45 + startDebugEvent.dispose(); + + this.logger.writeDebug( + `Debugger session detected: ${dotnetAttachSession.name} (${dotnetAttachSession.id})`, + ); + + tempConsoleDotnetAttachSession = dotnetAttachSession; + + const stopDebugEvent = debug.onDidTerminateDebugSession( + async (tempConsoleSession) => { + if ( + tempConsoleDotnetAttachSession.parentSession?.id !== + tempConsoleSession.id + ) { + return; + } + + // Makes the event one-time + stopDebugEvent.dispose(); + + this.logger.writeDebug( + `Debugger session terminated: ${tempConsoleSession.name} (${tempConsoleSession.id})`, + ); + + // HACK: As of 2023-08-17, there is no vscode debug API to request the C# debugger to detach, so we send it a custom DAP request instead. + const disconnectRequest: DebugProtocol.DisconnectRequest = { + command: "disconnect", + seq: 0, + type: "request", + arguments: { + restart: false, + terminateDebuggee: false, + suspendDebuggee: false, + }, + }; + + try { + await dotnetAttachSession.customRequest( + disconnectRequest.command, + disconnectRequest.arguments, + ); + } catch (err) { + this.logger.writeWarning( + `Disconnect request to dotnet debugger failed: ${err}`, + ); + } + }, + ); + }, + ); + + // Start a child debug session to attach the dotnet debugger + // TODO: Accommodate multi-folder workspaces if the C# code is in a different workspace folder + await debug.startDebugging(undefined, dotnetAttachConfig, session); + this.logger.writeDebug( + `Dotnet attach debug configuration: ${JSON.stringify(dotnetAttachConfig, undefined, 2)}`, + ); + this.logger.writeDebug(`Attached dotnet debugger to process: ${pid}`); } - /** Fetches all available vscode launch configurations. This is abstracted out for easier testing. */ - private getLaunchConfigurations(): DebugConfiguration[] { - return workspace.getConfiguration("launch").get("configurations") ?? []; + return this.tempSessionDetails; + } + + private getDotnetNamedConfigOrDefault( + configName?: string, + ): ResolveDebugConfigurationResult { + if (configName) { + const debugConfigs = this.getLaunchConfigurations(); + return debugConfigs.find( + ({ type, request, name }) => + type === "coreclr" && request === "attach" && name === configName, + ); } - private async resolveAttachDebugConfiguration(config: DebugConfiguration): Promise { - const platformDetails = getPlatformDetails(); - const versionDetails = this.sessionManager.getPowerShellVersionDetails(); - if (versionDetails === undefined) { - void this.logger.writeAndShowError(`PowerShell session version details were not found for '${config.name}'.`); - return PREVENT_DEBUG_START; - } - - // Cross-platform attach to process was added in 6.2.0-preview.4. - if (versionDetails.version < "7.0.0" && platformDetails.operatingSystem !== OperatingSystem.Windows) { - void this.logger.writeAndShowError(`Attaching to a PowerShell Host Process on ${OperatingSystem[platformDetails.operatingSystem]} requires PowerShell 7.0 or higher (Current Version: ${versionDetails.version}).`); - return PREVENT_DEBUG_START; - } - - // If nothing is set, prompt for the processId. - if (!config.customPipeName && !config.processId) { - config.processId = await this.pickPSHostProcess(); - // No process selected. Cancel attach. - if (!config.processId) { - return PREVENT_DEBUG_START; - } - } - - // If we were given a stringified int from the user, or from the picker - // command, we need to parse it here. - if (typeof config.processId === "string" && config.processId != "current") { - config.processId = parseInt(config.processId); - } - - // NOTE: We don't support attaching to the Extension Terminal, even - // though in the past it looked like we did. The implementation was - // half-baked and left things unusable. - if (config.processId === "current" || config.processId === await this.sessionManager.getLanguageServerPid()) { - // TODO: When (if ever) it's supported, we need to convert 0 and the - // old notion of "current" to the actual process ID, like this: - // config.processId = await this.sessionManager.getLanguageServerPid(); - void this.logger.writeAndShowError("Attaching to the PowerShell Extension terminal is not supported. Please use the 'PowerShell: Interactive Session' debug configuration instead."); - return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; - } - - if (!config.runspaceId && !config.runspaceName) { - config.runspaceId = await this.pickRunspace(config.processId); - // No runspace selected. Cancel attach. - if (!config.runspaceId) { - return PREVENT_DEBUG_START; - } - } - - return config; + // Default debugger config if none provided + // TODO: Type this appropriately from the C# extension? + return { + name: "Dotnet Debugger: Temporary Extension Terminal", + type: "coreclr", + request: "attach", + processId: undefined, + logging: { + moduleLoad: false, + }, + }; + } + + /** Fetches all available vscode launch configurations. This is abstracted out for easier testing. */ + private getLaunchConfigurations(): DebugConfiguration[] { + return ( + workspace + .getConfiguration("launch") + .get("configurations") ?? [] + ); + } + + private async resolveAttachDebugConfiguration( + config: DebugConfiguration, + ): Promise { + const platformDetails = getPlatformDetails(); + const versionDetails = this.sessionManager.getPowerShellVersionDetails(); + if (versionDetails === undefined) { + void this.logger.writeAndShowError( + `PowerShell session version details were not found for '${config.name}'.`, + ); + return PREVENT_DEBUG_START; } - private async pickPSHostProcess(): Promise { - const client = await LanguageClientConsumer.getLanguageClient(); - const response = await client.sendRequest(GetPSHostProcessesRequestType, {}); - const items: IProcessItem[] = []; - for (const process of response) { - let windowTitle = ""; - if (process.mainWindowTitle) { - windowTitle = `, ${process.mainWindowTitle}`; - } - - items.push({ - label: process.processName, - description: `PID: ${process.processId.toString()}${windowTitle}`, - processId: process.processId, - }); - } - - if (items.length === 0) { - return Promise.reject(new Error("There are no PowerShell host processes to attach.")); - } - - const options: QuickPickOptions = { - placeHolder: "Select a PowerShell host process to attach.", - matchOnDescription: true, - matchOnDetail: true, - }; - - const item = await window.showQuickPick(items, options); - - return item?.processId ?? undefined; + // Cross-platform attach to process was added in 6.2.0-preview.4. + if ( + versionDetails.version < "7.0.0" && + platformDetails.operatingSystem !== OperatingSystem.Windows + ) { + void this.logger.writeAndShowError( + `Attaching to a PowerShell Host Process on ${OperatingSystem[platformDetails.operatingSystem]} requires PowerShell 7.0 or higher (Current Version: ${versionDetails.version}).`, + ); + return PREVENT_DEBUG_START; } - private async pickRunspace(processId: number): Promise { - const client = await LanguageClientConsumer.getLanguageClient(); - const response = await client.sendRequest(GetRunspaceRequestType, { processId }); - const items: IRunspaceItem[] = []; - for (const runspace of response) { - items.push({ - label: runspace.name, - description: `ID: ${runspace.id} - ${runspace.availability}`, - id: runspace.id, - }); - } - - const options: QuickPickOptions = { - placeHolder: "Select PowerShell runspace to debug", - matchOnDescription: true, - matchOnDetail: true, - }; - - const item = await window.showQuickPick(items, options); - - return item?.id ?? undefined; + // If nothing is set, prompt for the processId. + if (!config.customPipeName && !config.processId) { + config.processId = await this.pickPSHostProcess(); + // No process selected. Cancel attach. + if (!config.processId) { + return PREVENT_DEBUG_START; + } } -} -class PowerShellDebugAdapterTrackerFactory implements DebugAdapterTrackerFactory, Disposable { - disposables: Disposable[] = []; - constructor(private adapterName = "PowerShell") {} - - - _log: LogOutputChannel | undefined; - /** Lazily creates a {@link LogOutputChannel} for debug tracing, and presents it only when DAP logging is enabled. - * - * We want to use a shared output log for separate debug sessions as usually only one is running at a time and we - * dont need an output window for every debug session. We also want to leave it active so user can copy and paste - * even on run end. When user changes the setting and disables it getter will return undefined, which will result - * in a noop for the logging activities, effectively pausing logging but not disposing the output channel. If the - * user re-enables, then logging resumes. - */ - get log(): LogOutputChannel | undefined { - if (workspace.getConfiguration("powershell.developer").get("traceDap") && this._log === undefined) { - this._log = window.createOutputChannel(`${this.adapterName}: Trace DAP`, { log: true }); - this.disposables.push(this._log); - } - return this._log; + // If we were given a stringified int from the user, or from the picker + // command, we need to parse it here. + if (typeof config.processId === "string" && config.processId != "current") { + config.processId = parseInt(config.processId); } - // This tracker effectively implements the logging for the debug adapter to a LogOutputChannel - createDebugAdapterTracker(session: DebugSession): DebugAdapterTracker { - const sessionInfo = `${this.adapterName} Debug Session: ${session.name} [${session.id}]`; - return { - onWillStartSession: () => this.log?.info(`Starting ${sessionInfo}. Set log level to trace to see DAP messages beyond errors`), - onWillStopSession: () => this.log?.info(`Stopping ${sessionInfo}`), - onExit: code => this.log?.info(`${sessionInfo} exited with code ${code}`), - onWillReceiveMessage: (m): void => { - this.log?.debug(`➡️${m.seq} ${m.type}: ${m.command}`); - if (m.arguments && (Array.isArray(m.arguments) ? m.arguments.length > 0 : Object.keys(m.arguments).length > 0)) { - this.log?.trace(`${m.seq}: ` + JSON.stringify(m.arguments, undefined, 2)); - } - }, - onDidSendMessage: (m):void => { - const responseSummary = m.request_seq !== undefined - ? `${m.success ? "✅" : "❌"}${m.request_seq} ${m.type}(${m.seq}): ${m.command}` - : `⬅️${m.seq} ${m.type}: ${m.event ?? m.command}`; - this.log?.debug( - responseSummary - ); - if (m.body && (Array.isArray(m.body) ? m.body.length > 0 : Object.keys(m.body).length > 0)) { - this.log?.trace(`${m.seq}: ` + JSON.stringify(m.body, undefined, 2)); - } - }, - onError: e => this.log?.error(e), - }; + // NOTE: We don't support attaching to the Extension Terminal, even + // though in the past it looked like we did. The implementation was + // half-baked and left things unusable. + if ( + config.processId === "current" || + config.processId === (await this.sessionManager.getLanguageServerPid()) + ) { + // TODO: When (if ever) it's supported, we need to convert 0 and the + // old notion of "current" to the actual process ID, like this: + // config.processId = await this.sessionManager.getLanguageServerPid(); + void this.logger.writeAndShowError( + "Attaching to the PowerShell Extension terminal is not supported. Please use the 'PowerShell: Interactive Session' debug configuration instead.", + ); + return PREVENT_DEBUG_START_AND_OPEN_DEBUGCONFIG; } - dispose(): void { - this.disposables.forEach(d => d.dispose()); + if (!config.runspaceId && !config.runspaceName) { + config.runspaceId = await this.pickRunspace(config.processId); + // No runspace selected. Cancel attach. + if (!config.runspaceId) { + return PREVENT_DEBUG_START; + } } -} -export class SpecifyScriptArgsFeature implements Disposable { - private command: Disposable; - private context: ExtensionContext; - - constructor(context: ExtensionContext) { - this.context = context; + return config; + } + + private async pickPSHostProcess(): Promise { + const client = await LanguageClientConsumer.getLanguageClient(); + const response = await client.sendRequest( + GetPSHostProcessesRequestType, + {}, + ); + const items: IProcessItem[] = []; + for (const process of response) { + let windowTitle = ""; + if (process.mainWindowTitle) { + windowTitle = `, ${process.mainWindowTitle}`; + } + + items.push({ + label: process.processName, + description: `PID: ${process.processId.toString()}${windowTitle}`, + processId: process.processId, + }); + } - this.command = commands.registerCommand("PowerShell.SpecifyScriptArgs", () => { - return this.specifyScriptArguments(); - }); + if (items.length === 0) { + return Promise.reject( + new Error("There are no PowerShell host processes to attach."), + ); } - public dispose(): void { - this.command.dispose(); + const options: QuickPickOptions = { + placeHolder: "Select a PowerShell host process to attach.", + matchOnDescription: true, + matchOnDetail: true, + }; + + const item = await window.showQuickPick(items, options); + + return item?.processId ?? undefined; + } + + private async pickRunspace(processId: number): Promise { + const client = await LanguageClientConsumer.getLanguageClient(); + const response = await client.sendRequest(GetRunspaceRequestType, { + processId, + }); + const items: IRunspaceItem[] = []; + for (const runspace of response) { + items.push({ + label: runspace.name, + description: `ID: ${runspace.id} - ${runspace.availability}`, + id: runspace.id, + }); } - private async specifyScriptArguments(): Promise { - const powerShellDbgScriptArgsKey = "powerShellDebugScriptArgs"; + const options: QuickPickOptions = { + placeHolder: "Select PowerShell runspace to debug", + matchOnDescription: true, + matchOnDetail: true, + }; - const options: InputBoxOptions = { - ignoreFocusOut: true, - placeHolder: "Enter script arguments or leave empty to pass no args", - }; + const item = await window.showQuickPick(items, options); - const prevArgs = this.context.workspaceState.get(powerShellDbgScriptArgsKey, ""); - if (prevArgs.length > 0) { - options.value = prevArgs; - } + return item?.id ?? undefined; + } +} - const text = await window.showInputBox(options); - // When user cancel's the input box (by pressing Esc), the text value is undefined. - // Let's not blow away the previous setting. - if (text !== undefined) { - await this.context.workspaceState.update(powerShellDbgScriptArgsKey, text); +class PowerShellDebugAdapterTrackerFactory + implements DebugAdapterTrackerFactory, Disposable +{ + disposables: Disposable[] = []; + constructor(private adapterName = "PowerShell") {} + + _log: LogOutputChannel | undefined; + /** Lazily creates a {@link LogOutputChannel} for debug tracing, and presents it only when DAP logging is enabled. + * + * We want to use a shared output log for separate debug sessions as usually only one is running at a time and we + * dont need an output window for every debug session. We also want to leave it active so user can copy and paste + * even on run end. When user changes the setting and disables it getter will return undefined, which will result + * in a noop for the logging activities, effectively pausing logging but not disposing the output channel. If the + * user re-enables, then logging resumes. + */ + get log(): LogOutputChannel | undefined { + if ( + workspace + .getConfiguration("powershell.developer") + .get("traceDap") && + this._log === undefined + ) { + this._log = window.createOutputChannel(`${this.adapterName}: Trace DAP`, { + log: true, + }); + this.disposables.push(this._log); + } + return this._log; + } + + // This tracker effectively implements the logging for the debug adapter to a LogOutputChannel + createDebugAdapterTracker(session: DebugSession): DebugAdapterTracker { + const sessionInfo = `${this.adapterName} Debug Session: ${session.name} [${session.id}]`; + return { + onWillStartSession: () => + this.log?.info( + `Starting ${sessionInfo}. Set log level to trace to see DAP messages beyond errors`, + ), + onWillStopSession: () => this.log?.info(`Stopping ${sessionInfo}`), + onExit: (code) => + this.log?.info(`${sessionInfo} exited with code ${code}`), + onWillReceiveMessage: (m): void => { + this.log?.debug(`➡️${m.seq} ${m.type}: ${m.command}`); + if ( + m.arguments && + (Array.isArray(m.arguments) + ? m.arguments.length > 0 + : Object.keys(m.arguments).length > 0) + ) { + this.log?.trace( + `${m.seq}: ` + JSON.stringify(m.arguments, undefined, 2), + ); } + }, + onDidSendMessage: (m): void => { + const responseSummary = + m.request_seq !== undefined + ? `${m.success ? "✅" : "❌"}${m.request_seq} ${m.type}(${m.seq}): ${m.command}` + : `⬅️${m.seq} ${m.type}: ${m.event ?? m.command}`; + this.log?.debug(responseSummary); + if ( + m.body && + (Array.isArray(m.body) + ? m.body.length > 0 + : Object.keys(m.body).length > 0) + ) { + this.log?.trace(`${m.seq}: ` + JSON.stringify(m.body, undefined, 2)); + } + }, + onError: (e) => this.log?.error(e), + }; + } + + dispose(): void { + this.disposables.forEach((d) => d.dispose()); + } +} + +export class SpecifyScriptArgsFeature implements Disposable { + private command: Disposable; + private context: ExtensionContext; + + constructor(context: ExtensionContext) { + this.context = context; + + this.command = commands.registerCommand( + "PowerShell.SpecifyScriptArgs", + () => { + return this.specifyScriptArguments(); + }, + ); + } + + public dispose(): void { + this.command.dispose(); + } + + private async specifyScriptArguments(): Promise { + const powerShellDbgScriptArgsKey = "powerShellDebugScriptArgs"; + + const options: InputBoxOptions = { + ignoreFocusOut: true, + placeHolder: "Enter script arguments or leave empty to pass no args", + }; + + const prevArgs = this.context.workspaceState.get( + powerShellDbgScriptArgsKey, + "", + ); + if (prevArgs.length > 0) { + options.value = prevArgs; + } - return text; + const text = await window.showInputBox(options); + // When user cancel's the input box (by pressing Esc), the text value is undefined. + // Let's not blow away the previous setting. + if (text !== undefined) { + await this.context.workspaceState.update( + powerShellDbgScriptArgsKey, + text, + ); } + + return text; + } } interface IProcessItem extends QuickPickItem { - processId: number; // payload for the QuickPick UI + processId: number; // payload for the QuickPick UI } - -interface IGetPSHostProcessesArguments { -} +interface IGetPSHostProcessesArguments {} interface IPSHostProcessInfo { - processName: string; - processId: number; - appDomainName: string; - mainWindowTitle: string; + processName: string; + processId: number; + appDomainName: string; + mainWindowTitle: string; } -export const GetPSHostProcessesRequestType = - new RequestType("powerShell/getPSHostProcesses"); - +export const GetPSHostProcessesRequestType = new RequestType< + IGetPSHostProcessesArguments, + IPSHostProcessInfo[], + string +>("powerShell/getPSHostProcesses"); interface IRunspaceItem extends QuickPickItem { - id: number; // payload for the QuickPick UI + id: number; // payload for the QuickPick UI } - + interface IGetRunspaceRequestArguments { } diff --git a/src/features/ExtensionCommands.ts b/src/features/ExtensionCommands.ts index 74547fbab7..52acbbc067 100644 --- a/src/features/ExtensionCommands.ts +++ b/src/features/ExtensionCommands.ts @@ -8,7 +8,7 @@ import { Position, Range, RequestType } from "vscode-languageclient"; import { LanguageClient } from "vscode-languageclient/node"; -import { ILogger } from "../logging"; +import type { ILogger } from "../logging"; import { getSettings, validateCwdSetting } from "../settings"; import { LanguageClientConsumer } from "../languageClientConsumer"; import { DebugConfig, DebugConfigurations } from "./DebugSession"; @@ -64,7 +64,7 @@ export const GetEditorContextRequestType = new RequestType( "editor/getEditorContext"); - + export interface IGetEditorContextRequestArguments { } diff --git a/src/features/ExternalApi.ts b/src/features/ExternalApi.ts index 29e3427f88..974436da4e 100644 --- a/src/features/ExternalApi.ts +++ b/src/features/ExternalApi.ts @@ -3,7 +3,7 @@ import * as vscode from "vscode"; import { v4 as uuidv4 } from "uuid"; -import { ILogger } from "../logging"; +import type { ILogger } from "../logging"; import { SessionManager } from "../session"; export interface IExternalPowerShellDetails { diff --git a/src/features/HelpCompletion.ts b/src/features/HelpCompletion.ts index e33f4cd32a..f92544f6f0 100644 --- a/src/features/HelpCompletion.ts +++ b/src/features/HelpCompletion.ts @@ -3,18 +3,18 @@ import { Disposable, EndOfLine, Range, SnippetString, - TextDocument, TextDocumentChangeEvent, window, workspace + type TextDocument, type TextDocumentChangeEvent, window, workspace } from "vscode"; import { RequestType } from "vscode-languageclient"; import { LanguageClient } from "vscode-languageclient/node"; import { Settings, CommentType, getSettings } from "../settings"; import { LanguageClientConsumer } from "../languageClientConsumer"; - + interface ICommentHelpRequestArguments { } - + interface ICommentHelpRequestResponse { content: string[] } @@ -88,7 +88,7 @@ class TriggerFinder { public updateState(document: TextDocument, changeText: string): void { switch (this.state) { case SearchState.Searching: - + if (changeText.length === 1 && changeText[0] === this.triggerCharacters[this.count]) { this.state = SearchState.Locked; this.document = document; @@ -97,7 +97,7 @@ class TriggerFinder { break; case SearchState.Locked: - + if (document === this.document && changeText.length === 1 && changeText[0] === this.triggerCharacters[this.count]) { this.count++; if (this.count === this.triggerCharacters.length) { @@ -136,7 +136,7 @@ class HelpCompletionProvider extends LanguageClientConsumer { return this.triggerFinderHelpComment.found; } - + public override onLanguageClientSet(_languageClient: LanguageClient): void {} public updateState(document: TextDocument, changeText: string, changeRange: Range): void { diff --git a/src/features/UpdatePowerShell.ts b/src/features/UpdatePowerShell.ts index 6805272cc8..adc5194912 100644 --- a/src/features/UpdatePowerShell.ts +++ b/src/features/UpdatePowerShell.ts @@ -5,8 +5,8 @@ import fetch from "node-fetch"; import { SemVer } from "semver"; import vscode = require("vscode"); -import { ILogger } from "../logging"; -import { IPowerShellVersionDetails } from "../session"; +import type { ILogger } from "../logging"; +import type { IPowerShellVersionDetails } from "../session"; import { changeSetting, Settings } from "../settings"; interface IUpdateMessageItem extends vscode.MessageItem { diff --git a/src/process.ts b/src/process.ts index f99b0cfa1b..38bba0bc42 100644 --- a/src/process.ts +++ b/src/process.ts @@ -4,10 +4,10 @@ import cp = require("child_process"); import path = require("path"); import vscode = require("vscode"); -import { ILogger } from "./logging"; +import type { ILogger } from "./logging"; import { Settings, validateCwdSetting } from "./settings"; import utils = require("./utils"); -import { IEditorServicesSessionDetails } from "./session"; +import type { IEditorServicesSessionDetails } from "./session"; import { promisify } from "util"; export class PowerShellProcess { diff --git a/src/session.ts b/src/session.ts index 759b7053e5..1e693ccd27 100644 --- a/src/session.ts +++ b/src/session.ts @@ -4,25 +4,49 @@ import net = require("net"); import path = require("path"); import vscode = require("vscode"); -import TelemetryReporter, { TelemetryEventProperties, TelemetryEventMeasurements } from "@vscode/extension-telemetry"; +import TelemetryReporter, { + type TelemetryEventProperties, + type TelemetryEventMeasurements, +} from "@vscode/extension-telemetry"; import { Message } from "vscode-jsonrpc"; -import { ILogger, LanguageClientOutputChannelAdapter, LspTraceParser, PsesParser } from "./logging"; +import { + type ILogger, + LanguageClientOutputChannelAdapter, + LspTraceParser, + PsesParser, +} from "./logging"; import { PowerShellProcess } from "./process"; -import { Settings, changeSetting, getSettings, getEffectiveConfigurationTarget, validateCwdSetting } from "./settings"; +import { + Settings, + changeSetting, + getSettings, + getEffectiveConfigurationTarget, + validateCwdSetting, +} from "./settings"; import utils = require("./utils"); import { - CloseAction, CloseHandlerResult, DocumentSelector, ErrorAction, ErrorHandlerResult, - LanguageClientOptions, Middleware, NotificationType, - RequestType0, ResolveCodeLensSignature, - RevealOutputChannelOn, + CloseAction, + type CloseHandlerResult, + DocumentSelector, + ErrorAction, + type ErrorHandlerResult, + type LanguageClientOptions, + type Middleware, + NotificationType, + RequestType0, + type ResolveCodeLensSignature, + RevealOutputChannelOn, } from "vscode-languageclient"; -import { LanguageClient, StreamInfo } from "vscode-languageclient/node"; +import { LanguageClient, type StreamInfo } from "vscode-languageclient/node"; import { UpdatePowerShell } from "./features/UpdatePowerShell"; import { - getPlatformDetails, IPlatformDetails, IPowerShellExeDetails, - OperatingSystem, PowerShellExeFinder + getPlatformDetails, + type IPlatformDetails, + type IPowerShellExeDetails, + OperatingSystem, + PowerShellExeFinder, } from "./platform"; import { LanguageClientConsumer } from "./languageClientConsumer"; import { SemVer, satisfies } from "semver"; @@ -1067,7 +1091,7 @@ class SessionMenuItem implements vscode.QuickPickItem { constructor( public readonly label: string, - + public readonly callback = async (): Promise => { }) { } } diff --git a/src/settings.ts b/src/settings.ts index f29079846a..943b4c27ab 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -4,7 +4,7 @@ import vscode = require("vscode"); import utils = require("./utils"); import os = require("os"); -import { ILogger } from "./logging"; +import type { ILogger } from "./logging"; import untildify from "untildify"; import path = require("path"); diff --git a/test/core/paths.test.ts b/test/core/paths.test.ts index 703b22a53f..e3d6de49a7 100644 --- a/test/core/paths.test.ts +++ b/test/core/paths.test.ts @@ -3,7 +3,7 @@ import assert from "assert"; import * as vscode from "vscode"; -import { IPowerShellExtensionClient } from "../../src/features/ExternalApi"; +import type { IPowerShellExtensionClient } from "../../src/features/ExternalApi"; import utils = require("../utils"); import { checkIfDirectoryExists, checkIfFileExists, ShellIntegrationScript } from "../../src/utils"; diff --git a/test/features/DebugSession.test.ts b/test/features/DebugSession.test.ts index 4b83478809..9ddcd5ac87 100644 --- a/test/features/DebugSession.test.ts +++ b/test/features/DebugSession.test.ts @@ -4,13 +4,37 @@ import structuredClone from "@ungap/structured-clone"; //Polyfill for structuredClone which will be present in Node 17. import * as assert from "assert"; import Sinon from "sinon"; -import { DebugAdapterNamedPipeServer, DebugConfiguration, DebugSession, Extension, ExtensionContext, Range, SourceBreakpoint, TextDocument, TextEditor, Uri, commands, debug, extensions, window, workspace } from "vscode"; +import { + DebugAdapterNamedPipeServer, + type DebugConfiguration, + type DebugSession, + type Extension, + type ExtensionContext, + Range, + SourceBreakpoint, + type TextDocument, + type TextEditor, + Uri, + commands, + debug, + extensions, + window, + workspace, +} from "vscode"; import { Disposable } from "vscode-languageserver-protocol"; -import { DebugConfig, DebugSessionFeature, DebugConfigurations } from "../../src/features/DebugSession"; -import { IPowerShellExtensionClient } from "../../src/features/ExternalApi"; +import { + DebugConfig, + DebugSessionFeature, + DebugConfigurations, +} from "../../src/features/DebugSession"; +import type { IPowerShellExtensionClient } from "../../src/features/ExternalApi"; import * as platform from "../../src/platform"; -import { IPlatformDetails } from "../../src/platform"; -import { IEditorServicesSessionDetails, IPowerShellVersionDetails, SessionManager } from "../../src/session"; +import type { IPlatformDetails } from "../../src/platform"; +import { + type IEditorServicesSessionDetails, + type IPowerShellVersionDetails, + SessionManager, +} from "../../src/session"; import * as utils from "../../src/utils"; import { BuildBinaryModuleMock, WaitEvent, ensureEditorServicesIsConnected, stubInterface, testLogger } from "../utils"; diff --git a/test/utils.ts b/test/utils.ts index d58d2dee41..05deec5e05 100644 --- a/test/utils.ts +++ b/test/utils.ts @@ -3,8 +3,8 @@ import * as path from "path"; import * as vscode from "vscode"; -import { ILogger } from "../src/logging"; -import { IPowerShellExtensionClient } from "../src/features/ExternalApi"; +import type { ILogger } from "../src/logging"; +import type { IPowerShellExtensionClient } from "../src/features/ExternalApi"; import { execSync } from "child_process"; // This lets us test the rest of our path assumptions against the baseline of