From 51c3544718f751dbba4ece9aec39c53fab524c88 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 7 Aug 2019 12:04:06 +0200 Subject: Deprecate Node 8 The support ends on December 2019: https://github.com/nodejs/Release#release-schedule --- server/initializers/checker-before-init.ts | 16 +++++++++++++++- server/tests/api/ci-3.sh | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index c94bca2f8..55bc820f5 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -1,5 +1,6 @@ import * as config from 'config' import { promisify0 } from '../helpers/core-utils' +import { logger } from '../helpers/logger' // ONLY USE CORE MODULES IN THIS FILE! @@ -109,10 +110,23 @@ async function checkFFmpegEncoders (): Promise> { return supportedOptionalEncoders } +function checkNodeVersion () { + const v = process.version + const majorString = v.split('.')[0].replace('v', '') + const major = parseInt(majorString, 10) + + logger.debug('Checking NodeJS version %s.', v) + + if (major < 10) { + logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v) + } +} + // --------------------------------------------------------------------------- export { checkFFmpeg, checkFFmpegEncoders, - checkMissedConfig + checkMissedConfig, + checkNodeVersion } diff --git a/server/tests/api/ci-3.sh b/server/tests/api/ci-3.sh index f6bb8a83e..7aeea7fcb 100644 --- a/server/tests/api/ci-3.sh +++ b/server/tests/api/ci-3.sh @@ -4,5 +4,5 @@ set -eu videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo) -MOCHA_PARALLEL=true npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \ +npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \ $videosFiles -- cgit v1.2.3