Skip to content

fix(server): fix setupExitSignals usage - #2181

Merged
hiroppy merged 4 commits into
webpack:masterfrom
knagaitsev:setupExitSignals-fix
Aug 8, 2019
Merged

fix(server): fix setupExitSignals usage#2181
hiroppy merged 4 commits into
webpack:masterfrom
knagaitsev:setupExitSignals-fix

Conversation

@knagaitsev

Copy link
Copy Markdown
Contributor
  • 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

@knagaitsevknagaitsev changed the title fix(server): pass server data to exit signal setup as objectfix(server): fix setupExitSignalsAug 7, 2019
@knagaitsevknagaitsev changed the title fix(server): fix setupExitSignalsfix(server): fix setupExitSignals usageAug 7, 2019

@alexander-akaitalexander-akait left a comment

Copy link
Copy Markdown
Member

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

codecovBot commented Aug 7, 2019

Copy link
Copy Markdown

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 FilesCoverage Δ
lib/utils/setupExitSignals.js100% <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
Copy Markdown
ContributorAuthor

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

alexander-akait commented Aug 7, 2019

Copy link
Copy Markdown
Member

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

@knagaitsev

knagaitsev commented Aug 7, 2019

Copy link
Copy Markdown
ContributorAuthor

@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

@alexander-akaitalexander-akait left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

@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
Copy Markdown
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 😄

@alexander-akaitalexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@hiroppy
hiroppy merged commit bbe410e into webpack:masterAug 8, 2019
@hiroppy

Copy link
Copy Markdown
Contributor

Thanks

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gsocGoogle Summer of Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@knagaitsev@alexander-akait@hiroppy@evilebottnawi