Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26081

CLI: Fix new Buffer deprecation warnings in build scripts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 7.1.1, Release 7.3.0, Release 7.2.0
    • Fix Version/s: Release 7.5.0
    • Component/s: CLI
    • Labels:
      None
    • Environment:

      Ti SDK: 7.1.1.GA, 7.2.0.v20180528150435, 7.3.0.v20180530072516
      Node 10.3.0

    • Story Points:
      5
    • Sprint:
      2018 Sprint 12 SDK

      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

      In titanium_mobile there are two instances https://github.com/appcelerator/titanium_mobile/search?l=JavaScript&q=%22new+Buffer%22
      , however checking all modules (*lib, node-appc, node-titanium-sdk etc.) would also be good as there deprecation warning will not be shown for code that resides under node_modules I believe.

      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

        Attachments

          Activity

            People

            • Assignee:
              eharris Ewan Harris
              Reporter:
              eharris Ewan Harris
              Reviewer:
              Hans Knöchel
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6368
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code