diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 9e8d20c6..c5dd2620 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -6,11 +6,11 @@ on: permissions: {} env: - NODE_VERSION: 18.17.1 + NODE_VERSION: 22.17.0 TEST_RESULTS_DIRECTORY: . # Force a path with spaces and unicode chars to test extension works in these scenarios - special-working-directory: './🐍 🐛' - special-working-directory-relative: '🐍 🐛' + special-working-directory: './testDir' + special-working-directory-relative: 'testDir' jobs: build-vsix: diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml index 722446af..c8e956a9 100644 --- a/.github/workflows/push-check.yml +++ b/.github/workflows/push-check.yml @@ -11,11 +11,11 @@ on: permissions: {} env: - NODE_VERSION: 18.17.1 + NODE_VERSION: 22.17.0 TEST_RESULTS_DIRECTORY: . # Force a path with spaces and unicode chars to test extension works in these scenarios - special-working-directory: './🐍 🐛' - special-working-directory-relative: '🐍 🐛' + special-working-directory: './testDir' + special-working-directory-relative: 'testDir' jobs: build-vsix: diff --git a/build/azure-pipeline.pre-release.yml b/build/azure-pipeline.pre-release.yml index c97169d0..2db74326 100644 --- a/build/azure-pipeline.pre-release.yml +++ b/build/azure-pipeline.pre-release.yml @@ -58,7 +58,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '18.17.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/build/azure-pipeline.stable.yml b/build/azure-pipeline.stable.yml index 5a743734..452ab5e9 100644 --- a/build/azure-pipeline.stable.yml +++ b/build/azure-pipeline.stable.yml @@ -53,7 +53,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '18.17.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/debugpy_info.json b/debugpy_info.json index b24d7ed9..8a066e4d 100644 --- a/debugpy_info.json +++ b/debugpy_info.json @@ -1,69 +1,69 @@ { "macOS": [ { - "url": "https://files.pythonhosted.org/packages/3f/32/901c7204cceb3262fdf38f4c25c9a46372c11661e8490e9ea702bc4ff448/debugpy-1.8.13-cp310-cp310-macosx_14_0_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/ce/fd/f1b75ebc61d90882595b81d808efd3573c082e1c3407850d9dccac4ae904/debugpy-1.8.16-cp310-cp310-macosx_14_0_x86_64.whl", "hash": { - "sha256": "06859f68e817966723ffe046b896b1bd75c665996a77313370336ee9e1de3e90" + "sha256": "2a3958fb9c2f40ed8ea48a0d34895b461de57a1f9862e7478716c35d76f56c65" } }, { - "url": "https://files.pythonhosted.org/packages/31/90/dd2fcad8364f0964f476537481985198ce6e879760281ad1cec289f1aa71/debugpy-1.8.13-cp311-cp311-macosx_14_0_universal2.whl", + "url": "https://files.pythonhosted.org/packages/63/d6/ad70ba8b49b23fa286fb21081cf732232cc19374af362051da9c7537ae52/debugpy-1.8.16-cp311-cp311-macosx_14_0_universal2.whl", "hash": { - "sha256": "eee02b2ed52a563126c97bf04194af48f2fe1f68bb522a312b05935798e922ff" + "sha256": "67371b28b79a6a12bcc027d94a06158f2fde223e35b5c4e0783b6f9d3b39274a" } }, { - "url": "https://files.pythonhosted.org/packages/79/ad/dff929b6b5403feaab0af0e5bb460fd723f9c62538b718a9af819b8fff20/debugpy-1.8.13-cp312-cp312-macosx_14_0_universal2.whl", + "url": "https://files.pythonhosted.org/packages/61/fb/0387c0e108d842c902801bc65ccc53e5b91d8c169702a9bbf4f7efcedf0c/debugpy-1.8.16-cp312-cp312-macosx_14_0_universal2.whl", "hash": { - "sha256": "2b8de94c5c78aa0d0ed79023eb27c7c56a64c68217d881bee2ffbcb13951d0c1" + "sha256": "b202e2843e32e80b3b584bcebfe0e65e0392920dc70df11b2bfe1afcb7a085e4" } } ], "win64": [ { - "url": "https://files.pythonhosted.org/packages/89/16/1d53a80caf5862627d3eaffb217d4079d7e4a1df6729a2d5153733661efd/debugpy-1.8.13-cp310-cp310-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/54/f8/e774ad16a60b9913213dbabb7472074c5a7b0d84f07c1f383040a9690057/debugpy-1.8.16-cp310-cp310-win_amd64.whl", "hash": { - "sha256": "dc7b77f5d32674686a5f06955e4b18c0e41fb5a605f5b33cf225790f114cfeec" + "sha256": "fee6db83ea5c978baf042440cfe29695e1a5d48a30147abf4c3be87513609817" } }, { - "url": "https://files.pythonhosted.org/packages/cd/d5/3684d7561c8ba2797305cf8259619acccb8d6ebe2117bb33a6897c235eee/debugpy-1.8.13-cp311-cp311-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/d8/ef/9aa9549ce1e10cea696d980292e71672a91ee4a6a691ce5f8629e8f48c49/debugpy-1.8.16-cp311-cp311-win_amd64.whl", "hash": { - "sha256": "62f9b4a861c256f37e163ada8cf5a81f4c8d5148fc17ee31fb46813bd658cdcc" + "sha256": "70f5fcd6d4d0c150a878d2aa37391c52de788c3dc680b97bdb5e529cb80df87a" } }, { - "url": "https://files.pythonhosted.org/packages/c9/f7/0df18a4f530ed3cc06f0060f548efe9e3316102101e311739d906f5650be/debugpy-1.8.13-cp312-cp312-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/b1/e0/bc62e2dc141de53bd03e2c7cb9d7011de2e65e8bdcdaa26703e4d28656ba/debugpy-1.8.16-cp312-cp312-win_amd64.whl", "hash": { - "sha256": "63ca7670563c320503fea26ac688988d9d6b9c6a12abc8a8cf2e7dd8e5f6b6ea" + "sha256": "75f204684581e9ef3dc2f67687c3c8c183fde2d6675ab131d94084baf8084121" } } ], "linux": [ { - "url": "https://files.pythonhosted.org/packages/95/10/77fe746851c8d84838a807da60c7bd0ac8627a6107d6917dd3293bf8628c/debugpy-1.8.13-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/df/5e/c5c1934352871128b30a1a144a58b5baa546e1b57bd47dbed788bad4431c/debugpy-1.8.16-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "cb56c2db69fb8df3168bc857d7b7d2494fed295dfdbde9a45f27b4b152f37520" + "sha256": "e5ca7314042e8a614cc2574cd71f6ccd7e13a9708ce3c6d8436959eae56f2378" } }, { - "url": "https://files.pythonhosted.org/packages/5c/c9/06ff65f15eb30dbdafd45d1575770b842ce3869ad5580a77f4e5590f1be7/debugpy-1.8.13-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/aa/49/7b03e88dea9759a4c7910143f87f92beb494daaae25560184ff4ae883f9e/debugpy-1.8.16-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "4caca674206e97c85c034c1efab4483f33971d4e02e73081265ecb612af65377" + "sha256": "b2abae6dd02523bec2dee16bd6b0781cccb53fd4995e5c71cc659b5f45581898" } }, { - "url": "https://files.pythonhosted.org/packages/d6/4f/b7d42e6679f0bb525888c278b0c0d2b6dff26ed42795230bb46eaae4f9b3/debugpy-1.8.13-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/37/44/19e02745cae22bf96440141f94e15a69a1afaa3a64ddfc38004668fcdebf/debugpy-1.8.16-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "887d54276cefbe7290a754424b077e41efa405a3e07122d8897de54709dbe522" + "sha256": "64473c4a306ba11a99fe0bb14622ba4fbd943eb004847d9b69b107bde45aa9ea" } } ], "any": [ { - "url": "https://files.pythonhosted.org/packages/37/4f/0b65410a08b6452bfd3f7ed6f3610f1a31fb127f46836e82d31797065dcb/debugpy-1.8.13-py2.py3-none-any.whl", + "url": "https://files.pythonhosted.org/packages/52/57/ecc9ae29fa5b2d90107cd1d9bf8ed19aacb74b2264d986ae9d44fe9bdf87/debugpy-1.8.16-py2.py3-none-any.whl", "hash": { - "sha256": "d4ba115cdd0e3a70942bd562adba9ec8c651fe69ddde2298a1be296fc331906f" + "sha256": "19c9521962475b87da6f673514f7fd610328757ec993bf7ec0d8c96f9a325f9e" } } ] diff --git a/package-lock.json b/package-lock.json index cc4ca09a..6ddac110 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,23 +11,23 @@ "dependencies": { "@vscode/debugadapter": "^1.65.0", "@vscode/debugprotocol": "^1.65.0", - "@vscode/extension-telemetry": "^0.8.5", - "@vscode/python-extension": "^1.0.5", + "@vscode/extension-telemetry": "^0.8.4", + "@vscode/python-extension": "^1.0.6", "fs-extra": "^11.2.0", "iconv-lite": "^0.6.3", - "jsonc-parser": "^3.2.0", + "jsonc-parser": "^3.0.0", "lodash": "^4.17.21", "vscode-languageclient": "^8.0.2" }, "devDependencies": { - "@types/chai": "^4.3.4", - "@types/chai-as-promised": "^7.1.8", + "@types/chai": "^4.1.2", + "@types/chai-as-promised": "^7.1.0", "@types/fs-extra": "^11.0.4", "@types/glob": "^7.2.0", - "@types/lodash": "^4.14.191", - "@types/mocha": "^10.0.7", - "@types/node": "18.x", - "@types/semver": "^7.3.13", + "@types/lodash": "^4.14.104", + "@types/mocha": "^9.1.0", + "@types/node": "^22.5.0", + "@types/semver": "^5.5.0", "@types/sinon": "^10.0.13", "@types/vscode": "^1.87.0", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -46,8 +46,8 @@ "ts-mockito": "^2.6.1", "typemoq": "^2.1.0", "typescript": "^5.5.4", - "webpack": "^5.87.0", - "webpack-cli": "^5.1.4" + "webpack": "^5.76.0", + "webpack-cli": "^4.9.2" }, "engines": { "vscode": "^1.92.0" @@ -692,22 +692,28 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", - "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", - "dev": true + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "18.18.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", - "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", - "dev": true + "version": "22.17.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.1.tgz", + "integrity": "sha512-y3tBaz+rjspDTylNjAX37jEC3TETEFGNJL6uQDxwF9/8GLLIjW1rvVHlynyuUKMnMr1Roq8jOv3vkopBjC4/VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", + "dev": true, + "license": "MIT" }, "node_modules/@types/shimmer": { "version": "1.2.0", @@ -906,6 +912,13 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/@typescript-eslint/utils/node_modules/@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true, + "license": "MIT" + }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", @@ -996,12 +1009,13 @@ "integrity": "sha512-gNw9z9LbqLV+WadZ6/MMrWwO3e0LuoUH1wve/1iPsBNbgqeVCiB0EZFNNj2lysxS2gkqoF9hmyVaG3MoM1BkxA==" }, "node_modules/@vscode/python-extension": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.5.tgz", - "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.6.tgz", + "integrity": "sha512-q7KYf+mymM67G0yS6xfhczFwu2teBi5oXHVdNgtCsYhErdSOkwMPtE291SqQahrjTcgKxn7O56i1qb1EQR6o4w==", + "license": "MIT", "engines": { - "node": ">=16.17.1", - "vscode": "^1.78.0" + "node": ">=22.17.0", + "vscode": "^1.93.0" } }, "node_modules/@vscode/test-electron": { @@ -1237,42 +1251,37 @@ } }, "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, - "engines": { - "node": ">=14.15.0" - }, + "license": "MIT", "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" } }, "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, - "engines": { - "node": ">=14.15.0" + "license": "MIT", + "dependencies": { + "envinfo": "^7.7.3" }, "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "webpack-cli": "4.x.x" } }, "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, - "engines": { - "node": ">=14.15.0" - }, + "license": "MIT", "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" + "webpack-cli": "4.x.x" }, "peerDependenciesMeta": { "webpack-dev-server": { @@ -2348,10 +2357,11 @@ } }, "node_modules/envinfo": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.9.0.tgz", - "integrity": "sha512-RODB4txU+xImYDemN5DqaKC0CHk05XSVkOX4pq0hK26Qx+1LChkuOyUDlGEjYb3ACr0n9qBhFjg37hQuJvpkRQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true, + "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -3346,12 +3356,13 @@ "optional": true }, "node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10.13.0" + "node": ">= 0.10" } }, "node_modules/is-binary-path": { @@ -4624,15 +4635,16 @@ } }, "node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, + "license": "MIT", "dependencies": { - "resolve": "^1.20.0" + "resolve": "^1.9.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 0.10" } }, "node_modules/require-directory": { @@ -5472,6 +5484,13 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -5666,42 +5685,45 @@ } }, "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, + "license": "MIT", "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", "colorette": "^2.0.14", - "commander": "^10.0.1", + "commander": "^7.0.0", "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", "webpack-merge": "^5.7.3" }, "bin": { "webpack-cli": "bin/cli.js" }, "engines": { - "node": ">=14.15.0" + "node": ">=10.13.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "5.x.x" + "webpack": "4.x.x || 5.x.x" }, "peerDependenciesMeta": { "@webpack-cli/generators": { "optional": true }, + "@webpack-cli/migrate": { + "optional": true + }, "webpack-bundle-analyzer": { "optional": true }, @@ -5711,12 +5733,13 @@ } }, "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true, + "license": "MIT", "engines": { - "node": ">=14" + "node": ">= 10" } }, "node_modules/webpack-merge": { @@ -6446,21 +6469,24 @@ "dev": true }, "@types/mocha": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", - "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", + "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", "dev": true }, "@types/node": { - "version": "18.18.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", - "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", - "dev": true + "version": "22.17.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.17.1.tgz", + "integrity": "sha512-y3tBaz+rjspDTylNjAX37jEC3TETEFGNJL6uQDxwF9/8GLLIjW1rvVHlynyuUKMnMr1Roq8jOv3vkopBjC4/VA==", + "dev": true, + "requires": { + "undici-types": "~6.21.0" + } }, "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", "dev": true }, "@types/shimmer": { @@ -6576,6 +6602,14 @@ "@typescript-eslint/typescript-estree": "5.62.0", "eslint-scope": "^5.1.1", "semver": "^7.3.7" + }, + "dependencies": { + "@types/semver": { + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.0.tgz", + "integrity": "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA==", + "dev": true + } } }, "@typescript-eslint/visitor-keys": { @@ -6654,9 +6688,9 @@ } }, "@vscode/python-extension": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.5.tgz", - "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.6.tgz", + "integrity": "sha512-q7KYf+mymM67G0yS6xfhczFwu2teBi5oXHVdNgtCsYhErdSOkwMPtE291SqQahrjTcgKxn7O56i1qb1EQR6o4w==" }, "@vscode/test-electron": { "version": "2.3.9", @@ -6862,23 +6896,25 @@ } }, "@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", + "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", "dev": true, "requires": {} }, "@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", + "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", "dev": true, - "requires": {} + "requires": { + "envinfo": "^7.7.3" + } }, "@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", + "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true, "requires": {} }, @@ -7651,9 +7687,9 @@ "dev": true }, "envinfo": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.9.0.tgz", - "integrity": "sha512-RODB4txU+xImYDemN5DqaKC0CHk05XSVkOX4pq0hK26Qx+1LChkuOyUDlGEjYb3ACr0n9qBhFjg37hQuJvpkRQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true }, "es-define-property": { @@ -8373,9 +8409,9 @@ "optional": true }, "interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, "is-binary-path": { @@ -9354,12 +9390,12 @@ } }, "rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "dev": true, "requires": { - "resolve": "^1.20.0" + "resolve": "^1.9.0" } }, "require-directory": { @@ -9957,6 +9993,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -10095,30 +10137,29 @@ } }, "webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", + "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", "dev": true, "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", + "@webpack-cli/configtest": "^1.2.0", + "@webpack-cli/info": "^1.5.0", + "@webpack-cli/serve": "^1.7.0", "colorette": "^2.0.14", - "commander": "^10.0.1", + "commander": "^7.0.0", "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", "webpack-merge": "^5.7.3" }, "dependencies": { "commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true } } diff --git a/package.json b/package.json index 60aac993..a65cbe82 100644 --- a/package.json +++ b/package.json @@ -612,14 +612,14 @@ "vsce-package": "npx @vscode/vsce package -o python-debugger.vsix" }, "devDependencies": { - "@types/chai": "^4.3.4", - "@types/chai-as-promised": "^7.1.8", + "@types/chai": "^4.1.2", + "@types/chai-as-promised": "^7.1.0", "@types/fs-extra": "^11.0.4", "@types/glob": "^7.2.0", - "@types/lodash": "^4.14.191", - "@types/mocha": "^10.0.7", - "@types/node": "18.x", - "@types/semver": "^7.3.13", + "@types/lodash": "^4.14.104", + "@types/mocha": "^9.1.0", + "@types/node": "^22.5.0", + "@types/semver": "^5.5.0", "@types/sinon": "^10.0.13", "@types/vscode": "^1.87.0", "@typescript-eslint/eslint-plugin": "^5.62.0", @@ -638,17 +638,17 @@ "ts-mockito": "^2.6.1", "typemoq": "^2.1.0", "typescript": "^5.5.4", - "webpack": "^5.87.0", - "webpack-cli": "^5.1.4" + "webpack": "^5.76.0", + "webpack-cli": "^4.9.2" }, "dependencies": { "@vscode/debugadapter": "^1.65.0", "@vscode/debugprotocol": "^1.65.0", - "@vscode/extension-telemetry": "^0.8.5", - "@vscode/python-extension": "^1.0.5", + "@vscode/extension-telemetry": "^0.8.4", + "@vscode/python-extension": "^1.0.6", "fs-extra": "^11.2.0", "iconv-lite": "^0.6.3", - "jsonc-parser": "^3.2.0", + "jsonc-parser": "^3.0.0", "lodash": "^4.17.21", "vscode-languageclient": "^8.0.2" } diff --git a/src/extension/common/python.ts b/src/extension/common/python.ts index a82fb559..18686d1f 100644 --- a/src/extension/common/python.ts +++ b/src/extension/common/python.ts @@ -2,7 +2,13 @@ // Licensed under the MIT License. /* eslint-disable @typescript-eslint/naming-convention */ -import { Environment, EnvironmentPath, PythonExtension, Resource } from '@vscode/python-extension'; +import { + ActiveEnvironmentPathChangeEvent, + Environment, + EnvironmentPath, + PythonExtension, + Resource, +} from '@vscode/python-extension'; import { commands, EventEmitter, extensions, Uri, Event, Disposable } from 'vscode'; import { createDeferred } from './utils/async'; import { traceError, traceLog } from './log/logging'; @@ -22,12 +28,24 @@ export interface IInterpreterDetails { const onDidChangePythonInterpreterEvent = new EventEmitter(); export const onDidChangePythonInterpreter: Event = onDidChangePythonInterpreterEvent.event; async function activateExtension() { + console.log('Activating Python extension...'); + activateEnvsExtension(); const extension = extensions.getExtension('ms-python.python'); if (extension) { if (!extension.isActive) { await extension.activate(); } } + console.log('Python extension activated.'); + return extension; +} +async function activateEnvsExtension() { + const extension = extensions.getExtension('ms-python.vscode-python-envs'); + if (extension) { + if (!extension.isActive) { + await extension.activate(); + } + } return extension; } @@ -48,8 +66,16 @@ export async function initializePython(disposables: Disposable[]): Promise if (api) { disposables.push( - api.environments.onDidChangeActiveEnvironmentPath((e) => { - onDidChangePythonInterpreterEvent.fire({ path: [e.path], resource: e.resource?.uri }); + api.environments.onDidChangeActiveEnvironmentPath((e: ActiveEnvironmentPathChangeEvent) => { + let resourceUri: Uri | undefined; + if (e.resource instanceof Uri) { + resourceUri = e.resource; + } + if (e.resource && 'uri' in e.resource) { + // WorkspaceFolder type + resourceUri = e.resource.uri; + } + onDidChangePythonInterpreterEvent.fire({ path: [e.path], resource: resourceUri }); }), ); @@ -89,8 +115,13 @@ export async function getActiveEnvironmentPath(resource?: Resource) { export async function getInterpreterDetails(resource?: Uri): Promise { const api = await getPythonExtensionEnviromentAPI(); const environment = await api.environments.resolveEnvironment(api.environments.getActiveEnvironmentPath(resource)); - if (environment?.executable.uri) { - return { path: [environment?.executable.uri.fsPath], resource }; + const rawExecPath = environment?.executable.uri?.fsPath; + if (rawExecPath) { + let execPath = rawExecPath; + if (rawExecPath.includes(' ') && !(rawExecPath.startsWith('"') && rawExecPath.endsWith('"'))) { + execPath = `"${rawExecPath}"`; + } + return { path: [execPath], resource }; } return { path: undefined, resource }; } diff --git a/src/test/constants.ts b/src/test/constants.ts index 5e1fd83b..b2d00e85 100644 --- a/src/test/constants.ts +++ b/src/test/constants.ts @@ -33,6 +33,8 @@ function isMultiRootTest() { export const EXTENSION_ROOT_DIR_FOR_TESTS = path.join(__dirname, '..', '..'); export const PVSC_EXTENSION_ID_FOR_TESTS = 'ms-python.python'; +export const PVSC_ENVS_EXTENSION_ID_FOR_TESTS = 'ms-python.vscode-python-envs'; + export const SMOKE_TEST_EXTENSIONS_DIR = path.join( EXTENSION_ROOT_DIR_FOR_TESTS, 'tmp', diff --git a/src/test/runTest.ts b/src/test/runTest.ts index 4122198f..464e0042 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -2,8 +2,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; -import { PVSC_EXTENSION_ID_FOR_TESTS } from './constants'; -import { OSType, getOSType } from '../extension/common/platform'; +import { PVSC_ENVS_EXTENSION_ID_FOR_TESTS, PVSC_EXTENSION_ID_FOR_TESTS } from './constants'; async function main() { try { @@ -18,19 +17,49 @@ async function main() { const [cliPath, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); // Use cp.spawn / cp.exec for custom setup - if (getOSType() === OSType.Windows) { - const exec = path.basename(cliPath); - cp.spawnSync(exec, [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS], { - cwd: path.dirname(cliPath), - encoding: 'utf-8', - stdio: 'inherit', - }); + const isWin = process.platform === 'win32'; + if (isWin) { + try { + const installResult = cp.spawnSync( + cliPath, + [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS], + { + cwd: path.dirname(cliPath), + encoding: 'utf8', + stdio: 'inherit', + shell: true, + }, + ); + if (installResult.error) { + console.error('Extension installation error:', installResult.error); + } + if (installResult.status !== 0) { + console.error(`Extension installation failed with exit code: ${installResult.status}`); + } else { + console.log('Extension installation succeeded.'); + } + } catch (ex) { + console.error('Exception during extension installation:', ex); + } } else { - cp.spawnSync(cliPath, [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS], { - encoding: 'utf-8', - stdio: 'inherit', - }); + const installResult = cp.spawnSync( + cliPath, + [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS], + { + encoding: 'utf8', + stdio: 'inherit', + }, + ); + if (installResult.error) { + console.error('Extension installation error:', installResult.error); + } + if (installResult.status !== 0) { + console.error(`Extension installation failed with exit code: ${installResult.status}`); + } else { + console.log('Extension installation succeeded.'); + } } + console.log('Extensions installed, ready to run tests.'); // Run the extension test await runTests({