diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/.npmrc b/app/assets/javascripts/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/admin/.npmrc b/app/assets/javascripts/admin/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/admin/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/admin/package.json b/app/assets/javascripts/admin/package.json index 56274a24a52..199c83d4f81 100644 --- a/app/assets/javascripts/admin/package.json +++ b/app/assets/javascripts/admin/package.json @@ -46,7 +46,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "default" diff --git a/app/assets/javascripts/discourse-common/.npmrc b/app/assets/javascripts/discourse-common/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/discourse-common/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/discourse-common/package.json b/app/assets/javascripts/discourse-common/package.json index 26b9d924a39..61de38645e7 100644 --- a/app/assets/javascripts/discourse-common/package.json +++ b/app/assets/javascripts/discourse-common/package.json @@ -46,7 +46,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/app/assets/javascripts/discourse-hbr/.npmrc b/app/assets/javascripts/discourse-hbr/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/discourse-hbr/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/discourse-hbr/package.json b/app/assets/javascripts/discourse-hbr/package.json index 217d246a574..f443450f2a8 100644 --- a/app/assets/javascripts/discourse-hbr/package.json +++ b/app/assets/javascripts/discourse-hbr/package.json @@ -46,7 +46,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/app/assets/javascripts/discourse-widget-hbs/.npmrc b/app/assets/javascripts/discourse-widget-hbs/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/discourse-widget-hbs/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/discourse-widget-hbs/package.json b/app/assets/javascripts/discourse-widget-hbs/package.json index 8353998b5b3..4787f2640ae 100644 --- a/app/assets/javascripts/discourse-widget-hbs/package.json +++ b/app/assets/javascripts/discourse-widget-hbs/package.json @@ -46,7 +46,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/app/assets/javascripts/discourse/.npmrc b/app/assets/javascripts/discourse/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/discourse/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/.npmrc b/app/assets/javascripts/discourse/lib/bootstrap-json/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/discourse/lib/bootstrap-json/package.json b/app/assets/javascripts/discourse/lib/bootstrap-json/package.json index c79e0bc3829..50d5b34ef2c 100644 --- a/app/assets/javascripts/discourse/lib/bootstrap-json/package.json +++ b/app/assets/javascripts/discourse/lib/bootstrap-json/package.json @@ -9,5 +9,10 @@ "history-support-middleware", "proxy-server-middleware" ] + }, + "engines": { + "node": ">= 12.*", + "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 ae735052a27..99aaf019354 100644 --- a/app/assets/javascripts/discourse/package.json +++ b/app/assets/javascripts/discourse/package.json @@ -64,7 +64,9 @@ "virtual-dom": "^2.1.1" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "default" diff --git a/app/assets/javascripts/pretty-text/.npmrc b/app/assets/javascripts/pretty-text/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/pretty-text/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/pretty-text/package.json b/app/assets/javascripts/pretty-text/package.json index 03c7d149969..f2823ac6fa1 100644 --- a/app/assets/javascripts/pretty-text/package.json +++ b/app/assets/javascripts/pretty-text/package.json @@ -45,7 +45,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/app/assets/javascripts/select-kit/.npmrc b/app/assets/javascripts/select-kit/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/select-kit/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/select-kit/package.json b/app/assets/javascripts/select-kit/package.json index 92bab1d5c08..67f0723434c 100644 --- a/app/assets/javascripts/select-kit/package.json +++ b/app/assets/javascripts/select-kit/package.json @@ -44,7 +44,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/app/assets/javascripts/truth-helpers/.npmrc b/app/assets/javascripts/truth-helpers/.npmrc new file mode 100644 index 00000000000..c42da845b44 --- /dev/null +++ b/app/assets/javascripts/truth-helpers/.npmrc @@ -0,0 +1 @@ +engine-strict = true diff --git a/app/assets/javascripts/truth-helpers/package.json b/app/assets/javascripts/truth-helpers/package.json index 23dbcb94ea0..68668bf3295 100644 --- a/app/assets/javascripts/truth-helpers/package.json +++ b/app/assets/javascripts/truth-helpers/package.json @@ -44,7 +44,9 @@ "loader.js": "^4.7.0" }, "engines": { - "node": "8.* || >= 10.*" + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" }, "ember": { "edition": "octane" diff --git a/package.json b/package.json index 7c41208dad4..39a7c9eeff5 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,11 @@ "lodash": "4.17.21" }, "scripts": { - "preinstall": "node -e \"if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('NPM is not supported, please use Yarn instead. ')\"", "postinstall": "yarn --cwd app/assets/javascripts/discourse" + }, + "engines": { + "node": ">= 12.*", + "npm": "please-use-yarn", + "yarn": ">= 1.21.1" } }