Skip to content
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

fix(server): don't crash on setupExitSignals(undefined) #2507

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

cben
Copy link
Contributor

@cben cben commented Apr 7, 2020

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes.

Motivation / Use-Case

Someone observed this line crash:
#1479 (comment)

This is the fix suggested by @evilebottnawi — please review.

Breaking Changes

none.

Additional Info

I don't see how that crash was possible, all callers (1 real + few tests) pass an object (and weren't touched since #2181 introduced serverData. But I also can't argue with a stacktrace :-)

Feel free to reject.

Not sure how it's possible as all callers pass an object, but observed in
webpack#1479 (comment)
@jsf-clabot
Copy link

jsf-clabot commented Apr 7, 2020

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Apr 7, 2020

Codecov Report

Merging #2507 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2507   +/-   ##
=======================================
  Coverage   93.58%   93.58%           
=======================================
  Files          34       34           
  Lines        1325     1325           
  Branches      381      381           
=======================================
  Hits         1240     1240           
  Misses         83       83           
  Partials        2        2           
Impacted Files Coverage Δ
lib/utils/setupExitSignals.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c436058...3d3a4f2. Read the comment docs.

@cben
Copy link
Contributor Author

cben commented Apr 7, 2020

I may be wrong but CI failures seem unrelated?

@alexander-akait
Copy link
Member

Restart CI, we will stability them in near future

/cc @hiroppy

@jeffin143
Copy link

@cben
Came up with similar fix few days back in #2501 https://github.com/webpack/webpack-dev-server/pull/2501/files

Good work with the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants