-
Notifications
You must be signed in to change notification settings - Fork 448
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
refactor: add js-libp2p-switch to the libp2p codebase #388
Conversation
* feat: fix circuit dialing * chore: upgrade deps * chore: update circle ci config * chore: adding missing dev dependency * fix: removing unused dependency * test: adding tests * fix: remove unused dep
* chore: update deps * feat: use latest secio API * chore: update deps
* docs: update browser example pubsub * docs: fix pubsub example config * fix: make pubsub default to enabled This allows for only adding the module to have it enabled. Previously you would have to supply and enable the module which is unncessary for users
"denylist" more adequately describes what this list is for. BREAKING CHANGE: Constructor options `blacklistTTL` and `blackListAttempts` have been renamed to `denyTTL` and `denyAttempts`. The error code from errors thrown when dial is currently denied has changed from `ERR_BLACKLISTED` to `ERR_DENIED`. License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
* chore: update deps and fix lint * test: fix tests after webrtc-star upgrade
* fix: dont override methods of created instance * chore: fix lint
BREAKING CHANGE: switch configuration has changed. 'blacklistTTL' is now 'denyTTL' and 'blackListAttempts' is now 'denyAttempts'
* chore: update ws rendezvous dep test(fix): fix tests with latest ws rendezvous server * fix: promisification of libp2p methods test: add tests to verify promisify support until async/await endeavor is complete * chore: fix linting
@vasco-santos there are some flakey tests on windows atm. My plan is to get the rest of the core modules in first and then fix all of those and dedupe some of the tests as well. For each PR I'm mainly focused on getting the Travis builds passing. I think if we end up fixing tests fully for each merge it's going to chew up a lot of time unnecessarily. |
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.
This looks good! 🚀 I just left 3 minor things to consider
Also, we can’t forget about tracking the issues and open PRs on js-libp2p-switch
. Regarding the issues, we should probably make a pass through them and move the relevant ones. On PRs, we should probably comment an update that the repo content was moved.
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) | ||
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) | ||
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io) | ||
[![Travis CI](https://flat.badgen.net/travis/libp2p/js-libp2p-switch)](https://travis-ci.com/libp2p/js-libp2p-switch) |
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.
Should we remove CI, cdecov and dependency status?
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.
Yes! I will go through and sweep the READMEs and cleanup the package.json files as part of the next PR to pull everything else in. If we keep the package.json files it may just be a super stripped down version, as the main reason I left them in is to be able to keep the clean libp2p-switch
require statements. But that might be unnecessary once everything is cleaned up.
* @throws {InvalidPeerType} | ||
* @returns {PeerInfo} | ||
*/ | ||
function getPeerInfo (peer, peerBook) { |
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.
This will probably make sense in other contexts. So, after getting all other modules in here, we should also analyze all the utils and put them in a common util folder
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/libp2p/js-libp2p-switch.git" |
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.
What about these URLs? Should we remove them? At least the bugs one should point to this repo
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## [5.0.2](libp2p/js-libp2p-kad-dht@v5.0.1...v5.0.2) (2022-11-05) ### Dependencies * bump it-all from 1.0.6 to 2.0.0 ([libp2p#389](libp2p/js-libp2p-kad-dht#389)) ([0596485](libp2p/js-libp2p-kad-dht@0596485)) * bump it-drain from 1.0.5 to 2.0.0 ([libp2p#390](libp2p/js-libp2p-kad-dht#390)) ([fdda357](libp2p/js-libp2p-kad-dht@fdda357)) * bump it-first from 1.0.7 to 2.0.0 ([libp2p#391](libp2p/js-libp2p-kad-dht#391)) ([681c24e](libp2p/js-libp2p-kad-dht@681c24e)) * bump it-length from 1.0.4 to 2.0.0 ([libp2p#394](libp2p/js-libp2p-kad-dht#394)) ([ae07736](libp2p/js-libp2p-kad-dht@ae07736)) * bump it-map from 1.0.6 to 2.0.0 ([libp2p#396](libp2p/js-libp2p-kad-dht#396)) ([ac5101c](libp2p/js-libp2p-kad-dht@ac5101c)) * bump it-merge from 1.0.4 to 2.0.0 ([libp2p#393](libp2p/js-libp2p-kad-dht#393)) ([1acb5f1](libp2p/js-libp2p-kad-dht@1acb5f1)) * bump it-parallel from 2.0.2 to 3.0.0 ([libp2p#392](libp2p/js-libp2p-kad-dht#392)) ([06a2c48](libp2p/js-libp2p-kad-dht@06a2c48)) * bump it-take from 1.0.2 to 2.0.0 ([libp2p#397](libp2p/js-libp2p-kad-dht#397)) ([4e909d2](libp2p/js-libp2p-kad-dht@4e909d2)) * **dev:** bump it-filter from 1.0.3 to 2.0.0 ([libp2p#395](libp2p/js-libp2p-kad-dht#395)) ([5668f9c](libp2p/js-libp2p-kad-dht@5668f9c)) * **dev:** bump it-last from 1.0.6 to 2.0.0 ([libp2p#388](libp2p/js-libp2p-kad-dht#388)) ([5b55239](libp2p/js-libp2p-kad-dht@5b55239))
This PR adds js-libp2p-switch to js-libp2p as a part of #384.
Things to note:
./src/switch
and its tests under./test/switch
.Note on Merging: Follow steps mentioned at #388 (comment).