Compare commits

...

8 Commits

Author SHA1 Message Date
David Dias
4c81f39ebe chore: release version v0.15.1 2018-01-16 06:16:15 -08:00
David Dias
76922383ab chore: update contributors 2018-01-16 06:16:15 -08:00
David Dias
3fc57ff397 chore: bump timeout on after 2018-01-16 06:13:42 -08:00
David Dias
13b36dcaa6 chore: update deps 2018-01-16 06:03:04 -08:00
Irakli Gozalishvili
61bebd10fc fix: typo in DHT setup (#151)
I think there was a typo that would have ignored passed options and fallback to defaults for DHT datastore.
2018-01-16 05:58:12 -08:00
Maciej Krüger
97cde1ccb4 test: Various pdd fixes (#150)
* fix(pdd): url for interop pkg was pointing to non-existing branch

* fix(pdd): case-sensitive names

peer-B.json does not _actually_ exist

* fix(pdd): story 2 peer b
2018-01-10 14:53:24 +00:00
Giovanni T. Parra
07b0cdc30e docs: note the Connection type on .handle and .dial docs (#149) 2018-01-07 18:47:02 +00:00
Kevin Kwok
73b6d60e32 docs: update to new URL format on the browser example 2018-01-07 17:17:22 +00:00
10 changed files with 29 additions and 14 deletions

View File

@@ -1,3 +1,13 @@
<a name="0.15.1"></a>
## [0.15.1](https://github.com/libp2p/js-libp2p/compare/v0.15.0...v0.15.1) (2018-01-16)
### Bug Fixes
* typo in DHT setup ([#151](https://github.com/libp2p/js-libp2p/issues/151)) ([61bebd1](https://github.com/libp2p/js-libp2p/commit/61bebd1))
<a name="0.15.0"></a>
# [0.15.0](https://github.com/libp2p/js-libp2p/compare/v0.14.3...v0.15.0) (2018-01-07)

View File

@@ -164,6 +164,7 @@ class Node extends libp2p {
- `peer`: can be an instance of [PeerInfo][], [PeerId][] or [multiaddr][]
- `protocol`: String that defines the protocol (e.g '/ipfs/bitswap/1.1.0')
- `callback`: Function with signature `function (err, conn) {}` where `conn` is a [Connection](https://github.com/libp2p/interface-connection) object
`callback` is a function with the following `function (err, conn) {}` signature, where `err` is an Error in of failure to dial the connection and `conn` is a [Connection][] instance in case of a protocol selected, if not it is undefined.
@@ -196,7 +197,7 @@ class Node extends libp2p {
> Handle new protocol
- `protocol`: String that defines the protocol (e.g '/ipfs/bitswap/1.1.0')
- `handlerFunc`: Function with signature `function (protocol, conn) {}`
- `handlerFunc`: Function with signature `function (protocol, conn) {}` where `conn` is a [Connection](https://github.com/libp2p/interface-connection) object
- `matchFunc`: Function for matching on protocol (exact matching, semver, etc). Default to exact match.
#### `libp2p.unhandle(protocol)`

View File

@@ -1,6 +1,6 @@
{
"name": "libp2p",
"version": "0.15.0",
"version": "0.15.1",
"description": "JavaScript base class for libp2p bundles",
"main": "src/index.js",
"scripts": {
@@ -59,7 +59,7 @@
"libp2p-railing": "~0.7.1",
"libp2p-secio": "~0.9.0",
"libp2p-spdy": "~0.11.0",
"libp2p-tcp": "~0.11.1",
"libp2p-tcp": "~0.11.2",
"libp2p-webrtc-star": "~0.13.3",
"libp2p-websockets": "~0.10.4",
"libp2p-websocket-star": "~0.7.2",
@@ -70,7 +70,7 @@
"pull-serializer": "~0.3.2",
"pull-stream": "^3.6.1",
"safe-buffer": "^5.1.1",
"sinon": "^4.1.3",
"sinon": "^4.1.5",
"wrtc": "0.0.65"
},
"contributors": [
@@ -81,8 +81,10 @@
"Elven <mon.samuel@qq.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Giovanni T. Parra <fiatjaf@gmail.com>",
"Irakli Gozalishvili <rfobic@gmail.com>",
"Joel Gustafson <joelg@mit.edu>",
"John Rees <johnrees@users.noreply.github.com>",
"Kevin Kwok <antimatter15@gmail.com>",
"Lars Gierth <lgierth@users.noreply.github.com>",
"Maciej Krüger <mkg20001@gmail.com>",
"Nuno Nogueira <nunofmn@gmail.com>",

View File

@@ -14,7 +14,7 @@
"license": "MIT",
"dependencies": {
"libp2p": "file:./..",
"libp2p-interop": "github:libp2p/interop#pdd",
"libp2p-interop": "github:libp2p/interop#master",
"tape": "^4.8.0"
}
}

View File

@@ -7,7 +7,7 @@ const PeerInfo = require('peer-info')
const waterfall = require('async/waterfall')
const pull = require('pull-stream')
const PeerA = require('libp2p-interop/peer-a.json')
const PeerB = require('libp2p-interop/peer-B.json')
const PeerB = require('libp2p-interop/peer-b.json')
class MyBundle extends libp2p {
constructor (peerInfo) {

View File

@@ -6,7 +6,7 @@ const TCP = require('libp2p-tcp')
const PeerInfo = require('peer-info')
const waterfall = require('async/waterfall')
const pull = require('pull-stream')
const PeerB = require('libp2p-interop/peer-B.json')
const PeerB = require('libp2p-interop/peer-b.json')
class MyBundle extends libp2p {
constructor (peerInfo) {

View File

@@ -7,7 +7,7 @@ const PeerInfo = require('peer-info')
const waterfall = require('async/waterfall')
const pull = require('pull-stream')
const PeerA = require('libp2p-interop/peer-a.json')
const PeerB = require('libp2p-interop/peer-B.json')
const PeerB = require('libp2p-interop/peer-b.json')
class MyBundle extends libp2p {
constructor (peerInfo) {

View File

@@ -6,7 +6,7 @@ const WebSockets = require('libp2p-websockets')
const PeerInfo = require('peer-info')
const waterfall = require('async/waterfall')
const pull = require('pull-stream')
const PeerB = require('libp2p-interop/peer-B.json')
const PeerB = require('libp2p-interop/peer-b.json')
class MyBundle extends libp2p {
constructor (peerInfo) {
@@ -35,14 +35,14 @@ test('story 2 - peerB', (t) => {
node.handle('/echo/1.0.0', (protocol, conn) => {
pull(
conn,
conn,
pull.onEnd((err) => {
pull.through(v => v, err => {
t.ifErr(err)
t.pass('Received End of Connection')
node.stop((err) => {
t.ifErr(err, 'PeerB has stopped')
})
})
}),
conn
)
})
})

View File

@@ -83,7 +83,7 @@ class Node extends EventEmitter {
if (_modules.DHT) {
this._dht = new this.modules.DHT(this.swarm, {
kBucketSize: 20,
datastoer: _options.DHT && _options.DHT.datastore
datastore: _options.DHT && _options.DHT.datastore
})
}

View File

@@ -465,7 +465,9 @@ describe('transports', () => {
], done)
})
after((done) => {
after(function (done) {
this.timeout(10 * 1000)
parallel([
(cb) => nodeAll.stop(cb),
(cb) => nodeTCP.stop(cb),