shamrickus commented on code in PR #7533:
URL: https://github.com/apache/trafficcontrol/pull/7533#discussion_r1199195176
##########
experimental/traffic-portal/server.ts:
##########
@@ -34,6 +34,14 @@ import {
import { AppServerModule } from "./src/main.server";
+const versionParts = process.versions.node.split(".");
+if (versionParts.length !== 3) {
+ console.warn(`Unable to determine current node version, got
${versionParts.length} items`);
+} else if (versionParts[0] < "16" || (versionParts[0] === "16" &&
versionParts[1] < "20")) {
+ console.error(`Unsupported version of node found: ${process.version},
expected >=16.20`);
+ process.exit(1);
+}
+
Review Comment:
It's not _needed_, but more of an anti-foot gun measure. I'd argue for
keeping it in, but most of the issues this would likely "catch" aren't actually
catch-able as the file probably won't parse in that node version (so the code
will never get ran).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]