DEV: Prevent npm usage (#13945)

We rely on yarn workspaces so we don't want people using npm in the repo by accident.

Also updated the required node version to 12+.

~~Not sure about the min yarn version – the latest one could be missing in various CI-like envs, so I might change it yet.~~
Downgraded yarn to ">= 1.21.1" (the oldest of "current" versions, tagged "legacy")
This commit is contained in:
Jarek Radosz 2021-08-04 22:04:58 +02:00 committed by GitHub
parent 5b85b254db
commit fbd1cd5fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 45 additions and 9 deletions

1
.npmrc Normal file
View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -9,5 +9,10 @@
"history-support-middleware",
"proxy-server-middleware"
]
},
"engines": {
"node": ">= 12.*",
"npm": "please-use-yarn",
"yarn": ">= 1.21.1"
}
}

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -0,0 +1 @@
engine-strict = true

View File

@ -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"

View File

@ -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"
}
}