Skip to content

refactor: change order of params for Server #3273

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

Merged
merged 12 commits into from
May 13, 2021

Conversation

rishabh3112
Copy link
Member

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

Will update tests accordingly

Motivation / Use-Case

We are moving to plugin interface for the server. The ideal signature for that would be constructor(options={}) but we need compiler in params as well for backward compatibility. For that reason, this PR aims to change the order of params so that plugin implementation can ignore compiler param.

Breaking Changes

Yes, we will need to fix this in serve package after patch release here

Additional Info

https://github.com/webpack/webpack-dev-server/pull/3251/files#r629851714

@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #3273 (fa4025d) into master (98d2acd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3273   +/-   ##
=======================================
  Coverage   95.39%   95.40%           
=======================================
  Files          34       34           
  Lines        1239     1241    +2     
  Branches      353      354    +1     
=======================================
+ Hits         1182     1184    +2     
  Misses         51       51           
  Partials        6        6           
Impacted Files Coverage Δ
lib/Server.js 95.42% <100.00%> (+0.01%) ⬆️

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 98d2acd...fa4025d. Read the comment docs.

anshumanv
anshumanv previously approved these changes May 12, 2021
Copy link
Member

@anshumanv anshumanv left a comment

Choose a reason for hiding this comment

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

Thanks!! 🌟

@rishabh3112
Copy link
Member Author

Thanks!! 🌟

Hey! No need to thank as such but appreciated 😄.

@rishabh3112 rishabh3112 marked this pull request as ready for review May 12, 2021 10:08
@rishabh3112 rishabh3112 requested a review from anshumanv May 12, 2021 10:08
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.

Oh, can we test multi compiler mode too or we already have tests?

@rishabh3112
Copy link
Member Author

rishabh3112 commented May 13, 2021

Oh, can we test multi compiler mode too or we already have tests?

Nothing is changed in this PR for multi-compilers though, will add similar test for multi-compiler too anyway.

EDIT: Done 👍🏽

Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

LGTM

@alexander-akait alexander-akait merged commit 4c3915a into master May 13, 2021
@alexander-akait alexander-akait deleted the refactor/param-order branch May 13, 2021 12:35
@alexander-akait
Copy link
Member

Thanks

@alexander-akait
Copy link
Member

Now we can continue development dev server as plugin and don't worry about breaking change for v4

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.

4 participants