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

switch from new Buffer() to Buffer.from() #259

Merged
merged 1 commit into from
Jan 26, 2019
Merged

Conversation

starpit
Copy link
Contributor

@starpit starpit commented Sep 10, 2018

avoids deprecation failures in nodejs 10

Fixes #256

@tomas
Copy link
Owner

tomas commented Sep 10, 2018

Nice, thanks! I think we'd need to update the package.json definition to declare that from now on, Needle requires at least Node v4.4.x (that's when I believe Buffer.from was introduced).

@starpit
Copy link
Contributor Author

starpit commented Sep 10, 2018

@starpit
Copy link
Contributor Author

starpit commented Sep 10, 2018

updated package.json

@tomas
Copy link
Owner

tomas commented Sep 10, 2018

That's weird, according to earlier docs it was added in 3.0.0?

https://nodejs.org/docs/v4.5.0/api/buffer.html#buffer_class_method_buffer_from_array

@starpit
Copy link
Contributor Author

starpit commented Sep 10, 2018

that is Buffer.from(array); we will need Buffer.from(string, encoding?)

@tomas
Copy link
Owner

tomas commented Sep 10, 2018

@starpit
Copy link
Contributor Author

starpit commented Sep 10, 2018

huh, weird! i can update the PR to reflect this. thanks!

avoids deprecation failures in nodejs 10

Fixes tomas#256
@starpit
Copy link
Contributor Author

starpit commented Sep 10, 2018

done. it's sad i guess that we have to drop support for older releases, but the alternative is failures on node 10 :(

@DaTebe
Copy link

DaTebe commented Jan 26, 2019

When do you guys plan to merge this PR?

@tomas
Copy link
Owner

tomas commented Jan 26, 2019

Next week! :)

@tomas tomas merged commit 92652ea into tomas:master Jan 26, 2019
@DaTebe
Copy link

DaTebe commented Apr 9, 2019

Hi, any chance we get a new release including this merge?
Kind regards

@tomas
Copy link
Owner

tomas commented Apr 9, 2019

Yes! Sorry, I've been a bit super busy with other stuff lately.

@tomas
Copy link
Owner

tomas commented Apr 9, 2019

Done! Just published 2.3.0

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.

3 participants