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

Brave should depend on upstream WebTorrent; Create de-facto "chromeapp" field in package.json spec #5587

Closed
feross opened this issue Aug 8, 2019 · 2 comments · Fixed by brave/brave-core#3134

Comments

@feross
Copy link

feross commented Aug 8, 2019

To resolve #856 and obviate the need for Brave to use a WebTorrent fork, I'm attempting to make a defacto standard for specifying Chrome App dependency substitutions using the "chromeapp" field in package.json.

The "chromeapp" field is just like the "browser" field in package.json except it's intended for Chrome Apps instead of a generic browser environment. Bundler tools like browserify or webpack can be configured to look for the "chromeapp" field instead of the "browser" field when doing a build for a Chrome App.

In the case of WebTorrent running in a Chrome App context in Brave, we can use raw sockets, so we want to replace e.g. require('net') with require('chrome-net') and similar.

I'm sending PRs to all dependent projects:

Once this is complete, we should be able to depend directly on upstream WebTorrent.

@feross feross added the feature/webtorrent Label for webtorrent related issues label Aug 8, 2019
@feross feross self-assigned this Aug 8, 2019
@feross
Copy link
Author

feross commented Aug 9, 2019

All PRs have been merged, except for the one to http-node. I'm going to make webtorrent itself temporarily depend on an http-node fork so that we can make progress on this issue.

I'm about to send a PR to make Brave depend on upstream webtorrent, which should now have all the necessary chromeapp fields. 🎉

(I'll be responsible for updating webtorrent to use upstream http-node once they merge the PR.)

@feross feross added the QA/No label Aug 9, 2019
feross added a commit to brave/brave-core that referenced this issue 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.
@feross feross added this to the 0.70.x - Nightly milestone Aug 13, 2019
@kjozwiak
Copy link
Member

kjozwiak commented Sep 18, 2019

Verification PASSED on macOS 10.14.6 x64 using the following build:

Brave 0.69.126 Chromium: 77.0.3865.65 (Official Build) (64-bit)
Revision 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS macOS Version 10.14.6 (Build 18G95)

Verification passed on

Brave 0.69.127 Chromium: 77.0.3865.75 (Official Build) (64-bit)
Revision 201e747d032611c5f2785cae06e894cf85be7f8a-refs/branch-heads/3865@{#776}
OS Ubuntu 18.04 LTS

Verification passed o

Brave 0.69.128 Chromium: 77.0.3865.75 (Official Build) (64-bit)
Revision 201e747d032611c5f2785cae06e894cf85be7f8a-refs/branch-heads/3865@{#776}
OS Windows 10 OS Version 1803 (Build 17134.1006)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants