From 36ed2a1ecfefd17b85d6f9383364e6304890f6fa Mon Sep 17 00:00:00 2001 From: David Dias Date: Sun, 3 Sep 2017 13:04:24 +0100 Subject: [PATCH] feat: p2p addrs situation (#61) * chore: update gitignore * chore: update CI * chore: update deps --- .gitignore | 16 ++++++++++++++-- .travis.yml | 19 ++++++++----------- README.md | 7 ++++--- circle.yml | 8 +++++--- package.json | 12 ++++++------ 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 5cd7358..e4c5b0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,14 @@ +**/node_modules/ +**/*.log +test/repo-tests* +**/bundle.js + # Logs logs *.log +coverage + # Runtime data pids *.pid @@ -19,8 +26,7 @@ coverage # node-waf configuration .lock-wscript -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release +build # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git @@ -28,3 +34,9 @@ node_modules lib dist +test/test-data/go-ipfs-repo/LOCK +test/test-data/go-ipfs-repo/LOG +test/test-data/go-ipfs-repo/LOG.old + +# while testing npm5 +package-lock.json diff --git a/.travis.yml b/.travis.yml index 9761465..584f308 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,20 @@ sudo: false language: node_js + matrix: include: - - node_js: 4 - env: CXX=g++-4.8 - node_js: 6 - env: - - SAUCE=true - - CXX=g++-4.8 - - node_js: stable env: CXX=g++-4.8 - -# Make sure we have new NPM. -before_install: - - npm install -g npm + - node_js: 8 + env: CXX=g++-4.8 + # - node_js: stable + # env: CXX=g++-4.8 script: - npm run lint - - npm test + - npm run test - npm run coverage + - make test before_script: - export DISPLAY=:99.0 @@ -28,6 +24,7 @@ after_success: - npm run coverage-publish addons: + firefox: 'latest' apt: sources: - ubuntu-toolchain-r-test diff --git a/README.md b/README.md index ccc5a43..025fc3e 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,17 @@ libp2p-mdns JavaScript implementation [![Coverage Status](https://coveralls.io/repos/github/libp2p/js-libp2p-mdns/badge.svg?branch=master)](https://coveralls.io/github/libp2p/js-libp2p-mdns?branch=master) [![Travis CI](https://travis-ci.org/libp2p/js-libp2p-mdns.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-mdns) [![Circle CI](https://circleci.com/gh/libp2p/js-libp2p-mdns.svg?style=svg)](https://circleci.com/gh/libp2p/js-libp2p-mdns) -[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mdns) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) +[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-mdns.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-mdns) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) > JavaScript libp2p MulticastDNS discovery implementation # Usage ```JavaScript -var MDNS = require('libp2p-mdns') +const MDNS = require('libp2p-mdns') -var mdns = new MDNS(peerInfo, options) +const mdns = new MDNS(peerInfo, options) mdns.on('peer', (peerInfo) => { console.log('Found a peer in the local network', peerInfo.id.toB58String()) diff --git a/circle.yml b/circle.yml index 434211a..56f7efb 100644 --- a/circle.yml +++ b/circle.yml @@ -5,8 +5,10 @@ machine: dependencies: pre: - google-chrome --version - - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - - - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' + - curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + - sudo dpkg -i google-chrome.deb || true - sudo apt-get update - - sudo apt-get --only-upgrade install google-chrome-stable + - sudo apt-get install -f + - sudo apt-get install --only-upgrade lsb-base + - sudo dpkg -i google-chrome.deb - google-chrome --version diff --git a/package.json b/package.json index 16d0d06..0887eac 100644 --- a/package.json +++ b/package.json @@ -32,16 +32,16 @@ "devDependencies": { "aegir": "^11.0.2", "async": "^2.5.0", - "chai": "^4.1.0", + "chai": "^4.1.2", "dirty-chai": "^2.0.1", "pre-commit": "^1.2.2" }, "dependencies": { - "libp2p-tcp": "~0.10.1", - "multiaddr": "^2.3.0", + "libp2p-tcp": "~0.11.0", + "multiaddr": "^3.0.0", "multicast-dns": "^6.1.1", - "peer-id": "~0.9.0", - "peer-info": "~0.10.0" + "peer-id": "~0.10.0", + "peer-info": "~0.11.0" }, "contributors": [ "David Dias ", @@ -51,4 +51,4 @@ "emersion ", "greenkeeperio-bot " ] -} \ No newline at end of file +}