Merge pull request #3392 from thelounge/node10

Bump minimum node version to v10
This commit is contained in:
Pavel Djundik 2019-09-06 11:29:14 +03:00 committed by GitHub
commit 07da692c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 16 deletions

View File

@ -24,9 +24,8 @@ matrix:
- name: "Production build"
env: BUILD_ENV=production
# Next node version and minimum supported node version
# Next node version
- node_js: 11 # EOL: June 2019
- node_js: 8.10.0 # EOL: December 2019 (test exact LTS version)
cache: yarn

View File

@ -58,7 +58,7 @@ The Lounge is the official and community-managed fork of [Shout](https://github.
## Installation and usage
The Lounge requires [Node.js](https://nodejs.org/) v8 or more recent.
The Lounge requires latest [Node.js](https://nodejs.org/) LTS version or more recent.
[Yarn package manager](https://yarnpkg.com/) is also recommended.
If you want to install with npm, `--unsafe-perm` is required for a correct install.

View File

@ -38,7 +38,7 @@
],
"license": "MIT",
"engines": {
"node": ">=8.10.0"
"node": ">=10.16.3"
},
"dependencies": {
"bcryptjs": "2.4.3",

View File

@ -12,18 +12,6 @@ const currentFetchPromises = new Map();
const imageTypeRegex = /^image\/.+/;
const mediaTypeRegex = /^(audio|video)\/.+/;
// Fix ECDH curve client compatibility in Node v8/v9
// This is fixed in Node 10, but The Lounge supports LTS versions
// https://github.com/nodejs/node/issues/16196
// https://github.com/nodejs/node/pull/16853
// https://github.com/nodejs/node/pull/15206
const tls = require("tls");
const semver = require("semver");
if (semver.gte(process.version, "8.6.0") && tls.DEFAULT_ECDH_CURVE === "prime256v1") {
tls.DEFAULT_ECDH_CURVE = "auto";
}
module.exports = function(client, chan, msg) {
if (!Helper.config.prefetch) {
return;