It seems that this project uses Buffer constructor on these two lines:
|
private rawData = new Buffer(0); |
|
case '.png': |
|
const buffer = new Buffer(payload.png.replace('data:image/png;base64', ''), 'base64'); |
|
await this.fs.writeLocalFile(file.fsPath, buffer); |
|
break; |
According to the nodejs document, we should use Buffer.from() or Buffer.alloc() instead of new Buffer(...).
I think it would be better if we replace it.
The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead.
Screenshot

It seems that this project uses Buffer constructor on these two lines:
vscode-jupyter/src/platform/debugger/extension/helpers/protocolParser.node.ts
Line 31 in e07a767
vscode-jupyter/src/webviews/extension-side/plotting/plotViewer.node.ts
Lines 145 to 148 in e07a767
According to the nodejs document, we should use
Buffer.from()orBuffer.alloc()instead ofnew Buffer(...).I think it would be better if we replace it.
Screenshot