-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
refactor: avoid new public options on class #3261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3261 +/- ##
==========================================
+ Coverage 95.55% 95.68% +0.13%
==========================================
Files 34 34
Lines 1260 1276 +16
Branches 357 366 +9
==========================================
+ Hits 1204 1221 +17
+ Misses 52 51 -1
Partials 4 4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, ideally we should add tests:
const devServer = new DevServer({ host: '192.168.0.2' }); devServer.listen(80, '127.0.0.1');
and throw an error like we do with theport
optionconst devServer = new DevServer({ host: '192.168.0.2' }); devServer.listen(80);
should work and listen192.168.0.2
Also I think we should support signatures like in server.listen
https://nodejs.org/api/net.html#net_server_listen (except), but we can do it in separate PR
I will update 👍 |
In the case of webpack-dev-server/lib/Server.js Lines 764 to 768 in 297a649
|
Better warning here |
4ff9fb3
to
51cedf0
Compare
I will fix CI in near future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will test and review it in near future
@snitin315 need rebase too |
Unfortunately I'm off my system, it's already night here. I will rebase in near future. |
201920a
to
be57500
Compare
Done ✅ |
For Bugs and Features; did you add new tests?
Motivation / Use-Case
rely on
this.options.host
Breaking Changes
None
Additional Info
No