build: Upgrade some of the backend dev-tooling (no-changelog) (#4589)
* upgrade ts-node * move tslint and typescript to a single place * source-map-support should be loaded in the `n8n` bin script, and not in core * upgrade jest * Support only node.js 14, 16, or 18
This commit is contained in:
committed by
GitHub
parent
edebad1a89
commit
0148631d28
@@ -1,17 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var path = require('path');
|
||||
const path = require('path');
|
||||
|
||||
// Make sure that it also find the config folder when it
|
||||
// did get started from another folder that the root one.
|
||||
process.env.NODE_CONFIG_DIR = process.env.NODE_CONFIG_DIR || path.join(__dirname, 'config');
|
||||
|
||||
// Check if version should be displayed
|
||||
var versionFlags = [
|
||||
'-v',
|
||||
'-V',
|
||||
'--version',
|
||||
];
|
||||
const versionFlags = ['-v', '-V', '--version'];
|
||||
if (versionFlags.includes(process.argv.slice(-1)[0])) {
|
||||
console.log(require('../package').version);
|
||||
process.exit(0);
|
||||
@@ -22,13 +18,22 @@ if (process.argv.length === 2) {
|
||||
process.argv.push('start');
|
||||
}
|
||||
|
||||
var nodeVersion = process.versions.node.split('.');
|
||||
const nodeVersion = process.versions.node;
|
||||
const nodeVersionMajor = require('semver').major(nodeVersion);
|
||||
|
||||
if (parseInt(nodeVersion[0], 10) < 14) {
|
||||
console.log(`\nYour Node.js version (${process.versions.node}) is too old to run n8n.\nPlease update at least to Node.js v14 or to the recommended Node.js v16!\n`);
|
||||
if (![14, 16, 18].includes(nodeVersionMajor)) {
|
||||
console.log(`
|
||||
Your Node.js version (${nodeVersion}) is currently not supported by n8n.
|
||||
Please use Node.js v14, v16 (recommended), or v18 instead!
|
||||
`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
require('@oclif/command').run()
|
||||
.then(require('@oclif/command/flush'))
|
||||
.catch(require('@oclif/errors/handle'));
|
||||
try {
|
||||
require('source-map-support').install();
|
||||
} catch {}
|
||||
|
||||
require('@oclif/command')
|
||||
.run()
|
||||
.then(require('@oclif/command/flush'))
|
||||
.catch(require('@oclif/errors/handle'));
|
||||
|
||||
@@ -96,11 +96,11 @@
|
||||
"concurrently": "^5.1.0",
|
||||
"nodemon": "^2.0.2",
|
||||
"run-script-os": "^1.0.7",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^6.2.2",
|
||||
"ts-node": "^8.9.1",
|
||||
"ts-node": "^9.1.1",
|
||||
"tsc-alias": "^1.7.0",
|
||||
"tsconfig-paths": "^3.14.1",
|
||||
"typescript": "~4.8.0"
|
||||
"tsconfig-paths": "^3.14.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oclif/command": "^1.8.16",
|
||||
@@ -164,6 +164,7 @@
|
||||
"posthog-node": "^1.3.0",
|
||||
"prom-client": "^13.1.0",
|
||||
"psl": "^1.8.0",
|
||||
"semver": "^7.3.8",
|
||||
"shelljs": "^0.8.5",
|
||||
"sqlite3": "^5.1.2",
|
||||
"sse-channel": "^3.1.1",
|
||||
|
||||
Reference in New Issue
Block a user