From 0cc8405e9c8e2c7acfe5607c46907287c0a52006 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 19 Jan 2021 16:37:12 +0000 Subject: [PATCH] Bump minimum required Node.js version to 10.17.0 This makes it possible to use fs.promises. --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- bin/plugins/checkPlugin.js | 2 +- doc/plugins.md | 2 +- package.json | 2 +- src/node/server.js | 4 ++-- src/package.json | 2 +- 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b39ce09ec..42c2692b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changes for the next release + +### Compatibility changes +* Node.js 10.17.0 or newer is now required. + ### Notable new features * Database performance is significantly improved. diff --git a/README.md b/README.md index 10dbd36cd..5a66ddd78 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Etherpad is a real-time collaborative editor [scalable to thousands of simultane # Installation ## Requirements -- `nodejs` >= **10.13.0**. +- `nodejs` >= **10.17.0**. ## GNU/Linux and other UNIX-like systems @@ -25,7 +25,7 @@ git clone --branch master https://github.com/ether/etherpad-lite.git && cd ether ``` ### Manual install -You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **10.13.0**). +You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **10.17.0**). **As any user (we recommend creating a separate user called etherpad):** diff --git a/bin/plugins/checkPlugin.js b/bin/plugins/checkPlugin.js index cbe146aa1..0b736af80 100755 --- a/bin/plugins/checkPlugin.js +++ b/bin/plugins/checkPlugin.js @@ -263,7 +263,7 @@ fs.readdir(pluginPath, (err, rootFiles) => { console.warn('No engines or node engine in package.json'); if (autoFix) { const engines = { - node: '>=10.13.0', + node: '^10.17.0 || >=11.14.0', }; parsedPackageJSON.engines = engines; writePackageJson(parsedPackageJSON); diff --git a/doc/plugins.md b/doc/plugins.md index 2062378bb..d8239c68a 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -225,7 +225,7 @@ publish your plugin. "author": "USERNAME (REAL NAME) ", "contributors": [], "dependencies": {"MODULE": "0.3.20"}, - "engines": { "node": ">= 10.13.0"} + "engines": { "node": "^10.17.0 || >=11.14.0"} } ``` diff --git a/package.json b/package.json index 41e472831..03cb677ba 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,6 @@ "lint": "eslint ." }, "engines": { - "node": ">=10.13.0" + "node": "^10.17.0 || >=11.14.0" } } diff --git a/src/node/server.js b/src/node/server.js index bbe4c7aeb..a0d9e2adc 100755 --- a/src/node/server.js +++ b/src/node/server.js @@ -36,8 +36,8 @@ const wtfnode = require('wtfnode'); * any modules that require newer versions of NodeJS */ const NodeVersion = require('./utils/NodeVersion'); -NodeVersion.enforceMinNodeVersion('10.13.0'); -NodeVersion.checkDeprecationStatus('10.13.0', '1.8.3'); +NodeVersion.enforceMinNodeVersion('10.17.0'); +NodeVersion.checkDeprecationStatus('10.17.0', '1.8.8'); const UpdateCheck = require('./utils/UpdateCheck'); const db = require('./db/DB'); diff --git a/src/package.json b/src/package.json index 816f5b587..8399c19bd 100644 --- a/src/package.json +++ b/src/package.json @@ -139,7 +139,7 @@ "root": true }, "engines": { - "node": ">=10.13.0", + "node": "^10.17.0 || >=11.14.0", "npm": ">=5.5.1" }, "repository": {