Skip to content

Commit 59aaa79

Browse files
committed
Revert "fix(Server): correct node version checks (webpack#1543)"
This reverts commit 927a2b3. This is only a test to see whether it fixes Travis.
1 parent 55398b5 commit 59aaa79

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

lib/Server.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ const https = require('https');
2020
const spdy = require('spdy');
2121
const sockjs = require('sockjs');
2222

23-
const semver = require('semver');
24-
2523
const killable = require('killable');
2624

2725
const del = require('del');
@@ -48,7 +46,8 @@ const schema = require('./options.json');
4846
// breaking connection when certificate is not signed with prime256v1
4947
// change it to auto allows OpenSSL to select the curve automatically
5048
// See https://github.com/nodejs/node/issues/16196 for more infomation
51-
if (semver.satisfies(process.version, '8.6.0 - 9')) {
49+
const version = parseFloat(process.version.slice(1));
50+
if (version >= 8.6 && version < 10) {
5251
tls.DEFAULT_ECDH_CURVE = 'auto';
5352
}
5453

@@ -593,7 +592,7 @@ function Server (compiler, options = {}, _log) {
593592
// - https://github.com/nodejs/node/issues/21665
594593
// - https://github.com/webpack/webpack-dev-server/issues/1449
595594
// - https://github.com/expressjs/express/issues/3388
596-
if (semver.gte(process.version, '10.0.0')) {
595+
if (version >= 10) {
597596
this.listeningApp = https.createServer(options.https, app);
598597
} else {
599598
this.listeningApp = spdy.createServer(options.https, app);

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"portfinder": "^1.0.9",
4545
"schema-utils": "^1.0.0",
4646
"selfsigned": "^1.9.1",
47-
"semver": "^5.6.0",
4847
"serve-index": "^1.7.2",
4948
"sockjs": "0.3.19",
5049
"sockjs-client": "1.3.0",

0 commit comments

Comments
 (0)