From 59aaa791f4c1855f46899763ed3e4ad791c6358c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Odin=20H=C3=B8rthe=20Omdal?= Date: Thu, 8 Nov 2018 15:12:25 +0100 Subject: [PATCH] Revert "fix(Server): correct `node` version checks (#1543)" This reverts commit 927a2b38d4d3a5d8fd50dfce0343634d46fa8a92. This is only a test to see whether it fixes Travis. --- lib/Server.js | 7 +++---- package-lock.json | 6 +++--- package.json | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/Server.js b/lib/Server.js index df60ccff74..065dc08bee 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -20,8 +20,6 @@ const https = require('https'); const spdy = require('spdy'); const sockjs = require('sockjs'); -const semver = require('semver'); - const killable = require('killable'); const del = require('del'); @@ -48,7 +46,8 @@ const schema = require('./options.json'); // breaking connection when certificate is not signed with prime256v1 // change it to auto allows OpenSSL to select the curve automatically // See https://github.com/nodejs/node/issues/16196 for more infomation -if (semver.satisfies(process.version, '8.6.0 - 9')) { +const version = parseFloat(process.version.slice(1)); +if (version >= 8.6 && version < 10) { tls.DEFAULT_ECDH_CURVE = 'auto'; } @@ -593,7 +592,7 @@ function Server (compiler, options = {}, _log) { // - https://github.com/nodejs/node/issues/21665 // - https://github.com/webpack/webpack-dev-server/issues/1449 // - https://github.com/expressjs/express/issues/3388 - if (semver.gte(process.version, '10.0.0')) { + if (version >= 10) { this.listeningApp = https.createServer(options.https, app); } else { this.listeningApp = spdy.createServer(options.https, app); diff --git a/package-lock.json b/package-lock.json index 8ae788f717..57aaae5d90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10393,9 +10393,9 @@ } }, "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", + "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==" }, "send": { "version": "0.16.2", diff --git a/package.json b/package.json index e3ee55f5e6..47452e1c31 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "portfinder": "^1.0.9", "schema-utils": "^1.0.0", "selfsigned": "^1.9.1", - "semver": "^5.6.0", "serve-index": "^1.7.2", "sockjs": "0.3.19", "sockjs-client": "1.3.0",