Skip to content

Commit

Permalink
Use the same Node version as VSCode
Browse files Browse the repository at this point in the history
As recommended here [1], we want to stay in sync with the current node
version shipped with VSCode (16.13.0) [2].

For this we can add a `.nvmrc` file to alert nvm to switch to the
preferred version automatically.

It will also help prevent builds from failing when setting up the
project for the first time, as building the extension currently fails in
Node v18. [3]

We're also updating the docs to mention using `nvm` to manage node
versions.

[1]: #1369 (comment)
[2]: https://github.com/microsoft/vscode/blob/32d40cf44e893e87ac33ac4f08de1e5f7fe077fc/remote/.yarnrc#L2
[3]: #1373
  • Loading branch information
elenatanasoiu committed Jun 1, 2022
1 parent 475d7cc commit 41d0a81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Here are a few things you can do that will increase the likelihood of your pull

Make sure you have installed recent versions of vscode (>= v1.52), node (>=12.16), and npm (>= 7.5.2). Earlier versions will probably work, but we no longer test against them.

To automatically switch to the correct version of node, we recommend using nvm which will pick-up the node version from `.nvmrc`.

### Installing all packages

From the command line, go to the directory `extensions/ql-vscode` and run
Expand Down
1 change: 1 addition & 0 deletions extensions/ql-vscode/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.13.0

0 comments on commit 41d0a81

Please sign in to comment.