Compare commits

...

7 Commits

Author SHA1 Message Date
Jacob Heun
1b8737dede chore: release version v0.8.4 2019-01-04 10:29:31 -07:00
Jacob Heun
dd5cd3d611 chore: update contributors 2019-01-04 10:29:30 -07:00
Vasco Santos
9fcd3d88ce chore: update dependencies 2019-01-03 11:37:02 -07:00
Jacob Heun
e50733821b chore: release version v0.8.3 2018-11-09 18:36:33 +01:00
Jacob Heun
e02abd06cd chore: update contributors 2018-11-09 18:36:32 +01:00
Jacob Heun
80cdbada75 chore: update lead maintainer
chore: update deps

test: fix usage of latest switch

test: change ping self test as its not supported anymore

chore: use package.files instead of .npmignore
2018-11-09 18:35:00 +01:00
David Dias
ec04e22ede chore: update gitignore to ignore docs folder 2018-10-31 07:32:32 +00:00
9 changed files with 41 additions and 130 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
docs
**/node_modules/
**/*.log
test/repo-tests*

View File

@@ -1,29 +0,0 @@
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
test

View File

@@ -1,32 +0,0 @@
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
sudo: false
language: node_js
matrix:
include:
- node_js: 6
env: CXX=g++-4.8
- node_js: 8
env: CXX=g++-4.8
# - node_js: stable
# env: CXX=g++-4.8
script:
- npm run lint
- npm run test
- npm run coverage
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
after_success:
- npm run coverage-publish
addons:
firefox: 'latest'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

View File

@@ -1,3 +1,13 @@
<a name="0.8.4"></a>
## [0.8.4](https://github.com/libp2p/js-libp2p-ping/compare/v0.8.3...v0.8.4) (2019-01-04)
<a name="0.8.3"></a>
## [0.8.3](https://github.com/libp2p/js-libp2p-ping/compare/v0.8.2...v0.8.3) (2018-11-09)
<a name="0.8.2"></a>
## [0.8.2](https://github.com/libp2p/js-libp2p-ping/compare/v0.8.1...v0.8.2) (2018-10-31)

View File

@@ -12,7 +12,7 @@ libp2p-ping JavaScript Implementation
## Lead Maintainer
[Vasco Santos](https://github.com/vasco-santos).
[Jacob Heun](https://github.com/jacobheun/)
## Usage

View File

@@ -1,29 +0,0 @@
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
version: "{build}"
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "8"
matrix:
fast_finish: true
install:
# Install Node.js
- ps: Install-Product node $env:nodejs_version
# Upgrade npm
- npm install -g npm
# Output our current versions for debugging
- node --version
- npm --version
# Install our package dependencies
- npm install
test_script:
- npm run test:node
build: off

View File

@@ -1,15 +0,0 @@
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
machine:
node:
version: stable
dependencies:
pre:
- google-chrome --version
- 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 install -f
- sudo apt-get install --only-upgrade lsb-base
- sudo dpkg -i google-chrome.deb
- google-chrome --version

View File

@@ -1,15 +1,20 @@
{
"name": "libp2p-ping",
"version": "0.8.2",
"version": "0.8.4",
"description": "libp2p Ping protocol implementation",
"leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>",
"leadMaintainer": "Jacob Heun <jacobheun@gmail.com>",
"main": "src/index.js",
"files": [
"dist",
"src"
],
"pre-push": [
"lint",
"test"
"lint"
],
"scripts": {
"test": "aegir test -t node",
"test:node": "aegir test -t node",
"build": "aegir build",
"lint": "aegir lint",
"release": "aegir release -t node",
"release-minor": "aegir release --type minor -t node",
@@ -30,22 +35,21 @@
},
"homepage": "https://github.com/libp2p/js-libp2p-ping",
"devDependencies": {
"aegir": "^17.0.1",
"aegir": "^18.0.2",
"async": "^2.6.1",
"chai": "^4.2.0",
"debug": "^4.1.0",
"debug": "^4.1.1",
"dirty-chai": "^2.0.1",
"gulp": "^3.9.1",
"libp2p-swarm": "~0.35.1",
"libp2p-switch": "~0.41.4",
"libp2p-tcp": "~0.13.0",
"multiaddr": "^5.0.0",
"peer-book": "~0.8.0",
"peer-id": "~0.12.0",
"peer-info": "~0.14.1",
"multiaddr": "^6.0.2",
"peer-book": "~0.9.0",
"peer-id": "~0.12.1",
"peer-info": "~0.15.0",
"run-parallel": "^1.1.9"
},
"dependencies": {
"libp2p-crypto": "~0.14.0",
"libp2p-crypto": "~0.15.0",
"pull-handshake": "^1.1.4",
"pull-stream": "^3.6.9"
},
@@ -53,8 +57,10 @@
"David Dias <daviddias.p@gmail.com>",
"Francisco Baio Dias <xicombd@gmail.com>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Jacob Heun <jacobheun@gmail.com>",
"João Antunes <j.goncalo.antunes@gmail.com>",
"Richard Littauer <richard.littauer@gmail.com>",
"Vasco Santos <vasco.santos@moxy.studio>",
"Vasco Santos <vasco.santos@ua.pt>",
"greenkeeperio-bot <support@greenkeeper.io>",
"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ <victorbjelkholm@gmail.com>"

View File

@@ -8,7 +8,7 @@ chai.use(dirtyChai)
const PeerInfo = require('peer-info')
const PeerBook = require('peer-book')
const Swarm = require('libp2p-swarm')
const Swarm = require('libp2p-switch')
const TCP = require('libp2p-tcp')
const series = require('async/series')
const parallel = require('async/parallel')
@@ -43,8 +43,8 @@ describe('libp2p ping', () => {
swarmB.transport.add('tcp', new TCP())
cb()
},
(cb) => swarmA.listen(cb),
(cb) => swarmB.listen(cb),
(cb) => swarmA.start(cb),
(cb) => swarmB.start(cb),
(cb) => {
Ping.mount(swarmA)
Ping.mount(swarmB)
@@ -55,8 +55,8 @@ describe('libp2p ping', () => {
after((done) => {
parallel([
(cb) => swarmA.close(cb),
(cb) => swarmB.close(cb)
(cb) => swarmA.stop(cb),
(cb) => swarmB.stop(cb)
], done)
})
@@ -96,17 +96,16 @@ describe('libp2p ping', () => {
p.start()
})
it('ping itself', (done) => {
it('cannot ping itself', (done) => {
const p = new Ping(swarmA, peerA)
p.on('error', (err) => {
expect(err).to.not.exist()
expect(err).to.exist()
done()
})
p.on('ping', (time) => {
expect(time).to.be.a('Number')
p.stop()
done()
p.on('ping', () => {
expect.fail('should not be called')
})
p.start()