[ALOY-1620] Fix new Buffer deprecation warnings
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-11-01T18:58:16.000+0000 |
Affected Version/s | Alloy 1.13.0 |
Fix Version/s | CLI Release 7.0.8 |
Components | Tooling |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2018-05-31T10:19:00.000+0000 |
Updated | 2018-11-01T18:58:25.000+0000 |
Description
Description
Node 10 produces a deprecation warning when thenew Buffer
constructor is used. See https://nodesource.com/blog/understanding-the-buffer-deprecation-in-node-js-10/ if you're curious
In most cases I believe the most appropriate swap for us to do is turn new Buffer
into Buffer.from
There is one instance in the alloy code https://github.com/appcelerator/alloy/search?q=%22new+Buffer%22&unscoped_q=%22new+Buffer%22, it might not show up when alloy is ran however as code under node_modules
will not throw the buffer deprecation warning
We might also wish to update eslint-config-axway to include the no-buffer-constructor
rule
Steps to reproduce to be added as replacement happens
https://github.com/appcelerator/alloy/pull/906
Verified the fix in 7.0.7-master.9. Closing.