mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user