Skip to content

Commit 6b80626

Browse files
committed
Replace uws with ws package
`uws` was deprecated by its maintainer and starts to cause more and more problems and issue reports. So it's time to replace it and use a maintained project instead. Lucky us, `uws` and `ws` can be used in an identical way, without problems. To provide better performance, we install the optional packages as well. Signed-off-by: Sheogorath <[email protected]>
1 parent fe97743 commit 6b80626

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ app.use(morgan('combined', {
5858

5959
// socket io
6060
var io = require('socket.io')(server)
61-
io.engine.ws = new (require('uws').Server)({
61+
io.engine.ws = new (require('ws').Server)({
6262
noServer: true,
6363
perMessageDeflate: false
6464
})

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@
125125
"to-markdown": "^3.0.3",
126126
"toobusy-js": "^0.5.1",
127127
"uuid": "^3.1.0",
128-
"uws": "~0.14.1",
129128
"validator": "^10.4.0",
130129
"velocity-animate": "^1.4.0",
131130
"visibilityjs": "^1.2.4",
132131
"viz.js": "^1.7.0",
133132
"winston": "^2.3.0",
133+
"ws": "^6.0.0",
134134
"xss": "^1.0.3"
135135
},
136136
"engines": {
@@ -211,5 +211,9 @@
211211
"lib/ot",
212212
"public/vendor"
213213
]
214+
},
215+
"optionalDependencies": {
216+
"bufferutil": "^4.0.0",
217+
"utf-8-validate": "^5.0.1"
214218
}
215219
}

0 commit comments

Comments
 (0)