node-fd-slicer icon indicating copy to clipboard operation
node-fd-slicer copied to clipboard

Buffer deprecated warning

Open sandy081 opened this issue 5 years ago • 5 comments

I am developer from VS Code and we are using the module yauzl v2.9.2 which depends on this module and it throws following warning.

internal/process/warning.js:127
      throw warning;
      ^

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:156:11)
    at new Buffer (buffer.js:171:3)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/fd-slicer/index.js:109:18
    at pendGo (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/pend/index.js:54:3)
    at onCb (/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/pend/index.js:41:7)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/fd-slicer/index.js:31:7
    at FSReqCallback.wrapper [as oncomplete] (fs.js:477:5) {
  name: 'DeprecationWarning',
  code: 'DEP0005'
}

https://github.com/thejoshwolfe/yauzl/issues/114 https://github.com/microsoft/vscode/issues/82524

sandy081 avatar Dec 09 '19 15:12 sandy081

This is rather annoying, especially given how easy it is to fix.

paya-cz avatar Jul 28 '21 18:07 paya-cz

Hi @andrewrk , Is it possible to get this fixed? There's already a PR open with the fix and it's affecting many users.

Reemh avatar Aug 23 '22 14:08 Reemh

Any update?

AerunDev avatar Mar 13 '23 21:03 AerunDev

@andrewrk - Can you please fix this? It causes warnings in VSCode.

TonyValenti avatar Dec 21 '23 14:12 TonyValenti

@andrewrk - Any update? Its throwing warnings in the terminal.

dassaswat avatar Sep 16 '24 06:09 dassaswat