Skip to content

Commit

Permalink
Revert "fix(Server): correct node version checks (webpack#1543)"
Browse files Browse the repository at this point in the history
This reverts commit 927a2b3.

This is only a test to see whether it fixes Travis.
  • Loading branch information
odinho committed Nov 8, 2018
1 parent 55398b5 commit 59aaa79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions lib/Server.js
Expand Up @@ -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');
Expand All @@ -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';
}

Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Expand Up @@ -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",
Expand Down

0 comments on commit 59aaa79

Please sign in to comment.