From 3d2e4f037125deb4711616ef6f9fa463b432ff3d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 9 Sep 2022 11:11:47 +0200 Subject: Update server dependencies --- server/lib/activitypub/context.ts | 1 + .../lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts | 4 ++-- server/lib/opentelemetry/metrics.ts | 2 +- server/tests/api/videos/resumable-upload.ts | 8 ++++---- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'server') diff --git a/server/lib/activitypub/context.ts b/server/lib/activitypub/context.ts index 5d6aee315..5308d32fe 100644 --- a/server/lib/activitypub/context.ts +++ b/server/lib/activitypub/context.ts @@ -24,6 +24,7 @@ const contextStore: { [ id in ContextType ]: (string | { [ id: string ]: string subtitleLanguage: 'sc:subtitleLanguage', sensitive: 'as:sensitive', language: 'sc:inLanguage', + identifier: 'sc:identifier', // TODO: remove in a few versions, introduced in 4.2 icons: 'as:icon', diff --git a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts index 473015e91..781722108 100644 --- a/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts +++ b/server/lib/opentelemetry/metric-helpers/nodejs-observers-builder.ts @@ -2,8 +2,8 @@ import { readdir } from 'fs-extra' import { constants, PerformanceObserver } from 'perf_hooks' import * as process from 'process' import { Meter, ObservableResult } from '@opentelemetry/api-metrics' -import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics-base' -import { View } from '@opentelemetry/sdk-metrics-base/build/src/view/View' +import { ExplicitBucketHistogramAggregation } from '@opentelemetry/sdk-metrics' +import { View } from '@opentelemetry/sdk-metrics/build/src/view/View' import { logger } from '@server/helpers/logger' // Thanks to https://github.com/siimon/prom-client diff --git a/server/lib/opentelemetry/metrics.ts b/server/lib/opentelemetry/metrics.ts index ba33c9505..fc1666604 100644 --- a/server/lib/opentelemetry/metrics.ts +++ b/server/lib/opentelemetry/metrics.ts @@ -1,7 +1,7 @@ import { Application, Request, Response } from 'express' import { Meter, metrics } from '@opentelemetry/api-metrics' import { PrometheusExporter } from '@opentelemetry/exporter-prometheus' -import { MeterProvider } from '@opentelemetry/sdk-metrics-base' +import { MeterProvider } from '@opentelemetry/sdk-metrics' import { logger } from '@server/helpers/logger' import { CONFIG } from '@server/initializers/config' import { MVideoImmutable } from '@server/types/models' diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts index 0625828a1..0cf1e6675 100644 --- a/server/tests/api/videos/resumable-upload.ts +++ b/server/tests/api/videos/resumable-upload.ts @@ -169,11 +169,11 @@ describe('Test resumable upload', function () { it('Should not accept more chunks than expected with an invalid content length/content range', async function () { const uploadId = await prepareUpload({ size: 1500 }) - // Content length check seems to have changed in v16 - if (process.version.startsWith('v16')) { + // Content length check can be different depending on the node version + try { await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 }) - await checkFileSize(uploadId, 1000) - } else { + await checkFileSize(uploadId, 0) + } catch { await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 }) await checkFileSize(uploadId, 0) } -- cgit v1.2.3