|
22 | 22 |
|
23 | 23 | [fork]: https://help.github.com/articles/fork-a-repo/
|
24 | 24 |
|
| 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 | + |
25 | 47 | ### Building the Code
|
26 | 48 |
|
27 | 49 | #### From Visual Studio Code
|
|
0 commit comments