mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 17:55:52 +01:00
feat(deps): remove dependency on semver
This commit is contained in:
@@ -12,7 +12,8 @@ import ws from "./services/ws.js";
|
||||
import utils from "./services/utils.js";
|
||||
import port from "./services/port.js";
|
||||
import host from "./services/host.js";
|
||||
import semver from "semver";
|
||||
|
||||
const MINIMUM_NODE_VERSION = "22.0.0";
|
||||
|
||||
// setup basic error handling even before requiring dependencies, since those can produce errors as well
|
||||
|
||||
@@ -32,8 +33,8 @@ function exit() {
|
||||
process.on("SIGINT", exit);
|
||||
process.on("SIGTERM", exit);
|
||||
|
||||
if (!semver.satisfies(process.version, ">=10.5.0")) {
|
||||
console.error("Trilium only supports node.js 10.5 and later");
|
||||
if (utils.compareVersions(process.version, MINIMUM_NODE_VERSION) < 0) {
|
||||
console.error(`\nTrilium requires Node.js ${MINIMUM_NODE_VERSION} and later.\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user