Skip to content

[webtorrent] Update to v3 - #75356

Open
trim21 wants to merge 5 commits into
DefinitelyTyped:masterfrom
trim21:webtorrent-v3
Open

[webtorrent] Update to v3#75356
trim21 wants to merge 5 commits into
DefinitelyTyped:masterfrom
trim21:webtorrent-v3

Conversation

@trim21

@trim21 trim21 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

This PR updates @types/webtorrent to v3 (webtorrent 3.0.21), continuing the series of PRs that upgraded magnet-uri to v7 (#75277) and parse-torrent to v11 (#75278).

Major changes:

  • Switch from CJS export = to ESM default export (export default class WebTorrent), with "type": "module" and exports in package.json.
  • Depend on @types/parse-torrent ^11 (was ^5).
  • Replace Buffer with Uint8Array to match the v3 source.
  • TorrentFile rewritten to match the W3C-like File implementation in v3: removed appendTo/renderTo/getBuffer/getBlob/getBlobURL, added arrayBuffer/blob/stream/streamTo/includes/async iterator, select(priority).
  • Torrent: removed load() and createServer(), added critical(), rescanFiles(), getFileModtimes(), addPeer() now takes an optional source, deselect() now takes two args; noPeers event now also reports lsd/ut_pex.
  • Server typings updated: client.createServer() returns NodeServer/BrowserServer with listen() support; torrent.createServer() no longer exists.
  • New client options (utPex, natUpnp, natPmp, secure, torrentPort, dhtPort, userAgent, seedOutgoingConnections) and static members (UTP_SUPPORT, VERSION).

@typescript-automation typescript-automation Bot moved this to Needs Author Action in Pull Request Status Board Aug 6, 2026
@trim21
trim21 marked this pull request as ready for review August 6, 2026 14:12
@typescript-automation

typescript-automation Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@trim21 Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because this PR edits the configuration file, it can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 A DT maintainer needs to approve changes that affect module config files

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.

Inactive

This PR has been inactive for 8 days.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 75356,
  "author": "trim21",
  "headCommitOid": "fc782ac2e032c2a3562c9db05e4aa1a1451a4120",
  "mergeBaseOid": "72eec8e92e22f05da10dca6e23d9bc1ca2a56caf",
  "lastPushDate": "2026-08-06T14:08:55.000Z",
  "lastActivityDate": "2026-08-06T14:12:04.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "webtorrent",
      "kind": "edit",
      "files": [
        {
          "path": "types/webtorrent/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/webtorrent/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/webtorrent/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-tsconfigjson) and not moving towards it (check: `compilerOptions.lib.1`)"
        },
        {
          "path": "types/webtorrent/webtorrent-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "niieani",
        "tlaziuk",
        "gjuchault",
        "cheeseandcereal"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [],
  "mainBotCommentID": 5205831173,
  "ciResult": "pass"
}

@typescript-automation typescript-automation Bot added the Check Config Changes a module config files label Aug 6, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

🔔 @niieani @tlaziuk @gjuchault @cheeseandcereal — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-automation typescript-automation Bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot added the The CI failed When GH Actions fails label Aug 6, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

@trim21 The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review.

@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot removed the The CI failed When GH Actions fails label Aug 6, 2026
@typescript-automation typescript-automation Bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot moved this from Needs Maintainer Review to Waiting for Code Reviews in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Aug 6, 2026
@typescript-automation typescript-automation Bot moved this from Needs Maintainer Review to Waiting for Code Reviews in Pull Request Status Board Aug 9, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Aug 9, 2026
@typescript-automation typescript-automation Bot moved this from Needs Maintainer Review to Waiting for Code Reviews in Pull Request Status Board Aug 14, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Maintainer Review in Pull Request Status Board Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Check Config Changes a module config files

Projects

Status: Needs Maintainer Review

Development

Successfully merging this pull request may close these issues.

1 participant