mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 07:12:12 +03:00
feat: add Node.js 24 LTS (Krypton) support (#1340)
Integrated into release/v3.6.7
This commit is contained in:
@@ -10,11 +10,13 @@
|
||||
export const SECURE_NODE_LINES = Object.freeze([
|
||||
Object.freeze({ major: 20, minor: 20, patch: 2 }),
|
||||
Object.freeze({ major: 22, minor: 22, patch: 2 }),
|
||||
Object.freeze({ major: 24, minor: 0, patch: 0 }),
|
||||
]);
|
||||
|
||||
export const RECOMMENDED_NODE_VERSION = "22.22.2";
|
||||
export const SUPPORTED_NODE_RANGE = ">=20.20.2 <21 || >=22.22.2 <23";
|
||||
export const SUPPORTED_NODE_DISPLAY = "Node.js 20.20.2+ (20.x LTS) or 22.22.2+ (22.x LTS)";
|
||||
export const RECOMMENDED_NODE_VERSION = "24.14.1";
|
||||
export const SUPPORTED_NODE_RANGE = ">=20.20.2 <21 || >=22.22.2 <23 || >=24.0.0 <25";
|
||||
export const SUPPORTED_NODE_DISPLAY =
|
||||
"Node.js 20.20.2+ (20.x LTS), 22.22.2+ (22.x LTS), or 24.x (24.x LTS)";
|
||||
|
||||
export interface NodeVersionInfo {
|
||||
major: number;
|
||||
@@ -78,8 +80,8 @@ export function getNodeRuntimeSupport(version: string = process.versions.node):
|
||||
reason = "supported";
|
||||
} else if (secureFloor) {
|
||||
reason = "below-security-floor";
|
||||
} else if (parsed.major >= 24) {
|
||||
reason = "native-addon-incompatible";
|
||||
} else if (parsed.major >= 25) {
|
||||
reason = "unreleased-major";
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -101,8 +103,8 @@ export function getNodeRuntimeWarning(version: string = process.versions.node):
|
||||
return `Node.js ${support.nodeVersion} is below the patched minimum ${support.minimumSecureVersion} for this LTS line.`;
|
||||
}
|
||||
|
||||
if (support.reason === "native-addon-incompatible") {
|
||||
return `Node.js ${support.nodeVersion} is outside the supported LTS lines and may fail at runtime because better-sqlite3 does not support Node.js 24+ here.`;
|
||||
if (support.reason === "unreleased-major") {
|
||||
return `Node.js ${support.nodeVersion} is outside the supported LTS lines. OmniRoute currently supports Node.js 20.x, 22.x, and 24.x.`;
|
||||
}
|
||||
|
||||
return `Node.js ${support.nodeVersion} is outside OmniRoute's approved secure runtime policy.`;
|
||||
|
||||
Reference in New Issue
Block a user