use engines

This commit is contained in:
syuilo 2023-07-08 08:52:51 +09:00
parent 383d6a2485
commit 1f181536ae
3 changed files with 3 additions and 7 deletions

View file

@ -1 +0,0 @@
18.16.0

View file

@ -3,6 +3,9 @@
"main": "./index.js",
"private": true,
"type": "module",
"engines": {
"node": ">=18.16.0"
},
"scripts": {
"start": "node ./built/index.js",
"start:test": "NODE_ENV=test node ./built/index.js",

View file

@ -96,12 +96,6 @@ function showNodejsVersion(): void {
const nodejsLogger = bootLogger.createSubLogger('nodejs');
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 {