[Docker] Bump to Node.js 22 (#6222)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Louis Lam
2025-10-27 23:58:27 +08:00
committed by GitHub
co-authored by Copilot
parent f6a47f351c
commit 8f3cb770eb
6 changed files with 27 additions and 13 deletions
+12
View File
@@ -0,0 +1,12 @@
import * as childProcess from "child_process";
const version = parseInt(process.version.slice(1).split(".")[0]);
/**
* Since Node.js 22 introduced a different "node --test" command with glob, we need to run different test commands based on the Node.js version.
*/
if (version < 22) {
childProcess.execSync("npm run test-backend-20", { stdio: "inherit" });
} else {
childProcess.execSync("npm run test-backend-22", { stdio: "inherit" });
}