Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-1219

LiveView: Upgrade to handle ES6 sytax

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: liveview 1.2.0
    • Component/s: CLI
    • Labels:
    • Environment:

      LiveVie: 1.1.15
      Studio: 4.9.0.201705231412

      Description

      Description

      When using ES6 syntax in an application LiveView will currently error out (however you wont see LiveView error out because of TIMOB-24694).

      It's possible we could just update the acorn to a newer version allowing ES6 (and newer) code, but

      1. We don't own the package https://www.npmjs.com/package/jsparse-tools
      2. The repo doesnt exist (or is private)

      We could grab the source from an npm install and update where necessary, I believe MIT allows this.

      Notes

      I had a quick try of updating to the latest acorn version and these were my observations

      1. The return data from the detect function stays the same across versions, so the acorn upgrade should not problematic
      2. Using const will throw an error, this seems to be because LiveView makes some assumptions about the length of a variable declaration, let works (let and var are both 3 characters long). (https://github.com/appcelerator/liveview/blob/de6bb766edf10b83e28e5f941528d420ef50798d/lib/fserver.js#L314-L324)
      3. This is only run for app.js files I believe

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eharris Ewan Harris
                Reporter:
                eharris Ewan Harris
              • Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code