Compare commits

...

7 Commits

Author SHA1 Message Date
7572279838 chore: release version v0.11.0 2017-09-03 10:02:33 +01:00
181ce4eef2 chore: update contributors 2017-09-03 10:02:33 +01:00
f8075be92a docs: update badge on readme 2017-09-03 10:02:10 +01:00
a54bb83657 feat: p2p addrs situation (#82)
* chore: update gitignore

* chore: update CI configs

* chore: update deps

* chore: small refactor
2017-09-03 10:01:16 +01:00
ef45cc9a34 chore: release version v0.10.2 2017-07-22 14:42:22 -07:00
ce5f023508 chore: update contributors 2017-07-22 14:42:21 -07:00
2f9b1fe7fe chore: update deps 2017-07-22 14:40:25 -07:00
7 changed files with 42 additions and 24 deletions

19
.gitignore vendored
View File

@ -1,7 +1,14 @@
**/node_modules/
**/*.log
test/repo-tests*
**/bundle.js
# Logs
logs
*.log
coverage
# Runtime data
pids
*.pid
@ -19,9 +26,17 @@ 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
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

View File

@ -1,22 +1,20 @@
sudo: false
language: node_js
matrix:
include:
- node_js: 4
env: CXX=g++-4.8
- node_js: 6
env: CXX=g++-4.8
- node_js: stable
- node_js: 8
env: CXX=g++-4.8
# Make sure we have new NPM.
before_install:
- npm install -g npm
# - 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
@ -26,8 +24,9 @@ after_success:
- npm run coverage-publish
addons:
firefox: 'latest'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- g++-4.8

View File

@ -7,7 +7,7 @@
[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-tcp.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-tcp)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
![](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)
![](https://img.shields.io/badge/Node.js-%3E%3D6.0.0-orange.svg?style=flat-square)
![](https://raw.githubusercontent.com/libp2p/interface-connection/master/img/badge.png)
![](https://raw.githubusercontent.com/libp2p/interface-transport/master/img/badge.png)

View File

@ -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

View File

@ -1,6 +1,6 @@
{
"name": "libp2p-tcp",
"version": "0.10.1",
"version": "0.11.0",
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",
"main": "src/index.js",
"scripts": {
@ -30,24 +30,25 @@
},
"homepage": "https://github.com/libp2p/js-libp2p-tcp",
"engines": {
"node": ">=4.0.0"
"node": ">=6.0.0",
"npm": ">=3.0.0"
},
"devDependencies": {
"aegir": "^11.0.1",
"chai": "^3.5.0",
"dirty-chai": "^1.2.2",
"aegir": "^11.0.2",
"chai": "^4.1.2",
"dirty-chai": "^2.0.1",
"interface-transport": "~0.3.5",
"lodash.isfunction": "^3.0.8",
"pre-commit": "^1.2.2",
"pull-stream": "^3.5.0"
"pull-stream": "^3.6.0"
},
"dependencies": {
"interface-connection": "~0.3.2",
"ip-address": "^5.8.8",
"lodash.includes": "^4.3.0",
"lodash.isfunction": "^3.0.8",
"mafmt": "^2.1.8",
"multiaddr": "^2.3.0",
"mafmt": "^3.0.0",
"multiaddr": "^3.0.0",
"once": "^1.4.0",
"stream-to-pull-stream": "^1.7.2"
},

View File

@ -4,7 +4,7 @@ const multiaddr = require('multiaddr')
const Address6 = require('ip-address').Address6
module.exports = (socket) => {
var mh
let mh
if (socket.remoteFamily === 'IPv6') {
var addr = new Address6(socket.remoteAddress)

View File

@ -14,6 +14,7 @@ const getMultiaddr = require('./get-multiaddr')
const IPFS_CODE = 421
const CLOSE_TIMEOUT = 2000
function noop () {}
module.exports = (handler) => {