node8: require nodejs >= 8.9.0, npm >= 6.4

Next version will be Etherpad 1.8. As planned in #3424, we are going to require
NodeJS >=8.9.0 and npm >= 6.4.

This commit implements that change and updates documentation and scripts.
Subsequent changes will get rid of old idioms, dating back to node < 0.7, that
still survive in the code.
Once migrated to NodeJS 8, we will be able to start working on migrating the
code base from callbacks to async/await, greatly simplifying legibility (see
#3540).

Closes #3557
pull/3572/head
muxator 2019-02-19 00:48:50 +01:00 committed by muxator
parent 9d9b7c9faf
commit 9d35d15ae3
5 changed files with 13 additions and 11 deletions

View File

@ -9,7 +9,7 @@ Etherpad is a really-real time collaborative editor scalable to thousands of sim
# Installation
## Requirements
- `nodejs` >= **6.9.0** (preferred: `nodejs` >= **8.9**)
- `nodejs` >= **8.9.0**
## Uber-Quick Ubuntu
```
@ -19,7 +19,7 @@ git clone --branch master https://github.com/ether/etherpad-lite.git && cd ether
```
## GNU/Linux and other UNIX-like systems
You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **6.9.0**, preferred: >= **8.9**).
You'll need git and [node.js](https://nodejs.org) installed (minimum required Node version: **8.9.0**).
**As any user (we recommend creating a separate user called etherpad):**

View File

@ -1,12 +1,12 @@
#!/bin/sh
# minimum required node version
REQUIRED_NODE_MAJOR=6
REQUIRED_NODE_MAJOR=8
REQUIRED_NODE_MINOR=9
# minimum required npm version
REQUIRED_NPM_MAJOR=3
REQUIRED_NPM_MINOR=10
REQUIRED_NPM_MAJOR=6
REQUIRED_NPM_MINOR=4
require_minimal_version() {
PROGRAM_LABEL="$1"

View File

@ -115,7 +115,7 @@ Your plugin must also contain a [package definition file](https://docs.npmjs.com
"author": "USERNAME (REAL NAME) <MAIL@EXAMPLE.COM>",
"contributors": [],
"dependencies": {"MODULE": "0.3.20"},
"engines": { "node": ">= 6.9.0"}
"engines": { "node": ">= 8.9.0"}
}
```

View File

@ -32,12 +32,14 @@ log4js.replaceConsole();
* early check for version compatibility before calling
* any modules that require newer versions of NodeJS
*/
NodeVersion.enforceMinNodeVersion('6.9.0');
NodeVersion.enforceMinNodeVersion('8.9.0');
/*
* Since Etherpad 1.8.0, at least NodeJS 8.9.0 will be required
* As of Etherpad 1.8.0, we do not have any further Node version deprecation in
* place.
*
* NodeVersion.checkDeprecationStatus('10.13.0', '1.9.0');
*/
NodeVersion.checkDeprecationStatus('8.9.0', '1.8.0');
/*
* start up stats counting system

View File

@ -73,8 +73,8 @@
"wd": "1.11.1"
},
"engines": {
"node": ">=6.9.0",
"npm": ">=3.10.8"
"node": ">=8.9.0",
"npm": ">=6.4.1"
},
"repository": {
"type": "git",