From f5f257c575479e0d9b1f68d893f7566fe5257ba5 Mon Sep 17 00:00:00 2001 From: Vidal Ortega <43078681+vidorteg@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:10:36 -0800 Subject: [PATCH] Upgrading typescript and vscode-extension-telemetry (#2704) Upgrading typescript and vscode-extension-telemetry and making changes to support the upgrades --- package-lock.json | 399 ++++++++++------------------ package.json | 6 +- src/cdpTargetsProvider.ts | 2 +- src/debugTelemetryReporter.ts | 4 +- src/devtoolsPanel.ts | 2 +- src/extension.ts | 2 +- src/launchDebugProvider.ts | 2 +- src/screencastPanel.ts | 2 +- src/utils.ts | 4 +- test/cdpTargetsProvider.test.ts | 2 +- test/debugTelemetryReporter.test.ts | 2 +- test/devtoolsPanel.test.ts | 2 +- test/extension.test.ts | 2 +- test/helpers/helpers.ts | 10 +- test/launchDebugProvider.test.ts | 2 +- test/utils.test.ts | 2 +- 16 files changed, 157 insertions(+), 288 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6829b0ee..d8f375df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,19 +10,18 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@vscode/codicons": "0.0.36", + "@vscode/extension-telemetry": "0.9.4", "bufferutil": "4.0.8", "lit-html": "^3.2.0", "puppeteer-core": "22.12.1", "utf-8-validate": "6.0.4", "vscode-chrome-debug-core": "6.8.11", - "vscode-extension-telemetry": "0.4.1", "vscode-webhint": "2.1.15", "ws": "8.18.0", "xmlhttprequest": "1.8.0" }, "devDependencies": { "@opentelemetry/tracing": "0.24.0", - "@types/copy-webpack-plugin": "8.0.1", "@types/fs-extra": "11.0.4", "@types/jest": "29.5.14", "@types/node": "22.5.4", @@ -41,11 +40,10 @@ "jest-environment-jsdom": "^29.7.0", "ts-jest": " 29.2.5", "ts-loader": "9.5.1", - "typescript": "4.9.4", + "typescript": "5.5.2", "uglify-js": "3.19.3", "unzipper": "0.12.3", "vscode-languageclient": "9.0.1", - "vscode-test": "1.6.1", "webpack": "5.94.0", "webpack-cli": "5.1.4" }, @@ -1806,6 +1804,120 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@microsoft/1ds-core-js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-4.3.4.tgz", + "integrity": "sha512-3gbDUQgAO8EoyQTNcAEkxpuPnioC0May13P1l1l0NKZ128L9Ts/sj8QsfwCRTjHz0HThlA+4FptcAJXNYUy3rg==", + "dependencies": { + "@microsoft/applicationinsights-core-js": "3.3.4", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-async": ">= 0.5.2 < 2.x", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + } + }, + "node_modules/@microsoft/1ds-post-js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-4.3.4.tgz", + "integrity": "sha512-nlKjWricDj0Tn68Dt0P8lX9a+X7LYrqJ6/iSfQwMfDhRIGLqW+wxx8gxS+iGWC/oc8zMQAeiZaemUpCwQcwpRQ==", + "dependencies": { + "@microsoft/1ds-core-js": "4.3.4", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-async": ">= 0.5.2 < 2.x", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + } + }, + "node_modules/@microsoft/applicationinsights-channel-js": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-channel-js/-/applicationinsights-channel-js-3.3.4.tgz", + "integrity": "sha512-Z4nrxYwGKP9iyrYtm7iPQXVOFy4FsEsX0nDKkAi96Qpgw+vEh6NH4ORxMMuES0EollBQ3faJyvYCwckuCVIj0g==", + "dependencies": { + "@microsoft/applicationinsights-common": "3.3.4", + "@microsoft/applicationinsights-core-js": "3.3.4", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-async": ">= 0.5.2 < 2.x", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + }, + "peerDependencies": { + "tslib": ">= 1.0.0" + } + }, + "node_modules/@microsoft/applicationinsights-common": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-common/-/applicationinsights-common-3.3.4.tgz", + "integrity": "sha512-4ms16MlIvcP4WiUPqopifNxcWCcrXQJ2ADAK/75uok2mNQe6ZNRsqb/P+pvhUxc8A5HRlvoXPP1ptDSN5Girgw==", + "dependencies": { + "@microsoft/applicationinsights-core-js": "3.3.4", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + }, + "peerDependencies": { + "tslib": ">= 1.0.0" + } + }, + "node_modules/@microsoft/applicationinsights-core-js": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-3.3.4.tgz", + "integrity": "sha512-MummANF0mgKIkdvVvfmHQTBliK114IZLRhTL0X0Ep+zjDwWMHqYZgew0nlFKAl6ggu42abPZFK5afpE7qjtYJA==", + "dependencies": { + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-async": ">= 0.5.2 < 2.x", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + }, + "peerDependencies": { + "tslib": ">= 1.0.0" + } + }, + "node_modules/@microsoft/applicationinsights-shims": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-3.0.1.tgz", + "integrity": "sha512-DKwboF47H1nb33rSUfjqI6ryX29v+2QWcTrRvcQDA32AZr5Ilkr7whOOSsD1aBzwqX0RJEIP1Z81jfE3NBm/Lg==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.9.4 < 2.x" + } + }, + "node_modules/@microsoft/applicationinsights-web-basic": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-web-basic/-/applicationinsights-web-basic-3.3.4.tgz", + "integrity": "sha512-OpEPXr8vU/t/M8T9jvWJzJx/pCyygIiR1nGM/2PTde0wn7anl71Gxl5fWol7K/WwFEORNjkL3CEyWOyDc+28AA==", + "dependencies": { + "@microsoft/applicationinsights-channel-js": "3.3.4", + "@microsoft/applicationinsights-common": "3.3.4", + "@microsoft/applicationinsights-core-js": "3.3.4", + "@microsoft/applicationinsights-shims": "3.0.1", + "@microsoft/dynamicproto-js": "^2.0.3", + "@nevware21/ts-async": ">= 0.5.2 < 2.x", + "@nevware21/ts-utils": ">= 0.11.3 < 2.x" + }, + "peerDependencies": { + "tslib": ">= 1.0.0" + } + }, + "node_modules/@microsoft/dynamicproto-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-2.0.3.tgz", + "integrity": "sha512-JTWTU80rMy3mdxOjjpaiDQsTLZ6YSGGqsjURsY6AUQtIj0udlF/jYmhdLZu8693ZIC0T1IwYnFa0+QeiMnziBA==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.10.4 < 2.x" + } + }, + "node_modules/@nevware21/ts-async": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@nevware21/ts-async/-/ts-async-0.5.4.tgz", + "integrity": "sha512-IBTyj29GwGlxfzXw2NPnzty+w0Adx61Eze1/lknH/XIVdxtF9UnOpk76tnrHXWa6j84a1RR9hsOcHQPFv9qJjA==", + "dependencies": { + "@nevware21/ts-utils": ">= 0.11.6 < 2.x" + } + }, + "node_modules/@nevware21/ts-utils": { + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/@nevware21/ts-utils/-/ts-utils-0.11.6.tgz", + "integrity": "sha512-OUUJTh3fnaUSzg9DEHgv3d7jC+DnPL65mIO7RaR+jWve7+MmcgIvF79gY97DPQ4frH+IpNR78YAYd/dW4gK3kg==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2109,17 +2221,6 @@ "@babel/types": "^7.20.7" } }, - "node_modules/@types/copy-webpack-plugin": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@types/copy-webpack-plugin/-/copy-webpack-plugin-8.0.1.tgz", - "integrity": "sha512-TwEeGse0/wq+t3SFW0DEwroMS/cDkwVZT+vj7tMAYTp7llt/yz6NuW2n04X2M5P/kSfBQOORhrHAN2mqZdmybg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "tapable": "^2.0.0", - "webpack": "^5.1.0" - } - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", @@ -2498,6 +2599,19 @@ "resolved": "https://registry.npmjs.org/@vscode/codicons/-/codicons-0.0.36.tgz", "integrity": "sha512-wsNOvNMMJ2BY8rC2N2MNBG7yOowV3ov8KlvUE/AiVUlHKTfWsw3OgAOQduX7h0Un6GssKD3aoTVH+TF3DSQwKQ==" }, + "node_modules/@vscode/extension-telemetry": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@vscode/extension-telemetry/-/extension-telemetry-0.9.4.tgz", + "integrity": "sha512-+j0XKpdPcoqHpR1h9ScTdHZHboe9BU+twFQc5j+Zb+7+LG3fJI4LQoo38LVmeax5YJIzQlTVP9/CavDuY6kdBg==", + "dependencies": { + "@microsoft/1ds-core-js": "^4.1.1", + "@microsoft/1ds-post-js": "^4.1.1", + "@microsoft/applicationinsights-web-basic": "^3.1.1" + }, + "engines": { + "vscode": "^1.75.0" + } + }, "node_modules/@vscode/vsce": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-3.1.0.tgz", @@ -3575,28 +3689,6 @@ "node": ">=10.0.0" } }, - "node_modules/big-integer": { - "version": "1.6.52", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz", - "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", - "dev": true, - "dependencies": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -3738,24 +3830,6 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "node_modules/buffer-indexof-polyfill": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", - "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", - "dev": true, - "engines": { - "node": ">=0.2.0" - } - }, "node_modules/bufferutil": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz", @@ -3825,18 +3899,6 @@ } ] }, - "node_modules/chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", - "dev": true, - "dependencies": { - "traverse": ">=0.3.0 <0.4" - }, - "engines": { - "node": "*" - } - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5790,47 +5852,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/fstream/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/fstream/node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -8833,12 +8854,6 @@ "uc.micro": "^2.0.0" } }, - "node_modules/listenercount": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", - "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", - "dev": true - }, "node_modules/lit-html": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.2.0.tgz", @@ -10375,12 +10390,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -11111,15 +11120,6 @@ "node": ">=12" } }, - "node_modules/traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", - "dev": true, - "engines": { - "node": "*" - } - }, "node_modules/ts-api-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", @@ -11457,16 +11457,16 @@ } }, "node_modules/typescript": { - "version": "4.9.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uc.micro": { @@ -11714,15 +11714,6 @@ "integrity": "sha512-dzKWTMMyebIMPF1VYMuuQj7gGFq7guR8AFya0mKacu+ayptJfaRuM0mdHCqiOth4FnRP8mPhEroFPx6Ift8wHA==", "deprecated": "This package has been renamed to @vscode/debugprotocol, please update to the new name" }, - "node_modules/vscode-extension-telemetry": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.4.1.tgz", - "integrity": "sha512-GUH42rpRlQc/yj0FTj/nTbDavtLqLCPNj/SvSrK1J4XazPC8vOTCOY0cyrf08Z8udolzBbVrxhXbFtPwbNyWPg==", - "deprecated": "This package has been renamed to @vscode/extension-telemetry, please update to the new name", - "engines": { - "vscode": "^1.60.0" - } - }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -11788,130 +11779,6 @@ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-4.1.2.tgz", "integrity": "sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==" }, - "node_modules/vscode-test": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-test/-/vscode-test-1.6.1.tgz", - "integrity": "sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA==", - "deprecated": "This package has been renamed to @vscode/test-electron, please update to the new name", - "dev": true, - "dependencies": { - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "rimraf": "^3.0.2", - "unzipper": "^0.10.11" - }, - "engines": { - "node": ">=8.9.3" - } - }, - "node_modules/vscode-test/node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/vscode-test/node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/vscode-test/node_modules/bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", - "dev": true - }, - "node_modules/vscode-test/node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/vscode-test/node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/vscode-test/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/vscode-test/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/vscode-test/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/vscode-test/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/vscode-test/node_modules/unzipper": { - "version": "0.10.14", - "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.14.tgz", - "integrity": "sha512-ti4wZj+0bQTiX2KmKWuwj7lhV+2n//uXEotUmGuQqrbVZSEGFMbI68+c6JCQ8aAmUWYvtHEz2A8K6wXvueR/6g==", - "dev": true, - "dependencies": { - "big-integer": "^1.6.17", - "binary": "~0.3.0", - "bluebird": "~3.4.1", - "buffer-indexof-polyfill": "~1.0.0", - "duplexer2": "~0.1.4", - "fstream": "^1.0.12", - "graceful-fs": "^4.2.2", - "listenercount": "~1.0.1", - "readable-stream": "~2.3.6", - "setimmediate": "~1.0.4" - } - }, "node_modules/vscode-uri": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", diff --git a/package.json b/package.json index 88ca1d54..0db09751 100644 --- a/package.json +++ b/package.json @@ -677,19 +677,18 @@ }, "dependencies": { "@vscode/codicons": "0.0.36", + "@vscode/extension-telemetry":"0.9.4", "bufferutil": "4.0.8", "lit-html": "^3.2.0", "puppeteer-core": "22.12.1", "utf-8-validate": "6.0.4", "vscode-chrome-debug-core": "6.8.11", - "vscode-extension-telemetry": "0.4.1", "vscode-webhint": "2.1.15", "ws": "8.18.0", "xmlhttprequest": "1.8.0" }, "devDependencies": { "@opentelemetry/tracing": "0.24.0", - "@types/copy-webpack-plugin": "8.0.1", "@types/fs-extra": "11.0.4", "@types/jest": "29.5.14", "@types/node": "22.5.4", @@ -707,12 +706,11 @@ "jest": "29.7.0", "ts-jest": " 29.2.5", "ts-loader": "9.5.1", - "typescript": "4.9.4", + "typescript": "5.5.2", "uglify-js": "3.19.3", "unzipper": "0.12.3", "jest-environment-jsdom": "^29.7.0", "vscode-languageclient": "9.0.1", - "vscode-test": "1.6.1", "webpack": "5.94.0", "webpack-cli": "5.1.4" } diff --git a/src/cdpTargetsProvider.ts b/src/cdpTargetsProvider.ts index e9fe3428..08ac3350 100644 --- a/src/cdpTargetsProvider.ts +++ b/src/cdpTargetsProvider.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as vscode from 'vscode'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import * as path from 'path'; import * as fs from 'fs'; import { CDPTarget } from './cdpTarget'; diff --git a/src/debugTelemetryReporter.ts b/src/debugTelemetryReporter.ts index 49db8d57..7d985412 100644 --- a/src/debugTelemetryReporter.ts +++ b/src/debugTelemetryReporter.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; export class DebugTelemetryReporter extends TelemetryReporter { constructor() { - super('extensionId', 'extensionVersion', 'key'); + super('key'); } sendTelemetryEvent( diff --git a/src/devtoolsPanel.ts b/src/devtoolsPanel.ts index 4d11f9fd..68677289 100644 --- a/src/devtoolsPanel.ts +++ b/src/devtoolsPanel.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import * as vscode from 'vscode'; import * as debugCore from 'vscode-chrome-debug-core'; import { performance } from 'perf_hooks'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import { SettingsProvider } from './common/settingsProvider'; import { encodeMessageForChannel, diff --git a/src/extension.ts b/src/extension.ts index 6c309e5b..326a8f84 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -4,7 +4,7 @@ import { Browser, Target, TargetType } from 'puppeteer-core'; import * as vscode from 'vscode'; import * as debugCore from 'vscode-chrome-debug-core'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import { CDPTarget } from './cdpTarget'; import { CDPTargetsProvider } from './cdpTargetsProvider'; import { DevToolsPanel } from './devtoolsPanel'; diff --git a/src/launchDebugProvider.ts b/src/launchDebugProvider.ts index 48decb1a..b0ea1f7b 100644 --- a/src/launchDebugProvider.ts +++ b/src/launchDebugProvider.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as vscode from 'vscode'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import { IUserConfig, SETTINGS_STORE_NAME, diff --git a/src/screencastPanel.ts b/src/screencastPanel.ts index cec36f8c..b781fe95 100644 --- a/src/screencastPanel.ts +++ b/src/screencastPanel.ts @@ -17,7 +17,7 @@ import { SETTINGS_SCREENCAST_WEBVIEW_NAME, SETTINGS_VIEW_NAME, } from './utils'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import { DevToolsPanel } from './devtoolsPanel'; import { providedHeadlessDebugConfig } from './launchConfigManager'; diff --git a/src/utils.ts b/src/utils.ts index 5573bd50..4d0081bc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import * as url from 'url'; import * as vscode from 'vscode'; import * as debugCore from 'vscode-chrome-debug-core'; -import TelemetryReporter from 'vscode-extension-telemetry'; +import TelemetryReporter from '@vscode/extension-telemetry'; import packageJson from '../package.json'; import { DebugTelemetryReporter } from './debugTelemetryReporter'; @@ -338,7 +338,7 @@ export async function getJsDebugCDPProxyWebsocketUrl(debugSessionId: string): Pr export function createTelemetryReporter(_context: vscode.ExtensionContext): Readonly { if (packageJson && (_context.extensionMode === vscode.ExtensionMode.Production)) { // Use the real telemetry reporter - return new TelemetryReporter(packageJson.name, packageJson.version, packageJson.aiKey); + return new TelemetryReporter(packageJson.aiKey); } // Fallback to a fake telemetry reporter return new DebugTelemetryReporter(); diff --git a/test/cdpTargetsProvider.test.ts b/test/cdpTargetsProvider.test.ts index 66619ffa..c12c7467 100644 --- a/test/cdpTargetsProvider.test.ts +++ b/test/cdpTargetsProvider.test.ts @@ -5,7 +5,7 @@ // tslint:disable: variable-name import { ExtensionContext } from "vscode"; -import TelemetryReporter from "vscode-extension-telemetry"; +import TelemetryReporter from "@vscode/extension-telemetry"; import { CDPTarget } from "../src/cdpTarget"; import { createFakeExtensionContext, createFakeTelemetryReporter, createFakeVSCode, Mocked } from "./helpers/helpers"; import { IRemoteTargetJson } from "../src/utils"; diff --git a/test/debugTelemetryReporter.test.ts b/test/debugTelemetryReporter.test.ts index d4e27153..409bd5fa 100644 --- a/test/debugTelemetryReporter.test.ts +++ b/test/debugTelemetryReporter.test.ts @@ -7,7 +7,7 @@ import { createFakeVSCode } from "./helpers/helpers"; // eslint-disable no-console jest.mock("vscode", () => createFakeVSCode(), { virtual: true }); -jest.mock("vscode-extension-telemetry"); +jest.mock("@vscode/extension-telemetry"); describe("debugTelemetryReporter", () => { it("gets created successfully", async () => { diff --git a/test/devtoolsPanel.test.ts b/test/devtoolsPanel.test.ts index 74097f38..0f5b1801 100644 --- a/test/devtoolsPanel.test.ts +++ b/test/devtoolsPanel.test.ts @@ -5,7 +5,7 @@ // tslint:disable: variable-name import { Disposable, ExtensionContext, WebviewPanel } from "vscode"; -import TelemetryReporter from "vscode-extension-telemetry"; +import TelemetryReporter from "@vscode/extension-telemetry"; import { TelemetryData, webviewEventNames } from "../src/common/webviewEvents"; import { PanelSocket } from "../src/panelSocket"; import { JsDebugProxyPanelSocket } from "../src/JsDebugProxyPanelSocket"; diff --git a/test/extension.test.ts b/test/extension.test.ts index dc1835f6..68719930 100644 --- a/test/extension.test.ts +++ b/test/extension.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { ExtensionContext, Uri} from "vscode"; -import TelemetryReporter from "vscode-extension-telemetry"; +import TelemetryReporter from "@vscode/extension-telemetry"; import { createFakeExtensionContext, createFakeTelemetryReporter, createFakeVSCode, createFakeLanguageClient, Mocked } from "./helpers/helpers"; import { buttonCode, diff --git a/test/helpers/helpers.ts b/test/helpers/helpers.ts index 19781d76..0a72a8fe 100644 --- a/test/helpers/helpers.ts +++ b/test/helpers/helpers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { ExtensionContext } from "vscode"; -import TelemetryReporter from "vscode-extension-telemetry"; +import TelemetryReporter from "@vscode/extension-telemetry"; // Allow unused variables in the mocks to have leading underscore // tslint:disable: variable-name @@ -162,9 +162,13 @@ export function createFakeExtensionContext() { export function createFakeTelemetryReporter(): Mocked> { return { dispose: jest.fn(), - sendTelemetryErrorEvent: jest.fn(), sendTelemetryEvent: jest.fn(), - sendTelemetryException: jest.fn(), + sendRawTelemetryEvent: jest.fn(), + sendDangerousTelemetryEvent: jest.fn(), + sendTelemetryErrorEvent: jest.fn(), + sendDangerousTelemetryErrorEvent: jest.fn(), + onDidChangeTelemetryLevel: jest.fn(), + telemetryLevel: "all" }; } diff --git a/test/launchDebugProvider.test.ts b/test/launchDebugProvider.test.ts index 47f7ce8d..85c736e1 100644 --- a/test/launchDebugProvider.test.ts +++ b/test/launchDebugProvider.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import TelemetryReporter from "vscode-extension-telemetry"; +import TelemetryReporter from "@vscode/extension-telemetry"; import { LaunchDebugProvider } from "../src/launchDebugProvider"; import { createFakeExtensionContext, diff --git a/test/utils.test.ts b/test/utils.test.ts index 522ac0fa..07f9d96e 100644 --- a/test/utils.test.ts +++ b/test/utils.test.ts @@ -429,7 +429,7 @@ describe("utils", () => { it("returns a retail version when valid package in retail env", async () => { const retailReporter = {}; - jest.doMock("vscode-extension-telemetry", () => function retail() { return retailReporter; }); + jest.doMock("@vscode/extension-telemetry", () => function retail() { return retailReporter; }); jest.resetModules(); jest.requireMock("vscode").env.machineId = "12345";