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:
parent
13f07161f5
commit
678ae8abbd
8 changed files with 15 additions and 20 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue