mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.52k stars 306 forks source link

Using deprecated method new Buffer() #1133

Closed guanzhongs closed 1 year ago

guanzhongs commented 1 year ago

Describe the bug After installed sqltools in vscode, got error in Output > Log(Window) 2023-04-20 20:18:52.477 [error] [Extension Host] (node:9330) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Usenode --trace-deprecation ...to show where the warning was created)

To Reproduce

  1. Open a terminal, navigate to OUTPUT > Log(Window)
  2. Install SQLTools & SQLTools MySQL/MariaDB Driver in VSCode.
  3. Disable the extension SQLTools.
  4. The error is eliminated.

Expected behavior No error relates to the extension.

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

gjsjohnmurray commented 1 year ago

I think this isn't specific to these extensions. See https://github.com/microsoft/vscode/issues/82524

guanzhongs commented 1 year ago

The error is eliminated while disabling the extension. And see code of the extension at branch dev (ce93cf99cc2355503954fe2879b8ce117e845150): in file 'vscode-sqltools\packages\util\persistence\serializable-storage.ts' image

gjsjohnmurray commented 1 year ago

You are right. I have submitted a PR to resolve this in the next release.