mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-07-21 19:41:58 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1b8737dede | ||
|
dd5cd3d611 | ||
|
9fcd3d88ce | ||
|
e50733821b | ||
|
e02abd06cd | ||
|
80cdbada75 | ||
|
ec04e22ede |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
docs
|
||||
**/node_modules/
|
||||
**/*.log
|
||||
test/repo-tests*
|
||||
|
29
.npmignore
29
.npmignore
@@ -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
|
32
.travis.yml
32
.travis.yml
@@ -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
|
10
CHANGELOG.md
10
CHANGELOG.md
@@ -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)
|
||||
|
||||
|
@@ -12,7 +12,7 @@ libp2p-ping JavaScript Implementation
|
||||
|
||||
## Lead Maintainer
|
||||
|
||||
[Vasco Santos](https://github.com/vasco-santos).
|
||||
[Jacob Heun](https://github.com/jacobheun/)
|
||||
|
||||
## Usage
|
||||
|
||||
|
29
appveyor.yml
29
appveyor.yml
@@ -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
|
15
circle.yml
15
circle.yml
@@ -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
|
32
package.json
32
package.json
@@ -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>"
|
||||
|
@@ -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()
|
||||
|
Reference in New Issue
Block a user