{ "id": "167214", "key": "TIMOB-24609", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" }, { "id": "19417", "name": "node-titanium-sdk 0.2.0", "archived": false, "released": true, "releaseDate": "2018-02-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-05-04T17:15:34.000+0000", "created": "2017-04-20T18:17:00.000+0000", "epic": { "id": 152521, "key": "TIMOB-19834", "name": "Support ES6 for Titanium Application Development", "summary": "Support ES6 for Titanium Application Development", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2017-05-16T23:24:58.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" }, { "id": "10207", "name": "Tooling" } ], "description": "When we build apps, we run jsanalyze from our titanium-sdk node modules. That file is specifically used to:\r\n- Parse the JS file (validity check)\r\n- Walk the AST and collect/record Ti.* API usages\r\n- Optionally, minify the code\r\n\r\nUnfortunately, uglifyjs hasn't supported ES6 and has lagged for years. Nowadays, people typically use babel and related projects. We should replace our usage of uglifyjs with babel-related modules so that we can parse ES6+ code.\r\n\r\nSpecifically we can use babylon for parsing, babel-traverse/babel-core/babel-types for AST walking, and babili preset for minification.", "attachment": [], "flagged": false, "summary": "Replace uglifyjs usage with babel to parse ES6+ code", "creator": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 883, "state": "closed", "name": "2017 Sprint 09 SDK", "startDate": "2017-04-23T21:46:54.309Z", "endDate": "2017-05-07T21:46:00.000Z", "completeDate": "2017-05-08T00:25:44.276Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "419104", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/8972", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-04T17:00:23.000+0000", "updated": "2017-05-04T17:00:23.000+0000" }, { "id": "419107", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Re-opening for 6.1.0 backport", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-04T17:09:28.000+0000", "updated": "2017-05-04T17:09:28.000+0000" }, { "id": "419110", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2017-05-04T17:12:41.000+0000", "updated": "2017-05-04T17:12:41.000+0000" }, { "id": "419111", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This has been back ported to the 6_1_X branch: https://github.com/appcelerator/titanium_mobile/pull/9018", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-05-04T17:13:30.000+0000", "updated": "2017-05-04T17:13:30.000+0000" }, { "id": "419812", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~cwilliams] how do I validate the change? Do I specifically check for something in the log when building apps?", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-16T18:50:11.000+0000", "updated": "2017-05-16T18:50:11.000+0000" }, { "id": "419839", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with this environment:\r\nNode Version: 6.10.1\r\nNPM Version: 3.10.10 (4.4.4 for Windows)\r\nOS: Mac OS 10.12.4, Windows 10.0.14393\r\nAppc CLI: 6.2.1\r\nAppc CLI NPM: 4.2.9\r\nTitanium SDK version: 6.1.0.v20170516103606, 6.2.0.v20170515114643\r\nAppcelerator Studio, build: 4.8.1.201612050850\r\nXcode 8.3.2\r\nDevices: iOS 10.3, Android 7.1, Windows 8.1, Windows 10.\r\n\r\nI used Han's demo code and verified that the following work as expected for iOS and Android. It does not work for Windows 8.1 & 10. Specifically, when I built and installed the app, an alert pops up. After dismissing the pop-up, a trigger button is displayed. Each time I clicked on Trigger, \"Hello world!\" was printed on the console. \r\nIn the case of the Windows phones, the Alert popped up, but after dismissing it, the screen become white, and no Trigger button was seen.\r\n", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-16T22:05:49.000+0000", "updated": "2017-05-16T23:04:15.000+0000" }, { "id": "419840", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For convenience, pasting demo code here:\r\n{code}\r\nclass Application {\r\n \r\n constructor(cb) { \r\n this.window = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n });\r\n\r\n var btn = Ti.UI.createButton({\r\n title: 'Trigger'\r\n });\r\n\r\n btn.addEventListener('click', function() {\r\n Ti.API.info('Hello world!');\r\n });\r\n\r\n this.window.add(btn);\r\n }\r\n \r\n open(cb) {\r\n this.window.open();\r\n cb('ES6 rocks!');\r\n }\r\n}\r\n\r\nvar app = new Application();\r\napp.open((text) => {\r\n alert(text);\r\n});\r\n{code}", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-16T22:10:05.000+0000", "updated": "2017-05-16T22:10:05.000+0000" }, { "id": "419855", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~amukherjee] Change the background color (following code snippet will change the window color to red)\r\n{code:java}\r\nconstructor(cb) { \r\n this.window = Ti.UI.createWindow({\r\n backgroundColor: '#ff0000'\r\n });\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-05-16T23:24:58.000+0000", "updated": "2017-05-16T23:24:58.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }