From 644f9b97ddb423c407f35c2bbca20d498323690b Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Tue, 13 Sep 2016 16:31:13 +0200 Subject: [PATCH 01/11] refactor: PeerId.create is now async BREAKING CHANGE New method PeerInfo.create(cb) replaces the previous new PeerInfo() to create a fresh id --- src/index.js | 16 +++++++++--- test/peer-info.spec.js | 59 +++++++++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 27 deletions(-) diff --git a/src/index.js b/src/index.js index 3a5c10d..64b70b9 100644 --- a/src/index.js +++ b/src/index.js @@ -20,11 +20,11 @@ function Peer (peerId) { } if (!peerId) { - this.id = Id.create() - } else { - this.id = peerId + throw new Error('Missing peerId. Use Peer.create(cb) to create one') } + this.id = peerId + this.multiaddrs = [] const observedMultiaddrs = [] @@ -91,3 +91,13 @@ function Peer (peerId) { // TODO: add features to fetch multiaddr using filters // look at https://github.com/whyrusleeping/js-mafmt/blob/master/src/index.js } + +Peer.create = (cb) => { + Id.create((err, key) => { + if (err) { + return cb(err) + } + + cb(null, new Peer(key)) + }) +} diff --git a/test/peer-info.spec.js b/test/peer-info.spec.js index 26aecf0..03ad56b 100644 --- a/test/peer-info.spec.js +++ b/test/peer-info.spec.js @@ -6,31 +6,49 @@ const PeerId = require('peer-id') const Multiaddr = require('multiaddr') const PeerInfo = require('../src') -describe('peer-info', function () { - this.timeout(20000) +describe('peer-info', () => { + let pi + beforeEach((done) => { + PeerInfo.create((err, _pi) => { + if (err) { + return done(err) + } + pi = _pi + done() + }) + }) - it('create with Id', () => { - const id = PeerId.create() - const pi = new PeerInfo(id) - expect(pi).to.exist - expect(pi.id).to.exist - expect(pi.id).to.deep.equal(id) + it('create with Id', (done) => { + PeerId.create((err, id) => { + expect(err).to.not.exist + const pi = new PeerInfo(id) + const pi2 = PeerInfo(id) + expect(pi).to.exist + expect(pi.id).to.exist + expect(pi.id).to.deep.equal(id) + expect(pi2).to.exist + expect(pi2.id).to.exist + expect(pi2.id).to.deep.equal(id) + done() + }) }) - it('create without passing an Id', () => { - const pi = new PeerInfo() - expect(pi).to.exist - expect(pi.id).to.exist + it('throws when not passing an Id', () => { + expect( + () => new PeerInfo() + ).to.throw() }) - it('create without "new"', () => { - const pi = PeerInfo() - expect(pi).to.exist - expect(pi.id).to.exist + it('PeerInfo.create', (done) => { + PeerInfo.create((err, pi) => { + expect(err).to.not.exist + expect(pi).to.exist + expect(pi.id).to.exist + done() + }) }) it('add multiaddr', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) @@ -38,7 +56,6 @@ describe('peer-info', function () { }) it('add multiaddr that are buffers', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh.buffer) @@ -46,7 +63,6 @@ describe('peer-info', function () { }) it('add repeated multiaddr', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) @@ -56,7 +72,6 @@ describe('peer-info', function () { }) it('rm multiaddr', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) @@ -66,7 +81,6 @@ describe('peer-info', function () { }) it('addSafe - avoid multiaddr explosion', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/9002') @@ -81,7 +95,6 @@ describe('peer-info', function () { }) it('addSafe - multiaddr that are buffers', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.addSafe(mh.buffer) @@ -90,7 +103,6 @@ describe('peer-info', function () { }) it('replace multiaddr', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh1 = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/5002') @@ -115,7 +127,6 @@ describe('peer-info', function () { }) it('replace multiaddr (no arrays)', () => { - const pi = new PeerInfo() expect(pi).to.exist const mh1 = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/5002') From 19c0a0548144ea38db20f72523220aa2363bc308 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Mon, 26 Sep 2016 14:51:03 +0200 Subject: [PATCH 02/11] test(browser): disable phantomjs --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index bf86189..3997668 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,12 @@ "scripts": { "lint": "aegir-lint", "build": "aegir-build", - "test": "aegir-test", - "test:node": "aegir-test node", - "test:browser": "aegir-test browser", - "release": "aegir-release", - "release-minor": "aegir-release --type minor", - "release-major": "aegir-release --type major", + "test": "PHANTOM=off aegir-test", + "test:node": "aegir-test --env node", + "test:browser": "PHANTOM=off aegir-test --env browser", + "release": "PHANTOM=off aegir-release", + "release-minor": "PHANTOM=off aegir-release --type minor", + "release-major": "PHANTOM=off aegir-release --type major", "coverage": "aegir-coverage", "coverage-publish": "aegir-coverage publish" }, @@ -37,7 +37,7 @@ "test" ], "devDependencies": { - "aegir": "^8.0.0", + "aegir": "^8.1.1", "buffer-loader": "0.0.1", "chai": "^3.5.0", "pre-commit": "^1.1.3" @@ -55,4 +55,4 @@ "dignifiedquire ", "greenkeeperio-bot " ] -} \ No newline at end of file +} From 58bf208793380bbae43692521c2a3b265df2f286 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Mon, 26 Sep 2016 18:43:20 +0200 Subject: [PATCH 03/11] remove unused .aegir --- .aegir.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .aegir.js diff --git a/.aegir.js b/.aegir.js deleted file mode 100644 index e3151ab..0000000 --- a/.aegir.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -const path = require('path') - -module.exports = { - webpack: { - resolve: { - alias: { - 'node-forge': path.resolve( - path.dirname(require.resolve('libp2p-crypto')), - '../vendor/forge.bundle.js' - ) - } - } - } -} From 2061b34d7b74f9b2efecf9ba9f5a108a9d562a7b Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Mon, 3 Oct 2016 19:16:11 +0200 Subject: [PATCH 04/11] test: drop superfluous existence check --- test/peer-info.spec.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/peer-info.spec.js b/test/peer-info.spec.js index 03ad56b..9fa0038 100644 --- a/test/peer-info.spec.js +++ b/test/peer-info.spec.js @@ -8,6 +8,7 @@ const PeerInfo = require('../src') describe('peer-info', () => { let pi + beforeEach((done) => { PeerInfo.create((err, _pi) => { if (err) { @@ -23,7 +24,6 @@ describe('peer-info', () => { expect(err).to.not.exist const pi = new PeerInfo(id) const pi2 = PeerInfo(id) - expect(pi).to.exist expect(pi.id).to.exist expect(pi.id).to.deep.equal(id) expect(pi2).to.exist @@ -42,28 +42,24 @@ describe('peer-info', () => { it('PeerInfo.create', (done) => { PeerInfo.create((err, pi) => { expect(err).to.not.exist - expect(pi).to.exist expect(pi.id).to.exist done() }) }) it('add multiaddr', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) expect(pi.multiaddrs.length).to.equal(1) }) it('add multiaddr that are buffers', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh.buffer) expect(pi.multiaddrs[0] instanceof Multiaddr).to.equal(true) }) it('add repeated multiaddr', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) expect(pi.multiaddrs.length).to.equal(1) @@ -72,7 +68,6 @@ describe('peer-info', () => { }) it('rm multiaddr', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) expect(pi.multiaddrs.length).to.equal(1) @@ -81,7 +76,6 @@ describe('peer-info', () => { }) it('addSafe - avoid multiaddr explosion', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/9002') const mh3 = Multiaddr('/ip4/127.0.0.1/tcp/9009') @@ -95,7 +89,6 @@ describe('peer-info', () => { }) it('addSafe - multiaddr that are buffers', () => { - expect(pi).to.exist const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.addSafe(mh.buffer) pi.multiaddr.addSafe(mh.buffer) @@ -103,7 +96,6 @@ describe('peer-info', () => { }) it('replace multiaddr', () => { - expect(pi).to.exist const mh1 = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/5002') const mh3 = Multiaddr('/ip4/127.0.0.1/tcp/5003') @@ -127,7 +119,6 @@ describe('peer-info', () => { }) it('replace multiaddr (no arrays)', () => { - expect(pi).to.exist const mh1 = Multiaddr('/ip4/127.0.0.1/tcp/5001') const mh2 = Multiaddr('/ip4/127.0.0.1/tcp/5002') const mh3 = Multiaddr('/ip4/127.0.0.1/tcp/5003') From 365b1300bd820843e27778509d6526db329bd17b Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 6 Oct 2016 14:05:39 +0200 Subject: [PATCH 05/11] cr - round1 --- README.md | 116 ++++++++++++++-------- src/index.js | 30 ++++-- test/{peer-info.spec.js => index.spec.js} | 12 +++ 3 files changed, 107 insertions(+), 51 deletions(-) rename test/{peer-info.spec.js => index.spec.js} (92%) diff --git a/README.md b/README.md index 9b0ba3b..51fb011 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -peer-info JavaScript implementation -=================================== +# js-peer-info [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Build Status](https://travis-ci.org/diasdavid/js-peer-info.svg?style=flat-square)](https://travis-ci.org/diasdavid/js-peer-info) -[![Coverage Status](https://coveralls.io/repos/github/diasdavid/js-peer-info/badge.svg?branch=master)](https://coveralls.io/github/diasdavid/js-peer-info?branch=master) -[![Dependency Status](https://david-dm.org/diasdavid/js-peer-info.svg?style=flat-square)](https://david-dm.org/diasdavid/js-peer-info) +[![Build Status](https://travis-ci.org/multiformats/js-peer-info.svg?style=flat-square)](https://travis-ci.org/multiformats/js-peer-info) +[![Coverage Status](https://coveralls.io/repos/github/multiformats/js-peer-info/badge.svg?branch=master)](https://coveralls.io/github/multiformats/js-peer-info?branch=master) +[![Dependency Status](https://david-dm.org/multiformats/js-peer-info.svg?style=flat-square)](https://david-dm.org/multiformats/js-peer-info) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) > A PeerInfo object contains information about a > [PeerID](https://github.com/libp2p/js-peer-id) and its @@ -14,7 +14,47 @@ peer-info JavaScript implementation > [IPFS](https://github.com/ipfs/ipfs) and > [libp2p](https://github.com/libp2p/js-libp2p). -# Example +- [Installation](#installation) + - [npm](#npm) + - [Node.JS, Browserify, Webpack](#nodejs-browserify-webpack) + - [Browser: ` + + +``` + +## Usage ```js const PeerInfo = require('peer-info') @@ -32,31 +72,41 @@ peer.multiaddr.add(multiaddr('/ip4/1.2.3.4/udp/8001')) peer.multiaddr.add(multiaddr('/sonic/bfsk/697/1209')) ``` -# API +## API ```js const PeerInfo = require('peer-info') ``` -## const peer = new PeerInfo() +### `PeerInfo.create([id, ] callback)` + +- `id: PeerID`, optional +- `callback: Function` + +Creates a new PeerInfo instance and if no `id` is passed it +generates a new underlying [PeerID](https://github.com/libp2p/js-peer-id) +for it. -Creates a new PeerInfo instance and also generates a new underlying -[PeerID](https://github.com/libp2p/js-peer-id) for it. +### `new PeerInfo(id)` -## const peer = new PeerInfo(peerId) +- `id: PeerID` Creates a new PeerInfo instance from an existing PeerID. -## peer.multiaddrs +### `multiaddrs` A list of multiaddresses instances that `peer` can be reached at. -## peer.multiaddr.add(addr) +### `multiaddr.add(addr)` + +- `addr: Multiaddr` Adds a new multiaddress that `peer` can be reached at. `addr` is an instance of a [multiaddr](https://github.com/libp2p/js-multiaddr). -## peer.multiaddr.addSafe(addr) +### `multiaddr.addSafe(addr)` + +- `addr: Multiaddr` The `addSafe` call, in comparison to `add`, will only add the multiaddr to `multiaddrs` if the same multiaddr tries to be added twice. @@ -67,40 +117,26 @@ peers which will not provide a useful multiaddr to be shared to the rest of the network (e.g. a multiaddr referring to a peer inside a LAN being shared to the outside world). -## peer.multiaddr.rm(addr) +### `multiaddr.rm(addr)` + +- `addr: Multiaddr` Removes a multiaddress instance `addr` from `peer`. -## peer.multiaddr.replace(existing, fresh) +### `multiaddr.replace(existing, fresh)` + +- `existing: Multiaddr` +- `fresh: Multiaddr` Removes the array of multiaddresses `existing` from `peer`, and adds the array of multiaddresses `fresh`. +## Contribute -# Installation - -## npm - -```sh -> npm i peer-info -``` - -## Node.JS, Browserify, Webpack - -```JavaScript -var PeerInfo = require('peer-info') -``` - -## Browser: ` - - -``` +Small note: If editing the Readme, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. -# License +## License -MIT +[MIT © David Dias](LICENSE) diff --git a/src/index.js b/src/index.js index 64b70b9..5888834 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,7 @@ const Id = require('peer-id') const multiaddr = require('multiaddr') -exports = module.exports = Peer +exports = module.exports = PeerInfo function ensureMultiaddr (addr) { if (multiaddr.isMultiaddr(addr)) { @@ -14,9 +14,9 @@ function ensureMultiaddr (addr) { } // Peer represents a peer on the IPFS network -function Peer (peerId) { - if (!(this instanceof Peer)) { - return new Peer(peerId) +function PeerInfo (peerId) { + if (!(this instanceof PeerInfo)) { + return new PeerInfo(peerId) } if (!peerId) { @@ -92,12 +92,20 @@ function Peer (peerId) { // look at https://github.com/whyrusleeping/js-mafmt/blob/master/src/index.js } -Peer.create = (cb) => { - Id.create((err, key) => { - if (err) { - return cb(err) - } +PeerInfo.create = (id, callback) => { + if (typeof id === 'function') { + callback = id + id = null + + Id.create((err, id) => { + if (err) { + return callback(err) + } + + callback(null, new PeerInfo(id)) + }) + return + } - cb(null, new Peer(key)) - }) + callback(null, new PeerInfo(id)) } diff --git a/test/peer-info.spec.js b/test/index.spec.js similarity index 92% rename from test/peer-info.spec.js rename to test/index.spec.js index 9fa0038..85e7f60 100644 --- a/test/peer-info.spec.js +++ b/test/index.spec.js @@ -47,6 +47,18 @@ describe('peer-info', () => { }) }) + it('PeerInfo.create with existing id', (done) => { + PeerId.create((err, id) => { + expect(err).to.not.exist + PeerInfo.create(id, (err, pi) => { + expect(err).to.not.exist + expect(pi.id).to.exist + expect(pi.id).to.deep.equal(id) + done() + }) + }) + }) + it('add multiaddr', () => { const mh = Multiaddr('/ip4/127.0.0.1/tcp/5001') pi.multiaddr.add(mh) From c7c61c388ce9dbe77237611e7ae8a670996c2ed5 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 6 Oct 2016 14:08:59 +0200 Subject: [PATCH 06/11] readme fixes --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 51fb011..7ea21d5 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) -[![Build Status](https://travis-ci.org/multiformats/js-peer-info.svg?style=flat-square)](https://travis-ci.org/multiformats/js-peer-info) -[![Coverage Status](https://coveralls.io/repos/github/multiformats/js-peer-info/badge.svg?branch=master)](https://coveralls.io/github/multiformats/js-peer-info?branch=master) -[![Dependency Status](https://david-dm.org/multiformats/js-peer-info.svg?style=flat-square)](https://david-dm.org/multiformats/js-peer-info) +[![Build Status](https://travis-ci.org/libp2p/js-peer-info.svg?style=flat-square)](https://travis-ci.org/libp2p/js-peer-info) +[![Coverage Status](https://coveralls.io/repos/github/libp2p/js-peer-info/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-peer-info?branch=master) +[![Dependency Status](https://david-dm.org/libp2p/js-peer-info.svg?style=flat-square)](https://david-dm.org/libp2p/js-peer-info) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) @@ -14,6 +14,8 @@ > [IPFS](https://github.com/ipfs/ipfs) and > [libp2p](https://github.com/libp2p/js-libp2p). +## Table of Contents + - [Installation](#installation) - [npm](#npm) - [Node.JS, Browserify, Webpack](#nodejs-browserify-webpack) From c3d6a18d6df4930ffdab490aef425cfc0549fc78 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 27 Oct 2016 13:49:47 +0200 Subject: [PATCH 07/11] ready for nex aegir --- .gitignore | 1 - .travis.yml | 3 ++- README.md | 5 +++++ package.json | 22 ++++++++++------------ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 5b1fd19..907c78a 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,3 @@ build/Release node_modules dist -lib \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index e1d6320..fc1482f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ sudo: false language: node_js node_js: - 4 - - 5 + - 6 + - stable # Make sure we have new NPM. before_install: diff --git a/README.md b/README.md index 7ea21d5..2117e7b 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,11 @@ [![Dependency Status](https://david-dm.org/libp2p/js-peer-info.svg?style=flat-square)](https://david-dm.org/libp2p/js-peer-info) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) +![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square) +![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square) + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/js-peer-info.svg)](https://saucelabs.com/u/js-peer +-info) > A PeerInfo object contains information about a > [PeerID](https://github.com/libp2p/js-peer-id) and its diff --git a/package.json b/package.json index 3997668..66fe41a 100644 --- a/package.json +++ b/package.json @@ -2,36 +2,35 @@ "name": "peer-info", "version": "0.7.1", "description": "IPFS Peer abstraction JavaScript implementation", - "main": "lib/index.js", - "jsnext:main": "src/index.js", + "main": "src/index.js", "scripts": { "lint": "aegir-lint", "build": "aegir-build", - "test": "PHANTOM=off aegir-test", + "test": "aegir-test", "test:node": "aegir-test --env node", - "test:browser": "PHANTOM=off aegir-test --env browser", - "release": "PHANTOM=off aegir-release", - "release-minor": "PHANTOM=off aegir-release --type minor", - "release-major": "PHANTOM=off aegir-release --type major", + "test:browser": "aegir-test --env browser", + "release": "aegir-release", + "release-minor": "aegir-release --type minor", + "release-major": "aegir-release --type major", "coverage": "aegir-coverage", "coverage-publish": "aegir-coverage publish" }, "repository": { "type": "git", - "url": "https://github.com/diasdavid/js-peer-info.git" + "url": "https://github.com/libp2p/js-peer-info.git" }, "keywords": [ "IPFS" ], "engines": { - "node": "^4.3.0" + "node": ">=4.0.0" }, "author": "David Dias ", "license": "MIT", "bugs": { - "url": "https://github.com/diasdavid/js-peer-info/issues" + "url": "https://github.com/libp2p/js-peer-info/issues" }, - "homepage": "https://github.com/diasdavid/js-peer-info", + "homepage": "https://github.com/libp2p/js-peer-info", "pre-commit": [ "lint", "test" @@ -43,7 +42,6 @@ "pre-commit": "^1.1.3" }, "dependencies": { - "babel-runtime": "^6.11.6", "multiaddr": "^2.0.3", "peer-id": "^0.7.0" }, From 2dee9a6ebb391d62ec658c712810c5822aab48fb Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Thu, 27 Oct 2016 14:58:50 +0200 Subject: [PATCH 08/11] update ageir --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66fe41a..0083115 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test" ], "devDependencies": { - "aegir": "^8.1.1", + "aegir": "^9.0.0", "buffer-loader": "0.0.1", "chai": "^3.5.0", "pre-commit": "^1.1.3" From 400f3ce426970626ec65c250191db2e0760d6f6c Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Mon, 31 Oct 2016 10:35:31 +0100 Subject: [PATCH 09/11] update travis --- .travis.yml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index fc1482f..dbe2542 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,16 @@ sudo: false language: node_js -node_js: - - 4 - - 6 - - stable + +matrix: + include: + - node_js: 4 + env: CXX=g++-4.8 + - node_js: 6 + env: CXX=g++-4.8 + - node_js: stable + env: + - SAUCE=true + - CXX=g++-4.8 # Make sure we have new NPM. before_install: @@ -23,3 +30,11 @@ before_script: after_success: - npm run coverage-publish + +addons: + firefox: latest + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 From cac6551ff23b95180c012b91dafd35c9e1aa2ea0 Mon Sep 17 00:00:00 2001 From: Friedel Ziegelmayer Date: Wed, 2 Nov 2016 11:15:31 +0100 Subject: [PATCH 10/11] ready --- .travis.yml | 8 ++++---- README.md | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index dbe2542..7d22efa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,11 +6,11 @@ matrix: - node_js: 4 env: CXX=g++-4.8 - node_js: 6 - env: CXX=g++-4.8 - - node_js: stable env: - - SAUCE=true - - CXX=g++-4.8 + - SAUCE=true + - CXX=g++-4.8 + - node_js: stable + env: CXX=g++-4.8 # Make sure we have new NPM. before_install: diff --git a/README.md b/README.md index 2117e7b..544d8f1 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ ![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square) ![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square) -[![Sauce Test Status](https://saucelabs.com/browser-matrix/js-peer-info.svg)](https://saucelabs.com/u/js-peer --info) +[![Sauce Test Status](https://saucelabs.com/browser-matrix/ipfs-js-peer-info.svg)](https://saucelabs.com/u/ipfs-js-peer-info) > A PeerInfo object contains information about a > [PeerID](https://github.com/libp2p/js-peer-id) and its From af534258239278747a972421b200c99a0e346d36 Mon Sep 17 00:00:00 2001 From: David Dias Date: Thu, 3 Nov 2016 07:53:45 +0000 Subject: [PATCH 11/11] chore: update dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0083115..139ce39 100644 --- a/package.json +++ b/package.json @@ -36,14 +36,14 @@ "test" ], "devDependencies": { - "aegir": "^9.0.0", + "aegir": "^9.0.1", "buffer-loader": "0.0.1", "chai": "^3.5.0", "pre-commit": "^1.1.3" }, "dependencies": { "multiaddr": "^2.0.3", - "peer-id": "^0.7.0" + "peer-id": "^0.8.0" }, "contributors": [ "David Dias ",