Skip to content

Commit

Permalink
Remove optionalDependencies from API npm package and document to inst…
Browse files Browse the repository at this point in the history
…all 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.
  • Loading branch information
Kartik Raj committed Aug 4, 2023
1 parent cabdf39 commit 8e0e59b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 4 additions & 1 deletion pythonExtensionApi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ First we need to define a `package.json` for the extension that wants to use the
// Depend on the Python extension facade npm module to get easier API access to the
// core extension.
"dependencies": {
"@vscode/python-extension": "..."
"@vscode/python-extension": "...",
"@types/vscode": "..."
},
}
```

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.

The actual source code to get the active environment to run some script could look like this:

```typescript
Expand Down
3 changes: 0 additions & 3 deletions pythonExtensionApi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions pythonExtensionApi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
"bugs": {
"url": "https://github.com/Microsoft/vscode-python/issues"
},
"optionalDependencies": {
"@types/vscode": "^1.78.0"
},
"devDependencies": {
"typescript": "5.0.4",
"@types/vscode": "^1.78.0"
Expand Down

0 comments on commit 8e0e59b

Please sign in to comment.