Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for node 0.8.x with YuzuJS's setImmediate implementation #234

Merged
merged 3 commits into from
Dec 18, 2014

Conversation

MBThaumatec
Copy link
Contributor

Hi,
This are correction that are needed to support node v0.8 with incomming MQTT.js v1.0.0.

@@ -14,6 +14,7 @@ var MqttServer = require('./lib/server').MqttServer
, fs = require("fs")
, connect = require('./lib/connect')
, net = require('net')
, setimmediate = require('setimmediate')
Copy link
Member

Choose a reason for hiding this comment

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

You can just do a

// setup the global setImmediate if missing
require('setimmediate')

without assigning it to anything.

@MBThaumatec
Copy link
Contributor Author

I push your suggestion, but I can see there is issue with Travis CI tests. I'm quite sure it's about too old npm version. With node 0.8.x in Travis there is npm v1.2.x. As you can see here:
npm/npm#4984
or
npm/npm#5906

this npm version is not working good with ^ - compatible version mark which you are using in package.json. It should be at least npm v1.4.x.

What we can do about it?

@mcollina
Copy link
Member

replace all ^ in package.json with ~, for our purposes it is very similar.

@MBThaumatec
Copy link
Contributor Author

OK, I'll do. I was thinking that maybe there is way to tell nvm in Travis to use newer version of nvm. But I'm not familiar with Travis, and my searching for such option in travis.yml was not successful. I thought, that maybe something you can do on Travis webpage.

@mcollina
Copy link
Member

you can run npm install npm@latest -g as a before_install command. Actually, this is definitely better than the package.json fix.

See http://docs.travis-ci.com/user/build-configuration/#Build-Lifecycle.

mcollina added a commit that referenced this pull request Dec 18, 2014
support for node 0.8.x with YuzuJS's setImmediate implementation
@mcollina mcollina merged commit 0be2378 into mqttjs:v1.0.0-dev Dec 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants