Skip to content

Commit

Permalink
chore: bump ws 7->8
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Apr 11, 2023
1 parent f300125 commit a6ec1ce
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
60 changes: 31 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions plugins/plugin-bash-like/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"@types/properties-parser": "0.3.0",
"@types/shelljs": "^0.8.11",
"@types/tmp": "^0.2.3",
"@types/uuid": "^9.0.1"
"@types/uuid": "^9.0.1",
"@types/ws": "^8.5.4"
},
"dependencies": {
"@kui-shell/xterm-helpers": "^2.1.0",
Expand All @@ -47,7 +48,7 @@
"speed-date": "^1.0.0",
"tmp": "^0.2.1",
"uuid": "^9.0.0",
"ws": "^7.5.9",
"ws": "^8.13.0",
"xterm": "^5.1.0",
"xterm-addon-fit": "^0.7.0",
"xterm-addon-webgl": "^0.14.0"
Expand Down
6 changes: 3 additions & 3 deletions plugins/plugin-bash-like/src/pty/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export const main = async (
if (cachedWss) {
return cachedPort
} else {
const WebSocket = (await import('ws')).default
const { WebSocketServer } = await import('ws')

// eslint-disable-next-line no-async-promise-executor
return new Promise(async resolve => {
Expand All @@ -537,7 +537,7 @@ export const main = async (
// if we were given a session cookie, then use the
// verifyClient functionality of WebSocket.Server to enforce
// the session's validity
const wss = new WebSocket.Server({
const wss = new WebSocketServer({
noServer: true,
verifyClient: expectedCookie && verifySession(expectedCookie)
})
Expand All @@ -561,7 +561,7 @@ export const main = async (
cachedPort = await getPort()
const server = createDefaultServer()
server.listen(cachedPort, async () => {
const wss = (cachedWss = new WebSocket.Server({ server }))
const wss = (cachedWss = new WebSocketServer({ server }))
servers.push({ wss: cachedWss, server })
resolve({ wss, port: cachedPort, exitNow })
})
Expand Down

0 comments on commit a6ec1ce

Please sign in to comment.