diff --git a/lib/global.js b/lib/global.js index 6673590..50062df 100644 --- a/lib/global.js +++ b/lib/global.js @@ -1,8 +1,8 @@ const createTorrent = require('create-torrent') const wrtc = require('wrtc') -global.WEBTORRENT_ANNOUNCE = createTorrent.announceList +globalThis.WEBTORRENT_ANNOUNCE = createTorrent.announceList .map(arr => arr[0]) .filter(url => url.indexOf('wss://') === 0 || url.indexOf('ws://') === 0) -global.WRTC = wrtc +globalThis.WRTC = wrtc diff --git a/package.json b/package.json index 60586f5..9dc6042 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/webtorrent/webtorrent-hybrid/issues" }, "dependencies": { - "create-torrent": "^4.4.2", + "create-torrent": "^5.0.0", "webtorrent": "^1.0.0", "webtorrent-cli": "^3.2.0", "wrtc": "^0.4.6"