mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-08 13:21:34 +00:00
Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
37471135fa | |||
2a21c20ea3 | |||
9a2d4e3d72 | |||
7c2a19e3cc | |||
26d5e69c62 | |||
5042e09bb4 | |||
409e7a8e1f | |||
52938e9f39 | |||
32941a807a | |||
32d34d3b83 | |||
074b8af09d | |||
4117bd7552 | |||
db3f6dbb06 | |||
3808c365b1 | |||
19528ef15e | |||
bb0c9905ed | |||
141920cd14 | |||
2dc94cd907 | |||
7fc1cd0f7c | |||
26f3f9a319 | |||
e9ce4ac795 | |||
bca86873cc |
40
CHANGELOG.md
40
CHANGELOG.md
@ -1,3 +1,43 @@
|
|||||||
|
<a name="0.20.4"></a>
|
||||||
|
## [0.20.4](https://github.com/libp2p/js-libp2p/compare/v0.20.2...v0.20.4) (2018-04-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.20.3"></a>
|
||||||
|
## [0.20.3](https://github.com/libp2p/js-libp2p/compare/v0.20.2...v0.20.3) (2018-04-30)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.20.2"></a>
|
||||||
|
## [0.20.2](https://github.com/libp2p/js-libp2p/compare/v0.20.1...v0.20.2) (2018-04-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.20.1"></a>
|
||||||
|
## [0.20.1](https://github.com/libp2p/js-libp2p/compare/v0.20.0...v0.20.1) (2018-04-10)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.20.0"></a>
|
||||||
|
# [0.20.0](https://github.com/libp2p/js-libp2p/compare/v0.19.2...v0.20.0) (2018-04-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* use class-is for type checks ([bb0c990](https://github.com/libp2p/js-libp2p/commit/bb0c990))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.19.2"></a>
|
||||||
|
## [0.19.2](https://github.com/libp2p/js-libp2p/compare/v0.19.0...v0.19.2) (2018-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="0.19.1"></a>
|
||||||
|
## [0.19.1](https://github.com/libp2p/js-libp2p/compare/v0.19.0...v0.19.1) (2018-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="0.19.0"></a>
|
<a name="0.19.0"></a>
|
||||||
# [0.19.0](https://github.com/libp2p/js-libp2p/compare/v0.18.0...v0.19.0) (2018-03-15)
|
# [0.19.0](https://github.com/libp2p/js-libp2p/compare/v0.18.0...v0.19.0) (2018-03-15)
|
||||||
|
|
||||||
|
@ -22,4 +22,4 @@ Let us know if you find any issue or if you want to contribute and add a new tut
|
|||||||
- [Running libp2p in the Browser](./libp2p-in-the-browser)
|
- [Running libp2p in the Browser](./libp2p-in-the-browser)
|
||||||
- Running libp2p in the Electron (future)
|
- Running libp2p in the Electron (future)
|
||||||
- [The standard echo net example with libp2p](./echo)
|
- [The standard echo net example with libp2p](./echo)
|
||||||
- [A simple chat app with](./chat)
|
- [A simple chat app with libp2p](./chat)
|
||||||
|
@ -46,7 +46,7 @@ const bootstrapers = [
|
|||||||
|
|
||||||
Now, once we create and start the node, we can listen for events such as `peer:discovery` and `peer:connect`, these events tell us when we found a peer, independently of the discovery mechanism used and when we actually dialed to that peer.
|
Now, once we create and start the node, we can listen for events such as `peer:discovery` and `peer:connect`, these events tell us when we found a peer, independently of the discovery mechanism used and when we actually dialed to that peer.
|
||||||
|
|
||||||
```
|
```JavaScript
|
||||||
let node
|
let node
|
||||||
|
|
||||||
waterfall([
|
waterfall([
|
||||||
|
52
package.json
52
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "libp2p",
|
"name": "libp2p",
|
||||||
"version": "0.19.0",
|
"version": "0.20.4",
|
||||||
"description": "JavaScript base class for libp2p bundles",
|
"description": "JavaScript base class for libp2p bundles",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -38,49 +38,50 @@
|
|||||||
"homepage": "https://github.com/libp2p/js-libp2p",
|
"homepage": "https://github.com/libp2p/js-libp2p",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "^2.6.0",
|
"async": "^2.6.0",
|
||||||
"libp2p-floodsub": "^0.14.1",
|
"libp2p-floodsub": "^0.15.0",
|
||||||
"libp2p-ping": "~0.6.1",
|
"libp2p-ping": "~0.8.0",
|
||||||
"libp2p-switch": "~0.37.3",
|
"libp2p-switch": "~0.39.2",
|
||||||
"mafmt": "^4.0.0",
|
"mafmt": "^6.0.0",
|
||||||
"multiaddr": "^3.0.2",
|
"multiaddr": "^5.0.0",
|
||||||
"peer-book": "~0.5.4",
|
"peer-book": "~0.7.0",
|
||||||
"peer-id": "~0.10.6",
|
"peer-id": "~0.10.7",
|
||||||
"peer-info": "~0.11.6"
|
"libp2p-websockets": "^0.12.0",
|
||||||
|
"peer-info": "~0.14.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"aegir": "^13.0.6",
|
"aegir": "^13.1.0",
|
||||||
"chai": "^4.1.2",
|
"chai": "^4.1.2",
|
||||||
"cids": "~0.5.3",
|
"cids": "~0.5.3",
|
||||||
"dirty-chai": "^2.0.1",
|
"dirty-chai": "^2.0.1",
|
||||||
"electron-webrtc": "~0.3.0",
|
"electron-webrtc": "~0.3.0",
|
||||||
"libp2p-circuit": "~0.1.5",
|
"libp2p-circuit": "~0.2.0",
|
||||||
"libp2p-kad-dht": "~0.9.0",
|
"libp2p-kad-dht": "~0.10.0",
|
||||||
"libp2p-mdns": "~0.9.2",
|
"libp2p-mdns": "~0.11.0",
|
||||||
"libp2p-mplex": "~0.6.0",
|
"libp2p-mplex": "~0.7.0",
|
||||||
"libp2p-railing": "~0.7.1",
|
"libp2p-railing": "~0.8.1",
|
||||||
"libp2p-secio": "~0.9.3",
|
"libp2p-secio": "~0.10.0",
|
||||||
"libp2p-spdy": "~0.11.0",
|
"libp2p-spdy": "~0.12.1",
|
||||||
"libp2p-tcp": "~0.11.6",
|
"libp2p-tcp": "~0.12.0",
|
||||||
"libp2p-webrtc-star": "~0.13.4",
|
"libp2p-webrtc-star": "~0.14.0",
|
||||||
"libp2p-websockets": "~0.10.5",
|
"libp2p-websocket-star": "~0.8.0",
|
||||||
"libp2p-websocket-star": "~0.7.7",
|
|
||||||
"libp2p-websocket-star-rendezvous": "~0.2.3",
|
"libp2p-websocket-star-rendezvous": "~0.2.3",
|
||||||
"lodash.times": "^4.3.2",
|
"lodash.times": "^4.3.2",
|
||||||
"pre-commit": "^1.2.2",
|
"pre-commit": "^1.2.2",
|
||||||
"pull-goodbye": "0.0.2",
|
"pull-goodbye": "0.0.2",
|
||||||
"pull-serializer": "~0.3.2",
|
"pull-serializer": "~0.3.2",
|
||||||
"pull-stream": "^3.6.2",
|
"pull-stream": "^3.6.7",
|
||||||
"safe-buffer": "^5.1.1",
|
"sinon": "^5.0.1",
|
||||||
"sinon": "^4.4.6",
|
"wrtc": "0.1.4"
|
||||||
"wrtc": "0.0.67"
|
|
||||||
},
|
},
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Chris Bratlien <chrisbratlien@gmail.com>",
|
"Chris Bratlien <chrisbratlien@gmail.com>",
|
||||||
"Chris Dostert <chrisdostert@users.noreply.github.com>",
|
"Chris Dostert <chrisdostert@users.noreply.github.com>",
|
||||||
"Daijiro Wachi <daijiro.wachi@gmail.com>",
|
"Daijiro Wachi <daijiro.wachi@gmail.com>",
|
||||||
"David Dias <daviddias.p@gmail.com>",
|
"David Dias <daviddias.p@gmail.com>",
|
||||||
|
"Diogo Silva <fsdiogo@gmail.com>",
|
||||||
"Dmitriy Ryajov <dryajov@gmail.com>",
|
"Dmitriy Ryajov <dryajov@gmail.com>",
|
||||||
"Elven <mon.samuel@qq.com>",
|
"Elven <mon.samuel@qq.com>",
|
||||||
|
"Florian-Merle <florian.david.merle@gmail.com>",
|
||||||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
||||||
"Giovanni T. Parra <fiatjaf@gmail.com>",
|
"Giovanni T. Parra <fiatjaf@gmail.com>",
|
||||||
"Irakli Gozalishvili <rfobic@gmail.com>",
|
"Irakli Gozalishvili <rfobic@gmail.com>",
|
||||||
@ -94,6 +95,7 @@
|
|||||||
"RasmusErik Voel Jensen <github@solsort.com>",
|
"RasmusErik Voel Jensen <github@solsort.com>",
|
||||||
"Richard Littauer <richard.littauer@gmail.com>",
|
"Richard Littauer <richard.littauer@gmail.com>",
|
||||||
"Ryan Bell <ryan@piing.net>",
|
"Ryan Bell <ryan@piing.net>",
|
||||||
|
"Sönke Hahn <soenkehahn@gmail.com>",
|
||||||
"Tiago Alves <alvesjtiago@gmail.com>",
|
"Tiago Alves <alvesjtiago@gmail.com>",
|
||||||
"Zane Starr <zcstarr@gmail.com>",
|
"Zane Starr <zcstarr@gmail.com>",
|
||||||
"greenkeeperio-bot <support@greenkeeper.io>",
|
"greenkeeperio-bot <support@greenkeeper.io>",
|
||||||
|
@ -10,6 +10,7 @@ const series = require('async/series')
|
|||||||
const PeerBook = require('peer-book')
|
const PeerBook = require('peer-book')
|
||||||
const Switch = require('libp2p-switch')
|
const Switch = require('libp2p-switch')
|
||||||
const Ping = require('libp2p-ping')
|
const Ping = require('libp2p-ping')
|
||||||
|
const WebSockets = require('libp2p-websockets')
|
||||||
|
|
||||||
const peerRouting = require('./peer-routing')
|
const peerRouting = require('./peer-routing')
|
||||||
const contentRouting = require('./content-routing')
|
const contentRouting = require('./content-routing')
|
||||||
@ -129,8 +130,7 @@ class Node extends EventEmitter {
|
|||||||
if (transport.filter(multiaddrs).length > 0) {
|
if (transport.filter(multiaddrs).length > 0) {
|
||||||
this.switch.transport.add(
|
this.switch.transport.add(
|
||||||
transport.tag || transport.constructor.name, transport)
|
transport.tag || transport.constructor.name, transport)
|
||||||
} else if (transport.constructor &&
|
} else if (WebSockets.isWebSockets(transport)) {
|
||||||
transport.constructor.name === 'WebSockets') {
|
|
||||||
// TODO find a cleaner way to signal that a transport is always
|
// TODO find a cleaner way to signal that a transport is always
|
||||||
// used for dialing, even if no listener
|
// used for dialing, even if no listener
|
||||||
ws = transport
|
ws = transport
|
||||||
|
Reference in New Issue
Block a user