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

Makes the lib compatible with Node 4.1.1 #18

Closed
wants to merge 4 commits into from

Conversation

hoffmannjan
Copy link

Tested this on project that I'm working now and everything seems to be OK 👍

@jasongin
Copy link
Owner

jasongin commented Jul 5, 2017

Thanks, and sorry for the delay in getting to this.

I'm not excited about taking on the added step of babel compilation, just to support Node 4. Maybe I could be convinced though. I understand a substantial number of people still run Node 4.

@jasongin
Copy link
Owner

I think a better solution might be to just change the source code to be Node 4 compatible. I haven't tried, but I think it shouldn't be too hard:

  1. Change all use of let and const to var.
  2. Replace some light use of ES6 Promise with either a promise library, or just change to callbacks.

@hoffmannjan
Copy link
Author

Sure, I can do this :).
I was only thinking that It might be kind of pain for you to develop this lib in older ES version.

@jasongin
Copy link
Owner

If this is done, then I can update noble/noble#646 to use this package with Node 4 also.

@ghost
Copy link

ghost commented Aug 4, 2018

now that node 4.x is EOL is this still worth doing?

@ghost
Copy link

ghost commented Aug 17, 2018

I'm pushing to make 6.x the minimum version for the next version of noble btw.

@@ -514,7 +514,7 @@ NobleBindings.prototype._onAdvertisementWatcherReceived = function(sender, e) {
var manufacturerData = manufacturerSections[0];
deviceRecord.manufacturerData = rt.toBuffer(manufacturerData.data);
let companyIdHex = manufacturerData.companyId.toString(16);
let toAppend = Buffer.allocUnsafe(2);
let toAppend = new Buffer(2);
Copy link

@ghost ghost Aug 17, 2018

Choose a reason for hiding this comment

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

this will spew warnings in node 10.x and same for the other one.

@ghost ghost mentioned this pull request Aug 17, 2018
@jasongin
Copy link
Owner

now that node 4.x is EOL is this still worth doing?

I think not, therefore I'm going to go ahead and close this PR. If anyone objects, please speak up!

@jasongin jasongin closed this Aug 17, 2018
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