Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Buffer() is deprecated #18

Open
Aareksio opened this issue Apr 25, 2018 · 2 comments
Open

Buffer() is deprecated #18

Aareksio opened this issue Apr 25, 2018 · 2 comments

Comments

@Aareksio
Copy link
Contributor

Uses of new Buffer() and Buffer() outside of the node_modules directory will now emit a runtime deprecation warning. [9d4ab90117]

Node 10 displays following warning when ran locally:

[DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. 
Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
@DoctorMcKay
Copy link
Owner

steam-client still supports Node v4.1.1, while Buffer.alloc was introduced in v4.5.0. Buffer constructors will not be replaced until the next major version (which honestly may not come because steam-user v4 will remove the dependency, whenever I finish that up).

@Trott
Copy link

Trott commented Apr 26, 2018

steam-client still supports Node v4.1.1, while Buffer.alloc was introduced in v4.5.0.

If you want to use Buffer.alloc() but also support older versions of Node.js, you can consider using https://www.npmjs.com/package/safer-buffer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants