diff --git a/src/bin/plugins/checkPlugin.js b/src/bin/plugins/checkPlugin.js index e7c45f570..44c008a6f 100755 --- a/src/bin/plugins/checkPlugin.js +++ b/src/bin/plugins/checkPlugin.js @@ -188,6 +188,10 @@ fs.readdir(pluginPath, (err, rootFiles) => { 'ep_etherpad-lite': {ver: '>=1.8.6', overwrite: false}, }); + updateDeps(parsedPackageJSON, 'engines', { + node: '>=12.13.0', + }); + if (packageJSON.toLowerCase().indexOf('eslintconfig') === -1) { console.warn('No esLintConfig in package.json'); if (autoFix) { @@ -211,17 +215,6 @@ fs.readdir(pluginPath, (err, rootFiles) => { 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) {