Pg-promise: Nodejs 7 buffer deprecation warning

Created on 4 Nov 2016  路  4Comments  路  Source: vitaly-t/pg-promise

Hi,
After upgrading nodejs to 7, I got this warning and wanted to report it.

DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.

Most helpful comment

Version 7.2.1 of Node.js removed both the warning and the plans for making the change in 7.x :smile:

Problem solved! 馃樃

All 4 comments

This warning relates to the underlying driver, and not immediately to this library. This will get resolved when the time is right. At the moment it is not, as the driver got a number of its own problems, and not really suitable for an upgrade. By the time that "soon" becomes "now" it will be resolved, somehow.

I supposed Buffer is used by this library since I didn't look into source, that's why I just wanted to report it. Of course time is not problem as nodejs 7 is very new.
I would move the issue to main library but there is already reported one; https://github.com/brianc/node-postgres/issues/1163

Btw, thanks for quick reply.

Looks like this won't be an issue for at least node 7.

https://github.com/nodejs/node/commit/4fffe32a4b3a93548c4d39b1c2531aa38403b5e6

Version 7.2.1 of Node.js removed both the warning and the plans for making the change in 7.x :smile:

Problem solved! 馃樃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

seanh1414 picture seanh1414  路  4Comments

realcarbonneau picture realcarbonneau  路  4Comments

paleite picture paleite  路  4Comments

jabooth picture jabooth  路  4Comments

msjoshi picture msjoshi  路  4Comments