memcachier / memjs

A memcache client for node using the binary protocol and SASL authentication
MIT License
197 stars 52 forks source link

New Buffer Deprecation #120

Closed flippmoke closed 5 years ago

flippmoke commented 5 years ago

Starting in node 10 new Buffer will be deprecated. https://nodejs.org/api/buffer.html#buffer_class_buffer

This is a patch use Buffer.from and Buffer.alloc instead, but to support older versions of node -- backwards compatible methods have been added.

flippmoke commented 5 years ago

This might also solve https://github.com/memcachier/memjs/issues/116

saschat commented 5 years ago

@flippmoke I am super sorry but I just see this now. For some reason I did not get a notification when you created this PR.

Knowing about this PR would have actually saved me from doing it myself (#122). Your PR is even better than mine.

Sorry again! I am closing this given that v1.2.2 now uses the new buffer calls.