{ "id": "138104", "key": "ALOY-1168", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15404", "description": "Alloy 2.0.0", "name": "Alloy 2.0.0", "archived": false, "released": false } ], "resolution": null, "resolutiondate": null, "created": "2014-10-15T17:06:40.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "56205", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "159805", "key": "ALOY-1495", "fields": { "summary": "Support newer versions of Underscore / Lodash", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56207", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "165130", "key": "ALOY-1533", "fields": { "summary": "Upgrade underscore.js to version 1.8.3", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "updated": "2019-08-08T09:54:18.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "Investigate the ramifications of replacing underscore with Lo-Dash. Test Alloy compile-time and runtime code to determine what changes would be needed. \r\n\r\nCreate a plan for deprecating, then replacing underscore, if that's the option we take. This will include documenting any differences for developers.\r\n\r\nUnderscore 1.7.* is incompatible with Alloy. So if we stick with that, we'll need a ticket to update Alloy to support the newest underscore releases.\r\n", "attachment": [], "flagged": false, "summary": "Replace underscore with Lo-Dash", "creator": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 977, "state": "closed", "name": "2017 Sprint 25 Tooling", "startDate": "2017-12-03T23:21:41.825Z", "endDate": "2017-12-17T23:21:00.000Z", "completeDate": "2017-12-18T22:30:55.005Z", "originBoardId": 219 }, { "id": 1009, "state": "closed", "name": "2018 Sprint 06 Tooling", "startDate": "2018-03-11T22:22:24.159Z", "endDate": "2018-03-25T22:22:00.000Z", "completeDate": "2018-03-25T21:58:30.495Z", "originBoardId": 219 }, { "id": 996, "state": "closed", "name": "2018 Sprint 03 Tooling", "startDate": "2018-01-28T16:24:33.898Z", "endDate": "2018-02-11T16:24:00.000Z", "completeDate": "2018-02-12T04:23:35.987Z", "originBoardId": 219 }, { "id": 983, "state": "closed", "name": "2017 Sprint 26 Tooling", "startDate": "2017-12-17T22:33:16.616Z", "endDate": "2017-12-31T22:33:00.000Z", "completeDate": "2018-01-02T16:57:51.963Z", "originBoardId": 219 }, { "id": 1001, "state": "closed", "name": "2018 Sprint 04 Tooling", "startDate": "2018-02-12T04:25:16.870Z", "endDate": "2018-02-26T04:25:00.000Z", "completeDate": "2018-02-26T19:38:13.619Z", "originBoardId": 219 }, { "id": 986, "state": "closed", "name": "2018 Sprint 01 Tooling", "startDate": "2017-12-31T16:58:25.103Z", "endDate": "2018-01-14T16:58:00.000Z", "completeDate": "2018-01-17T22:42:40.307Z", "originBoardId": 219 }, { "id": 1019, "state": "closed", "name": "2018 Sprint 07 Tooling", "startDate": "2018-03-25T21:58:00.558Z", "endDate": "2018-04-08T21:58:00.000Z", "completeDate": "2018-04-08T17:56:19.404Z", "originBoardId": 219 }, { "id": 991, "state": "closed", "name": "2018 Sprint 02 Tooling", "startDate": "2018-01-14T22:42:09.481Z", "endDate": "2018-01-28T22:42:00.000Z", "completeDate": "2018-01-29T16:24:16.051Z", "originBoardId": 219 }, { "id": 1007, "state": "closed", "name": "2018 Sprint 05 Tooling", "startDate": "2018-02-25T17:48:46.503Z", "endDate": "2018-03-11T16:48:00.000Z", "completeDate": "2018-03-11T22:21:44.972Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "328232", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "What changed and to what degree that means underscore is no longer a viable library? If one or two things; baby and bath water comes to mind. If everything - then how did this happen on a dot update? ", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2014-10-15T20:03:48.000+0000", "updated": "2014-10-15T20:03:48.000+0000" }, { "id": "328233", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "With ALOY-1159 we'll be updating to Underscore 1.6.0. The key change between it and 1.7 seems to be:\r\n\r\n{quote}\r\n\"Underscore templates no longer accept an initial data object. {{_.template}} always returns a function now.\"\r\n{quote}\r\n\r\n from http://underscorejs.org/#changelog However, even accounting for that difference, the Alloy compiler errors out with a \".split is not a method of undefined\" error. The fix for that might be easy, and might be the ultimate change here.\r\n\r\nLodash offers an underscore-compatible version, is faster, offers additional methods which are not provided by underscore, and provides more consistent APIs. See http://stackoverflow.com/a/13898916/292947 for example. There's also a Backbone-only subset, which devs could possibly drop in for greater speed / smaller size if they're not using other functions. \r\n\r\nIf we go with lodash, we would use the underscore version and expose it within Alloy as the {{_}} variable so that the change should be transparent to developers. \r\n\r\n", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-10-15T20:21:48.000+0000", "updated": "2014-10-15T20:21:48.000+0000" }, { "id": "355744", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "This priority should be higher, the performance and extra functions are a huge help for development.\r\n\r\nI've personally added it myself in the Alloy.js file already (by overriding the `_` variable) but sadly it is overwritten during compilation on each `app/models/*.js` file, so I cant use it everywhere.\r\n\r\nIt would be a really nice feature to actually edit the `alloy.js` yourself, because its very unclear that additional javascript is added during compiletime. Why dont we just have a one-time-only generated alloy.js? ", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2015-06-23T12:29:14.000+0000", "updated": "2015-06-23T12:29:14.000+0000" }, { "id": "371455", "author": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "body": "Can we increase the priority for this improvement?\r\n\r\nPerhaps even we should aim for a setup where the end user can use an `alloypackage.json` to decide which packages to require (but somehow still have a default package.json shipped with Alloy which is overwritable and in the root of the project dir).\r\n\r\nImagine a package.json where all modules are automagically loaded into the Alloy namespace...", "updateAuthor": { "name": "creative_jira_user", "key": "uzbbert", "displayName": "Creative", "active": false, "timeZone": "Europe/Amsterdam" }, "created": "2015-11-25T13:17:21.000+0000", "updated": "2015-11-25T13:17:21.000+0000" }, { "id": "379746", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "I am getting ready to replace underscore w/ lodash and can submit a PR when it is finished, if so desired. Is there any reason that the underscore used by the build is tied to the underscore used by the app? Can those two be separated so that Alloy build uses its own underscore/lodash and the app has its own version? Thanks!", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2016-03-15T13:56:54.000+0000", "updated": "2016-03-15T13:56:54.000+0000" }, { "id": "379886", "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": "2016-03-16T16:30:10.000+0000", "updated": "2016-03-16T16:32:45.000+0000" }, { "id": "432044", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "PR: https://github.com/appcelerator/alloy/pull/862\r\nNote: the pr only take `lodash` as an npm dependency and use it internally by the Alloy complier.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-12-12T18:47:35.000+0000", "updated": "2017-12-12T18:47:35.000+0000" }, { "id": "432048", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "https://github.com/appcelerator/alloy/pull/842 includes a version of `lodash` in the `lib` folder.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-12-12T19:51:15.000+0000", "updated": "2017-12-12T19:51:15.000+0000" }, { "id": "450336", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Was the lodash change ever merged to Alloy or does it still use Underscore? ", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-08-08T08:28:03.000+0000", "updated": "2019-08-08T08:28:03.000+0000" }, { "id": "450341", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "At runtime, alloy still uses underscore. I'll add this into the \"Alloy 2.0.0\" release just to keep it on my radar", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-08-08T09:54:12.000+0000", "updated": "2019-08-08T09:54:12.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }