rastapasta / mapscii

🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
MIT License
7.93k stars 256 forks source link

new Buffer(size) got deprecated #42

Closed jaller94 closed 6 years ago

jaller94 commented 6 years ago

new Buffer(size) got deprecated, use Buffer.alloc(size) instead.

Places in the code: https://github.com/rastapasta/mapscii/blob/5873af5c96e24be0774a6471730bb11674835f21/src/BrailleBuffer.coffee#L44-L46

jaller94 commented 6 years ago

Buffer.alloc() got introduced in NodeJS 5.10.0. I think it is reasonable to raise the required Node version to the latest LTS.

https://nodejs.org/api/buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding

derhuerst commented 6 years ago

You could also just raise to 6, which is LTS and still being maintained. Some well-known npm lib authors have done this recently.

jaller94 commented 6 years ago

Thanks for the mention of Node 6 which is still maintained until April of 2019. Do you think it’s ok to require >= 6.14.0 as I did in #43? There is still --ignore-engine for those those that wish to try earlier versions.

derhuerst commented 6 years ago

Do you think it’s ok to require >= 6.14.0 as I did in #43? There is still --ignore-engine for those those that wish to try earlier versions.

Aside from the fact that you have no obligation to support anything, requiring the latest 6 version seems reasonable to me, as older versions have known security vulnerabilities.

jaller94 commented 6 years ago

@derhuerst Thank you so much for your input. I believe that the current decision is better than my previous judgment thanks to your posts.