Skip to content

Commit 5691aff

Browse files
committed
Pin @types/node correctly and document how to update
1 parent 0609e29 commit 5691aff

File tree

3 files changed

+443
-122
lines changed

3 files changed

+443
-122
lines changed

docs/development.md

+22
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@
2222
2323
[fork]: https://help.github.com/articles/fork-a-repo/
2424

25+
## Tracking Upstream Dependencies
26+
27+
As a VS Code extension, we first rely on the `engine` field of `package.json` to
28+
state the lowest version of VS Code we support. This extension in particular
29+
must not update past what Azure Data Studio supports, which can be found in the
30+
[`vscodeVersion`][] field of their `product.json` file. We periodically check
31+
that for updates, and when available update our own.
32+
33+
When our `engine` field is updated the development dependency `@types/vscode`
34+
must be updated to match. Note that it uses `~` (not `^`) so as to accept new
35+
patches with `npm update` but not new minor versions. Then we check that version
36+
of VS Code's own `package.json` file for their [`electron`][] dependency. The
37+
major version of [Electron][] will tell us which [Node.js][] is included, which
38+
dictates which version of Node.js the extension is eventually run with. This
39+
lets us finally update our `@types/node` development dependency to match, our
40+
developer machines if necessary, and the CI and OneBranch pipeline tasks.
41+
42+
[`vscodeVersion`]: https://github.com/microsoft/azuredatastudio/blob/4970733324ef8254b7c22a5dc55af7f8a1dea93f/product.json#L50
43+
[`electron`]: https://github.com/microsoft/vscode/blob/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/package.json#L153
44+
[Electron]: https://www.electronjs.org/blog/electron-25-0
45+
[Node.js]: https://nodejs.org/en/download/package-manager
46+
2547
### Building the Code
2648

2749
#### From Visual Studio Code

0 commit comments

Comments
 (0)