diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2abfb866f605..2c53f182c895 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -50,11 +50,11 @@ jobs: files: | docs/** - - name: Install Node.js v16 + - name: Install Node.js v18 if: steps.changed-files.outputs.any_changed == 'true' uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" cache: "yarn" - name: Install doctoc @@ -115,11 +115,11 @@ jobs: files_ignore: | lib/vscode/** - - name: Install Node.js v16 + - name: Install Node.js v18 if: steps.changed-files.outputs.any_changed == 'true' uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache if: steps.changed-files.outputs.any_changed == 'true' @@ -170,11 +170,11 @@ jobs: files_ignore: | lib/vscode/** - - name: Install Node.js v16 + - name: Install Node.js v18 if: steps.changed-files.outputs.any_changed == 'true' uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache if: steps.changed-files.outputs.any_changed == 'true' @@ -224,10 +224,10 @@ jobs: - name: Patch Code run: quilt push -a - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache id: cache-node-modules @@ -298,10 +298,10 @@ jobs: - name: Install system dependencies run: sudo apt update && sudo apt install -y libkrb5-dev - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache id: cache-node-modules @@ -357,10 +357,10 @@ jobs: - name: Install system dependencies run: sudo apt update && sudo apt install -y libkrb5-dev - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache id: cache-node-modules diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0ce4d721c501..90f9d114d9fb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,10 +35,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Install development tools run: | @@ -142,16 +142,16 @@ jobs: CXX: ${{ format('{0}-g++', matrix.prefix) }} LINK: ${{ format('{0}-g++', matrix.prefix) }} NPM_CONFIG_ARCH: ${{ matrix.arch }} - NODE_VERSION: v16.13.0 + NODE_VERSION: v18.15.0 steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Install nfpm run: | @@ -210,10 +210,10 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Install nfpm run: | diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 7bb34224179e..9024e7a3c38c 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -29,10 +29,10 @@ jobs: with: fetch-depth: 0 - - name: Install Node.js v16 + - name: Install Node.js v18 uses: actions/setup-node@v3 with: - node-version: "16" + node-version: "18" - name: Fetch dependencies from cache id: cache-yarn diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index ee4d34913b69..028c1bad60ef 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -68,8 +68,8 @@ main() { echo "USE AT YOUR OWN RISK!" fi - if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-16}" ]; then - echo "ERROR: code-server currently requires node v16." + if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-18}" ]; then + echo "ERROR: code-server currently requires node v18." if [ -n "$FORCE_NODE_VERSION" ]; then echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION." fi diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index c42fc9e20a4f..41c72a80c683 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -37,7 +37,7 @@ for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). Here is what is needed: -- `node` v16.x +- `node` v18.x - `git` v2.x or greater - [`git-lfs`](https://git-lfs.github.com) - [`yarn`](https://classic.yarnpkg.com/en/) diff --git a/docs/android.md b/docs/android.md index c530283536d1..9479276e0928 100644 --- a/docs/android.md +++ b/docs/android.md @@ -11,11 +11,11 @@ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash ``` 6. Exit the terminal using `exit` and then reopen the terminal -7. Install and use Node.js 16: +7. Install and use Node.js 18: ```shell -nvm install 16 -nvm use 16 +nvm install 18 +nvm use 18 ``` 8. Install code-server globally on device with: `npm install --global code-server --unsafe-perm` diff --git a/docs/npm.md b/docs/npm.md index 5d3d3f88e4fb..12064e3b0883 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -30,7 +30,7 @@ includes installing instructions based on your operating system. ## Node.js version We use the same major version of Node.js shipped with Code's remote, which is -currently `16.x`. VS Code also [lists Node.js +currently `18.x`. VS Code also [lists Node.js requirements](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites). Using other versions of Node.js [may lead to unexpected @@ -79,7 +79,7 @@ Proceed to [installing](#installing) ## FreeBSD ```sh -pkg install -y git python npm-node16 pkgconf +pkg install -y git python npm-node18 pkgconf pkg install -y libinotify ``` diff --git a/docs/termux.md b/docs/termux.md index 9c19a9e42c50..82aa995ad918 100644 --- a/docs/termux.md +++ b/docs/termux.md @@ -56,7 +56,7 @@ npm config set python python3 node -v ``` -you will get node version `v16.15.0` +you will get Node version `v18` 5. Now install code-server following our guide on [installing with npm](./npm.md) diff --git a/flake.nix b/flake.nix index 4162c8ce6308..37e5062c16a6 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; - nodejs = pkgs.nodejs-16_x; + nodejs = pkgs.nodejs-18_x; yarn' = pkgs.yarn.override { inherit nodejs; }; in { devShells.default = pkgs.mkShell { diff --git a/install.sh b/install.sh index d9bed9a4b04e..5cbd8222b6c7 100755 --- a/install.sh +++ b/install.sh @@ -441,7 +441,7 @@ install_npm() { return fi echoerr "Please install npm to install code-server!" - echoerr "You will need at least node v12 and a few C dependencies." + echoerr "You will need at least node v18 and a few C dependencies." echoerr "See the docs https://coder.com/docs/code-server/latest/install#npm" exit 1 diff --git a/package.json b/package.json index 1db50e43c88f..9649c1e2c26e 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@types/express": "^4.17.8", "@types/http-proxy": "^1.17.4", "@types/js-yaml": "^4.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/pem": "^1.9.5", "@types/proxy-from-env": "^1.0.1", "@types/safe-compare": "^1.1.0", @@ -82,7 +82,7 @@ "nanoid": "^3.1.31", "minimist": "npm:minimist-lite@2.2.1", "glob-parent": "^6.0.1", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "qs": "^6.7.3" }, "dependencies": { @@ -120,7 +120,7 @@ "remote-development" ], "engines": { - "node": "16" + "node": "18" }, "jest": { "transform": { diff --git a/yarn.lock b/yarn.lock index ebfb2b801d3b..9e4bb9b926d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -285,10 +285,10 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== -"@types/node@*", "@types/node@^16.0.0": - version "16.18.18" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.18.tgz#06cb0eeb5a0175d26d99b7acf4db613ca30cb07f" - integrity sha512-fwGw1uvQAzabxL1pyoknPlJIF2t7+K90uTqynleKRx24n3lYcxWa3+KByLhgkF8GEAK2c7hC8Ki0RkNM5H15jQ== +"@types/node@*", "@types/node@^18.0.0": + version "18.17.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.18.tgz#acae19ad9011a2ab3d792232501c95085ba1838f" + integrity sha512-/4QOuy3ZpV7Ya1GTRz5CYSz3DgkKpyUptXuQ5PPce7uuyJAOR7r9FhkmxJfvcNUXyklbC63a+YvB3jxy7s9ngw== "@types/pem@^1.9.5": version "1.9.6"