This commit is contained in:
Chocobozzz 2023-02-17 09:21:11 +01:00
parent f11d8a8380
commit 82e3ae1523
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 8 additions and 14 deletions

View file

@ -197,7 +197,7 @@
"@types/mocha": "^10.0.0",
"@types/morgan": "^1.7.32",
"@types/multer": "^1.3.3",
"@types/node": "^14.14.31",
"@types/node": "^18.13.0",
"@types/nodemailer": "^6.2.0",
"@types/oauth2-server": "^3.0.8",
"@types/request": "^2.0.3",

View file

@ -1,5 +1,5 @@
import { readdir } from 'fs-extra'
import { constants, PerformanceObserver } from 'perf_hooks'
import { constants, NodeGCPerformanceDetail, PerformanceObserver } from 'perf_hooks'
import * as process from 'process'
import { Meter, ObservableResult } from '@opentelemetry/api'
import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics'
@ -110,9 +110,9 @@ export class NodeJSObserversBuilder {
// 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 as any).detail
? kinds[(entry as any).detail.kind]
: kinds[entry.kind]
const kind = entry.detail
? kinds[(entry.detail as NodeGCPerformanceDetail).kind]
: kinds[(entry as any).kind]
// Convert duration from milliseconds to seconds
histogram.record(entry.duration / 1000, {

View file

@ -18,9 +18,8 @@ describe('Test comments notifications', function () {
let emails: object[] = []
const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>'
const expectedHtml = '<strong style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">hello</strong> ' +
'<a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer" style="-ms-text-size-adjust: 100%; ' +
'-webkit-text-size-adjust: 100%; text-decoration: none; color: #f2690d;">world</a>, </p>what do you think about peertube?'
const expectedHtml = '<strong>hello</strong> <a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer">world</a>' +
', </p>what do you think about peertube?'
before(async function () {
this.timeout(120000)

View file

@ -2178,7 +2178,7 @@
dependencies:
"@types/express" "*"
"@types/node@*", "@types/node@>=10.0.0":
"@types/node@*", "@types/node@>=10.0.0", "@types/node@^18.13.0":
version "18.13.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850"
integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==
@ -2188,11 +2188,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708"
integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==
"@types/node@^14.14.31":
version "14.18.36"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835"
integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==
"@types/node@^17.0.5":
version "17.0.45"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"