{ "id": "172631", "key": "TIMOB-26572", "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": "20950", "name": "Release 9.1.0", "archived": false, "released": true, "releaseDate": "2020-08-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-03-06T16:35:54.000+0000", "created": "2018-11-16T16:24:13.000+0000", "epic": { "id": 172628, "key": "TIMOB-26570", "name": "Node Compatibility", "summary": "Node compatibility and developer experience", "color": { "key": "color_3" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [ { "id": "58072", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "170170", "key": "TIMOB-25453", "fields": { "summary": "iOS: console.error.bind is not a function", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57078", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "112212", "key": "TIMOB-13379", "fields": { "summary": "TiAPI: Add support for console.time and console.timeEnd", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "57079", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171770", "key": "TIMOB-26115", "fields": { "summary": "TiAPI: Add support for console.timeLog", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "57839", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174130", "key": "TIMOB-27399", "fields": { "summary": "Android: Work around android log truncation limit for Ti.API logging", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2020-03-31T17:11:05.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Our current console global object has the most common methods, but is missing some easy ones to target.\r\n\r\n- assert\r\n- count\r\n- countReset\r\n- trace\r\n\r\nSome other methods may be useful to simply implement as no-ops (like #clear())\r\n\r\nhttps://nodejs.org/api/console.html\r\n\r\nTony Lukasavage has a JS impl to add trace/assert/dir here: https://github.com/tonylukasavage/ti-console/blob/master/src/ti-console.js\r\n", "attachment": [], "flagged": false, "summary": "TiAPI: Extend global console API to be more Node-compatible", "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": 1181, "state": "closed", "name": "2020 Sprint 5", "startDate": "2020-03-02T18:45:02.513Z", "endDate": "2020-03-13T18:45:00.000Z", "completeDate": "2020-03-13T16:42:04.632Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444753", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "I think given that on Android and Windows we already have JS code to implement some of console, it'd be fairly simple to move this into the common area and expand upon it.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/master/android/runtime/common/src/js/console.js\r\nhttps://github.com/appcelerator/titanium_mobile_windows/blob/master/Source/TitaniumKit/src/TiModule.cpp#L493-L531\r\n\r\n\r\n", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2018-12-19T19:30:20.000+0000", "updated": "2018-12-19T19:30:20.000+0000" }, { "id": "444943", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cwilliams] I started to look into this, I'm not sure whether we would consider it a breaking change? iOS defines a [TiConsole|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/API/TiConsole.m], which is then added to the globals [here|https://github.com/appcelerator/titanium_mobile/blob/master/iphone/TitaniumKit/TitaniumKit/Sources/API/KrollBridge.m#L557-L560]. Is TitaniumKit itself seen as a public API, or is just Titanium SDK our public API. As I understand, if it's the former then this should be a breaking change", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2019-01-02T22:08:32.000+0000", "updated": "2019-01-02T22:08:32.000+0000" }, { "id": "450125", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "The original goal from Matt Langston back in the early days of TitaniumKit/HAL was to make that the core foundation of all the platforms, but no one has the appetite to throw away our core stuff on iOS and replace it - let alone consider how we'd hook up JSC for Android. I'd only consider the SDK as our public API.\r\n\r\nI don't think this should be a breaking change, basically we just move any methods we can into the common JS code we ship in the SDK and leave say the base methods (like {{#log()}}) done natively. If we want to be extra safe, we can sniff if the console object already has an implementation for any given method and not override it.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-07-29T14:44:33.000+0000", "updated": "2019-07-29T14:44:33.000+0000" }, { "id": "453528", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "WIP PR: https://github.com/appcelerator/titanium_mobile/pull/11425", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-09T16:07:18.000+0000", "updated": "2020-01-09T16:07:18.000+0000" }, { "id": "453593", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/11425", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-09T21:24:21.000+0000", "updated": "2020-01-09T21:24:21.000+0000" }, { "id": "454580", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master for 9.1.0 target", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-03-06T16:35:54.000+0000", "updated": "2020-03-06T16:35:54.000+0000" }, { "id": "454917", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed: Tested by looking at the results of the Unit tests in Jenkins and a quick titanium application outlining various features. \r\n\r\n\r\n{code:java}\r\nvar window = Titanium.UI.createWindow({\r\n backgroundColor:'white'\r\n});\r\n\r\nconsole.log('*********************************************************************************************')\r\nconsole.log('Log')\r\nconsole.info('info')\r\nconsole.error('error')\r\nconsole.warn('warm')\r\nconsole.log('*********************************************************************************************')\r\n\r\nconsole.log('*********************************************************************************************')\r\nconsole.time('mytimer'); // Start timer\r\nconsole.timeLog('mytimer'); // Log time taken so far\r\nconsole.timeLog('mytimer', 'with', 'some', 'extra', 'info'); // Log time taken with extra logging\r\nconsole.timeLog('mytimer', [ 'a', 'b', 'c' ], { objects: true }); // Should handle Arrays and Objects\r\nconsole.timeEnd('mytimer');\r\nconsole.log('*********************************************************************************************')\r\n\r\nvar buttonClear = Titanium.UI.createButton({\r\ntitle: 'Clear',\r\ntop: 10,\r\n});\r\nbuttonClear.addEventListener('click',function(e)\r\n{\r\n console.clear()\r\n console.log('Clear should be a function, does not do anything')\r\n});\r\n\r\nvar buttonCount = Titanium.UI.createButton({\r\ntitle: 'Count',\r\ntop: 30,\r\n});\r\nbuttonCount.addEventListener('click',function(e)\r\n{\r\n console.count()\r\n});\r\n\r\nvar buttonClearCount = Titanium.UI.createButton({\r\ntitle: 'Clear Count',\r\ntop: 50,\r\n});\r\nbuttonClearCount.addEventListener('click',function(e)\r\n{\r\n console.countReset()\r\n});\r\n\r\nvar buttonGroup = Titanium.UI.createButton({\r\ntitle: 'Group',\r\ntop: 70,\r\n});\r\nbuttonGroup.addEventListener('click',function(e)\r\n{\r\n const logs = [];\r\n \t\t\tconst fakeTiAPI = {\r\n \t\t\t\twarn: msg => {\r\n \t\t\t\t\tlogs.push(`[WARN]${msg}`);\r\n \t\t\t\t},\r\n \t\t\t\tdebug: msg => {\r\n \t\t\t\t\tlogs.push(`[DEBUG]${msg}`);\r\n \t\t\t\t},\r\n \t\t\t\tinfo: msg => {\r\n \t\t\t\t\tlogs.push(`[INFO]${msg}`);\r\n \t\t\t\t},\r\n \t\t\t\terror: msg => {\r\n \t\t\t\t\tlogs.push(`[ERROR]${msg}`);\r\n \t\t\t\t},\r\n \t\t\t\tapiName: 'Ti.API',\r\n \t\t\t};\r\n console.group('mylabel');\r\n \t\t\tconsole.log('this should be indented');\r\n \t\t\tconsole.groupEnd();\r\n \t\t\tconsole.group();\r\n \t\t\tconsole.group('something');\r\n \t\t\tconsole.warn('this should be indented twice'); // FIXME: Hijack warn too!\r\n \t\t\tconsole.groupEnd();\r\n \t\t\tconsole.log('this should be indented');\r\n \t\t\tconsole.groupEnd();\r\n \t\t\tconsole.log('this should NOT be indented');\r\n});\r\n\r\nvar buttonDir = Titanium.UI.createButton({\r\ntitle: 'Dir',\r\ntop: 90,\r\n});\r\nbuttonDir.addEventListener('click',function(e)\r\n{\r\n console.dir(1);\r\n console.dir('1');\r\n console.dir(null);\r\n console.dir(undefined);\r\n console.dir({ 1: [ 2 ] });\r\n});\r\n\r\nwindow.open({fullscreen:true});\r\nwindow.add(buttonClear)\r\nwindow.add(buttonCount)\r\nwindow.add(buttonClearCount)\r\nwindow.add(buttonGroup)\r\nwindow.add(buttonDir)\r\n\r\n{code}\r\n\r\n*Test environment*\r\n{code:java}\r\nMacOS Catalina: 10.15.1 beta\r\nXcode: 11.3\r\nJava Version: 1.8.0_131\r\nAndroid NDK: 21.1.6273396-beta2\r\nNode.js: 10.16.3\r\n\"\"NPM\":\"5.0.0-1\",\"CLI\":\"8.0.0-master.10\"\"\r\nPixel Xl 7.1.1 Sim\r\niphone x (ios13 sime)\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-31T17:10:49.000+0000", "updated": "2020-03-31T17:10:49.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }