From 0d297e4e1f2b924f6b99965f3fd3677723d3a628 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 02:30:17 +0000 Subject: [PATCH 01/10] chore(deps): update dependency tape to v5.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 856f18c8..031550b1 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "magnet-uri": "6.2.0", "semantic-release": "19.0.5", "standard": "*", - "tape": "5.6.1", + "tape": "5.6.3", "webtorrent-fixtures": "2.0.0", "wrtc": "0.4.7" }, From dda99359eb033774e0e4608b7b08cab302e35528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Thu, 26 Jan 2023 10:22:50 -0500 Subject: [PATCH 02/10] ci: upgrade node --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64f6689e..0bb7ae24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: os: - ubuntu-latest node: - - '14' + - '18' steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 From b38acbdbe5ac81ebb02715ff96fd0324d0b73a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Sun, 29 Jan 2023 22:17:11 -0500 Subject: [PATCH 03/10] ci: add node-pre-gyp --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 031550b1..6eefad37 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "ws": "^7.4.5" }, "devDependencies": { + "@mapbox/node-pre-gyp": "1.0.10", "@webtorrent/semantic-release-config": "1.0.8", "magnet-uri": "6.2.0", "semantic-release": "19.0.5", From 90ee33785160c85ab23ade0e95079500806d0643 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Jan 2023 22:19:13 -0500 Subject: [PATCH 04/10] chore(deps): update actions/stale action to v7 (#439) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index bd98abab..6db0d135 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v6 + - uses: actions/stale@v7 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?' From 4bf8cb54dc00df6153c93499e82c264197d3e5d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Jan 2023 22:19:32 -0500 Subject: [PATCH 05/10] chore(deps): update dependency semantic-release to v20 (#441) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6eefad37..e78f28f2 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@mapbox/node-pre-gyp": "1.0.10", "@webtorrent/semantic-release-config": "1.0.8", "magnet-uri": "6.2.0", - "semantic-release": "19.0.5", + "semantic-release": "20.1.0", "standard": "*", "tape": "5.6.3", "webtorrent-fixtures": "2.0.0", From 138c6e7327468ca44185c94e424c1153943ad876 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 29 Jan 2023 22:20:56 -0500 Subject: [PATCH 06/10] chore(deps): update dependency magnet-uri to v7 (#444) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e78f28f2..92dae3d5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "devDependencies": { "@mapbox/node-pre-gyp": "1.0.10", "@webtorrent/semantic-release-config": "1.0.8", - "magnet-uri": "6.2.0", + "magnet-uri": "7.0.1", "semantic-release": "20.1.0", "standard": "*", "tape": "5.6.3", From b72d226ed88eec5b62b633172a39f142dc632af3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 03:43:44 +0100 Subject: [PATCH 07/10] chore(deps): update webtorrent (#445) * chore(deps): update webtorrent * fix: dependencies (#446) --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Cas <6506529+ThaUnknown@users.noreply.github.com> --- lib/client/http-tracker.js | 12 ++++++------ package.json | 6 +++--- server.js | 4 ++-- test/request-handler.js | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/client/http-tracker.js b/lib/client/http-tracker.js index 8dfe718a..07b2990c 100644 --- a/lib/client/http-tracker.js +++ b/lib/client/http-tracker.js @@ -159,13 +159,13 @@ class HTTPTracker extends Tracker { } catch (err) { return cb(new Error(`Error decoding tracker response: ${err.message}`)) } - const failure = data['failure reason'] + const failure = data['failure reason'] && Buffer.from(data['failure reason']).toString() if (failure) { debug(`failure from ${requestUrl} (${failure})`) return cb(new Error(failure)) } - const warning = data['warning message'] + const warning = data['warning message'] && Buffer.from(data['warning message']).toString() if (warning) { debug(`warning from ${requestUrl} (${warning})`) self.client.emit('warning', new Error(warning)) @@ -194,10 +194,10 @@ class HTTPTracker extends Tracker { this.client.emit('update', response) let addrs - if (Buffer.isBuffer(data.peers)) { + if (ArrayBuffer.isView(data.peers)) { // tracker returned compact response try { - addrs = compact2string.multi(data.peers) + addrs = compact2string.multi(Buffer.from(data.peers)) } catch (err) { return this.client.emit('warning', err) } @@ -211,10 +211,10 @@ class HTTPTracker extends Tracker { }) } - if (Buffer.isBuffer(data.peers6)) { + if (ArrayBuffer.isView(data.peers6)) { // tracker returned compact response try { - addrs = compact2string.multi6(data.peers6) + addrs = compact2string.multi6(Buffer.from(data.peers6)) } catch (err) { return this.client.emit('warning', err) } diff --git a/package.json b/package.json index 92dae3d5..90099e49 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "type": "module", "dependencies": { - "bencode": "^3.0.0", + "bencode": "^3.0.3", "bittorrent-peerid": "^1.3.3", "bn.js": "^5.2.0", "chrome-dgram": "^3.0.6", @@ -54,11 +54,11 @@ "devDependencies": { "@mapbox/node-pre-gyp": "1.0.10", "@webtorrent/semantic-release-config": "1.0.8", - "magnet-uri": "7.0.1", + "magnet-uri": "7.0.2", "semantic-release": "20.1.0", "standard": "*", "tape": "5.6.3", - "webtorrent-fixtures": "2.0.0", + "webtorrent-fixtures": "2.0.2", "wrtc": "0.4.7" }, "engines": { diff --git a/server.js b/server.js index 3ef4349c..05364e89 100644 --- a/server.js +++ b/server.js @@ -351,7 +351,7 @@ class Server extends EventEmitter { } createSwarm (infoHash, cb) { - if (Buffer.isBuffer(infoHash)) infoHash = infoHash.toString('hex') + if (ArrayBuffer.isView(infoHash)) infoHash = infoHash.toString('hex') process.nextTick(() => { const swarm = this.torrents[infoHash] = new Server.Swarm(infoHash, this) @@ -360,7 +360,7 @@ class Server extends EventEmitter { } getSwarm (infoHash, cb) { - if (Buffer.isBuffer(infoHash)) infoHash = infoHash.toString('hex') + if (ArrayBuffer.isView(infoHash)) infoHash = infoHash.toString('hex') process.nextTick(() => { cb(null, this.torrents[infoHash]) diff --git a/test/request-handler.js b/test/request-handler.js index b24110fa..6532cbbb 100644 --- a/test/request-handler.js +++ b/test/request-handler.js @@ -47,7 +47,7 @@ function testRequestHandler (t, serverType) { client1.once('update', data => { t.equal(data.complete, 246) - t.equal(data.extraData.toString(), 'hi') + t.equal(Buffer.from(data.extraData).toString(), 'hi') client1.destroy(() => { t.pass('client1 destroyed') From 7c4578f1b996ff909d8b691d403987f51115307c Mon Sep 17 00:00:00 2001 From: Cas <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:31:48 +0100 Subject: [PATCH 08/10] ci: update release node version (#447) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5302563..037e5acf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 - name: Cache uses: actions/cache@v3 with: From 2209d4f21bdee10e575c1728c3accf7bd34380c9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:19:06 +0100 Subject: [PATCH 09/10] 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> --- package.json | 2 +- server.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 90099e49..3d69b4f3 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/server.js b/server.js index 05364e89..dd823f42 100644 --- a/server.js +++ b/server.js @@ -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 From 7356e34894ae55c3e077703b36f6ae4546bbcac3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 1 Feb 2023 14:22:01 +0000 Subject: [PATCH 10/10] chore(release): 10.0.2 ## [10.0.2](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.1...v10.0.2) (2023-02-01) ### Bug Fixes * **deps:** update dependency ws to v8 ([#448](https://github.com/webtorrent/bittorrent-tracker/issues/448)) ([2209d4f](https://github.com/webtorrent/bittorrent-tracker/commit/2209d4f21bdee10e575c1728c3accf7bd34380c9)), closes [#449](https://github.com/webtorrent/bittorrent-tracker/issues/449) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d9e92d8..4150d276 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [10.0.2](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.1...v10.0.2) (2023-02-01) + + +### Bug Fixes + +* **deps:** update dependency ws to v8 ([#448](https://github.com/webtorrent/bittorrent-tracker/issues/448)) ([2209d4f](https://github.com/webtorrent/bittorrent-tracker/commit/2209d4f21bdee10e575c1728c3accf7bd34380c9)), closes [#449](https://github.com/webtorrent/bittorrent-tracker/issues/449) + ## [10.0.1](https://github.com/webtorrent/bittorrent-tracker/compare/v10.0.0...v10.0.1) (2022-12-07) diff --git a/package.json b/package.json index 3d69b4f3..4d0f3abb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bittorrent-tracker", "description": "Simple, robust, BitTorrent tracker (client & server) implementation", - "version": "10.0.1", + "version": "10.0.2", "author": { "name": "WebTorrent LLC", "email": "feross@webtorrent.io",