mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
checkPlugin: Use updateDeps
to manage engine
This commit is contained in:
parent
f0ab112c2d
commit
b7dce95802
1 changed files with 4 additions and 11 deletions
|
@ -188,6 +188,10 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
||||||
'ep_etherpad-lite': {ver: '>=1.8.6', overwrite: false},
|
'ep_etherpad-lite': {ver: '>=1.8.6', overwrite: false},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
updateDeps(parsedPackageJSON, 'engines', {
|
||||||
|
node: '>=12.13.0',
|
||||||
|
});
|
||||||
|
|
||||||
if (packageJSON.toLowerCase().indexOf('eslintconfig') === -1) {
|
if (packageJSON.toLowerCase().indexOf('eslintconfig') === -1) {
|
||||||
console.warn('No esLintConfig in package.json');
|
console.warn('No esLintConfig in package.json');
|
||||||
if (autoFix) {
|
if (autoFix) {
|
||||||
|
@ -211,17 +215,6 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
||||||
writePackageJson(parsedPackageJSON);
|
writePackageJson(parsedPackageJSON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((packageJSON.toLowerCase().indexOf('engines') === -1) || !parsedPackageJSON.engines.node) {
|
|
||||||
console.warn('No engines or node engine in package.json');
|
|
||||||
if (autoFix) {
|
|
||||||
const engines = {
|
|
||||||
node: '>=12.13.0',
|
|
||||||
};
|
|
||||||
parsedPackageJSON.engines = engines;
|
|
||||||
writePackageJson(parsedPackageJSON);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (files.indexOf('package-lock.json') === -1) {
|
if (files.indexOf('package-lock.json') === -1) {
|
||||||
|
|
Loading…
Reference in a new issue