fix(deps): update dependency ws to v8 (#448)

* fix(deps): update dependency ws to v8

* fix: ws imports (#449)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Cas <6506529+ThaUnknown@users.noreply.github.com>
This commit is contained in:
renovate[bot] 2023-02-01 15:19:06 +01:00 committed by GitHub
parent 7c4578f1b9
commit 2209d4f21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -49,7 +49,7 @@
"socks": "^2.0.0",
"string2compact": "^2.0.0",
"unordered-array-remove": "^1.0.2",
"ws": "^7.4.5"
"ws": "^8.0.0"
},
"devDependencies": {
"@mapbox/node-pre-gyp": "1.0.10",

View File

@ -6,7 +6,7 @@ import http from 'http'
import peerid from 'bittorrent-peerid'
import series from 'run-series'
import string2compact from 'string2compact'
import ws from 'ws'
import { WebSocketServer } from 'ws'
import common from './lib/common.js'
import Swarm from './lib/server/swarm.js'
@ -14,7 +14,6 @@ import parseHttpRequest from './lib/server/parse-http.js'
import parseUdpRequest from './lib/server/parse-udp.js'
import parseWebSocketRequest from './lib/server/parse-websocket.js'
const { Server: WebSocketServer } = ws
const debug = Debug('bittorrent-tracker:server')
const hasOwnProperty = Object.prototype.hasOwnProperty