mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 05:01:05 +08:00
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:
parent
5b85b254db
commit
fbd1cd5fe1
1
app/assets/javascripts/.npmrc
Normal file
1
app/assets/javascripts/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
1
app/assets/javascripts/admin/.npmrc
Normal file
1
app/assets/javascripts/admin/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/discourse-common/.npmrc
Normal file
1
app/assets/javascripts/discourse-common/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/discourse-hbr/.npmrc
Normal file
1
app/assets/javascripts/discourse-hbr/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/discourse-widget-hbs/.npmrc
Normal file
1
app/assets/javascripts/discourse-widget-hbs/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/discourse/.npmrc
Normal file
1
app/assets/javascripts/discourse/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -9,5 +9,10 @@
|
|||
"history-support-middleware",
|
||||
"proxy-server-middleware"
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12.*",
|
||||
"npm": "please-use-yarn",
|
||||
"yarn": ">= 1.21.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/pretty-text/.npmrc
Normal file
1
app/assets/javascripts/pretty-text/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/select-kit/.npmrc
Normal file
1
app/assets/javascripts/select-kit/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
1
app/assets/javascripts/truth-helpers/.npmrc
Normal file
1
app/assets/javascripts/truth-helpers/.npmrc
Normal file
|
@ -0,0 +1 @@
|
|||
engine-strict = true
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user