Compare commits

...

22 Commits

Author SHA1 Message Date
37471135fa chore: release version v0.20.4 2018-04-30 22:41:32 +01:00
2a21c20ea3 chore: update contributors 2018-04-30 22:41:32 +01:00
9a2d4e3d72 chore: release version v0.20.3 2018-04-30 22:41:08 +01:00
7c2a19e3cc chore: update deps 2018-04-30 22:41:08 +01:00
26d5e69c62 chore: update deps 2018-04-30 22:41:08 +01:00
5042e09bb4 docs: typo in examples readme.md 2018-04-30 15:29:12 +01:00
409e7a8e1f chore: release version v0.20.2 2018-04-10 14:04:44 +09:00
52938e9f39 chore: update contributors 2018-04-10 14:04:44 +09:00
32941a807a chore: fix deps 2018-04-10 14:03:29 +09:00
32d34d3b83 chore: release version v0.20.1 2018-04-10 12:15:57 +09:00
074b8af09d chore: update contributors 2018-04-10 12:15:57 +09:00
4117bd7552 chore: add needed dep (websockets) 2018-04-10 12:13:11 +09:00
db3f6dbb06 chore: release version v0.20.0 2018-04-06 17:03:47 +01:00
3808c365b1 chore: update contributors 2018-04-06 17:03:47 +01:00
19528ef15e chore: update deps 2018-04-06 17:02:51 +01:00
bb0c9905ed feat: use class-is for type checks 2018-04-05 19:47:02 +01:00
141920cd14 chore: update deps 2018-04-05 19:47:02 +01:00
2dc94cd907 chore: release version v0.19.2 2018-03-28 15:34:00 -07:00
7fc1cd0f7c chore: update contributors 2018-03-28 15:33:59 -07:00
26f3f9a319 chore: release version v0.19.1 2018-03-28 15:32:20 -07:00
e9ce4ac795 chore: update deps 2018-03-28 15:32:20 -07:00
bca86873cc docs: enable missing syntax highlighting (#178)
Enable missing syntax highlighting for example code in `discovery-mechanisms/README.md`.
2018-03-20 21:43:56 -07:00
5 changed files with 71 additions and 29 deletions

View File

@ -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>
# [0.19.0](https://github.com/libp2p/js-libp2p/compare/v0.18.0...v0.19.0) (2018-03-15)

View File

@ -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 Electron (future)
- [The standard echo net example with libp2p](./echo)
- [A simple chat app with](./chat)
- [A simple chat app with libp2p](./chat)

View File

@ -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.
```
```JavaScript
let node
waterfall([

View File

@ -1,6 +1,6 @@
{
"name": "libp2p",
"version": "0.19.0",
"version": "0.20.4",
"description": "JavaScript base class for libp2p bundles",
"main": "src/index.js",
"scripts": {
@ -38,49 +38,50 @@
"homepage": "https://github.com/libp2p/js-libp2p",
"dependencies": {
"async": "^2.6.0",
"libp2p-floodsub": "^0.14.1",
"libp2p-ping": "~0.6.1",
"libp2p-switch": "~0.37.3",
"mafmt": "^4.0.0",
"multiaddr": "^3.0.2",
"peer-book": "~0.5.4",
"peer-id": "~0.10.6",
"peer-info": "~0.11.6"
"libp2p-floodsub": "^0.15.0",
"libp2p-ping": "~0.8.0",
"libp2p-switch": "~0.39.2",
"mafmt": "^6.0.0",
"multiaddr": "^5.0.0",
"peer-book": "~0.7.0",
"peer-id": "~0.10.7",
"libp2p-websockets": "^0.12.0",
"peer-info": "~0.14.1"
},
"devDependencies": {
"aegir": "^13.0.6",
"aegir": "^13.1.0",
"chai": "^4.1.2",
"cids": "~0.5.3",
"dirty-chai": "^2.0.1",
"electron-webrtc": "~0.3.0",
"libp2p-circuit": "~0.1.5",
"libp2p-kad-dht": "~0.9.0",
"libp2p-mdns": "~0.9.2",
"libp2p-mplex": "~0.6.0",
"libp2p-railing": "~0.7.1",
"libp2p-secio": "~0.9.3",
"libp2p-spdy": "~0.11.0",
"libp2p-tcp": "~0.11.6",
"libp2p-webrtc-star": "~0.13.4",
"libp2p-websockets": "~0.10.5",
"libp2p-websocket-star": "~0.7.7",
"libp2p-circuit": "~0.2.0",
"libp2p-kad-dht": "~0.10.0",
"libp2p-mdns": "~0.11.0",
"libp2p-mplex": "~0.7.0",
"libp2p-railing": "~0.8.1",
"libp2p-secio": "~0.10.0",
"libp2p-spdy": "~0.12.1",
"libp2p-tcp": "~0.12.0",
"libp2p-webrtc-star": "~0.14.0",
"libp2p-websocket-star": "~0.8.0",
"libp2p-websocket-star-rendezvous": "~0.2.3",
"lodash.times": "^4.3.2",
"pre-commit": "^1.2.2",
"pull-goodbye": "0.0.2",
"pull-serializer": "~0.3.2",
"pull-stream": "^3.6.2",
"safe-buffer": "^5.1.1",
"sinon": "^4.4.6",
"wrtc": "0.0.67"
"pull-stream": "^3.6.7",
"sinon": "^5.0.1",
"wrtc": "0.1.4"
},
"contributors": [
"Chris Bratlien <chrisbratlien@gmail.com>",
"Chris Dostert <chrisdostert@users.noreply.github.com>",
"Daijiro Wachi <daijiro.wachi@gmail.com>",
"David Dias <daviddias.p@gmail.com>",
"Diogo Silva <fsdiogo@gmail.com>",
"Dmitriy Ryajov <dryajov@gmail.com>",
"Elven <mon.samuel@qq.com>",
"Florian-Merle <florian.david.merle@gmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Giovanni T. Parra <fiatjaf@gmail.com>",
"Irakli Gozalishvili <rfobic@gmail.com>",
@ -94,6 +95,7 @@
"RasmusErik Voel Jensen <github@solsort.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Ryan Bell <ryan@piing.net>",
"Sönke Hahn <soenkehahn@gmail.com>",
"Tiago Alves <alvesjtiago@gmail.com>",
"Zane Starr <zcstarr@gmail.com>",
"greenkeeperio-bot <support@greenkeeper.io>",

View File

@ -10,6 +10,7 @@ const series = require('async/series')
const PeerBook = require('peer-book')
const Switch = require('libp2p-switch')
const Ping = require('libp2p-ping')
const WebSockets = require('libp2p-websockets')
const peerRouting = require('./peer-routing')
const contentRouting = require('./content-routing')
@ -129,8 +130,7 @@ class Node extends EventEmitter {
if (transport.filter(multiaddrs).length > 0) {
this.switch.transport.add(
transport.tag || transport.constructor.name, transport)
} else if (transport.constructor &&
transport.constructor.name === 'WebSockets') {
} else if (WebSockets.isWebSockets(transport)) {
// TODO find a cleaner way to signal that a transport is always
// used for dialing, even if no listener
ws = transport