mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 21:03:09 +02:00
use engines
This commit is contained in:
parent
383d6a2485
commit
1f181536ae
3 changed files with 3 additions and 7 deletions
|
@ -1 +0,0 @@
|
||||||
18.16.0
|
|
|
@ -3,6 +3,9 @@
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.16.0"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node ./built/index.js",
|
"start": "node ./built/index.js",
|
||||||
"start:test": "NODE_ENV=test node ./built/index.js",
|
"start:test": "NODE_ENV=test node ./built/index.js",
|
||||||
|
|
|
@ -96,12 +96,6 @@ function showNodejsVersion(): void {
|
||||||
const nodejsLogger = bootLogger.createSubLogger('nodejs');
|
const nodejsLogger = bootLogger.createSubLogger('nodejs');
|
||||||
|
|
||||||
nodejsLogger.info(`Version ${process.version} detected.`);
|
nodejsLogger.info(`Version ${process.version} detected.`);
|
||||||
|
|
||||||
const minVersion = fs.readFileSync(`${_dirname}/../../../../.node-version-min`, 'utf-8').trim();
|
|
||||||
if (semver.lt(process.version, minVersion)) {
|
|
||||||
nodejsLogger.error(`At least Node.js ${minVersion} required!`);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadConfigBoot(): Config {
|
function loadConfigBoot(): Config {
|
||||||
|
|
Loading…
Reference in a new issue