aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/initializers/checker-before-init.ts16
-rw-r--r--server/tests/api/ci-3.sh2
2 files changed, 16 insertions, 2 deletions
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 @@
1import * as config from 'config' 1import * as config from 'config'
2import { promisify0 } from '../helpers/core-utils' 2import { promisify0 } from '../helpers/core-utils'
3import { logger } from '../helpers/logger'
3 4
4// ONLY USE CORE MODULES IN THIS FILE! 5// ONLY USE CORE MODULES IN THIS FILE!
5 6
@@ -109,10 +110,23 @@ async function checkFFmpegEncoders (): Promise<Map<string, boolean>> {
109 return supportedOptionalEncoders 110 return supportedOptionalEncoders
110} 111}
111 112
113function checkNodeVersion () {
114 const v = process.version
115 const majorString = v.split('.')[0].replace('v', '')
116 const major = parseInt(majorString, 10)
117
118 logger.debug('Checking NodeJS version %s.', v)
119
120 if (major < 10) {
121 logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v)
122 }
123}
124
112// --------------------------------------------------------------------------- 125// ---------------------------------------------------------------------------
113 126
114export { 127export {
115 checkFFmpeg, 128 checkFFmpeg,
116 checkFFmpegEncoders, 129 checkFFmpegEncoders,
117 checkMissedConfig 130 checkMissedConfig,
131 checkNodeVersion
118} 132}
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
4 4
5videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo) 5videosFiles=$(find server/tests/api/videos -type f | grep -v index.ts | xargs echo)
6 6
7MOCHA_PARALLEL=true npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \ 7npm run mocha -- --timeout 30000 --exit --require ts-node/register --bail \
8 $videosFiles 8 $videosFiles