Skip to content

fix nodejs 7 DeprecationWarning: calling new Buffer(0)#1156

Closed
isghe wants to merge 1 commit into
brianc:masterfrom
isghe:nodejs7_deprecationWarning
Closed

fix nodejs 7 DeprecationWarning: calling new Buffer(0)#1156
isghe wants to merge 1 commit into
brianc:masterfrom
isghe:nodejs7_deprecationWarning

Conversation

@isghe

@isghe isghe commented Oct 26, 2016

Copy link
Copy Markdown

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

Avoid nodejs 7 warning:
DeprecationWarning: Using Buffer without `new` will soon stop working.
Use `new Buffer()`, or preferably `Buffer.from()`,
`Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
@charmander

Copy link
Copy Markdown
Collaborator

Actually, I guess this is a duplicate of #1154.

@jackycute

Copy link
Copy Markdown

It would be great if anyone could merge this PR 😄

@alextes

alextes commented Nov 30, 2016

Copy link
Copy Markdown

It's gotten to the point where there are even duplicate PR's 😓 to fix issue #1163 of node-postgres causing node to emit scary warnings. I get #1154 is in contention. However considering time efficiency and the content of this PR it makes sense to merge this as soon as possible.

I hope one of the maintainers finds the time to take a peek at this!

@runk

runk commented Dec 7, 2016

Copy link
Copy Markdown

Guys, please merge this trivial but very annoying thing. All users of node 7+ are affected.

@alextes

alextes commented Dec 7, 2016

Copy link
Copy Markdown

@runk no longer actually! As of yesterday, the 'annoying' deprecation warning has been removed. Just update to Node v7.2.1 . As of yesterday I'd actually say this PR can be closed. After all unsafe use of buffer allocation was never the issue for node-postgres, it was the annoying warning and use of a deprecated API. This PR does little to solve that, going from a deprecated API to another deprecated API.

@SEAPUNK

SEAPUNK commented Dec 7, 2016

Copy link
Copy Markdown

@alextes What's deprecated about the new Buffer allocation API?

EDIT: nvm, just noticed what the change was. Keeping track of too many PRs, heh.

@brianc

brianc commented Dec 10, 2016

Copy link
Copy Markdown
Owner

OOOff sorry it took me so long to get to this. I'm going to close this in favor of the more feature-complete approach here:

#1154

Hope to have that merged soon!

@brianc brianc closed this Dec 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants