Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

feat: upgrade to aegir@9 #33

Merged
merged 5 commits into from
Nov 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ node_modules
.node_repl_history

dist
lib
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
sudo: false
language: node_js
node_js:
- 4
- 5
- stable

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:
Expand All @@ -14,12 +22,17 @@ script:
- npm test
- npm run coverage

addons:
firefox: 'latest'

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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
[![Travis CI](https://travis-ci.org/libp2p/js-libp2p-websockets.svg?branch=master)](https://travis-ci.org/libp2p/js-libp2p-websockets)
[![Circle CI](https://circleci.com/gh/libp2p/js-libp2p-websockets.svg?style=svg)](https://circleci.com/gh/libp2p/js-libp2p-websockets)
[![Dependency Status](https://david-dm.org/libp2p/js-libp2p-websockets.svg?style=flat-square)](https://david-dm.org/libp2p/js-libp2p-websockets) [![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)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/js-libp2p-websockets.svg)](https://saucelabs.com/u/js-libp2p-websockets)

![](https://raw.githubusercontent.com/libp2p/interface-connection/master/img/badge.png)
![](https://raw.githubusercontent.com/libp2p/interface-transport/master/img/badge.png)

> JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport interface

## Description
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"name": "libp2p-websockets",
"version": "0.8.1",
"description": "JavaScript implementation of the WebSockets module that libp2p uses and that implements the interface-transport spec",
"main": "lib/index.js",
"jsnext:main": "src/index.js",
"main": "src/index.js",
"scripts": {
"lint": "aegir-lint",
"test": "gulp test",
Expand All @@ -16,6 +15,9 @@
"coverage": "gulp coverage",
"coverage-publish": "aegir-coverage publish"
},
"browser": {
"pull-ws/server": false
},
"pre-commit": [
"lint",
"test"
Expand All @@ -34,26 +36,25 @@
},
"homepage": "https://github.com/libp2p/js-libp2p-websockets#readme",
"dependencies": {
"detect-node": "^2.0.3",
"interface-connection": "^0.2.1",
"interface-connection": "^0.3.0",
"lodash.contains": "^2.4.3",
"mafmt": "^2.1.1",
"pull-ws": "^3.2.3"
"mafmt": "^2.1.2",
"pull-ws": "^3.2.8"
},
"devDependencies": {
"aegir": "^8.0.0",
"aegir": "^9.0.1",
"chai": "^3.5.0",
"gulp": "^3.9.1",
"interface-transport": "^0.3.3",
"multiaddr": "^2.0.2",
"multiaddr": "^2.0.3",
"pre-commit": "^1.1.3",
"pull-goodbye": "0.0.1",
"pull-stream": "^3.4.3"
"pull-stream": "^3.5.0"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Francisco Baio Dias <xicombd@gmail.com>",
"dignifiedquire <dignifiedquire@gmail.com>",
"greenkeeperio-bot <support@greenkeeper.io>"
]
}
}
7 changes: 2 additions & 5 deletions src/listener.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
'use strict'

const isNode = require('detect-node')
const Connection = require('interface-connection').Connection
const contains = require('lodash.contains')

// const IPFS_CODE = 421

let createServer
let createServer = require('pull-ws/server')

if (isNode) {
createServer = require('pull-ws/server')
} else {
if (!createServer) {
createServer = () => {}
}

Expand Down