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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new Buffer(size) got deprecated

jaller94 opened this issue · comments

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

Places in the code:

@pixelBuffer = new Buffer size
@foregroundBuffer = new Buffer size
@backgroundBuffer = new Buffer size

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

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

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.

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.

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