Skip to content

BREAKING CHANGE: move sock options into an object #2593

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 7 commits into from
May 12, 2020

Conversation

knagaitsev
Copy link
Collaborator

@knagaitsev knagaitsev commented May 10, 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

All the breaking changes are listed below

I created a new option called clientOptions that has properties host, path, and port. Is this a good name, or would we prefer something like wsOptions? I think we should not use "sock" anymore

I also added an API method to server to easily get the path we want: server.getClientOptionsPath(). We can also consider if there is a better name for this (maybe server.getClientWsPath()?)

Breaking Changes

  • sockPath, sockHost, sockPort options removed in favor of clientOptions object
  • removed the above CLI options as well (they were not well implemented or tested, so I did not replace them with something new)
  • remove server.sockPath and switch it with an API method server.getClientOptionsPath()
  • query parameters for creation of the client are now host, path, and port (rather than sockHost, sockPath, sockPort)

Additional Info

We also need to update the docs for this

@knagaitsev knagaitsev changed the title chore(server): move sock options into an object BREAKING CHANGE: move sock options into an object May 10, 2020
@codecov
Copy link

codecov bot commented May 10, 2020

Codecov Report

Merging #2593 into v4 will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v4    #2593      +/-   ##
==========================================
+ Coverage   92.84%   92.86%   +0.02%     
==========================================
  Files          35       35              
  Lines        1313     1318       +5     
  Branches      368      373       +5     
==========================================
+ Hits         1219     1224       +5     
  Misses         89       89              
  Partials        5        5              
Impacted Files Coverage Δ
lib/Server.js 96.88% <ø> (-0.03%) ⬇️
lib/servers/SockJSServer.js 93.75% <ø> (ø)
lib/servers/WebsocketServer.js 94.11% <ø> (ø)
lib/utils/createConfig.js 95.50% <ø> (-0.29%) ⬇️
client-src/default/utils/createSocketUrl.js 100.00% <100.00%> (ø)
lib/utils/addEntries.js 100.00% <100.00%> (ø)
lib/utils/normalizeOptions.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 8775a07...aef1796. Read the comment docs.

This was referenced May 10, 2020
Merged
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.

Good job!

@alexander-akait alexander-akait merged commit ed9c4f7 into webpack:v4 May 12, 2020
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.

3 participants