Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1620] Fix new Buffer deprecation warnings

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-11-01T18:58:16.000+0000
Affected Version/sAlloy 1.13.0
Fix Version/sCLI Release 7.0.8
ComponentsTooling
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2018-05-31T10:19:00.000+0000
Updated2018-11-01T18:58:25.000+0000

Description

Description

Node 10 produces a deprecation warning when the new 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

Comments

  1. Ewan Harris 2018-09-12

    https://github.com/appcelerator/alloy/pull/906
  2. Lokesh Choudhary 2018-10-11

    Verified the fix in 7.0.7-master.9. Closing.

JSON Source