andrewrk / node-fd-slicer

safely create multiple ReadStream or WriteStream objects from the same file descriptor
MIT License
30 stars 18 forks source link

Buffer deprecated warning #3

Open sandy081 opened 4 years ago

sandy081 commented 4 years ago

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

paya-cz commented 3 years ago

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

Reemh commented 2 years ago

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

AerunDev commented 1 year ago

Any update?

TonyValenti commented 10 months ago

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

dassaswat commented 1 month ago

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