From 7d907381801e1f437541b9e6c19d8931448e888e Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 10:32:57 -0700 Subject: [PATCH 01/14] Add basic support for web extension --- .gitignore | 3 + .vscode/launch.json | 8 + packages/typespec-vscode/package.json | 5 +- packages/typespec-vscode/rollup.config.ts | 27 +- packages/typespec-vscode/src/web/extension.ts | 16 + pnpm-lock.yaml | 434 +++++++++++++++++- 6 files changed, 489 insertions(+), 4 deletions(-) create mode 100644 packages/typespec-vscode/src/web/extension.ts diff --git a/.gitignore b/.gitignore index 37082eeea8..48f904c685 100644 --- a/.gitignore +++ b/.gitignore @@ -203,6 +203,9 @@ obj/ packages/*/etc/ docs/**/js-api/ +# VS Code test web temp files +.vscode-test-web/ + # csharp emitter !packages/http-client-csharp/package-lock.json packages/http-client-csharp/generator/artifacts/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 802349582d..ad6a0b1c62 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -144,6 +144,14 @@ "smartStep": true, "sourceMaps": true, "skipFiles": ["/**/*.js"] + }, + { + "name": "Run Web Extension in VS Code", + "type": "extensionHost", + "debugWebWorkerHost": true, + "request": "launch", + "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode", "--extensionDevelopmentKind=web"], + "outFiles": ["${workspaceFolder}/dist/web/**/*.js"] } ], "compounds": [ diff --git a/packages/typespec-vscode/package.json b/packages/typespec-vscode/package.json index 22908cf590..21952b089b 100644 --- a/packages/typespec-vscode/package.json +++ b/packages/typespec-vscode/package.json @@ -24,6 +24,7 @@ ], "type": "module", "main": "./dist/src/extension.cjs", + "browser": "./dist/src/web/extension.js", "engines": { "vscode": "^1.93.0" }, @@ -152,7 +153,8 @@ "generate-language-configuration": "node scripts/generate-language-configuration.js", "generate-third-party-notices": "typespec-build-tool generate-third-party-notices", "package-vsix": "vsce package", - "deploy": "vsce publish" + "deploy": "vsce publish", + "open-in-browser": "vscode-test-web --extensionDevelopmentPath=. ." }, "devDependencies": { "@rollup/plugin-commonjs": "~26.0.1", @@ -164,6 +166,7 @@ "@typespec/internal-build-utils": "workspace:~", "@vitest/coverage-v8": "^2.1.0", "@vitest/ui": "^2.1.0", + "@vscode/test-web": "^0.0.60", "@vscode/vsce": "~3.1.0", "c8": "^10.1.2", "rimraf": "~6.0.1", diff --git a/packages/typespec-vscode/rollup.config.ts b/packages/typespec-vscode/rollup.config.ts index d59c960cd2..68e9fba737 100644 --- a/packages/typespec-vscode/rollup.config.ts +++ b/packages/typespec-vscode/rollup.config.ts @@ -4,7 +4,7 @@ import typescript from "@rollup/plugin-typescript"; import { defineConfig } from "rollup"; -export default defineConfig({ +const baseConfig = defineConfig({ input: "src/extension.ts", output: { file: "dist/src/extension.cjs", @@ -31,3 +31,28 @@ export default defineConfig({ warn(warning); }, }); + +export default defineConfig([ + { + ...baseConfig, + input: "src/extension.ts", + output: { + file: "dist/src/extension.cjs", + format: "commonjs", + sourcemap: true, + exports: "named", + inlineDynamicImports: true, + }, + }, + { + ...baseConfig, + input: "src/web/extension.ts", + output: { + file: "dist/src/web/extension.js", // VSCode web will add extra .js if you use .cjs + format: "commonjs", + sourcemap: true, + // exports: "named", + inlineDynamicImports: true, + }, + }, +]); diff --git a/packages/typespec-vscode/src/web/extension.ts b/packages/typespec-vscode/src/web/extension.ts new file mode 100644 index 0000000000..28ad61492f --- /dev/null +++ b/packages/typespec-vscode/src/web/extension.ts @@ -0,0 +1,16 @@ +import type { ExtensionContext } from "vscode"; +import logger from "../extension-logger.js"; +import { TypeSpecLogOutputChannel } from "../typespec-log-output-channel.js"; + +/** + * Workaround: LogOutputChannel doesn't work well with LSP RemoteConsole, so having a customized LogOutputChannel to make them work together properly + * More detail can be found at https://github.com/microsoft/vscode-discussions/discussions/1149 + */ +const outputChannel = new TypeSpecLogOutputChannel("TypeSpec"); +logger.outputChannel = outputChannel; + +export async function activate(context: ExtensionContext) { + logger.info("Activated TypeSpec Web Extension."); +} + +export async function deactivate(): Promise {} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc52b73810..a0fe385311 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1652,6 +1652,9 @@ importers: '@vitest/ui': specifier: ^2.1.0 version: 2.1.0(vitest@2.1.0) + '@vscode/test-web': + specifier: ^0.0.60 + version: 0.0.60 '@vscode/vsce': specifier: ~3.1.0 version: 3.1.0 @@ -4152,6 +4155,14 @@ packages: '@jsdevtools/ono@7.1.3': resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} + '@koa/cors@5.0.0': + resolution: {integrity: sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==} + engines: {node: '>= 14.0.0'} + + '@koa/router@13.1.0': + resolution: {integrity: sha512-mNVu1nvkpSd8Q8gMebGbCkDWJ51ODetrFvLKYusej+V0ByD4btqHYnPIzTBLXnQMVUlm/oxVwqmWBY3zQfZilw==} + engines: {node: '>= 18'} + '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} @@ -4371,6 +4382,10 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@playwright/browser-chromium@1.47.2': + resolution: {integrity: sha512-tsk9bLcGzIu4k4xI2ixlwDrdJhMqCalUCsSj7TRI8VuvK7cLiJIa5SR0dprKbX+wkku/JMR4EN6g9DMHvfna+Q==} + engines: {node: '>=18'} + '@playwright/test@1.47.0': resolution: {integrity: sha512-SgAdlSwYVpToI4e/IH19IHHWvoijAYH5hu2MWSXptRypLSnzj51PcGD+rsOXFayde4P9ZLi+loXVwArg6IUkCA==} engines: {node: '>=18'} @@ -5586,6 +5601,11 @@ packages: '@volar/typescript@2.4.4': resolution: {integrity: sha512-QQMQRVj0fVHJ3XdRKiS1LclhG0VBXdFYlyuHRQF/xLk2PuJuHNWP26MDZNvEVCvnyUQuUQhIAfylwY5TGPgc6w==} + '@vscode/test-web@0.0.60': + resolution: {integrity: sha512-U3Eif3GZEfmtFJFTRl5IZUxlqDocslvpHCoW4uz407F9YINc2ujJPB0QG+9ZtjjowZDzFJlg60J44RqmnlA0cg==} + engines: {node: '>=16'} + hasBin: true + '@vscode/vsce-sign-alpine-arm64@2.0.2': resolution: {integrity: sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ==} cpu: [arm64] @@ -6006,6 +6026,9 @@ packages: azure-devops-node-api@12.5.0: resolution: {integrity: sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==} + b4a@1.6.6: + resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + babel-core@7.0.0-bridge.0: resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: @@ -6042,6 +6065,21 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + bare-events@2.4.2: + resolution: {integrity: sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==} + + bare-fs@2.3.5: + resolution: {integrity: sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==} + + bare-os@2.4.4: + resolution: {integrity: sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==} + + bare-path@2.1.3: + resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} + + bare-stream@2.3.0: + resolution: {integrity: sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -6117,6 +6155,9 @@ packages: browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} + browserify-zlib@0.1.4: + resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} + browserslist@4.23.2: resolution: {integrity: sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -6174,6 +6215,10 @@ packages: resolution: {integrity: sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw==} engines: {node: ^16.14.0 || >=18.0.0} + cache-content-type@1.0.1: + resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} + engines: {node: '>= 6.0.0'} + cacheable-lookup@7.0.0: resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} engines: {node: '>=14.16'} @@ -6381,6 +6426,10 @@ packages: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} + co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + cockatiel@3.1.2: resolution: {integrity: sha512-5yARKww0dWyWg2/3xZeXgoxjHLwpVqFptj9Zy7qioJ6+/L0ARM184sgMUrQDjxw7ePJWlGhV998mKhzrxT0/Kg==} engines: {node: '>=16'} @@ -6540,6 +6589,10 @@ packages: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} + cookies@0.9.1: + resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==} + engines: {node: '>= 0.8'} + copy-text-to-clipboard@3.2.0: resolution: {integrity: sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==} engines: {node: '>=12'} @@ -7010,6 +7063,9 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} + deep-equal@1.0.1: + resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} + deep-equal@2.2.3: resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==} engines: {node: '>= 0.4'} @@ -7062,6 +7118,9 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + depd@1.1.2: resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} engines: {node: '>= 0.6'} @@ -7178,6 +7237,9 @@ packages: duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + duplexify@3.7.1: + resolution: {integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -7568,6 +7630,9 @@ packages: resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} engines: {node: '>=6.0.0'} + fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -7979,6 +8044,10 @@ packages: resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} engines: {node: '>=6.0'} + gunzip-maybe@1.4.2: + resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==} + hasBin: true + gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} engines: {node: '>=10'} @@ -8137,6 +8206,10 @@ packages: htmlparser2@8.0.2: resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + http-assert@1.5.0: + resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} + engines: {node: '>= 0.8'} + http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} @@ -8147,6 +8220,10 @@ packages: resolution: {integrity: sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==} engines: {node: '>= 0.6'} + http-errors@1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} + engines: {node: '>= 0.6'} + http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -8187,6 +8264,10 @@ packages: resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} engines: {node: '>= 14'} + https-proxy-agent@7.0.5: + resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + engines: {node: '>= 14'} + human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -8380,6 +8461,9 @@ packages: is-decimal@2.0.1: resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + is-deflate@1.0.0: + resolution: {integrity: sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ==} + is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -8405,6 +8489,10 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-gzip@1.0.0: + resolution: {integrity: sha512-rcfALRIb1YewtnksfRIHGcIY93QnK8BIQ/2c9yDYcG/Y6+vRoJuTWBmmSEbyLLYtXm7q35pHOHbZFQBaLrhlWQ==} + engines: {node: '>=0.10.0'} + is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} @@ -8774,6 +8862,10 @@ packages: keyborg@2.6.0: resolution: {integrity: sha512-o5kvLbuTF+o326CMVYpjlaykxqYP9DphFQZ2ZpgrvBouyvOxyEB7oqe8nOLFpiV5VCtz0D3pt8gXQYWpLpBnmA==} + keygrip@1.1.0: + resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} + engines: {node: '>= 0.6'} + keytar@7.9.0: resolution: {integrity: sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==} @@ -8795,6 +8887,32 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + koa-compose@4.1.0: + resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} + + koa-convert@2.0.0: + resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} + engines: {node: '>= 10'} + + koa-morgan@1.0.1: + resolution: {integrity: sha512-JOUdCNlc21G50afBXfErUrr1RKymbgzlrO5KURY+wmDG1Uvd2jmxUJcHgylb/mYXy2SjiNZyYim/ptUBGsIi3A==} + + koa-mount@4.0.0: + resolution: {integrity: sha512-rm71jaA/P+6HeCpoRhmCv8KVBIi0tfGuO/dMKicbQnQW/YJntJ6MnnspkodoA4QstMVEZArsCphmd0bJEtoMjQ==} + engines: {node: '>= 7.6.0'} + + koa-send@5.0.1: + resolution: {integrity: sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==} + engines: {node: '>= 8'} + + koa-static@5.0.0: + resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} + engines: {node: '>= 7.6.0'} + + koa@2.15.3: + resolution: {integrity: sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==} + engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} + kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -9718,6 +9836,9 @@ packages: oniguruma-to-js@0.4.0: resolution: {integrity: sha512-GwNFPQygkpDjO9MOr54Rqi01dGS+h9VAS//Qxz9lTN5B09CxqiIc7rydvdV+Ex2Z8Vk+zqfHH7hU6ePn8uf+Mg==} + only@0.0.2: + resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} + open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} @@ -9812,6 +9933,9 @@ packages: engines: {node: ^16.14.0 || >=18.0.0} hasBin: true + pako@0.2.9: + resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==} + param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -9920,6 +10044,9 @@ packages: path-to-regexp@2.2.1: resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==} + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -9935,6 +10062,9 @@ packages: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} + peek-stream@1.1.3: + resolution: {integrity: sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==} + pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -9987,6 +10117,11 @@ packages: engines: {node: '>=18'} hasBin: true + playwright-core@1.47.2: + resolution: {integrity: sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==} + engines: {node: '>=18'} + hasBin: true + playwright@1.47.0: resolution: {integrity: sha512-jOWiRq2pdNAX/mwLiwFYnPHpEZ4rM+fRSQpRHwEwZlP2PUANvL3+aJOF/bvISMhFD30rqMxUB4RJx9aQbfh4Ww==} engines: {node: '>=18'} @@ -10367,9 +10502,15 @@ packages: psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + pump@2.0.1: + resolution: {integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==} + pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + pumpify@1.5.1: + resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==} + punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} engines: {node: '>=6'} @@ -10402,6 +10543,9 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + queue-tick@1.0.1: + resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} + queue@6.0.2: resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} @@ -10723,6 +10867,10 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-path@1.4.0: + resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} + engines: {node: '>= 0.8'} + resolve-pathname@3.0.0: resolution: {integrity: sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng==} @@ -11134,10 +11282,16 @@ packages: resolution: {integrity: sha512-XKU+nem9OKX/juvJPwka1Q7DTpSbOe0IMp8ZyLQWorhFKpquJdUjryl7Z9GiFZyyTykCqH4ItQ7h8PaOmqVMOw==} hasBin: true + stream-shift@1.0.3: + resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} + streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} + streamx@2.20.1: + resolution: {integrity: sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==} + string-argv@0.3.2: resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} engines: {node: '>=0.6.19'} @@ -11310,10 +11464,16 @@ packages: tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + tar-fs@3.0.6: + resolution: {integrity: sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==} + tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} + tar-stream@3.1.7: + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} @@ -11353,12 +11513,18 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} + text-decoder@1.2.0: + resolution: {integrity: sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==} + text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + through2@2.0.5: + resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} + through2@4.0.2: resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} @@ -11472,6 +11638,10 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} + tsx@4.19.1: resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} engines: {node: '>=18.0.0'} @@ -12232,6 +12402,10 @@ packages: yazl@2.5.1: resolution: {integrity: sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==} + ylru@1.4.0: + resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==} + engines: {node: '>= 4.0.0'} + yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} @@ -15800,6 +15974,16 @@ snapshots: '@jsdevtools/ono@7.1.3': {} + '@koa/cors@5.0.0': + dependencies: + vary: 1.1.2 + + '@koa/router@13.1.0': + dependencies: + http-errors: 2.0.0 + koa-compose: 4.1.0 + path-to-regexp: 6.3.0 + '@leichtgewicht/ip-codec@2.0.5': {} '@mdx-js/mdx@3.0.1': @@ -16155,6 +16339,10 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@playwright/browser-chromium@1.47.2': + dependencies: + playwright-core: 1.47.2 + '@playwright/test@1.47.0': dependencies: playwright: 1.47.0 @@ -17659,6 +17847,26 @@ snapshots: path-browserify: 1.0.1 vscode-uri: 3.0.8 + '@vscode/test-web@0.0.60': + dependencies: + '@koa/cors': 5.0.0 + '@koa/router': 13.1.0 + '@playwright/browser-chromium': 1.47.2 + glob: 11.0.0 + gunzip-maybe: 1.4.2 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.5 + koa: 2.15.3 + koa-morgan: 1.0.1 + koa-mount: 4.0.0 + koa-static: 5.0.0 + minimist: 1.2.8 + playwright: 1.47.0 + tar-fs: 3.0.6 + vscode-uri: 3.0.8 + transitivePeerDependencies: + - supports-color + '@vscode/vsce-sign-alpine-arm64@2.0.2': optional: true @@ -18154,6 +18362,8 @@ snapshots: tunnel: 0.0.6 typed-rest-client: 1.8.11 + b4a@1.6.6: {} + babel-core@7.0.0-bridge.0(@babel/core@7.25.2): dependencies: '@babel/core': 7.25.2 @@ -18197,6 +18407,30 @@ snapshots: balanced-match@1.0.2: {} + bare-events@2.4.2: + optional: true + + bare-fs@2.3.5: + dependencies: + bare-events: 2.4.2 + bare-path: 2.1.3 + bare-stream: 2.3.0 + optional: true + + bare-os@2.4.4: + optional: true + + bare-path@2.1.3: + dependencies: + bare-os: 2.4.4 + optional: true + + bare-stream@2.3.0: + dependencies: + b4a: 1.6.6 + streamx: 2.20.1 + optional: true + base64-js@1.5.1: {} basic-auth@2.0.1: @@ -18306,6 +18540,10 @@ snapshots: browser-process-hrtime@1.0.0: {} + browserify-zlib@0.1.4: + dependencies: + pako: 0.2.9 + browserslist@4.23.2: dependencies: caniuse-lite: 1.0.30001643 @@ -18374,6 +18612,11 @@ snapshots: tar: 6.2.1 unique-filename: 3.0.0 + cache-content-type@1.0.1: + dependencies: + mime-types: 2.1.35 + ylru: 1.4.0 + cacheable-lookup@7.0.0: {} cacheable-request@10.2.14: @@ -18598,6 +18841,8 @@ snapshots: clsx@2.1.1: {} + co@4.6.0: {} + cockatiel@3.1.2: {} code-error-fragment@0.0.230: {} @@ -18747,6 +18992,11 @@ snapshots: cookie@0.6.0: {} + cookies@0.9.1: + dependencies: + depd: 2.0.0 + keygrip: 1.1.0 + copy-text-to-clipboard@3.2.0: {} copy-webpack-plugin@11.0.0(webpack@5.91.0(@swc/core@1.7.26(@swc/helpers@0.5.8))): @@ -19322,6 +19572,8 @@ snapshots: deep-eql@5.0.2: {} + deep-equal@1.0.1: {} + deep-equal@2.2.3: dependencies: array-buffer-byte-length: 1.0.1 @@ -19392,6 +19644,8 @@ snapshots: delayed-stream@1.0.0: {} + delegates@1.0.0: {} + depd@1.1.2: {} depd@2.0.0: {} @@ -19508,6 +19762,13 @@ snapshots: duplexer@0.1.2: {} + duplexify@3.7.1: + dependencies: + end-of-stream: 1.4.4 + inherits: 2.0.4 + readable-stream: 2.3.8 + stream-shift: 1.0.3 + eastasianwidth@0.2.0: {} ecdsa-sig-formatter@1.0.11: @@ -19574,7 +19835,6 @@ snapshots: end-of-stream@1.4.4: dependencies: once: 1.4.0 - optional: true enhanced-resolve@5.16.0: dependencies: @@ -20083,6 +20343,8 @@ snapshots: fast-equals@5.0.1: {} + fast-fifo@1.3.2: {} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -20531,6 +20793,15 @@ snapshots: section-matter: 1.0.0 strip-bom-string: 1.0.0 + gunzip-maybe@1.4.2: + dependencies: + browserify-zlib: 0.1.4 + is-deflate: 1.0.0 + is-gzip: 1.0.0 + peek-stream: 1.1.3 + pumpify: 1.5.1 + through2: 2.0.5 + gzip-size@6.0.0: dependencies: duplexer: 0.1.2 @@ -20773,6 +21044,11 @@ snapshots: domutils: 3.1.0 entities: 4.5.0 + http-assert@1.5.0: + dependencies: + deep-equal: 1.0.1 + http-errors: 1.8.1 + http-cache-semantics@4.1.1: {} http-deceiver@1.2.7: {} @@ -20784,6 +21060,14 @@ snapshots: setprototypeof: 1.1.0 statuses: 1.5.0 + http-errors@1.8.1: + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 1.5.0 + toidentifier: 1.0.1 + http-errors@2.0.0: dependencies: depd: 2.0.0 @@ -20848,6 +21132,13 @@ snapshots: transitivePeerDependencies: - supports-color + https-proxy-agent@7.0.5: + dependencies: + agent-base: 7.1.0 + debug: 4.3.7 + transitivePeerDependencies: + - supports-color + human-signals@2.1.0: {} human-signals@5.0.0: {} @@ -21005,6 +21296,8 @@ snapshots: is-decimal@2.0.1: {} + is-deflate@1.0.0: {} + is-docker@2.2.1: {} is-extendable@0.1.1: {} @@ -21021,6 +21314,8 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-gzip@1.0.0: {} + is-hexadecimal@2.0.1: {} is-installed-globally@0.4.0: @@ -21393,6 +21688,10 @@ snapshots: keyborg@2.6.0: {} + keygrip@1.1.0: + dependencies: + tsscmp: 1.0.6 + keytar@7.9.0: dependencies: node-addon-api: 4.3.0 @@ -21411,6 +21710,69 @@ snapshots: kleur@4.1.5: {} + koa-compose@4.1.0: {} + + koa-convert@2.0.0: + dependencies: + co: 4.6.0 + koa-compose: 4.1.0 + + koa-morgan@1.0.1: + dependencies: + morgan: 1.10.0 + transitivePeerDependencies: + - supports-color + + koa-mount@4.0.0: + dependencies: + debug: 4.3.7 + koa-compose: 4.1.0 + transitivePeerDependencies: + - supports-color + + koa-send@5.0.1: + dependencies: + debug: 4.3.7 + http-errors: 1.8.1 + resolve-path: 1.4.0 + transitivePeerDependencies: + - supports-color + + koa-static@5.0.0: + dependencies: + debug: 3.2.7 + koa-send: 5.0.1 + transitivePeerDependencies: + - supports-color + + koa@2.15.3: + dependencies: + accepts: 1.3.8 + cache-content-type: 1.0.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookies: 0.9.1 + debug: 4.3.7 + delegates: 1.0.0 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + fresh: 0.5.2 + http-assert: 1.5.0 + http-errors: 1.6.3 + is-generator-function: 1.0.10 + koa-compose: 4.1.0 + koa-convert: 2.0.0 + on-finished: 2.4.1 + only: 0.0.2 + parseurl: 1.3.3 + statuses: 1.5.0 + type-is: 1.6.18 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + kolorist@1.8.0: {} kuler@2.0.0: {} @@ -22787,6 +23149,8 @@ snapshots: dependencies: regex: 4.3.2 + only@0.0.2: {} + open@8.4.2: dependencies: define-lazy-prop: 2.0.0 @@ -22913,6 +23277,8 @@ snapshots: - bluebird - supports-color + pako@0.2.9: {} + param-case@3.0.4: dependencies: dot-case: 3.0.4 @@ -23016,6 +23382,8 @@ snapshots: path-to-regexp@2.2.1: {} + path-to-regexp@6.3.0: {} + path-type@4.0.0: {} path-type@5.0.0: {} @@ -23024,6 +23392,12 @@ snapshots: pathval@2.0.0: {} + peek-stream@1.1.3: + dependencies: + buffer-from: 1.1.2 + duplexify: 3.7.1 + through2: 2.0.5 + pend@1.2.0: {} periscopic@3.1.0: @@ -23072,6 +23446,8 @@ snapshots: playwright-core@1.47.0: {} + playwright-core@1.47.2: {} + playwright@1.47.0: dependencies: playwright-core: 1.47.0 @@ -23421,11 +23797,21 @@ snapshots: psl@1.9.0: {} + pump@2.0.1: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + pump@3.0.0: dependencies: end-of-stream: 1.4.4 once: 1.4.0 - optional: true + + pumpify@1.5.1: + dependencies: + duplexify: 3.7.1 + inherits: 2.0.4 + pump: 2.0.1 punycode.js@2.3.1: {} @@ -23451,6 +23837,8 @@ snapshots: queue-microtask@1.2.3: {} + queue-tick@1.0.1: {} + queue@6.0.2: dependencies: inherits: 2.0.4 @@ -23878,6 +24266,11 @@ snapshots: resolve-from@5.0.0: {} + resolve-path@1.4.0: + dependencies: + http-errors: 1.6.3 + path-is-absolute: 1.0.1 + resolve-pathname@3.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -24365,8 +24758,18 @@ snapshots: - supports-color - utf-8-validate + stream-shift@1.0.3: {} + streamsearch@1.1.0: {} + streamx@2.20.1: + dependencies: + fast-fifo: 1.3.2 + queue-tick: 1.0.1 + text-decoder: 1.2.0 + optionalDependencies: + bare-events: 2.4.2 + string-argv@0.3.2: {} string-length@4.0.2: @@ -24565,6 +24968,14 @@ snapshots: tar-stream: 2.2.0 optional: true + tar-fs@3.0.6: + dependencies: + pump: 3.0.0 + tar-stream: 3.1.7 + optionalDependencies: + bare-fs: 2.3.5 + bare-path: 2.1.3 + tar-stream@2.2.0: dependencies: bl: 4.1.0 @@ -24574,6 +24985,12 @@ snapshots: readable-stream: 3.6.2 optional: true + tar-stream@3.1.7: + dependencies: + b4a: 1.6.6 + fast-fifo: 1.3.2 + streamx: 2.20.1 + tar@6.2.1: dependencies: chownr: 2.0.0 @@ -24617,10 +25034,19 @@ snapshots: glob: 10.4.2 minimatch: 9.0.5 + text-decoder@1.2.0: + dependencies: + b4a: 1.6.6 + text-hex@1.0.0: {} text-table@0.2.0: {} + through2@2.0.5: + dependencies: + readable-stream: 2.3.8 + xtend: 4.0.2 + through2@4.0.2: dependencies: readable-stream: 3.6.2 @@ -24720,6 +25146,8 @@ snapshots: tslib@2.6.2: {} + tsscmp@1.0.6: {} + tsx@4.19.1: dependencies: esbuild: 0.23.1 @@ -25569,6 +25997,8 @@ snapshots: dependencies: buffer-crc32: 0.2.13 + ylru@1.4.0: {} + yn@3.1.1: {} yocto-queue@0.1.0: {} From 306960b65e4544b716ead1d7edd347dd1db4db09 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 12:44:00 -0700 Subject: [PATCH 02/14] Basic web tests --- packages/typespec-vscode/package.json | 7 +- packages/typespec-vscode/rollup.config.ts | 43 ++++- packages/typespec-vscode/test/data/basic.tsp | 1 + packages/typespec-vscode/test/suite.ts | 28 +++ packages/typespec-vscode/test/utils.ts | 1 + packages/typespec-vscode/test/web.test.ts | 62 ++++++ packages/typespec-vscode/tsconfig.build.json | 2 +- packages/typespec-vscode/tsconfig.json | 2 + pnpm-lock.yaml | 193 ++++++++++++++----- 9 files changed, 292 insertions(+), 47 deletions(-) create mode 100644 packages/typespec-vscode/test/data/basic.tsp create mode 100644 packages/typespec-vscode/test/suite.ts create mode 100644 packages/typespec-vscode/test/utils.ts create mode 100644 packages/typespec-vscode/test/web.test.ts diff --git a/packages/typespec-vscode/package.json b/packages/typespec-vscode/package.json index 21952b089b..20465eb6d8 100644 --- a/packages/typespec-vscode/package.json +++ b/packages/typespec-vscode/package.json @@ -154,12 +154,16 @@ "generate-third-party-notices": "typespec-build-tool generate-third-party-notices", "package-vsix": "vsce package", "deploy": "vsce publish", - "open-in-browser": "vscode-test-web --extensionDevelopmentPath=. ." + "open-in-browser": "vscode-test-web --extensionDevelopmentPath=. .", + "test:e2e": "pnpm test:web", + "test:web": "vscode-test-web --extensionDevelopmentPath=. --extensionTestsPath=dist/test/suite.js ./test/data" }, "devDependencies": { "@rollup/plugin-commonjs": "~26.0.1", + "@rollup/plugin-json": "~6.1.0", "@rollup/plugin-node-resolve": "~15.2.3", "@rollup/plugin-typescript": "~11.1.6", + "@types/mocha": "^10.0.8", "@types/node": "~22.5.4", "@types/vscode": "~1.93.0", "@typespec/compiler": "workspace:~", @@ -169,6 +173,7 @@ "@vscode/test-web": "^0.0.60", "@vscode/vsce": "~3.1.0", "c8": "^10.1.2", + "mocha": "^10.7.3", "rimraf": "~6.0.1", "rollup": "~4.21.3", "typescript": "~5.6.2", diff --git a/packages/typespec-vscode/rollup.config.ts b/packages/typespec-vscode/rollup.config.ts index 68e9fba737..adef166774 100644 --- a/packages/typespec-vscode/rollup.config.ts +++ b/packages/typespec-vscode/rollup.config.ts @@ -1,9 +1,39 @@ import commonjs from "@rollup/plugin-commonjs"; +import json from "@rollup/plugin-json"; import resolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; +import * as path from "path"; import { defineConfig } from "rollup"; +/** + * For web extension, all tests, including the test runner, need to be bundled into + * a single module that has a exported `run` function . + * This plugin bundles implements a virtual file extensionTests.ts that bundles all these together. + * @type {import('esbuild').Plugin} + */ +const testBundlePlugin = { + name: "testBundlePlugin", + setup(build: any) { + build.onResolve({ filter: /[/\\]suite\.ts$/ }, (args: any) => { + if (args.kind === "entry-point") { + return { path: path.resolve(args.path) }; + } + }); + build.onLoad({ filter: /[/\\]suite\.ts$/ }, async (args: any) => { + const testsRoot = path.join(__dirname, "test"); + const files = ["web.test.js"]; + return { + contents: + `export { run } from './mochaTestRunner.ts';` + + files.map((f) => `import('./${f}');`).join(""), + watchDirs: files.map((f) => path.dirname(path.resolve(testsRoot, f))), + watchFiles: files.map((f) => path.resolve(testsRoot, f)), + }; + }); + }, +}; + const baseConfig = defineConfig({ input: "src/extension.ts", output: { @@ -17,6 +47,7 @@ const baseConfig = defineConfig({ plugins: [ (resolve as any)({ preferBuiltins: true }), (commonjs as any)(), + (json as any)(), (typescript as any)({ tsconfig: "./tsconfig.build.json" }), ], onwarn: (warning, warn) => { @@ -51,8 +82,18 @@ export default defineConfig([ file: "dist/src/web/extension.js", // VSCode web will add extra .js if you use .cjs format: "commonjs", sourcemap: true, - // exports: "named", inlineDynamicImports: true, }, }, + { + ...baseConfig, + input: "test/suite.ts", + output: { + file: "dist/test/suite.js", // VSCode web will add extra .js if you use .cjs + format: "commonjs", + sourcemap: true, + inlineDynamicImports: true, + }, + plugins: [testBundlePlugin as any, ...(baseConfig.plugins as any)], + }, ]); diff --git a/packages/typespec-vscode/test/data/basic.tsp b/packages/typespec-vscode/test/data/basic.tsp new file mode 100644 index 0000000000..5a8e327552 --- /dev/null +++ b/packages/typespec-vscode/test/data/basic.tsp @@ -0,0 +1 @@ +model Foo {} diff --git a/packages/typespec-vscode/test/suite.ts b/packages/typespec-vscode/test/suite.ts new file mode 100644 index 0000000000..025ec99623 --- /dev/null +++ b/packages/typespec-vscode/test/suite.ts @@ -0,0 +1,28 @@ +// // imports mocha for the browser, defining the `mocha` global. +import "mocha/mocha"; + +mocha.setup({ + ui: "bdd", + reporter: undefined, + timeout: 20000, +}); + +export async function run(): Promise { + await import("./web.test.js"); + return new Promise((c, e) => { + try { + // Run the mocha test + mocha.run((failures) => { + if (failures > 0) { + e(new Error(`${failures} tests failed.`)); + } else { + c(); + } + }); + } catch (err) { + // eslint-disable-next-line no-console + console.error(err); + e(err); + } + }); +} diff --git a/packages/typespec-vscode/test/utils.ts b/packages/typespec-vscode/test/utils.ts new file mode 100644 index 0000000000..dfb725d522 --- /dev/null +++ b/packages/typespec-vscode/test/utils.ts @@ -0,0 +1 @@ +export const it = window.test; diff --git a/packages/typespec-vscode/test/web.test.ts b/packages/typespec-vscode/test/web.test.ts new file mode 100644 index 0000000000..1660d2fa10 --- /dev/null +++ b/packages/typespec-vscode/test/web.test.ts @@ -0,0 +1,62 @@ +import { assert } from "vitest"; +// You can import and use all API from the 'vscode' module +// as well as import your extension to test it +import * as vscode from "vscode"; +// import * as myExtension from '../../extension'; + +async function waitSeconds(secs: number) { + return new Promise((r) => setTimeout(r, secs * 1000)); +} + +describe("Web Extension", () => { + vscode.window.showInformationMessage("Start all tests."); + + let basicUri: vscode.Uri; + + before(async () => { + const ext = vscode.extensions.getExtension("typespec.typespec-vscode"); + assert.ok(ext, "Could not activate extension!"); + await ext!.activate(); + + const scheme = ext?.extensionUri.scheme === "file" ? "file" : "vscode-test-web"; + const pathPrefix = scheme === "file" ? ext?.extensionUri.fsPath + "/test" : ""; + + basicUri = vscode.Uri.from({ scheme, path: pathPrefix + "/basic.tsp" }); + + await waitSeconds(5); + }); + + it("start extension", async () => {}); + + it("ColorProvider", async () => { + const doc = await vscode.workspace.openTextDocument(basicUri); + const colors = (await vscode.commands.executeCommand( + "vscode.executeDocumentColorProvider", + doc.uri, + )) as any[]; + console.log("Colors", doc.uri, colors); + assert.ok(colors); + assert.equal(colors.length, 3); + const expected: any = [ + { red: 1, green: 0, blue: 0, alpha: 1 }, + { + red: 0.9411764705882353, + green: 0.9725490196078431, + blue: 1, + alpha: 1, + }, + { + red: 0.4980392156862745, + green: 0.4980392156862745, + blue: 0.4980392156862745, + alpha: 1, + }, + ]; + + for (const i of [0, 1, 2]) { + for (const prop in expected[i]) { + assert.approximately(colors[i].color[prop], expected[i][prop], 1e-4); + } + } + }); +}); diff --git a/packages/typespec-vscode/tsconfig.build.json b/packages/typespec-vscode/tsconfig.build.json index 469b708971..bdb03d3825 100644 --- a/packages/typespec-vscode/tsconfig.build.json +++ b/packages/typespec-vscode/tsconfig.build.json @@ -9,5 +9,5 @@ "declarationMap": false, "sourceRoot": ".." }, - "include": ["src/**/*.ts"] + "include": ["src/**/*.ts", "test/**/*.ts"], } diff --git a/packages/typespec-vscode/tsconfig.json b/packages/typespec-vscode/tsconfig.json index dc97d5b73d..2aac5ee516 100644 --- a/packages/typespec-vscode/tsconfig.json +++ b/packages/typespec-vscode/tsconfig.json @@ -9,6 +9,8 @@ "sourceMap": false, "resolveJsonModule": true, "outDir": "dist", + "skipLibCheck": true, + "types": ["mocha"], "rootDir": "." }, "include": ["rollup.config.ts", "src/**/*.ts", "test/**/*.ts"] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0fe385311..e3074fa22c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1628,12 +1628,18 @@ importers: '@rollup/plugin-commonjs': specifier: ~26.0.1 version: 26.0.1(rollup@4.21.3) + '@rollup/plugin-json': + specifier: ~6.1.0 + version: 6.1.0(rollup@4.21.3) '@rollup/plugin-node-resolve': specifier: ~15.2.3 version: 15.2.3(rollup@4.21.3) '@rollup/plugin-typescript': specifier: ~11.1.6 version: 11.1.6(rollup@4.21.3)(tslib@2.6.2)(typescript@5.6.2) + '@types/mocha': + specifier: ^10.0.8 + version: 10.0.8 '@types/node': specifier: ~22.5.4 version: 22.5.4 @@ -1661,6 +1667,9 @@ importers: c8: specifier: ^10.1.2 version: 10.1.2 + mocha: + specifier: ^10.7.3 + version: 10.7.3 rimraf: specifier: ~6.0.1 version: 6.0.1 @@ -5314,6 +5323,9 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + '@types/mocha@10.0.8': + resolution: {integrity: sha512-HfMcUmy9hTMJh66VNcmeC9iVErIZJli2bszuXc6julh5YGuRb/W5OnkHjwLNYdFlMis0sY3If5SEAp+PktdJjw==} + '@types/morgan@1.9.9': resolution: {integrity: sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==} @@ -6141,10 +6153,6 @@ packages: brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -6155,6 +6163,9 @@ packages: browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} + browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + browserify-zlib@0.1.4: resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} @@ -6410,6 +6421,9 @@ packages: resolution: {integrity: sha512-Lm3L0p+/npIQWNIiyF/nAn7T5dnOwR3xNTHXYEBFBFVPXzCVNZ5lqEC/1eo/EVfpDsQ1I+TX4ORPQgp+UI0CRw==} engines: {node: 10.* || >= 12.*} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -7046,6 +7060,10 @@ packages: supports-color: optional: true + decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} @@ -7973,6 +7991,11 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + global-directory@4.0.1: resolution: {integrity: sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==} engines: {node: '>=18'} @@ -9564,6 +9587,11 @@ packages: mlly@1.7.1: resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + mocha@10.7.3: + resolution: {integrity: sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==} + engines: {node: '>= 14.0.0'} + hasBin: true + monaco-editor-core@0.51.0: resolution: {integrity: sha512-wNWSPfvQirGt2vxn9DzlwnXURPH20kyND60UZXD+Vk9x7+QbUpV5Cc1J5ojlSq3lxu1dEIMpG5gbL7oPJSCRWw==} @@ -12289,6 +12317,9 @@ packages: resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} engines: {node: '>=8.0.0'} + workerpool@6.5.1: + resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -12388,10 +12419,22 @@ packages: engines: {node: '>= 14'} hasBin: true + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -12777,7 +12820,7 @@ snapshots: '@babel/core': 7.25.2 '@babel/helper-compilation-targets': 7.24.8 '@babel/helper-plugin-utils': 7.24.7 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -13572,7 +13615,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.24.7 '@babel/parser': 7.24.8 '@babel/types': 7.24.9 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -13584,7 +13627,7 @@ snapshots: '@babel/parser': 7.25.6 '@babel/template': 7.25.0 '@babel/types': 7.25.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -14755,7 +14798,7 @@ snapshots: '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -14763,7 +14806,7 @@ snapshots: '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) espree: 10.1.0 globals: 14.0.0 ignore: 5.3.1 @@ -15902,7 +15945,7 @@ snapshots: '@antfu/install-pkg': 0.4.1 '@antfu/utils': 0.7.10 '@iconify/types': 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) kolorist: 1.8.0 local-pkg: 0.5.0 mlly: 1.7.1 @@ -17463,6 +17506,8 @@ snapshots: '@types/minimatch@5.1.2': {} + '@types/mocha@10.0.8': {} + '@types/morgan@1.9.9': dependencies: '@types/node': 22.5.4 @@ -17623,7 +17668,7 @@ snapshots: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.5.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) eslint: 9.10.0(jiti@1.21.0) optionalDependencies: typescript: 5.6.2 @@ -17657,7 +17702,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2) '@typescript-eslint/utils': 8.5.0(eslint@9.10.0(jiti@1.21.0))(typescript@5.6.2) - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 @@ -17673,7 +17718,7 @@ snapshots: dependencies: '@typescript-eslint/types': 7.17.0 '@typescript-eslint/visitor-keys': 7.17.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.5 @@ -17688,7 +17733,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.5.0 '@typescript-eslint/visitor-keys': 8.5.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -17748,7 +17793,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 @@ -18104,13 +18149,13 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color agent-base@7.1.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -18528,10 +18573,6 @@ snapshots: dependencies: balanced-match: 1.0.2 - braces@3.0.2: - dependencies: - fill-range: 7.1.1 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -18540,6 +18581,8 @@ snapshots: browser-process-hrtime@1.0.0: {} + browser-stdout@1.3.1: {} + browserify-zlib@0.1.4: dependencies: pako: 0.2.9 @@ -18753,7 +18796,7 @@ snapshots: chokidar@3.6.0: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -18825,6 +18868,12 @@ snapshots: optionalDependencies: '@colors/colors': 1.5.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -19554,9 +19603,13 @@ snapshots: dependencies: ms: 2.1.2 - debug@4.3.7: + debug@4.3.7(supports-color@8.1.1): dependencies: ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + + decamelize@4.0.0: {} decimal.js@10.4.3: {} @@ -19668,7 +19721,7 @@ snapshots: detect-port@1.5.1: dependencies: address: 1.2.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -19955,7 +20008,7 @@ snapshots: esbuild-register@3.5.0(esbuild@0.21.5): dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) esbuild: 0.21.5 transitivePeerDependencies: - supports-color @@ -20156,7 +20209,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) escape-string-regexp: 4.0.0 eslint-scope: 8.0.2 eslint-visitor-keys: 4.0.0 @@ -20700,6 +20753,14 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + global-directory@4.0.1: dependencies: ini: 4.1.1 @@ -21082,14 +21143,14 @@ snapshots: dependencies: '@tootallnate/once': 2.0.0 agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -21121,21 +21182,21 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.4: dependencies: agent-base: 7.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -21462,7 +21523,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.25 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -21725,14 +21786,14 @@ snapshots: koa-mount@4.0.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) koa-compose: 4.1.0 transitivePeerDependencies: - supports-color koa-send@5.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) http-errors: 1.8.1 resolve-path: 1.4.0 transitivePeerDependencies: @@ -21752,7 +21813,7 @@ snapshots: content-disposition: 0.5.4 content-type: 1.0.5 cookies: 0.9.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) delegates: 1.0.0 depd: 2.0.0 destroy: 1.2.0 @@ -22671,7 +22732,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -22693,7 +22754,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -22838,6 +22899,29 @@ snapshots: pkg-types: 1.2.0 ufo: 1.5.3 + mocha@10.7.3: + dependencies: + ansi-colors: 4.1.3 + browser-stdout: 1.3.1 + chokidar: 3.6.0 + debug: 4.3.7(supports-color@8.1.1) + 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 + monaco-editor-core@0.51.0: {} monaco-editor-webpack-plugin@7.1.0(monaco-editor@0.46.0)(webpack@5.91.0(@swc/core@1.7.26(@swc/helpers@0.5.8))): @@ -24649,7 +24733,7 @@ snapshots: socks-proxy-agent@8.0.2: dependencies: agent-base: 7.1.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) socks: 2.8.1 transitivePeerDependencies: - supports-color @@ -24694,7 +24778,7 @@ snapshots: spdy-transport@3.0.0: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 @@ -24705,7 +24789,7 @@ snapshots: spdy@4.0.2: dependencies: - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) handle-thing: 2.0.1 http-deceiver: 1.2.7 select-hose: 2.0.0 @@ -25158,7 +25242,7 @@ snapshots: tuf-js@2.2.0: dependencies: '@tufjs/models': 2.0.0 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) make-fetch-happen: 13.0.0 transitivePeerDependencies: - supports-color @@ -25499,7 +25583,7 @@ snapshots: vite-node@2.1.0(@types/node@22.5.4)(terser@5.30.0): dependencies: cac: 6.7.14 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) pathe: 1.1.2 vite: 5.4.4(@types/node@22.5.4)(terser@5.30.0) transitivePeerDependencies: @@ -25542,7 +25626,7 @@ snapshots: '@volar/typescript': 2.4.4 '@vue/language-core': 2.1.6(typescript@5.6.2) compare-versions: 6.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) kolorist: 1.8.0 local-pkg: 0.5.0 magic-string: 0.30.11 @@ -25574,7 +25658,7 @@ snapshots: '@vitest/spy': 2.1.0 '@vitest/utils': 2.1.0 chai: 5.1.1 - debug: 4.3.7 + debug: 4.3.7(supports-color@8.1.1) magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 @@ -25904,6 +25988,8 @@ snapshots: reduce-flatten: 2.0.0 typical: 5.2.0 + workerpool@6.5.1: {} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -25976,8 +26062,27 @@ snapshots: yaml@2.5.1: {} + yargs-parser@20.2.9: {} + yargs-parser@21.1.1: {} + yargs-unparser@2.0.0: + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1 From 358b197bf96ac3afba44f6690db269a6ca3e0c2a Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 12:44:15 -0700 Subject: [PATCH 03/14] Basic web tests --- packages/typespec-vscode/test/web.test.ts | 44 ++--------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/packages/typespec-vscode/test/web.test.ts b/packages/typespec-vscode/test/web.test.ts index 1660d2fa10..f5ef12d871 100644 --- a/packages/typespec-vscode/test/web.test.ts +++ b/packages/typespec-vscode/test/web.test.ts @@ -1,18 +1,10 @@ import { assert } from "vitest"; -// You can import and use all API from the 'vscode' module -// as well as import your extension to test it import * as vscode from "vscode"; -// import * as myExtension from '../../extension'; - -async function waitSeconds(secs: number) { - return new Promise((r) => setTimeout(r, secs * 1000)); -} describe("Web Extension", () => { vscode.window.showInformationMessage("Start all tests."); let basicUri: vscode.Uri; - before(async () => { const ext = vscode.extensions.getExtension("typespec.typespec-vscode"); assert.ok(ext, "Could not activate extension!"); @@ -22,41 +14,9 @@ describe("Web Extension", () => { const pathPrefix = scheme === "file" ? ext?.extensionUri.fsPath + "/test" : ""; basicUri = vscode.Uri.from({ scheme, path: pathPrefix + "/basic.tsp" }); - - await waitSeconds(5); }); - it("start extension", async () => {}); - - it("ColorProvider", async () => { - const doc = await vscode.workspace.openTextDocument(basicUri); - const colors = (await vscode.commands.executeCommand( - "vscode.executeDocumentColorProvider", - doc.uri, - )) as any[]; - console.log("Colors", doc.uri, colors); - assert.ok(colors); - assert.equal(colors.length, 3); - const expected: any = [ - { red: 1, green: 0, blue: 0, alpha: 1 }, - { - red: 0.9411764705882353, - green: 0.9725490196078431, - blue: 1, - alpha: 1, - }, - { - red: 0.4980392156862745, - green: 0.4980392156862745, - blue: 0.4980392156862745, - alpha: 1, - }, - ]; - - for (const i of [0, 1, 2]) { - for (const prop in expected[i]) { - assert.approximately(colors[i].color[prop], expected[i][prop], 1e-4); - } - } + it("open tsp file", async () => { + await vscode.workspace.openTextDocument(basicUri); }); }); From dc7dacf428d19fa47fef2cbdeb040502b4f38ac7 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 12:54:04 -0700 Subject: [PATCH 04/14] clean --- packages/typespec-vscode/rollup.config.ts | 30 ----------------------- 1 file changed, 30 deletions(-) diff --git a/packages/typespec-vscode/rollup.config.ts b/packages/typespec-vscode/rollup.config.ts index adef166774..5a4d92cbdf 100644 --- a/packages/typespec-vscode/rollup.config.ts +++ b/packages/typespec-vscode/rollup.config.ts @@ -2,38 +2,9 @@ import commonjs from "@rollup/plugin-commonjs"; import json from "@rollup/plugin-json"; import resolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; -import * as path from "path"; import { defineConfig } from "rollup"; -/** - * For web extension, all tests, including the test runner, need to be bundled into - * a single module that has a exported `run` function . - * This plugin bundles implements a virtual file extensionTests.ts that bundles all these together. - * @type {import('esbuild').Plugin} - */ -const testBundlePlugin = { - name: "testBundlePlugin", - setup(build: any) { - build.onResolve({ filter: /[/\\]suite\.ts$/ }, (args: any) => { - if (args.kind === "entry-point") { - return { path: path.resolve(args.path) }; - } - }); - build.onLoad({ filter: /[/\\]suite\.ts$/ }, async (args: any) => { - const testsRoot = path.join(__dirname, "test"); - const files = ["web.test.js"]; - return { - contents: - `export { run } from './mochaTestRunner.ts';` + - files.map((f) => `import('./${f}');`).join(""), - watchDirs: files.map((f) => path.dirname(path.resolve(testsRoot, f))), - watchFiles: files.map((f) => path.resolve(testsRoot, f)), - }; - }); - }, -}; - const baseConfig = defineConfig({ input: "src/extension.ts", output: { @@ -94,6 +65,5 @@ export default defineConfig([ sourcemap: true, inlineDynamicImports: true, }, - plugins: [testBundlePlugin as any, ...(baseConfig.plugins as any)], }, ]); From b6a1d4062ed7d5e55e4697d76f42657b3e4c6de4 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 13:13:13 -0700 Subject: [PATCH 05/14] cleanup --- packages/typespec-vscode/package.json | 1 - packages/typespec-vscode/rollup.config.ts | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/typespec-vscode/package.json b/packages/typespec-vscode/package.json index 20465eb6d8..2a8f58a848 100644 --- a/packages/typespec-vscode/package.json +++ b/packages/typespec-vscode/package.json @@ -160,7 +160,6 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "~26.0.1", - "@rollup/plugin-json": "~6.1.0", "@rollup/plugin-node-resolve": "~15.2.3", "@rollup/plugin-typescript": "~11.1.6", "@types/mocha": "^10.0.8", diff --git a/packages/typespec-vscode/rollup.config.ts b/packages/typespec-vscode/rollup.config.ts index 5a4d92cbdf..99709b2826 100644 --- a/packages/typespec-vscode/rollup.config.ts +++ b/packages/typespec-vscode/rollup.config.ts @@ -1,5 +1,4 @@ import commonjs from "@rollup/plugin-commonjs"; -import json from "@rollup/plugin-json"; import resolve from "@rollup/plugin-node-resolve"; import typescript from "@rollup/plugin-typescript"; @@ -12,13 +11,11 @@ const baseConfig = defineConfig({ format: "commonjs", sourcemap: true, exports: "named", - inlineDynamicImports: true, }, - external: ["fs/promises", "vscode"], + external: ["vscode"], plugins: [ (resolve as any)({ preferBuiltins: true }), (commonjs as any)(), - (json as any)(), (typescript as any)({ tsconfig: "./tsconfig.build.json" }), ], onwarn: (warning, warn) => { From 7b4069fa2bd1ccfe12bdb646e713e736622e81b8 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 13:20:23 -0700 Subject: [PATCH 06/14] Create vscode-web-2024-8-23-20-15-22.md --- .chronus/changes/vscode-web-2024-8-23-20-15-22.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .chronus/changes/vscode-web-2024-8-23-20-15-22.md diff --git a/.chronus/changes/vscode-web-2024-8-23-20-15-22.md b/.chronus/changes/vscode-web-2024-8-23-20-15-22.md new file mode 100644 index 0000000000..d2e59acf6f --- /dev/null +++ b/.chronus/changes/vscode-web-2024-8-23-20-15-22.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: feature +packages: + - typespec-vscode +--- + +Make extension web compatible with minimal functionality From 40a4c31d80e96e3e5f7f07bfb50157e56a290737 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 13:23:31 -0700 Subject: [PATCH 07/14] update lock --- pnpm-lock.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e3074fa22c..1a3dfc8bb1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1628,9 +1628,6 @@ importers: '@rollup/plugin-commonjs': specifier: ~26.0.1 version: 26.0.1(rollup@4.21.3) - '@rollup/plugin-json': - specifier: ~6.1.0 - version: 6.1.0(rollup@4.21.3) '@rollup/plugin-node-resolve': specifier: ~15.2.3 version: 15.2.3(rollup@4.21.3) From 7a9bf5898ca11e8e29aa49bcb78114c29fa19d3c Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 13:28:47 -0700 Subject: [PATCH 08/14] format --- packages/typespec-vscode/tsconfig.build.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-vscode/tsconfig.build.json b/packages/typespec-vscode/tsconfig.build.json index bdb03d3825..5f4a295046 100644 --- a/packages/typespec-vscode/tsconfig.build.json +++ b/packages/typespec-vscode/tsconfig.build.json @@ -9,5 +9,5 @@ "declarationMap": false, "sourceRoot": ".." }, - "include": ["src/**/*.ts", "test/**/*.ts"], + "include": ["src/**/*.ts", "test/**/*.ts"] } From b70e558dc7326023a5d1ab20ca9db37772649aa7 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 14:02:55 -0700 Subject: [PATCH 09/14] remove --- packages/typespec-vscode/vitest.config.ts | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/typespec-vscode/vitest.config.ts diff --git a/packages/typespec-vscode/vitest.config.ts b/packages/typespec-vscode/vitest.config.ts deleted file mode 100644 index 15eeaceb85..0000000000 --- a/packages/typespec-vscode/vitest.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { defineConfig, mergeConfig } from "vitest/config"; -import { defaultTypeSpecVitestConfig } from "../../vitest.workspace.js"; - -export default mergeConfig(defaultTypeSpecVitestConfig, defineConfig({})); From e5a87e2f5fdd41d14d89954b8e64e2ae5e6efb5c Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 23 Sep 2024 14:29:32 -0700 Subject: [PATCH 10/14] Tweaks --- .../internal-build-utils/src/generate-third-party-notice.ts | 2 +- packages/typespec-vscode/.vscodeignore | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/internal-build-utils/src/generate-third-party-notice.ts b/packages/internal-build-utils/src/generate-third-party-notice.ts index 8d33aa7d30..68ecb9123b 100644 --- a/packages/internal-build-utils/src/generate-third-party-notice.ts +++ b/packages/internal-build-utils/src/generate-third-party-notice.ts @@ -1,7 +1,7 @@ import { readdir, readFile, stat, writeFile } from "fs/promises"; import { basename, dirname, join, resolve } from "path"; -const skipDirs = new Set(["node_modules", "dist-dev"]); +const skipDirs = new Set(["node_modules", "dist-dev", "test"]); export async function generateThirdPartyNotice() { const root = resolve("./"); diff --git a/packages/typespec-vscode/.vscodeignore b/packages/typespec-vscode/.vscodeignore index b016ff91a9..17dfc6fbc7 100644 --- a/packages/typespec-vscode/.vscodeignore +++ b/packages/typespec-vscode/.vscodeignore @@ -10,6 +10,8 @@ !dist/**/*.cjs !dist/**/*.js.map !dist/**/language-configuration.json +dist/test/ + !markdown-typespec.json !README.md !ThirdPartyNotices.txt From 22c98f209900cdafc5d51fe1e566f2c2190e1984 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Tue, 24 Sep 2024 10:32:52 -0700 Subject: [PATCH 11/14] Create vscode-web-2024-8-23-21-44-3.md --- .chronus/changes/vscode-web-2024-8-23-21-44-3.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .chronus/changes/vscode-web-2024-8-23-21-44-3.md diff --git a/.chronus/changes/vscode-web-2024-8-23-21-44-3.md b/.chronus/changes/vscode-web-2024-8-23-21-44-3.md new file mode 100644 index 0000000000..c8a42008c9 --- /dev/null +++ b/.chronus/changes/vscode-web-2024-8-23-21-44-3.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: fix +packages: + - "@typespec/internal-build-utils" +--- + +Ignore test from third party notice generation From 4f52fabe0b7967a04fb23d6f9d3fdc55bc6db131 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Tue, 24 Sep 2024 14:07:28 -0700 Subject: [PATCH 12/14] Run test headless --- packages/typespec-vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/typespec-vscode/package.json b/packages/typespec-vscode/package.json index 2a8f58a848..66acc6223e 100644 --- a/packages/typespec-vscode/package.json +++ b/packages/typespec-vscode/package.json @@ -156,7 +156,7 @@ "deploy": "vsce publish", "open-in-browser": "vscode-test-web --extensionDevelopmentPath=. .", "test:e2e": "pnpm test:web", - "test:web": "vscode-test-web --extensionDevelopmentPath=. --extensionTestsPath=dist/test/suite.js ./test/data" + "test:web": "vscode-test-web --extensionDevelopmentPath=. --headless --extensionTestsPath=dist/test/suite.js ./test/data" }, "devDependencies": { "@rollup/plugin-commonjs": "~26.0.1", From b89df349f5e2a6667dc43ab0b01e0c50e8d2159d Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 25 Sep 2024 09:46:30 -0700 Subject: [PATCH 13/14] Update .vscode/launch.json Co-authored-by: Christopher Radek <14189820+chrisradek@users.noreply.github.com> --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index ad6a0b1c62..760cc09240 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -151,7 +151,7 @@ "debugWebWorkerHost": true, "request": "launch", "args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/typespec-vscode", "--extensionDevelopmentKind=web"], - "outFiles": ["${workspaceFolder}/dist/web/**/*.js"] + "outFiles": ["${workspaceFolder}/dist/src/web/**/*.js"] } ], "compounds": [ From d45a9078a5e4781dc019922f87a582c5d922e298 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Wed, 25 Sep 2024 09:47:14 -0700 Subject: [PATCH 14/14] Remove old file --- packages/typespec-vscode/test/utils.ts | 1 - 1 file changed, 1 deletion(-) delete mode 100644 packages/typespec-vscode/test/utils.ts diff --git a/packages/typespec-vscode/test/utils.ts b/packages/typespec-vscode/test/utils.ts deleted file mode 100644 index dfb725d522..0000000000 --- a/packages/typespec-vscode/test/utils.ts +++ /dev/null @@ -1 +0,0 @@ -export const it = window.test;