The module still depends on a version of packet-reader that has deprecated Buffer usage.
consoleStream.js:43
(node:44680) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
warning.js:18
at showFlaggedDeprecation (buffer.js:160:11)
at new Buffer (buffer.js:175:3)
at module.exports.Reader.addChunk (.packages\packet-reader@f4fc956ec61b187cd18790c0b0a6fa5d1d3a30de4a5493e3277460485ed188f2\index.js:35:21)
at Socket.<anonymous> (.packages\pg@1070266975c840c14642630da3a4733f2608c038eac5d97764832e1dff16eccb\lib\connection.js:116:18)
The PR to fix this has been open for 2 months. https://github.com/brianc/node-packet-reader/pull/5
@brianc @oliversalzburg Any plan about this issue? The warning really is annoying. Thanks
I think I have already been as annoying as possible about this issue :(
I should have a fix for this today.
Alright I pushed the fix out...but my terminal is still showing the old version as the only one available in npm:
~/src/node-postgres [bmc/upgrade-packet-reader !]$ npm info packet-reader
[email protected] | MIT | deps: none | versions: 6
Read binary packets...
https://github.com/brianc/node-packet-reader
dist
.tarball: https://registry.npmjs.org/packet-reader/-/packet-reader-0.3.1.tgz
.shasum: cd62e60af8d7fea8a705ec4ff990871c46871f27
maintainers:
- brianc <[email protected]>
dist-tags:
latest: 0.3.1
published a year ago by brianc <[email protected]>
where as on npmjs.com we get:

A bit confused as to what could be causing the mis-match...
I see the same older version as well. There were some delays with NPM publishing earlier this month (https://status.npmjs.org/incidents/hry8fvybglkw). Maybe they're having similar replication issues today as well.
ah thanks for checking - I'll wait a few hours & see if it clears up.
published a fix [email protected] - please lemme know if you hit any other deprecation warnings! thanks.
Everything looks clean here. Thanks for taking care of it :)
Most helpful comment
published a fix
[email protected]- please lemme know if you hit any other deprecation warnings! thanks.