Skip to content

Commit

Permalink
Update deps fix ci fix 9errors (#903)
Browse files Browse the repository at this point in the history
* Updated some dependencies, removed old node versions from .travis.yml

* Fix #901 errors.

Replace echo stream close implementation.
  • Loading branch information
redboltz authored and mcollina committed Dec 18, 2018
1 parent 9a39faa commit 821422e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
@@ -1,14 +1,10 @@
language: node_js
sudo: false
node_js:
- '4'
# AWS Lambda
- '4.3.2'
- '6'
- '7'
- '8'
- '9'
- '10'
- '11'
env:
# For compiling optional extensions
addons:
Expand Down
5 changes: 3 additions & 2 deletions lib/client.js
Expand Up @@ -5,7 +5,6 @@
*/
var events = require('events')
var Store = require('./store')
var eos = require('end-of-stream')
var mqttPacket = require('mqtt-packet')
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
Expand Down Expand Up @@ -280,7 +279,9 @@ MqttClient.prototype._setupStream = function () {
this.stream.on('error', nop)

// Echo stream close
eos(this.stream, this.emit.bind(this, 'close'))
this.stream.on('close', function () {
that.emit('close')
})

// Send a connect packet
connectPacket = Object.create(this.options)
Expand Down
14 changes: 7 additions & 7 deletions package.json
Expand Up @@ -31,7 +31,7 @@
"browser-build": "rimraf dist/ && mkdirp dist/ && browserify mqtt.js -s mqtt > dist/mqtt.js && uglifyjs < dist/mqtt.js > dist/mqtt.min.js",
"browser-test": "zuul --server test/browser/server.js --local --open test/browser/test.js",
"sauce-test": "zuul --server test/browser/server.js --tunnel ngrok -- test/browser/test.js",
"ci": "npm run tslint && npm run typescript-test && npm run test && codecov"
"ci": "npm run tslint && npm run typescript-compile-test && npm run test && codecov"
},
"pre-commit": [
"test",
Expand Down Expand Up @@ -75,12 +75,12 @@
"pump": "^3.0.0",
"readable-stream": "^2.3.6",
"reinterval": "^1.1.0",
"split2": "^2.1.1",
"split2": "^3.1.0",
"websocket-stream": "^5.1.2",
"xtend": "^4.0.1"
},
"devDependencies": {
"@types/node": "^8.10.21",
"@types/node": "^10.0.0",
"browserify": "^16.2.2",
"codecov": "^3.0.4",
"global": "^4.3.2",
Expand All @@ -93,12 +93,12 @@
"safe-buffer": "^5.1.2",
"should": "^13.2.1",
"sinon": "~1.17.7",
"snazzy": "^7.1.1",
"snazzy": "^8.0.0",
"standard": "^11.0.1",
"through2": "^2.0.3",
"through2": "^3.0.0",
"tslint": "^5.11.0",
"tslint-config-standard": "^7.1.0",
"typescript": "^2.9.2",
"tslint-config-standard": "^8.0.1",
"typescript": "^3.2.2",
"uglify-js": "^3.4.5",
"ws": "^3.3.3",
"zuul": "^3.12.0",
Expand Down

0 comments on commit 821422e

Please sign in to comment.