From 9162476fe9fe022ff24bd42ff828aca7c68129ef Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 4 Feb 2021 14:29:24 +0100 Subject: [PATCH] Support NodeJS 14 and 15, deprecate Node 10 --- package.json | 4 ++-- server/initializers/checker-before-init.ts | 4 ++-- support/doc/dependencies.md | 8 ++++---- support/doc/tools.md | 3 +-- support/docker/production/Dockerfile.buster | 2 +- yarn.lock | 8 ++++---- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 44f8be4b8..ba5fb3a65 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "licence": "AGPL-3.0", "engines": { - "node": ">=10.x <13", + "node": ">=10.x <=15", "yarn": ">=1.x", "postgres": ">=9.6", "redis-server": ">=2.8.18", @@ -87,7 +87,7 @@ "http-signature": "1.3.5" }, "dependencies": { - "apicache": "^1.4.0", + "apicache": "1.5.2", "async": "^3.0.1", "async-lru": "^1.1.1", "bcrypt": "5.0.0", diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index 7cc073603..cac24f0b6 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -107,8 +107,8 @@ function checkNodeVersion () { logger.debug('Checking NodeJS version %s.', v) - if (major < 10) { - logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v) + if (major <= 10) { + logger.warn('Your NodeJS version %s is deprecated. Please upgrade.', v) } } diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md index 350a7c4a0..1faf46c63 100644 --- a/support/doc/dependencies.md +++ b/support/doc/dependencies.md @@ -30,7 +30,7 @@ _note_: only **LTS** versions of external dependencies are supported. If no LTS 2. It would be wise to disable root access and to continue this tutorial with a user with sudoers group access -3. Install NodeJS 10.x: +3. Install NodeJS 12.x: [https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) 4. Install yarn, and be sure to have [a recent version](https://github.com/yarnpkg/yarn/releases/latest): [https://yarnpkg.com/en/docs/install#linux-tab](https://yarnpkg.com/en/docs/install#linux-tab) @@ -66,7 +66,7 @@ sudo systemctl start redis postgresql ## CentOS 7 -1. Install NodeJS 10.x: +1. Install NodeJS 12.x: [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) 2. Install yarn: @@ -113,7 +113,7 @@ sudo systemctl enable --now postgresql ## Centos 8 -1. Install NodeJS 10.x: +1. Install NodeJS 12.x: [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) 2. Install yarn: @@ -172,7 +172,7 @@ su my-peertube-user 3. (Optional) Install certbot (choose instructions for your distribution): [https://certbot.eff.org/all-instructions](https://certbot.eff.org/all-instructions) -4. Install NodeJS 10.x: +4. Install NodeJS 12.x: [https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora](https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora) 5. Install yarn: diff --git a/support/doc/tools.md b/support/doc/tools.md index 62ba52111..e6c4c2010 100644 --- a/support/doc/tools.md +++ b/support/doc/tools.md @@ -39,7 +39,6 @@ You need to follow all the following steps even if you are on a PeerTube server ### Dependencies Install the [PeerTube dependencies](dependencies.md) except PostgreSQL and Redis. -PeerTube supports NodeJS 12. ### Installation @@ -348,7 +347,7 @@ $ cd /var/www/peertube/peertube-latest $ sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run plugin:uninstall -- --npm-name peertube-plugin-myplugin ``` -### REPL ([Read Eval Print Loop](https://nodejs.org/docs/latest-v10.x/api/repl.html)) +### REPL (Read Eval Print Loop) If you want to interact with the application libraries and objects even when PeerTube is not running, there is a REPL for that. diff --git a/support/docker/production/Dockerfile.buster b/support/docker/production/Dockerfile.buster index 457936090..f06a22c00 100644 --- a/support/docker/production/Dockerfile.buster +++ b/support/docker/production/Dockerfile.buster @@ -1,4 +1,4 @@ -FROM node:10-buster-slim +FROM node:12-buster-slim # Allow to pass extra options to the npm run build # eg: --light --light-fr to not build all client languages diff --git a/yarn.lock b/yarn.lock index 21c9531de..6fefe5403 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1118,10 +1118,10 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -apicache@^1.4.0: - version "1.5.3" - resolved "https://registry.yarnpkg.com/apicache/-/apicache-1.5.3.tgz#8977b358bf7d579d55fe3d183c907ae5dbcfb357" - integrity sha512-n1h39Bt7tMiJMV0u0tFlhigig8Uo/wJmKoj6WE/OwvZ+WbFchn7jnXleotZOzZTUBtr0Tg9iJshHnJDAGQbAEQ== +apicache@1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/apicache/-/apicache-1.5.2.tgz#2cb0697d9b1b612b505b1a44face66d48b1d1404" + integrity sha512-jO8ie/Zqmr3MxLQSVNsHiQo5R1tbbP1TnpI6xOnRJv9wUOSP+YnZkULWmdo3fE7PHBSxIQzgIsEHGa6H5hKH9Q== append-field@^1.0.0: version "1.0.0" -- 2.41.0