microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
271 stars 77 forks source link

"DeprecationWarning: Buffer() is deprecated..." #217

Closed DanTup closed 2 years ago

DanTup commented 5 years ago

I see these warnings when running tests.. I'm slowly getting through the packages that seem to be causing them, and this seems to be one:

(node:23425) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security
    and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or
    Buffer.from() methods instead.

    at showFlaggedDeprecation (buffer.js:160:11)
    at new Buffer (buffer.js:175:3)
    at DartDebugSession.start (/Users/dantup/Dev/Dart-Code/node_modules/vscode-debugadapter/lib/protocol.js:17:1)

(To get the stack in the warning you can use export NODE_OPTIONS="--trace-deprecation" before launching Code).

I think it's this line triggering the warning, though I haven't checked for others:

https://github.com/microsoft/vscode-debugadapter-node/blob/a7ed1f2860f3c4de3d463048cc9614bd3cd0bc3c/adapter/src/protocol.ts#L28

weinand commented 2 years ago

This has been fixed by #244