From 4ff75a3b2c48b2b0a1250cb551d2b73eb26d5296 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 24 Dec 2021 13:52:32 +0100 Subject: Deprecate node 12 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/test.yml | 2 +- server/initializers/checker-before-init.ts | 4 ++++ support/doc/dependencies.md | 14 +++++++------- support/docker/production/Dockerfile.bullseye | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 7e8259d27..8811f0f45 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -35,7 +35,7 @@ jobs: - uses: './.github/actions/reusable-prepare-peertube-build' with: - node-version: '12.x' + node-version: '14.x' - uses: './.github/actions/reusable-prepare-peertube-run' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 030ec3790..18cf60a0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,7 +52,7 @@ jobs: - uses: './.github/actions/reusable-prepare-peertube-build' with: - node-version: '12.x' + node-version: '14.x' - uses: './.github/actions/reusable-prepare-peertube-run' diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index d2f3bb128..458005b98 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -119,6 +119,10 @@ function checkNodeVersion () { if (major <= 10) { throw new Error('Your NodeJS version ' + v + ' is not supported. Please upgrade.') } + + if (major <= 12) { + logger.warn('Your NodeJS version ' + v + ' is deprecated. Please upgrade.') + } } // --------------------------------------------------------------------------- diff --git a/support/doc/dependencies.md b/support/doc/dependencies.md index 711fd2d7f..61b0fc6bc 100644 --- a/support/doc/dependencies.md +++ b/support/doc/dependencies.md @@ -77,7 +77,7 @@ sudo systemctl start redis postgresql 1. Run: ``` -sudo pacman -S nodejs-lts-fermium yarn ffmpeg postgresql openssl redis git wget unzip python base-devel npm nginx +sudo pacman -S nodejs-lts-fermium yarn ffmpeg postgresql openssl redis git wget unzip python base-devel npm nginx ``` Now that dependencies are installed, before running PeerTube you should start PostgreSQL and Redis: @@ -88,7 +88,7 @@ sudo systemctl start redis postgresql ## CentOS 7 -1. Install NodeJS 12.x: +1. Install NodeJS 14.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: @@ -135,7 +135,7 @@ sudo systemctl enable --now postgresql ## Centos 8 -1. Install NodeJS 12.x: +1. Install NodeJS 14.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: @@ -180,9 +180,9 @@ sudo systemctl enable --now postgresql sudo dnf update -y ``` -2. Install NodeJS 12.x (or 14): +2. Install NodeJS 14.x: ``` -sudo dnf module install -y nodejs:12 +sudo dnf module install -y nodejs:14 ``` 3. Install yarn: @@ -239,7 +239,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 12.x: +4. Install NodeJS 14.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: @@ -331,7 +331,7 @@ echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo s 2. Install Node.JS ``` -sudo dnf module install nodejs:12 +sudo dnf module install nodejs:14 ``` 3. Install Yarn diff --git a/support/docker/production/Dockerfile.bullseye b/support/docker/production/Dockerfile.bullseye index ec06d6b1d..262fc427a 100644 --- a/support/docker/production/Dockerfile.bullseye +++ b/support/docker/production/Dockerfile.bullseye @@ -1,4 +1,4 @@ -FROM node:12-bullseye-slim +FROM node:14-bullseye-slim # Allow to pass extra options to the npm run build # eg: --light --light-fr to not build all client languages -- cgit v1.2.3