-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improved feature-detection of chrome.sockets #36
Improved feature-detection of chrome.sockets #36
Conversation
Old version did not check if chrome.sockets.* actually exist. This caused problems with extensions built for Chromium-based browsers that tried to maintain the single codebase and do feature-detection at runtime. License: MIT Signed-off-by: Marcin Rataj <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
Co-Authored-By: lidel <[email protected]>
@jscissr any chance to publish a new release to npm with this? :) |
The problem is that @feross has enabled branch protection with required pull request review for master, and I can't approve my own changes. At the same time his status is:
I could publish to npm, but then I can't push the version update commit to GitHub. Some options I see are:
What do you think? |
You should be able to open a PR here: https://github.com/feross/chrome-net/compare/version-update?expand=1 |
Release includes feross/chrome-net#36 improved feature-detection of chrome.sockets
Release includes feross/chrome-net#36 improved feature-detection of chrome.sockets
switch to chrome-net v3.3.2 Release includes feross/chrome-net#36 (improved feature-detection of chrome.sockets) + usual dependency updates
Sorry that I missed this message. Were you able to get this issue figured out and a new version published to npm? |
Yes, its all good: it shipped in v3.3.2 |
I created a PR with the same fix for UDP API: feross/chrome-dgram#16 |
What?
This PR adds explicit check if
chrome.sockets.tcp
andchrome.sockets.tcpServer
exist before registering related listeners.Why?
chrome-net
did not check if usedchrome.sockets.*
APIs actually exist, which caused problems in browser extensions. Extension was unable to maintain the single codebase and do feature-detection at runtime (eg. Google Chrome withoutchrome.sockets
vs Brave with).This PR makes it possible to include
chrome-net
in generic build pipeline.Refs. ipfs/ipfs-companion#664 ipfs/ipfs-companion#716