Breaking: only support node 18

Node 16 is not supported anymore

See https://nodejs.org/fr/blog/announcements/nodejs16-eol
This commit is contained in:
Chocobozzz 2023-10-11 13:59:24 +02:00
parent 13f07161f5
commit 678ae8abbd
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 15 additions and 20 deletions

View file

@ -35,7 +35,7 @@ jobs:
- uses: './.github/actions/reusable-prepare-peertube-build'
with:
node-version: '16.x'
node-version: '18.x'
- uses: './.github/actions/reusable-prepare-peertube-run'

View file

@ -18,7 +18,7 @@ jobs:
- uses: './.github/actions/reusable-prepare-peertube-build'
with:
node-version: '16.x'
node-version: '18.x'
- name: Build
run: npm run nightly

View file

@ -22,7 +22,7 @@ jobs:
- uses: './.github/actions/reusable-prepare-peertube-build'
with:
node-version: '16.x'
node-version: '18.x'
- name: Angular bundlewatch
uses: jackyef/bundlewatch-gh-action@master

View file

@ -56,7 +56,7 @@ jobs:
- uses: './.github/actions/reusable-prepare-peertube-build'
with:
node-version: '16.x'
node-version: '18.x'
- uses: './.github/actions/reusable-prepare-peertube-run'

View file

@ -5,7 +5,7 @@
"private": true,
"licence": "AGPL-3.0",
"engines": {
"node": ">=16.x",
"node": ">=18.x",
"yarn": ">=1.x"
},
"type": "module",

View file

@ -107,12 +107,7 @@ export class NodeJSObserversBuilder {
const obs = new PerformanceObserver(list => {
const entry = list.getEntries()[0]
// Node < 16 uses entry.kind
// Node >= 16 uses entry.detail.kind
// See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties
const kind = entry.detail
? kinds[(entry.detail as NodeGCPerformanceDetail).kind]
: kinds[(entry as any).kind]
const kind = kinds[(entry.detail as NodeGCPerformanceDetail).kind]
// Convert duration from milliseconds to seconds
histogram.record(entry.duration / 1000, {

View file

@ -4,7 +4,7 @@
Main dependencies version supported by PeerTube:
* `node` >=16.x
* `node` >=18.x
* `yarn` >=1.x
* `postgres` >=10.x
* `redis-server` >=6.x
@ -41,7 +41,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. You can see a guide for how to do this in Debian/Ubuntu [here](https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-ubuntu-20-04).
3. Install NodeJS 16.x:
3. Install NodeJS 18.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)
@ -96,7 +96,7 @@ sudo systemctl start redis postgresql
## CentOS 7
1. Install NodeJS 16.x:
1. Install NodeJS 18.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:
@ -143,7 +143,7 @@ sudo systemctl enable --now postgresql
## Centos 8
1. Install NodeJS 16.x:
1. Install NodeJS 18.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:
@ -193,9 +193,9 @@ sudo systemctl enable --now postgresql
sudo dnf update -y
```
2. Install NodeJS 16.x:
2. Install NodeJS 18.x:
```
sudo dnf module install -y nodejs:16
sudo dnf module install -y nodejs:18
```
3. Install yarn:
@ -252,7 +252,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 16.x:
4. Install NodeJS 18.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:
@ -345,7 +345,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:16
sudo dnf module install nodejs:18
```
3. Install Yarn

View file

@ -1,4 +1,4 @@
FROM node:16-bookworm-slim
FROM node:18-bookworm-slim
# Install dependencies
RUN apt update \