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 1 commit
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
26 changes: 19 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
sudo: false
language: node_js
node_js:
- 4
- 5
- stable

matrix:
include:
- node_js: 4
env: CXX=g++-4.8
- node_js: 6
env: CXX=g++-4.8
- node_js: stable
env:
- SAUCE=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do sauce in LTS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? I already set it up this was in a couple of repos, the node version shouldn't have any influence for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- CXX=g++-4.8

# Make sure we have new NPM.
before_install:
Expand All @@ -14,12 +21,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
9 changes: 5 additions & 4 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,14 +36,13 @@
},
"homepage": "https://github.com/libp2p/js-libp2p-websockets#readme",
"dependencies": {
"detect-node": "^2.0.3",
"interface-connection": "^0.2.1",
"lodash.contains": "^2.4.3",
"mafmt": "^2.1.1",
"pull-ws": "^3.2.3"
},
"devDependencies": {
"aegir": "^8.0.0",
"aegir": "^9.0.1",
"chai": "^3.5.0",
"gulp": "^3.9.1",
"interface-transport": "^0.3.3",
Expand Down
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