1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

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

@ -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, {