Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depend on upstream WebTorrent #3134

Merged
merged 1 commit into from
Aug 9, 2019
Merged

Depend on upstream WebTorrent #3134

merged 1 commit into from
Aug 9, 2019

Conversation

feross
Copy link
Contributor

@feross feross commented Aug 9, 2019

Fixes: brave/brave-browser#5587
Fixes: brave/brave-browser#856
Fixes: brave/brave-browser#5489

This makes Brave depend on upstream WebTorrent instead of the fork. This also removes the need for forks of torrent-discovery and bittorrent-tracker.

Submitter Checklist:

Test Plan:

  1. Visit https://webtorrent.io/free-torrents
  2. Take turns clicking each torrent link, and also each magnet link.
  3. When each of the torrent pages load, ensure the Start Download button starts the torrent download.
  4. Ensure that the 'Copy Magnet Link' and 'Save .torrent File' links work.
  5. Ensure that clicking on a video file or audio file causes a new tab to open and the media to play.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@feross feross added the feature/webtorrent Label for webtorrent related issues label Aug 9, 2019
@feross feross added this to the 0.70.x - Nightly milestone Aug 9, 2019
@feross feross requested a review from yrliou August 9, 2019 03:41
@feross feross self-assigned this Aug 9, 2019
@feross feross force-pushed the webtorrent-upstream branch from 3129a14 to a4242c2 Compare August 9, 2019 03:44
'dgram': 'chrome-dgram',
'dns': path.resolve(__dirname, '../common/dns.ts'),
'net': 'chrome-net',
'torrent-discovery': path.resolve(__dirname, '../../node_modules/torrent-discovery')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No more need to depend on bittorrent-tracker or torrent-discovery fork.
  • No more need to specify net to chrome-net or dgram to chrome-dgram alias.

}
// TODO(feross): Publish chrome-dns and add to "chromeapp" package.json
// field so this isn't required anymore
dns: path.resolve(__dirname, '../common/dns.ts')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to shim dns as well, but haven't done that yet. Once I publish chrome-dns, I will include it in webtorrent's "chromeapp" field in package.json and then we can remove this line as well :)

},
// For explanation of "chromeapp", see:
// https://github.com/brave/brave-browser/issues/5587
aliasFields: ['chromeapp']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tells webpack to use "chromeapp" instead of "browser" in package.json.

"unique-selector": "^0.4.1",
"webtorrent": "github:brave/webtorrent#652fbeecd6c05076fdfd0f1e64ccb3957d51e21f"
"webtorrent": "^0.107.2"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're depending on upstream!

@feross feross force-pushed the webtorrent-upstream branch from a4242c2 to 3a3c1e9 Compare August 9, 2019 04:13
Fixes: brave/brave-browser#5587
Fixes: brave/brave-browser#856
Fixes: brave/brave-browser#5489

This makes Brave depend on upstream WebTorrent instead of the fork. This also removes the need for forks of torrent-discovery and bittorrent-tracker.
@feross feross force-pushed the webtorrent-upstream branch from 3a3c1e9 to d187598 Compare August 9, 2019 05:14
@yrliou
Copy link
Member

yrliou commented Aug 9, 2019

@feross I think it's more safe to do some manual testing on this PR, could you update the test plan and labelled the main issue as QA/Yes?

@feross
Copy link
Contributor Author

feross commented Aug 9, 2019

@yrliou Done. I updated the test plan and added QA/Yes.

@yrliou
Copy link
Member

yrliou commented Aug 9, 2019

The latest CI failure was just Copy file to S3.

Copy link
Member

@yrliou yrliou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through the test plan and LGTM, thanks for the effort on this one!

@feross feross merged commit 32b35ba into master Aug 9, 2019
@feross feross deleted the webtorrent-upstream branch August 9, 2019 22:44
@feross
Copy link
Contributor Author

feross commented Aug 9, 2019

Went through the test plan and LGTM, thanks for the effort on this one!

Of course! I think this is a great improvement. Should be a lot less work to stay on the latest webtorrent now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/webtorrent Label for webtorrent related issues
Projects
None yet
2 participants