Skip to content

Commit 741db24

Browse files
author
Akash Satheesan
authored
Merge branch 'main' into oxy/yarn-cache
2 parents 80401da + 58622cc commit 741db24

File tree

8 files changed

+49
-30
lines changed

8 files changed

+49
-30
lines changed

.github/workflows/ci.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Checkout repo
2525
uses: actions/checkout@v2
2626

27-
- name: Install Node.js v12
27+
- name: Install Node.js v14
2828
uses: actions/setup-node@v2
2929
with:
30-
node-version: "12"
30+
node-version: "14"
3131

3232
- name: Install helm
3333
uses: azure/[email protected]
@@ -69,10 +69,10 @@ jobs:
6969
- name: Checkout repo
7070
uses: actions/checkout@v2
7171

72-
- name: Install Node.js v12
72+
- name: Install Node.js v14
7373
uses: actions/setup-node@v2
7474
with:
75-
node-version: "12"
75+
node-version: "14"
7676

7777
- name: Fetch dependencies from cache
7878
id: cache-yarn
@@ -100,10 +100,10 @@ jobs:
100100
with:
101101
fetch-depth: 0
102102

103-
- name: Install Node.js v12
103+
- name: Install Node.js v14
104104
uses: actions/setup-node@v2
105105
with:
106-
node-version: "12"
106+
node-version: "14"
107107

108108
- name: Fetch dependencies from cache
109109
id: cache-yarn
@@ -175,10 +175,10 @@ jobs:
175175
steps:
176176
- uses: actions/checkout@v2
177177

178-
- name: Install Node.js v12
178+
- name: Install Node.js v14
179179
uses: actions/setup-node@v2
180180
with:
181-
node-version: "12"
181+
node-version: "14"
182182

183183
- name: Install development tools
184184
run: |
@@ -250,10 +250,10 @@ jobs:
250250
steps:
251251
- uses: actions/checkout@v2
252252

253-
- name: Install Node.js v12
253+
- name: Install Node.js v14
254254
uses: actions/setup-node@v2
255255
with:
256-
node-version: "12"
256+
node-version: "14"
257257

258258
- name: Install nfpm
259259
run: |
@@ -276,8 +276,8 @@ jobs:
276276

277277
- name: Replace node with arm64 equivalent
278278
run: |
279-
wget https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-arm64.tar.gz
280-
tar -xzf node-v12.18.4-linux-arm64.tar.gz node-v12.18.4-linux-arm64/bin/node --strip-components=2
279+
wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-arm64.tar.xz
280+
tar -xf node-v14.17.0-linux-arm64.tar.xz node-v14.17.0-linux-arm64/bin/node --strip-components=2
281281
mv ./node ./release-standalone/lib/node
282282
283283
- name: Build packages with nfpm
@@ -296,10 +296,10 @@ jobs:
296296
steps:
297297
- uses: actions/checkout@v2
298298

299-
- name: Install Node.js v12
299+
- name: Install Node.js v14
300300
uses: actions/setup-node@v2
301301
with:
302-
node-version: "12"
302+
node-version: "14"
303303

304304
- name: Install nfpm
305305
run: |
@@ -339,10 +339,10 @@ jobs:
339339
steps:
340340
- uses: actions/checkout@v2
341341

342-
- name: Install Node.js v12
342+
- name: Install Node.js v14
343343
uses: actions/setup-node@v2
344344
with:
345-
node-version: "12"
345+
node-version: "14"
346346

347347
- name: Install playwright
348348
uses: microsoft/playwright-github-action@v1

.tours/start-development.tour

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"file": "package.json",
77
"line": 31,
8-
"description": "## Commands\n\nTo start developing, make sure you have Node 12+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch"
8+
"description": "## Commands\n\nTo start developing, make sure you have Node 14+ and the [required dependencies](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites) installed. Then, run the following commands:\n\n1. Install dependencies:\n>> yarn\n\n3. Start development mode (and watch for changes):\n>> yarn watch"
99
},
1010
{
1111
"file": "src/node/app.ts",

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ VS Code v0.00.0
5555
### Development
5656

5757
- chore: cross-compile docker images with buildx #3166 @oxy
58+
- chore: update node to v14 #3458 @oxy
5859

5960
## 3.10.2
6061

ci/build/npm-postinstall.sh

+20-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,21 @@ main() {
2323
# Grabs the major version of node from $npm_config_user_agent which looks like
2424
# yarn/1.21.1 npm/? node/v14.2.0 darwin x64
2525
major_node_version=$(echo "$npm_config_user_agent" | sed -n 's/.*node\/v\([^.]*\).*/\1/p')
26-
if [ "$major_node_version" -lt 12 ]; then
27-
echo "code-server currently requires at least node v12"
26+
27+
if [ -n "${FORCE_NODE_VERSION:-}" ]; then
28+
echo "WARNING: Overriding required Node.js version to v$FORCE_NODE_VERSION"
29+
echo "This could lead to broken functionality, and is unsupported."
30+
echo "USE AT YOUR OWN RISK!"
31+
fi
32+
33+
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-14}" ]; then
34+
echo "ERROR: code-server currently requires node v14."
35+
if [ -n "$FORCE_NODE_VERSION" ]; then
36+
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
37+
fi
2838
echo "We have detected that you are on node v$major_node_version"
29-
echo "See https://github.com/cdr/code-server/issues/1633"
39+
echo "You can override this version check by setting \$FORCE_NODE_VERSION,"
40+
echo "but configurations that do not use the same node version are unsupported."
3041
exit 1
3142
fi
3243

@@ -54,6 +65,12 @@ main() {
5465
echo "Please see https://github.com/cdr/code-server/blob/master/docs/npm.md"
5566
exit 1
5667
fi
68+
69+
if [ -n "${FORCE_NODE_VERSION:-}" ]; then
70+
echo "WARNING: The required Node.js version was overriden to v$FORCE_NODE_VERSION"
71+
echo "This could lead to broken functionality, and is unsupported."
72+
echo "USE AT YOUR OWN RISK!"
73+
fi
5774
}
5875

5976
# This is a copy of symlink_asar in ../lib.sh. Look there for details.

docs/CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The prerequisites for contributing to code-server are almost the same as those f
3535
[VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites).
3636
There are several differences, however. Here is what is needed:
3737

38-
- `node` v12.x or greater
38+
- `node` v14.x or greater
3939
- `git` v2.x or greater
4040
- [`yarn`](https://classic.yarnpkg.com/en/)
4141
- used to install JS packages and run scripts
@@ -74,6 +74,7 @@ To update VS Code, follow these steps:
7474
4. There will be merge conflicts. First commit them.
7575
1. We do this because if we don't, it will be impossible to review your PR.
7676
5. Once they're all fixed, test code-server locally and make sure it all works.
77+
6. Check the version of Node.js that the version of Electron shipped with VSCode uses, and update the version of Node.js if necessary.
7778

7879
#### Notes about Changes
7980

docs/npm.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
If you're installing the npm module you'll need certain dependencies to build the native modules used by VS Code.
1414

15-
- Node.js: version `>= 12`, `<= 14`
15+
- Node.js: version `= 14`. Other versions may work, but your mileage may vary.
1616

17-
_Note: the Node.js version requirements are based on the VS Code Node.js requirements. See [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)._
17+
_Note: We use the same major version of Node.js that is shipped in VSCode's Electron. VS Code also lists Node.js requirements. See [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites)._
1818

1919
Related:
2020

@@ -55,6 +55,6 @@ xcode-select --install
5555
## FreeBSD
5656

5757
```sh
58-
pkg install -y git python npm-node12 yarn-node12 pkgconf
58+
pkg install -y git python npm-node14 yarn-node14 pkgconf
5959
pkg install -y libinotify
6060
```

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@types/express": "^4.17.8",
4343
"@types/http-proxy": "^1.17.4",
4444
"@types/js-yaml": "^4.0.0",
45-
"@types/node": "~12.20.7",
45+
"@types/node": "^14.17.1",
4646
"@types/parcel-bundler": "^1.12.1",
4747
"@types/pem": "^1.9.5",
4848
"@types/proxy-from-env": "^1.0.1",
@@ -123,7 +123,7 @@
123123
"browser-ide"
124124
],
125125
"engines": {
126-
"node": ">= 12 <= 14"
126+
"node": "= 14"
127127
},
128128
"jest": {
129129
"transform": {

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1126,10 +1126,10 @@
11261126
resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.1.tgz#283f669ff76d7b8260df8ab7a4262cc83d988256"
11271127
integrity sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==
11281128

1129-
"@types/node@*", "@types/node@~12.20.7":
1130-
version "12.20.13"
1131-
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.13.tgz#e743bae112bd779ac9650f907197dd2caa7f0364"
1132-
integrity sha512-1x8W5OpxPq+T85OUsHRP6BqXeosKmeXRtjoF39STcdf/UWLqUsoehstZKOi0CunhVqHG17AyZgpj20eRVooK6A==
1129+
"@types/node@*", "@types/node@^14.17.1":
1130+
version "14.17.1"
1131+
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.1.tgz#5e07e0cb2ff793aa7a1b41deae76221e6166049f"
1132+
integrity sha512-/tpUyFD7meeooTRwl3sYlihx2BrJE7q9XF71EguPFIySj9B7qgnRtHsHTho+0AUm4m1SvWGm6uSncrR94q6Vtw==
11331133

11341134
"@types/normalize-package-data@^2.4.0":
11351135
version "2.4.0"

0 commit comments

Comments
 (0)