diff --git a/.mocharc.json b/.mocharc.json deleted file mode 100644 index a6fe3df..0000000 --- a/.mocharc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/mocharc", - "spec": "**/*.test.ts", - "extension": [ - "ts", - "cts", - "mts" - ], - "require": [ - "@swc-node/register" - ], - "ui": "bdd", - "exit": true, - "failZero": true, - "color": true, - "enable-source-maps": true, - "timeout": 10000, - "ignore": [ - "**/*.vscode.test.ts" - ], - "grep": "vscode-e2e", - "invert": true -} diff --git a/.mocharc.yml b/.mocharc.yml new file mode 100644 index 0000000..7246dd7 --- /dev/null +++ b/.mocharc.yml @@ -0,0 +1,9 @@ +require: 'esbuild-register' +spec: + - 'src/**/*.test.ts' + - 'test/**/*.test.ts' +ignore: ['**/*.vscode.test.ts'] +exit: true +failZero: true +color: true +enable-source-maps: true diff --git a/.npmrc b/.npmrc index 67b5064..60cd421 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ +# Dont forget to update this in package.json script esbuild-base too! use-node-version=18.15.0 engine-strict=true diff --git a/.vscode-test.js b/.vscode-test.js new file mode 100644 index 0000000..769fd6d --- /dev/null +++ b/.vscode-test.js @@ -0,0 +1,11 @@ +// .vscode-test.js +const { defineConfig } = require('@vscode/test-cli') + +module.exports = defineConfig({ + files: 'dist/test/**/*.vscode.test.js', + launchArgs: ['--profile=vscode-pester-test'], + mocha: { + ui: 'bdd', + timeout: 600000 // 10 minutes to allow for debugging + } +}) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 9aa1f6f..d2ece4a 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,6 +5,7 @@ "github.vscode-github-actions", "dbaeumer.vscode-eslint", "connor4312.esbuild-problem-matchers", - "hbenl.vscode-mocha-test-adapter" + "hbenl.vscode-mocha-test-adapter", + "ms-vscode.extension-test-runner" ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index f92fb6c..d5e535a 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -52,27 +52,6 @@ "showAsyncStacks": true, "smartStep": true, "preLaunchTask": "build-watch" - }, - { - "name": "Test Extension", - "type": "node", - "request": "launch", - "program": "${workspaceFolder}/test/runTests.ts", - "runtimeArgs": ["-r", "@swc-node/register"], - "sourceMaps": true, - "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**", "!**/.vscode-test/**"], - "smartStep": true, - "attachSimplePort": 59229, // The default is 9229 but we want to avoid conflicts because we will have two vscode instances running. - "env": { - "__TEST_DEBUG_INSPECT_PORT": "59229" // Needs to match attachSimplePort - }, - "presentation": { - "hidden": false, - "group": "_test" - }, - "internalConsoleOptions": "neverOpen", - "console": "integratedTerminal", - "autoAttachChildProcesses": false } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 48c7ccb..dd0a37c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,9 +6,11 @@ "[typescript]": { "editor.defaultFormatter": "vscode.typescript-language-features" }, - "mochaExplorer.configFile": ".mocharc.json", "mochaExplorer.logpanel": true, "testExplorer.useNativeTesting": true, + "extension-test-runner.debugOptions": { + "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"] + }, "mochaExplorer.env": { "VSCODE_VERSION": "insiders", "ELECTRON_RUN_AS_NODE": null diff --git a/.vscode/tasks.json b/.vscode/tasks.json index ee19c60..ccd7d6f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -10,50 +10,39 @@ "type": "npm", "script": "build-watch", "group": "build", - "problemMatcher": { - "owner": "typescript", - "source": "rollup", - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+) - (error|warning) TS(\\d+): (.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "code": 5, - "message": 6 - }, - "severity": "info", - "fileLocation": ["relative", "${workspaceFolder}"], - "background": { - "activeOnStart": true, - "beginsPattern": "^rollup v\\d+\\.\\d+\\.\\d+$", - "endsPattern": { - "regexp": "^\\[[:-\\s\\d]+\\] waiting for changes\\.\\.\\.$" - } - } + "problemMatcher": "$esbuild-watch", + "isBackground": true + }, + { + "label": "build-test-vscode-watch", + "icon": { + "color": "terminal.ansiBlue", + "id": "beaker" }, + "type": "npm", + "script": "build-test-vscode-watch", + "group": "build", + "problemMatcher": "$esbuild-watch", "isBackground": true }, { "label": "test-watch", "icon": { - "color": "terminal.ansiCyan", - "id": "sync" + "color": "terminal.ansiBlue", + "id": "beaker" }, "type": "npm", "script": "test-watch", "group": "test", + "isBackground": true, "problemMatcher": { "owner": "typescript", "source": "mocha", "pattern": { - "regexp": "^(.*):(\\d+):(\\d+) - (error|warning) TS(\\d+): (.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "code": 5, - "message": 6 + "regexp": "\\w+?(Error): (.+)\\w+?\\((.+)\\)", + "severity": 1, + "message": 2, + "file": 3 }, "severity": "info", "fileLocation": ["relative", "${workspaceFolder}"], @@ -64,8 +53,7 @@ "regexp": "^ℹ \\[mocha\\] waiting for changes...$" } } - }, - "isBackground": true + } } ] } diff --git a/package.json b/package.json index b9fdae8..ec48922 100644 --- a/package.json +++ b/package.json @@ -86,11 +86,6 @@ ], "main": "./dist/extension.js", "devDependencies": { - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-swc": "^0.3.0", - "@rollup/plugin-terser": "^0.4.4", - "@swc-node/register": "^1.6.8", "@types/chai": "^4.3.5", "@types/debounce-promise": "^3.1.9", "@types/glob": "^8.1.0", @@ -98,14 +93,17 @@ "@types/mocha": "^10.0.6", "@types/node": "^20.10.6", "@types/readline-transform": "^1.0.4", + "@types/vscode": "^1.77.0", "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.16.0", "@vscode/dts": "^0.4.0", + "@vscode/test-cli": "^0.0.4", "@vscode/test-electron": "^2.3.8", "@vscode/vsce": "^2.22.0", "chai": "^5.0.0", "debounce-promise": "^3.1.2", "esbuild": "^0.19.11", + "esbuild-register": "^3.5.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-config-standard-with-typescript": "^43.0.0", @@ -116,13 +114,11 @@ "json-parse-safe": "^2.0.0", "lookpath": "^1.2.2", "mocha": "^10.2.0", - "mocha-multi-reporters": "^1.5.1", "path": "^0.12.7", "pkgroll": "^2.0.1", "prettier": "^3.1.1", "prettier-eslint": "^16.2.0", "readline-transform": "^1.0.0", - "rollup": "^4.9.2", "sinon": "^17.0.1", "tslog": "^4.9.2", "typescript": "^5.3.3", @@ -145,25 +141,32 @@ } ], "scripts": { + "esbuild-base": "pnpm esbuild --minify --bundle --platform=node --target=node18.15 --format=cjs --sourcemap --sources-content=false --external:mocha --external:vscode", "package": "vsce package --no-update-package-json --no-git-tag-version --no-dependencies", "publish": "pnpm run publishStable --pre-release --no-git-tag-version", "publishStable": "vsce publish --no-update-package-json --no-dependencies", - "build": "rollup --config", + "build": "pnpm run esbuild-base src/extension.ts --outdir=dist", "build-watch": "pnpm run build --watch", + "build-test-vscode": "pnpm run esbuild-base src/**/*.vscode.test.ts test/**/*.vscode.test.ts --outdir=dist/test", + "build-test-vscode-watch": "pnpm run build-test-vscode --watch", + "test-mocha": "mocha", + "test-mocha-vscode": "pnpm vscode-test", + "test": "pnpm test-mocha && pnpm test-mocha-vscode", + "test-watch": "pnpm test-mocha --watch", "lint-eslint": "eslint . --ext .ts", "lint-prettier": "prettier --check .", "lint-tsc": "tsc --noemit", "lint": "pnpm lint-eslint || pnpm lint-prettier || pnpm lint-tsc", - "test-mocha": "mocha", - "test-mocha-vscode": "node -r @swc-node/register test/runTests.ts", - "test": "pnpm test-mocha && pnpm test-mocha-vscode", - "test-watch": "pnpm test-mocha --watch", "download-api": "vscode-dts main", "postdownload-api": "vscode-dts main", "vscode:prepublish": "pnpm run build" }, "dependencies": { - "@ctiterm/strip-ansi": "^1.0.0", - "@swc/core": "^1.3.102" + "@ctiterm/strip-ansi": "^1.0.0" + }, + "pnpm": { + "patchedDependencies": { + "@vscode/test-cli@0.0.4": "patches/@vscode__test-cli@0.0.4.patch" + } } } diff --git a/patches/@vscode__test-cli@0.0.4.patch b/patches/@vscode__test-cli@0.0.4.patch new file mode 100644 index 0000000..f6cef40 --- /dev/null +++ b/patches/@vscode__test-cli@0.0.4.patch @@ -0,0 +1,14 @@ +diff --git a/out/bin.mjs b/out/bin.mjs +index 5282c55bd62d0b77c17f77a173ff848286c0c2f8..857e6d9ca1b6275185c11ab7ebadb1646b5a5afe 100644 +--- a/out/bin.mjs ++++ b/out/bin.mjs +@@ -11,6 +11,9 @@ import { dirname, isAbsolute, join, resolve } from 'path'; + import supportsColor from 'supports-color'; + import { fileURLToPath, pathToFileURL } from 'url'; + import yargs from 'yargs'; ++import { createRequire } from 'node:module'; ++ ++const require = createRequire(import.meta.url); + const rulesAndBehavior = 'Mocha: Rules & Behavior'; + const reportingAndOutput = 'Mocha: Reporting & Output'; + const fileHandling = 'Mocha: File Handling'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 367c194..879a7cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,29 +1,20 @@ lockfileVersion: '6.0' +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +patchedDependencies: + '@vscode/test-cli@0.0.4': + hash: aa32cg7dyx34lwwenfcblyoqba + path: patches/@vscode__test-cli@0.0.4.patch + dependencies: '@ctiterm/strip-ansi': specifier: ^1.0.0 version: 1.0.0 - '@swc/core': - specifier: ^1.3.102 - version: 1.3.102 devDependencies: - '@rollup/plugin-commonjs': - specifier: ^25.0.7 - version: 25.0.7(rollup@4.9.2) - '@rollup/plugin-node-resolve': - specifier: ^15.2.3 - version: 15.2.3(rollup@4.9.2) - '@rollup/plugin-swc': - specifier: ^0.3.0 - version: 0.3.0(@swc/core@1.3.102)(rollup@4.9.2) - '@rollup/plugin-terser': - specifier: ^0.4.4 - version: 0.4.4(rollup@4.9.2) - '@swc-node/register': - specifier: ^1.6.8 - version: 1.6.8(@swc/core@1.3.102)(typescript@5.3.3) '@types/chai': specifier: ^4.3.5 version: 4.3.6 @@ -45,6 +36,9 @@ devDependencies: '@types/readline-transform': specifier: ^1.0.4 version: 1.0.4 + '@types/vscode': + specifier: ^1.77.0 + version: 1.85.0 '@typescript-eslint/eslint-plugin': specifier: ^6.16.0 version: 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3) @@ -54,6 +48,9 @@ devDependencies: '@vscode/dts': specifier: ^0.4.0 version: 0.4.0 + '@vscode/test-cli': + specifier: ^0.0.4 + version: 0.0.4(patch_hash=aa32cg7dyx34lwwenfcblyoqba) '@vscode/test-electron': specifier: ^2.3.8 version: 2.3.8 @@ -69,6 +66,9 @@ devDependencies: esbuild: specifier: ^0.19.11 version: 0.19.11 + esbuild-register: + specifier: ^3.5.0 + version: 3.5.0(esbuild@0.19.11) eslint: specifier: ^8.56.0 version: 8.56.0 @@ -99,9 +99,6 @@ devDependencies: mocha: specifier: ^10.2.0 version: 10.2.0 - mocha-multi-reporters: - specifier: ^1.5.1 - version: 1.5.1(mocha@10.2.0) path: specifier: ^0.12.7 version: 0.12.7 @@ -117,9 +114,6 @@ devDependencies: readline-transform: specifier: ^1.0.0 version: 1.0.0 - rollup: - specifier: ^4.9.2 - version: 4.9.2 sinon: specifier: ^17.0.1 version: 17.0.1 @@ -625,43 +619,10 @@ packages: '@sinclair/typebox': 0.27.8 dev: true - /@jridgewell/gen-mapping@0.3.3: - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.19 - dev: true - - /@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/source-map@0.3.5: - resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - dev: true - /@jridgewell/sourcemap-codec@1.4.15: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.19: - resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} - dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -721,24 +682,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/plugin-commonjs@25.0.7(rollup@4.9.2): - resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.30.5 - rollup: 4.9.2 - dev: true - /@rollup/plugin-inject@5.0.4(rollup@3.29.4): resolution: {integrity: sha512-dM93Nyqp9Ah14jvThFFA30ifjB8cDKk3Bx69M1nIIHGytXug3VrTv5HEuYBzevu45HvZ0ho7t+40bmScmkzZhg==} engines: {node: '>=14.0.0'} @@ -785,24 +728,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.9.2): - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.5(rollup@4.9.2) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.6 - rollup: 4.9.2 - dev: true - /@rollup/plugin-replace@5.0.3(rollup@3.29.4): resolution: {integrity: sha512-je7fu05B800IrMlWjb2wzJcdXzHYW46iTipfChnBDbIbDXhASZs27W1B58T2Yf45jZtJUONegpbce+9Ut2Ti/Q==} engines: {node: '>=14.0.0'} @@ -817,37 +742,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/plugin-swc@0.3.0(@swc/core@1.3.102)(rollup@4.9.2): - resolution: {integrity: sha512-PC1c1FFAwGoasYUesGCMtJ3DggJl1l9ydvufze5esUwdIFjg2BmKeM6j0JA6WHTJjx6C4x9RjF4LNHEIknKPgA==} - engines: {node: '>=14.0.0'} - peerDependencies: - '@swc/core': ^1.3.0 - rollup: ^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) - '@swc/core': 1.3.102 - rollup: 4.9.2 - smob: 1.4.1 - dev: true - - /@rollup/plugin-terser@0.4.4(rollup@4.9.2): - resolution: {integrity: sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - rollup: 4.9.2 - serialize-javascript: 6.0.1 - smob: 1.4.1 - terser: 5.21.0 - dev: true - /@rollup/pluginutils@5.0.5(rollup@3.29.4): resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} engines: {node: '>=14.0.0'} @@ -863,21 +757,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/pluginutils@5.0.5(rollup@4.9.2): - resolution: {integrity: sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.2 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 4.9.2 - dev: true - /@rollup/pluginutils@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -893,125 +772,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.9.2): - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 4.9.2 - dev: true - - /@rollup/rollup-android-arm-eabi@4.9.2: - resolution: {integrity: sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-android-arm64@4.9.2: - resolution: {integrity: sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-darwin-arm64@4.9.2: - resolution: {integrity: sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-darwin-x64@4.9.2: - resolution: {integrity: sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm-gnueabihf@4.9.2: - resolution: {integrity: sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm64-gnu@4.9.2: - resolution: {integrity: sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-arm64-musl@4.9.2: - resolution: {integrity: sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-riscv64-gnu@4.9.2: - resolution: {integrity: sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==} - cpu: [riscv64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-x64-gnu@4.9.2: - resolution: {integrity: sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-linux-x64-musl@4.9.2: - resolution: {integrity: sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-arm64-msvc@4.9.2: - resolution: {integrity: sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-ia32-msvc@4.9.2: - resolution: {integrity: sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: true - optional: true - - /@rollup/rollup-win32-x64-msvc@4.9.2: - resolution: {integrity: sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: true - optional: true - /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true @@ -1052,150 +812,6 @@ packages: resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} dev: true - /@swc-node/core@1.10.6(@swc/core@1.3.102): - resolution: {integrity: sha512-lDIi/rPosmKIknWzvs2/Fi9zWRtbkx8OJ9pQaevhsoGzJSal8Pd315k1W5AIrnknfdAB4HqRN12fk6AhqnrEEw==} - engines: {node: '>= 10'} - peerDependencies: - '@swc/core': '>= 1.3' - dependencies: - '@swc/core': 1.3.102 - dev: true - - /@swc-node/register@1.6.8(@swc/core@1.3.102)(typescript@5.3.3): - resolution: {integrity: sha512-74ijy7J9CWr1Z88yO+ykXphV29giCrSpANQPQRooE0bObpkTO1g4RzQovIfbIaniBiGDDVsYwDoQ3FIrCE8HcQ==} - peerDependencies: - '@swc/core': '>= 1.3' - typescript: '>= 4.3' - dependencies: - '@swc-node/core': 1.10.6(@swc/core@1.3.102) - '@swc-node/sourcemap-support': 0.3.0 - '@swc/core': 1.3.102 - colorette: 2.0.20 - debug: 4.3.4(supports-color@8.1.1) - pirates: 4.0.6 - tslib: 2.6.2 - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - dev: true - - /@swc-node/sourcemap-support@0.3.0: - resolution: {integrity: sha512-gqBJSmJMWomZFxlppaKea7NeAqFrDrrS0RMt24No92M3nJWcyI9YKGEQKl+EyJqZ5gh6w1s0cTklMHMzRwA1NA==} - dependencies: - source-map-support: 0.5.21 - tslib: 2.6.2 - dev: true - - /@swc/core-darwin-arm64@1.3.102: - resolution: {integrity: sha512-CJDxA5Wd2cUMULj3bjx4GEoiYyyiyL8oIOu4Nhrs9X+tlg8DnkCm4nI57RJGP8Mf6BaXPIJkHX8yjcefK2RlDA==} - engines: {node: '>=10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - - /@swc/core-darwin-x64@1.3.102: - resolution: {integrity: sha512-X5akDkHwk6oAer49oER0qZMjNMkLH3IOZaV1m98uXIasAGyjo5WH1MKPeMLY1sY6V6TrufzwiSwD4ds571ytcg==} - engines: {node: '>=10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - - /@swc/core-linux-arm-gnueabihf@1.3.102: - resolution: {integrity: sha512-kJH3XtZP9YQdjq/wYVBeFuiVQl4HaC4WwRrIxAHwe2OyvrwUI43dpW3LpxSggBnxXcVCXYWf36sTnv8S75o2Gw==} - engines: {node: '>=10'} - cpu: [arm] - os: [linux] - requiresBuild: true - optional: true - - /@swc/core-linux-arm64-gnu@1.3.102: - resolution: {integrity: sha512-flQP2WDyCgO24WmKA1wjjTx+xfCmavUete2Kp6yrM+631IHLGnr17eu7rYJ/d4EnDBId/ytMyrnWbTVkaVrpbQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - - /@swc/core-linux-arm64-musl@1.3.102: - resolution: {integrity: sha512-bQEQSnC44DyoIGLw1+fNXKVGoCHi7eJOHr8BdH0y1ooy9ArskMjwobBFae3GX4T1AfnrTaejyr0FvLYIb0Zkog==} - engines: {node: '>=10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true - - /@swc/core-linux-x64-gnu@1.3.102: - resolution: {integrity: sha512-dFvnhpI478svQSxqISMt00MKTDS0e4YtIr+ioZDG/uJ/q+RpcNy3QI2KMm05Fsc8Y0d4krVtvCKWgfUMsJZXAg==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - - /@swc/core-linux-x64-musl@1.3.102: - resolution: {integrity: sha512-+a0M3CvjeIRNA/jTCzWEDh2V+mhKGvLreHOL7J97oULZy5yg4gf7h8lQX9J8t9QLbf6fsk+0F8bVH1Ie/PbXjA==} - engines: {node: '>=10'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true - - /@swc/core-win32-arm64-msvc@1.3.102: - resolution: {integrity: sha512-w76JWLjkZNOfkB25nqdWUNCbt0zJ41CnWrJPZ+LxEai3zAnb2YtgB/cCIrwxDebRuMgE9EJXRj7gDDaTEAMOOQ==} - engines: {node: '>=10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - optional: true - - /@swc/core-win32-ia32-msvc@1.3.102: - resolution: {integrity: sha512-vlDb09HiGqKwz+2cxDS9T5/461ipUQBplvuhW+cCbzzGuPq8lll2xeyZU0N1E4Sz3MVdSPx1tJREuRvlQjrwNg==} - engines: {node: '>=10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - optional: true - - /@swc/core-win32-x64-msvc@1.3.102: - resolution: {integrity: sha512-E/jfSD7sShllxBwwgDPeXp1UxvIqehj/ShSUqq1pjR/IDRXngcRSXKJK92mJkNFY7suH6BcCWwzrxZgkO7sWmw==} - engines: {node: '>=10'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true - - /@swc/core@1.3.102: - resolution: {integrity: sha512-OAjNLY/f6QWKSDzaM3bk31A+OYHu6cPa9P/rFIx8X5d24tHXUpRiiq6/PYI6SQRjUPlB72GjsjoEU8F+ALadHg==} - engines: {node: '>=10'} - requiresBuild: true - peerDependencies: - '@swc/helpers': ^0.5.0 - peerDependenciesMeta: - '@swc/helpers': - optional: true - dependencies: - '@swc/counter': 0.1.2 - '@swc/types': 0.1.5 - optionalDependencies: - '@swc/core-darwin-arm64': 1.3.102 - '@swc/core-darwin-x64': 1.3.102 - '@swc/core-linux-arm-gnueabihf': 1.3.102 - '@swc/core-linux-arm64-gnu': 1.3.102 - '@swc/core-linux-arm64-musl': 1.3.102 - '@swc/core-linux-x64-gnu': 1.3.102 - '@swc/core-linux-x64-musl': 1.3.102 - '@swc/core-win32-arm64-msvc': 1.3.102 - '@swc/core-win32-ia32-msvc': 1.3.102 - '@swc/core-win32-x64-msvc': 1.3.102 - - /@swc/counter@0.1.2: - resolution: {integrity: sha512-9F4ys4C74eSTEUNndnER3VJ15oru2NumfQxS8geE+f3eB5xvfxpWyqE5XlVnxb/R14uoXi6SLbBwwiDSkv+XEw==} - - /@swc/types@0.1.5: - resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} - /@tootallnate/once@1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} @@ -1264,6 +880,10 @@ packages: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true + /@types/vscode@1.85.0: + resolution: {integrity: sha512-CF/RBon/GXwdfmnjZj0WTUMZN5H6YITOfBCP4iEZlOtVQXuzw6t7Le7+cR+7JzdMrnlm7Mfp49Oj2TuSXIWo3g==} + dev: true + /@typescript-eslint/eslint-plugin@6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1411,6 +1031,20 @@ packages: - supports-color dev: true + /@vscode/test-cli@0.0.4(patch_hash=aa32cg7dyx34lwwenfcblyoqba): + resolution: {integrity: sha512-Tx0tfbxeSb2Xlo+jpd+GJrNLgKQHobhRHrYvOipZRZQYWZ82sKiK02VY09UjU1Czc/YnZnqyAnjUfaVGl3h09w==} + hasBin: true + dependencies: + '@types/mocha': 10.0.6 + chokidar: 3.5.3 + glob: 10.3.10 + minimatch: 9.0.3 + mocha: 10.2.0 + supports-color: 9.4.0 + yargs: 17.7.2 + dev: true + patched: true + /@vscode/test-electron@2.3.8: resolution: {integrity: sha512-b4aZZsBKtMGdDljAsOPObnAi7+VWIaYl3ylCz1jTs+oV6BZ4TNHcVNC3xUn0azPeszBmwSBDQYfFESIaUQnrOg==} engines: {node: '>=16'} @@ -1460,12 +1094,6 @@ packages: acorn: 8.11.3 dev: true - /acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - /acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} @@ -1701,10 +1329,6 @@ packages: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} dev: true - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} requiresBuild: true @@ -1840,6 +1464,15 @@ packages: wrap-ansi: 7.0.0 dev: true + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1861,14 +1494,6 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - dev: true - - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: true - /commander@6.2.1: resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} engines: {node: '>= 6'} @@ -2163,6 +1788,17 @@ packages: is-symbol: 1.0.4 dev: true + /esbuild-register@3.5.0(esbuild@0.19.11): + resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} + peerDependencies: + esbuild: '>=0.12 <1' + dependencies: + debug: 4.3.4(supports-color@8.1.1) + esbuild: 0.19.11 + transitivePeerDependencies: + - supports-color + dev: true + /esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -3376,19 +3012,6 @@ packages: dev: true optional: true - /mocha-multi-reporters@1.5.1(mocha@10.2.0): - resolution: {integrity: sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==} - engines: {node: '>=6.0.0'} - peerDependencies: - mocha: '>=3.1.2' - dependencies: - debug: 4.3.4(supports-color@8.1.1) - lodash: 4.17.21 - mocha: 10.2.0 - transitivePeerDependencies: - - supports-color - dev: true - /mocha@10.2.0: resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==} engines: {node: '>= 14.0.0'} @@ -3458,6 +3081,7 @@ packages: /node-abi@3.52.0: resolution: {integrity: sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ==} engines: {node: '>=10'} + requiresBuild: true dependencies: semver: 7.5.4 dev: true @@ -3647,11 +3271,6 @@ packages: engines: {node: '>=8.6'} dev: true - /pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - dev: true - /pkgroll@2.0.1(typescript@5.3.3): resolution: {integrity: sha512-sAik3umDeElVxQeRj4GpK21mBSi75TnqaKlP+f2/f5WwKEXXtmrrCs0stYG94JfPEyT9mTD8jHk7CODO1dpWmA==} engines: {node: '>=18'} @@ -3907,27 +3526,6 @@ packages: fsevents: 2.3.3 dev: true - /rollup@4.9.2: - resolution: {integrity: sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.2 - '@rollup/rollup-android-arm64': 4.9.2 - '@rollup/rollup-darwin-arm64': 4.9.2 - '@rollup/rollup-darwin-x64': 4.9.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.2 - '@rollup/rollup-linux-arm64-gnu': 4.9.2 - '@rollup/rollup-linux-arm64-musl': 4.9.2 - '@rollup/rollup-linux-riscv64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-musl': 4.9.2 - '@rollup/rollup-win32-arm64-msvc': 4.9.2 - '@rollup/rollup-win32-ia32-msvc': 4.9.2 - '@rollup/rollup-win32-x64-msvc': 4.9.2 - fsevents: 2.3.3 - dev: true - /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -3988,12 +3586,6 @@ packages: randombytes: 2.1.0 dev: true - /serialize-javascript@6.0.1: - resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} - dependencies: - randombytes: 2.1.0 - dev: true - /set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} @@ -4083,22 +3675,6 @@ packages: engines: {node: '>=12'} dev: true - /smob@1.4.1: - resolution: {integrity: sha512-9LK+E7Hv5R9u4g4C3p+jjLstaLe11MDsL21UpYaCNmapvMkYhqCV4A/f/3gyH8QjMyh6l68q9xC85vihY9ahMQ==} - dev: true - - /source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: true - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -4220,6 +3796,11 @@ packages: has-flag: 4.0.0 dev: true + /supports-color@9.4.0: + resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} + engines: {node: '>=12'} + dev: true + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -4249,17 +3830,6 @@ packages: dev: true optional: true - /terser@5.21.0: - resolution: {integrity: sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==} - engines: {node: '>=10'} - hasBin: true - dependencies: - '@jridgewell/source-map': 0.3.5 - acorn: 8.10.0 - commander: 2.20.3 - source-map-support: 0.5.21 - dev: true - /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -4296,10 +3866,6 @@ packages: strip-bom: 3.0.0 dev: true - /tslib@2.6.2: - resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: true - /tslog@4.9.2: resolution: {integrity: sha512-wBM+LRJoNl34Bdu8mYEFxpvmOUedpNUwMNQB/NcuPIZKwdDde6xLHUev3bBjXQU7gdurX++X/YE7gLH8eXYsiQ==} engines: {node: '>=16'} @@ -4533,6 +4099,11 @@ packages: engines: {node: '>=10'} dev: true + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + /yargs-unparser@2.0.0: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} @@ -4556,6 +4127,19 @@ packages: yargs-parser: 20.2.4 dev: true + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: @@ -4573,7 +4157,3 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false diff --git a/rollup.config.mjs b/rollup.config.mjs deleted file mode 100644 index 1eddf54..0000000 --- a/rollup.config.mjs +++ /dev/null @@ -1,32 +0,0 @@ -import commonjs from '@rollup/plugin-commonjs'; -import nodeResolve from '@rollup/plugin-node-resolve'; -import swc from '@rollup/plugin-swc'; -import terser from '@rollup/plugin-terser'; -export default { - input: 'src/extension.ts', - output: { - file: 'dist/extension.js', - format: 'cjs', - sourcemap: true, - sourcemapExcludeSources: true - }, - plugins: [ - // Uses the node resolution algorithm to resolve import statements in JavaScript files - nodeResolve({ - preferBuiltins: true, - extensions: ['.ts', '.js', '.mjs', '.cjs', '.json'] - }), - // Compiles TypeScript faster than tsc - swc({ - // SWC options go here - swc: { - sourceMaps: true, - } - }), - // Converts commonjs modules to ES6 modules for purposes of tree shaking (which then get converted back to CommonJS for output) - commonjs(), - // Minifies code - terser() - ], - external: ['vscode'] -} diff --git a/src/log.ts b/src/log.ts index e0ca6b8..28b9d02 100644 --- a/src/log.ts +++ b/src/log.ts @@ -1,7 +1,7 @@ -import { Logger, type ILogObj } from 'tslog' -import { type ILogObjMeta } from 'tslog/dist/types/BaseLogger' -import { type LogOutputChannel, window } from 'vscode' +import { Logger, ILogObj } from 'tslog' +import { ILogObjMeta } from 'tslog/dist/types/BaseLogger' +import { LogOutputChannel, window } from 'vscode' interface DefaultLog extends ILogObj { args: unknown[] diff --git a/src/log.vscode.test.ts b/src/log.vscode.test.ts index 6cf4f3e..3fb0b63 100644 --- a/src/log.vscode.test.ts +++ b/src/log.vscode.test.ts @@ -1,10 +1,8 @@ import log, { VSCodeLogOutputChannelTransport } from "./log" -describe('vscode-e2e', () => { - describe('log', () => { - it('should be able to log', async () => { - const transport = new VSCodeLogOutputChannelTransport('test') - log.attachTransport(transport.transport) - log.warn('test') - }) +describe('log', () => { + it('should be able to log', () => { + const transport = new VSCodeLogOutputChannelTransport('test') + log.attachTransport(transport.transport) + log.warn('test') }) }) diff --git a/test/extension.test.ts b/test/extension.test.ts new file mode 100644 index 0000000..6e84037 --- /dev/null +++ b/test/extension.test.ts @@ -0,0 +1,10 @@ +interface ShouldNotAppear { + shouldNotAppear: string +} + +describe('test', () => { + it('test', () => { + console.warn("SWCRC Setting", process.env.SWCRC) + console.warn("TESTFLAG Setting", process.env.TESTFLAG) + }) +}) diff --git a/test/runTests.ts b/test/runTests.ts deleted file mode 100644 index 25e040c..0000000 --- a/test/runTests.ts +++ /dev/null @@ -1,128 +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 { ConsoleReporter, 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. - * */ -export 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. Check that your build watch task is functioning correctly.") - 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(__dirname, "./runTestsInnerLoader.cjs") - - /** 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, new ConsoleReporter(true)) - InstallExtension(testVSCodePath, "ms-vscode.powershell") - - const launchArgs = [ - // https://github.com/microsoft/vscode/issues/84238 - '--no-sandbox', - // https://github.com/microsoft/vscode-test/issues/221 - '--disable-gpu-sandbox', - // https://github.com/microsoft/vscode-test/issues/120 - '--disable-updates', - '--skip-welcome', - '--skip-release-notes', - '--disable-workspace-trust', - 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] !== undefined) { - 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, - // This is necessary because the tests fail if more than once - // instance of Code is running. - version: vsCodeVersion, - extensionTestsEnv - }) - } catch (err: unknown) { - 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, prerelease?: boolean): string { - // Install the csharp extension which is required for the dotnet debugger testing - const [cli, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExePath) - - // Ref: https://github.com/microsoft/vscode/issues/143540#issuecomment-1073860327 - if (prerelease ?? false) { - extensionIdOrVSIXPath = `${extensionIdOrVSIXPath}@prerelease` - } - - 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(installResult.stderr) - throw new Error(`Failed to install extension: ${installResult.stderr}`) - } - return installResult.stdout -} - -void main() diff --git a/test/runTestsInner.ts b/test/runTestsInner.ts deleted file mode 100644 index 7e24fdd..0000000 --- a/test/runTestsInner.ts +++ /dev/null @@ -1,82 +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. The vscode instance will close once this function either completes or throws - * an error and will return an appropriate exit code. - * @returns A Promise that resolves when the tests have completed. - * @throws An error if the environment variable __TEST_EXTENSION_DEVELOPMENT_PATH is missing, if no tests are found for the specified glob pattern, or if the test run has one or more failures - */ -export async function run(): Promise { - /** Allow tools like Mocha Test Explorer to inject their own Mocha worker, overriding the default behavior */ - if (process.env.MOCHA_WORKER_PATH) { - return require(process.env.MOCHA_WORKER_PATH) - } - - /** 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") - } - - // Only run E2E tests in the test runner - if (config.grep === 'vscode-e2e') { - console.log("Running vscode-e2e tests only") - config.invert = false - } - - const mocha = new Mocha(config) - - // 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) - } - - // 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 runMochaAsync(mocha) -} - -/** - * Runs the given Mocha instance asynchronously and returns a Promise that resolves when all tests have completed. - * @param mocha The Mocha instance to run. - * @returns A Promise that resolves when all tests have completed successfully, or rejects with an error if any tests fail. - */ -async function runMochaAsync(mocha: Mocha): Promise { - return new Promise((resolve, reject) => { - mocha.run(failures => { - if (failures > 0) { - reject(new Error(`${failures} tests failed.`)) - } else { - resolve() - } - }) - }) -} diff --git a/test/runTestsInnerLoader.cjs b/test/runTestsInnerLoader.cjs deleted file mode 100644 index 331687e..0000000 --- a/test/runTestsInnerLoader.cjs +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -// This shim is needed because you cannot inject the transpiler via NODE_OPTIONS into a packaged electron app like - -// code.exe and vscode-test starts the test runner as a packaged app -exports.run = async () => { - // This allows us to dynamically load typescript files without first compiling them with tsc/esbuild - require('@swc-node/register') - - // eslint-disable-next-line @typescript-eslint/no-var-requires - return require('./runTestsInner.ts').run() -} diff --git a/tsconfig.json b/tsconfig.json index 6e8a089..93f53a0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,11 +4,10 @@ "target": "ES2022", "lib": ["ES2022"], "outDir": "dist", - "inlineSources": true, - "inlineSourceMap": true, + "sourceMap": true, "strict": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true }, - "exclude": ["node_modules", ".vscode-test", "*.config.ts", "TestsToRefactor"], + "exclude": ["node_modules", ".vscode-test", "*.config.ts"] }