Skip to content

chore: set min node version #5832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions lib/common/verify-node-version.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// This function must be separate to avoid dependencies on C++ modules - it must execute precisely when other functions cannot

import { color } from "../color";
import { ISystemWarning } from "./declarations";

// Use only ES5 code here - pure JavaScript can be executed with any Node.js version (even 0.10, 0.12).
Expand All @@ -12,7 +11,7 @@ var util = require("util");
// These versions cannot be used with CLI due to bugs in the node itself.
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
var versionsCausingFailure = ["0.10.34", "4.0.0", "4.2.0", "5.0.0"];
var minimumRequiredVersion = "8.0.0";
var minimumRequiredVersion = "22.12.0";

interface INodeVersionOpts {
supportedVersionsRange: string;
Expand Down Expand Up @@ -46,16 +45,14 @@ export function verifyNodeVersion(): void {
semver.lt(nodeVer, minimumRequiredVersion)
) {
console.error(
color.red.bold(
util.format(
"%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s",
os.EOL,
nodeVer,
cliName,
supportedVersionsRange,
os.EOL
)
)
util.format(
"%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s",
os.EOL,
nodeVer,
cliName,
supportedVersionsRange,
os.EOL,
),
);
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"analyze": true,
"license": "Apache-2.0",
"engines": {
"node": ">=14.0.0"
"node": ">=22.12.0"
},
"lint-staged": {
"*.ts": "prettier --write"
Expand Down