Skip to content

Commit

Permalink
fix(deps): bump socket-io to v3 (karma-runner#3586)
Browse files Browse the repository at this point in the history
* fix socket-io deprecated default export
BREAKING CHANGE:
Some projects have socket.io tests that are version sensitive.
Fixes karma-runner#3569
  • Loading branch information
muuvmuuv authored and anthony-redFox committed May 5, 2023
1 parent bd385c9 commit b87d972
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 276 deletions.
4 changes: 2 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ const EmitterWrapper = require('./emitter_wrapper')
const processWrapper = new EmitterWrapper(process)

function createSocketIoServer (webServer, executor, config) {
const server = new SocketIO(webServer, {
const server = new SocketIO.Server(webServer, {
// avoid destroying http upgrades from socket.io to get proxied websockets working
destroyUpgrade: false,
path: config.urlRoot + 'socket.io/',
transports: config.transports,
forceJSONP: config.forceJSONP,
// Default is 5000 in socket.io v2.x.
// Default is 5000 in socket.io v2.x and v3.x.
pingTimeout: config.pingTimeout || 5000
})

Expand Down
Loading

0 comments on commit b87d972

Please sign in to comment.