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): fix setupExitSignals usage #2181

Merged
merged 4 commits into from
Aug 8, 2019

Conversation

knagaitsev
Copy link
Collaborator

  • 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?

No, should I add tests for setupExitSignals?

Motivation / Use-Case

Fixes problem with setupExitSignals mentioned in: #1479

An alternative to this approach is simply to get rid of setupExitSignals, but I think it's better to keep the helper and just change the function a bit.

Breaking Changes

Altered setupExitSignals function API.

Additional Info

@knagaitsev knagaitsev changed the title fix(server): pass server data to exit signal setup as object fix(server): fix setupExitSignals Aug 7, 2019
@knagaitsev knagaitsev changed the title fix(server): fix setupExitSignals fix(server): fix setupExitSignals usage Aug 7, 2019
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, how it is solve problem

@codecov
Copy link

codecov bot commented Aug 7, 2019

Codecov Report

Merging #2181 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2181      +/-   ##
==========================================
+ Coverage   96.04%   96.07%   +0.02%     
==========================================
  Files          33       34       +1     
  Lines        1213     1222       +9     
  Branches      345      346       +1     
==========================================
+ Hits         1165     1174       +9     
  Misses         47       47              
  Partials        1        1
Impacted Files Coverage Δ
lib/utils/setupExitSignals.js 100% <100%> (ø)

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 21e7646...f99b27b. Read the comment docs.

@knagaitsev
Copy link
Collaborator Author

Not sure, how it is solve problem

Before, we were just passing undefined into the function. The function could not see when the variable was set to something else outside of the function.

Here, I am passing an object into the function. The setupExitSignals helper will be able to see when the properties of this object are updated from outside of the function.

@alexander-akait
Copy link
Member

alexander-akait commented Aug 7, 2019

@Loonride can we add tests fir this case? i am tired, stupid question above 😄

@knagaitsev
Copy link
Collaborator Author

knagaitsev commented Aug 7, 2019

@Loonride can we add tests fir this case?

Yes I will do that soon.

i am tired, stupid question above

no problem, it is definitely not an obvious difference

alexander-akait
alexander-akait previously approved these changes Aug 7, 2019
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fix lint problem, good job!

@knagaitsev
Copy link
Collaborator Author

@evilebottnawi It looks like husky is not working for me. Usually works for me on Windows 7, but I'm on Ubuntu 16.04 right now. Possibly just a bad npm install or something. Anyway, that means commitlint was not run here. Could this cause a problem with the commit messages?

@alexander-akait
Copy link
Member

@Loonride

Could this cause a problem with the commit messages?

don't worry, i will fix commit message before merge (I often correct them for a better changelog), anyway using good commit message help me to do it 😄

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/cc @hiroppy

@hiroppy hiroppy merged commit bbe410e into webpack:master Aug 8, 2019
@hiroppy
Copy link
Member

hiroppy commented Aug 8, 2019

Thanks

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

Successfully merging this pull request may close these issues.

4 participants