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

feat(server): async user callback for server.listen #2218

Merged
merged 4 commits into from
Sep 24, 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?

Not yet

Motivation / Use-Case

@evilebottnawi Is this what you meant by async userCallback?

Making the callback from server.listen async, along with the internally used userCallback. Also, removed a redundant piece of code that I left in the CLI.

Breaking Changes

None

Additional Info

@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #2218 into next will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #2218   +/-   ##
=======================================
  Coverage   93.93%   93.93%           
=======================================
  Files          36       36           
  Lines        1302     1302           
  Branches      367      367           
=======================================
  Hits         1223     1223           
  Misses         70       70           
  Partials        9        9
Impacted Files Coverage Δ
lib/Server.js 97.19% <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 64036a0...639f14b. Read the comment docs.

@knagaitsev knagaitsev added gsoc Google Summer of Code pr: next labels Aug 22, 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.

Let's add tests 👍

const compiler = webpack(config);
const server = new Server(
compiler,
Object.assign(
Copy link
Member

Choose a reason for hiding this comment

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

nit

{
  onListening: () => {
    callOrder.push('onListening');
  },
  ...baseDevConfig
}

lib/Server.js Outdated
@@ -748,10 +748,10 @@ class Server {
// specifically so that things are done in the right order to prevent
// backwards compatability issues
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// backwards compatability issues
// backwards compatibility issues

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 0e875f8 into webpack:next Sep 24, 2019
hiroppy pushed a commit that referenced this pull request Dec 12, 2019
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
hiroppy pushed a commit that referenced this pull request Dec 18, 2019
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
hiroppy pushed a commit that referenced this pull request Dec 19, 2019
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
hiroppy pushed a commit that referenced this pull request Dec 23, 2019
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
hiroppy pushed a commit that referenced this pull request Dec 24, 2019
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
alexander-akait pushed a commit that referenced this pull request Jan 29, 2020
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
alexander-akait pushed a commit that referenced this pull request Jan 31, 2020
* feat(server): made user callback async, remove cli listen redundancy

* test(server): added server listen method async callback tests

* test(server): create options object using spread operator

* chore(server): fix comment spelling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Google Summer of Code pr: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants