Skip to content

Commit 2209d4f

Browse files
fix(deps): update dependency ws to v8 (webtorrent#448)
* fix(deps): update dependency ws to v8 * fix: ws imports (webtorrent#449) --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cas <[email protected]>
1 parent 7c4578f commit 2209d4f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"socks": "^2.0.0",
5050
"string2compact": "^2.0.0",
5151
"unordered-array-remove": "^1.0.2",
52-
"ws": "^7.4.5"
52+
"ws": "^8.0.0"
5353
},
5454
"devDependencies": {
5555
"@mapbox/node-pre-gyp": "1.0.10",

server.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import http from 'http'
66
import peerid from 'bittorrent-peerid'
77
import series from 'run-series'
88
import string2compact from 'string2compact'
9-
import ws from 'ws'
9+
import { WebSocketServer } from 'ws'
1010

1111
import common from './lib/common.js'
1212
import Swarm from './lib/server/swarm.js'
1313
import parseHttpRequest from './lib/server/parse-http.js'
1414
import parseUdpRequest from './lib/server/parse-udp.js'
1515
import parseWebSocketRequest from './lib/server/parse-websocket.js'
1616

17-
const { Server: WebSocketServer } = ws
1817
const debug = Debug('bittorrent-tracker:server')
1918
const hasOwnProperty = Object.prototype.hasOwnProperty
2019

0 commit comments

Comments
 (0)