DEV: Re-allow node 17, with a warning (#15083)

DEV: Re-allow node 17, with a warning (#15083)

diff --git a/app/assets/javascripts/admin/package.json b/app/assets/javascripts/admin/package.json
index 2d26ca5..8608b42 100644
--- a/app/assets/javascripts/admin/package.json
+++ b/app/assets/javascripts/admin/package.json
@@ -46,7 +46,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/discourse-common/package.json b/app/assets/javascripts/discourse-common/package.json
index f804413..ce6bb53 100644
--- a/app/assets/javascripts/discourse-common/package.json
+++ b/app/assets/javascripts/discourse-common/package.json
@@ -46,7 +46,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/discourse-hbr/package.json b/app/assets/javascripts/discourse-hbr/package.json
index 41517f4..0b290a0 100644
--- a/app/assets/javascripts/discourse-hbr/package.json
+++ b/app/assets/javascripts/discourse-hbr/package.json
@@ -46,7 +46,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/discourse-widget-hbs/package.json b/app/assets/javascripts/discourse-widget-hbs/package.json
index fae0916..06a8626 100644
--- a/app/assets/javascripts/discourse-widget-hbs/package.json
+++ b/app/assets/javascripts/discourse-widget-hbs/package.json
@@ -46,7 +46,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/package.json b/app/assets/javascripts/discourse/lib/bootstrap-json/package.json
index 5c86ee7..abc04bd 100644
--- a/app/assets/javascripts/discourse/lib/bootstrap-json/package.json
+++ b/app/assets/javascripts/discourse/lib/bootstrap-json/package.json
@@ -11,7 +11,7 @@
     ]
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   }
diff --git a/app/assets/javascripts/discourse/package.json b/app/assets/javascripts/discourse/package.json
index 550b159..a294e75 100644
--- a/app/assets/javascripts/discourse/package.json
+++ b/app/assets/javascripts/discourse/package.json
@@ -66,7 +66,7 @@
     "virtual-dom": "^2.1.1"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/pretty-text/package.json b/app/assets/javascripts/pretty-text/package.json
index 1ec1e8c..9619aa7 100644
--- a/app/assets/javascripts/pretty-text/package.json
+++ b/app/assets/javascripts/pretty-text/package.json
@@ -45,7 +45,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/select-kit/package.json b/app/assets/javascripts/select-kit/package.json
index 3dd5bf0..eb95c12 100644
--- a/app/assets/javascripts/select-kit/package.json
+++ b/app/assets/javascripts/select-kit/package.json
@@ -44,7 +44,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/app/assets/javascripts/truth-helpers/package.json b/app/assets/javascripts/truth-helpers/package.json
index 36d5010..132705b 100644
--- a/app/assets/javascripts/truth-helpers/package.json
+++ b/app/assets/javascripts/truth-helpers/package.json
@@ -44,7 +44,7 @@
     "loader.js": "^4.7.0"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   },
diff --git a/bin/ember-cli b/bin/ember-cli
index 7138766..931b4a2 100755
--- a/bin/ember-cli
+++ b/bin/ember-cli
@@ -26,6 +26,10 @@ class String
   def cyan
     "\e[36m#{self}\e[0m"
   end
+
+  def red
+    "\033[31m#{self}\e[0m"
+  end
 end
 
 if ARGV.include?("-h") || ARGV.include?("--help")
@@ -48,6 +52,12 @@ end
 
 exit 1 if !system "yarn -s install --cwd #{yarn_dir}"
 
+if !system("node -p 'require(\"crypto\").createHash(\"md4\")'", out: "/dev/null", err: "/dev/null")
+  $stderr << "#{"ERROR".red}: Node 17 with OpenSSL 3 is currently unsupported\n"
+  $stderr << "Please use node LTS (16.x) instead\n"
+  exit 1
+end
+
 if ARGV.include?("-u") || ARGV.include?("--unicorn")
   unicorn_env = { "DISCOURSE_PORT" => ENV["DISCOURSE_PORT"] || "4200" }
   unicorn_pid = spawn(unicorn_env, __dir__ + "/unicorn")
diff --git a/package.json b/package.json
index ac6869d..7881bcf 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
     "postinstall": "yarn --cwd app/assets/javascripts/discourse"
   },
   "engines": {
-    "node": "12.* || 14.* || 16.*",
+    "node": "12.* || 14.* || >= 16",
     "npm": "please-use-yarn",
     "yarn": ">= 1.21.1"
   }

GitHub sha: de3680eb5c54c0ca8944af99f9286de7e4625221

This commit appears in #15083 which was approved by eviltrout. It was merged by CvX.