Skip to content

Commit 8e0e59b

Browse files
author
Kartik Raj
authored
Remove optionalDependencies from API npm package and document to install vscode types separately (#21764)
Closes It still leads to conflicts due to double installation of vscode types when testing through the cases, removing vscode types as dependencies altogether and documenting to install it separately instead.
1 parent cabdf39 commit 8e0e59b

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

pythonExtensionApi/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@ First we need to define a `package.json` for the extension that wants to use the
1717
// Depend on the Python extension facade npm module to get easier API access to the
1818
// core extension.
1919
"dependencies": {
20-
"@vscode/python-extension": "..."
20+
"@vscode/python-extension": "...",
21+
"@types/vscode": "..."
2122
},
2223
}
2324
```
2425

26+
Update `"@types/vscode"` to [a recent version](https://code.visualstudio.com/updates/) of VS Code, say `"^1.81.0"` for VS Code version `"1.81"`, in case there are any conflicts.
27+
2528
The actual source code to get the active environment to run some script could look like this:
2629

2730
```typescript

pythonExtensionApi/package-lock.json

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pythonExtensionApi/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
"bugs": {
2626
"url": "https://github.com/Microsoft/vscode-python/issues"
2727
},
28-
"optionalDependencies": {
29-
"@types/vscode": "^1.78.0"
30-
},
3128
"devDependencies": {
3229
"typescript": "5.0.4",
3330
"@types/vscode": "^1.78.0"

0 commit comments

Comments
 (0)