diff options
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts | 8 | ||||
-rw-r--r-- | server/tests/api/notifications/comments-notifications.ts | 5 | ||||
-rw-r--r-- | yarn.lock | 7 |
4 files changed, 8 insertions, 14 deletions
diff --git a/package.json b/package.json index 831f4d143..5d1d2e747 100644 --- a/package.json +++ b/package.json | |||
@@ -197,7 +197,7 @@ | |||
197 | "@types/mocha": "^10.0.0", | 197 | "@types/mocha": "^10.0.0", |
198 | "@types/morgan": "^1.7.32", | 198 | "@types/morgan": "^1.7.32", |
199 | "@types/multer": "^1.3.3", | 199 | "@types/multer": "^1.3.3", |
200 | "@types/node": "^14.14.31", | 200 | "@types/node": "^18.13.0", |
201 | "@types/nodemailer": "^6.2.0", | 201 | "@types/nodemailer": "^6.2.0", |
202 | "@types/oauth2-server": "^3.0.8", | 202 | "@types/oauth2-server": "^3.0.8", |
203 | "@types/request": "^2.0.3", | 203 | "@types/request": "^2.0.3", |
diff --git a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts index b66fa474c..8ed219e9e 100644 --- a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts +++ b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { readdir } from 'fs-extra' | 1 | import { readdir } from 'fs-extra' |
2 | import { constants, PerformanceObserver } from 'perf_hooks' | 2 | import { constants, NodeGCPerformanceDetail, PerformanceObserver } from 'perf_hooks' |
3 | import * as process from 'process' | 3 | import * as process from 'process' |
4 | import { Meter, ObservableResult } from '@opentelemetry/api' | 4 | import { Meter, ObservableResult } from '@opentelemetry/api' |
5 | import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' | 5 | import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' |
@@ -110,9 +110,9 @@ export class NodeJSObserversBuilder { | |||
110 | // Node < 16 uses entry.kind | 110 | // Node < 16 uses entry.kind |
111 | // Node >= 16 uses entry.detail.kind | 111 | // Node >= 16 uses entry.detail.kind |
112 | // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties | 112 | // See: https://nodejs.org/docs/latest-v16.x/api/deprecations.html#deprecations_dep0152_extension_performanceentry_properties |
113 | const kind = (entry as any).detail | 113 | const kind = entry.detail |
114 | ? kinds[(entry as any).detail.kind] | 114 | ? kinds[(entry.detail as NodeGCPerformanceDetail).kind] |
115 | : kinds[entry.kind] | 115 | : kinds[(entry as any).kind] |
116 | 116 | ||
117 | // Convert duration from milliseconds to seconds | 117 | // Convert duration from milliseconds to seconds |
118 | histogram.record(entry.duration / 1000, { | 118 | histogram.record(entry.duration / 1000, { |
diff --git a/server/tests/api/notifications/comments-notifications.ts b/server/tests/api/notifications/comments-notifications.ts index 5a50af040..65007193a 100644 --- a/server/tests/api/notifications/comments-notifications.ts +++ b/server/tests/api/notifications/comments-notifications.ts | |||
@@ -18,9 +18,8 @@ describe('Test comments notifications', function () { | |||
18 | let emails: object[] = [] | 18 | let emails: object[] = [] |
19 | 19 | ||
20 | const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>' | 20 | const commentText = '**hello** <a href="https://joinpeertube.org">world</a>, <h1>what do you think about peertube?</h1>' |
21 | const expectedHtml = '<strong style="-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">hello</strong> ' + | 21 | const expectedHtml = '<strong>hello</strong> <a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer">world</a>' + |
22 | '<a href="https://joinpeertube.org" target="_blank" rel="noopener noreferrer" style="-ms-text-size-adjust: 100%; ' + | 22 | ', </p>what do you think about peertube?' |
23 | '-webkit-text-size-adjust: 100%; text-decoration: none; color: #f2690d;">world</a>, </p>what do you think about peertube?' | ||
24 | 23 | ||
25 | before(async function () { | 24 | before(async function () { |
26 | this.timeout(120000) | 25 | this.timeout(120000) |
@@ -2178,7 +2178,7 @@ | |||
2178 | dependencies: | 2178 | dependencies: |
2179 | "@types/express" "*" | 2179 | "@types/express" "*" |
2180 | 2180 | ||
2181 | "@types/node@*", "@types/node@>=10.0.0": | 2181 | "@types/node@*", "@types/node@>=10.0.0", "@types/node@^18.13.0": |
2182 | version "18.13.0" | 2182 | version "18.13.0" |
2183 | resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" | 2183 | resolved "https://registry.yarnpkg.com/@types/node/-/node-18.13.0.tgz#0400d1e6ce87e9d3032c19eb6c58205b0d3f7850" |
2184 | integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== | 2184 | integrity sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg== |
@@ -2188,11 +2188,6 @@ | |||
2188 | resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" | 2188 | resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" |
2189 | integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== | 2189 | integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== |
2190 | 2190 | ||
2191 | "@types/node@^14.14.31": | ||
2192 | version "14.18.36" | ||
2193 | resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.36.tgz#c414052cb9d43fab67d679d5f3c641be911f5835" | ||
2194 | integrity sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ== | ||
2195 | |||
2196 | "@types/node@^17.0.5": | 2191 | "@types/node@^17.0.5": |
2197 | version "17.0.45" | 2192 | version "17.0.45" |
2198 | resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" | 2193 | resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" |