* fix: performance bottleneck in stat.js (#463)
Array.shift seems to be very slow, perhaps linear, on some
engines, resulting in _update consuming a lot of CPU.
* docs(fix): correct docs and example for pnet (#464)
* docs(fix): correct docs and example for pnet
* docs(fix): correct pnet docs
* docs(fix): update README.md language (#468)
* docs: reciprocate (#474)
* docs(example): fix ipfs cat (#475)
`ipfs.files.cat` is incorrect. the correct function is `ipfs.cat`
* fix: async-await example chat
* fix: move handler before start
* fix: examples readme typos (#481)
* fix: simplify libp2p bundle for echo example
* chore: remove unused vars
* fix: performance bottleneck in stat.js (#463)
Array.shift seems to be very slow, perhaps linear, on some
engines, resulting in _update consuming a lot of CPU.
* docs(fix): correct docs and example for pnet (#464)
* docs(fix): correct docs and example for pnet
* docs(fix): correct pnet docs
* docs(fix): update README.md language (#468)
* docs: reciprocate (#474)
* docs(example): fix ipfs cat (#475)
`ipfs.files.cat` is incorrect. the correct function is `ipfs.cat`
* fix: async await examples/echo
* fix: examples readme typos (#481)
* fix: simplify libp2p bundle for echo example
* chore(deps): update connection and multistream
* feat: add basic dial support for addresses and peers
* test: automatically require all node test files
* fix: dont catch and log in the wrong place
* test: add direct spec test
fix: improve dial error consistency
* feat: add dial timeouts and concurrency
Queue timeouts will result in aborts of the dials
* chore: fix linting
* test: verify dialer defaults
* feat: add initial upgrader
* fix: add more test coverage and fix bugs
* feat: libp2p creates the upgrader
* feat: hook up handle to the upgrader
* feat: hook up the dialer to libp2p
test: add node dialer libp2p tests
* feat: add connection listeners to upgrader
* feat: emit connect and disconnect events
* chore: use libp2p-interfaces
* fix: address review feedback
* fix: correct import
* refactor: dedupe connection creation code
* test: remove all tests for a clean slate
The refactor will require a large number of updates to the tests. In order
to ensure we have done a decent deduplication, and have a cleaner suite of tests
we've removed all tests. This will also allow us to more easily see tests
for the refactored systems.
We have a record of the latest test suites in master, so we are not losing any history.
* chore: update tcp and websockets
* chore: remove other transports until they are converted
* chore: use mafmt and multiaddr async versions
* chore: add and fix dependencies
* chore: clean up travis file
* feat: add new transport manager
* docs: add constructor jsdocs
* refactor(config): check that transports exist
This also removes the other logic, it can be added when those subsystems are refactored
* chore(deps): use async peer-id and peer-info
* feat: wire up the transport manager with libp2p
* chore: remove superstruct dep
The get peer info util consolidation from #400 exposed an issue
with how bad values are being handled. Throwing the error can cause
issues when promises are being used. Rejecting resolves this.
I added a test case to validate the change.
This removes defaults from superstruct and instead uses
mergeOptions to deeply set the defaults on configuration.
This ensures that defaults are properly set.
This is a step toward removing superstruct altogether, #406,
but it is still being used for basic type validation.
* refactor: add js-libp2p-connection-manager to repo
Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Pedro Teixeira <i@pgte.me>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
* test(conn-mgr): only run in node
* refactor: add js-libp2p-identify to repo
Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <hugomrdias@gmail.com>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Co-authored-by: Richard Littauer <richard.littauer@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
Co-authored-by: Yusef Napora <yusef@protocol.ai>
Co-authored-by: ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>
* refactor: add libp2p-pnet to repo
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
* refactor: add libp2p-ping to repo
Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Francisco Baio Dias <xicombd@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <mail@hugodias.me>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: João Antunes <j.goncalo.antunes@gmail.com>
Co-authored-by: Richard Littauer <richard.littauer@gmail.com>
Co-authored-by: Vasco Santos <vasco.santos@moxy.studio>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
Co-authored-by: ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>
* refactor: add libp2p-circuit to repo
Co-authored-by: David Dias <daviddias.p@gmail.com>
Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
Co-authored-by: Friedel Ziegelmayer <dignifiedquire@gmail.com>
Co-authored-by: Hugo Dias <mail@hugodias.me>
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
Co-authored-by: Maciej Krüger <mkg20001@gmail.com>
Co-authored-by: Oli Evans <oli@tableflip.io>
Co-authored-by: Pedro Teixeira <i@pgte.me>
Co-authored-by: Vasco Santos <vasco.santos@ua.pt>
Co-authored-by: Victor Bjelkholm <victorbjelkholm@gmail.com>
Co-authored-by: Yusef Napora <yusef@napora.org>
Co-authored-by: dirkmc <dirk@mccormick.cx>
* test(switch): avoid using instanceof
* chore(switch): update bignumber dep
* refactor(circuit): clean up tests
* refactor(switch): consolidate get peer utils
* test(identify): do deep checks of addresses
* test(identify): bump timeout for identify test
* test(switch): tidy up limit dialer test
* refactor(switch): remove redundant circuit tests
* chore: add coverage script
* refactor(circuit): consolidate get peer info
* docs: reference original repositories in each sub readme
* docs: fix comment
* refactor: clean up sub package.json files and readmes
* 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