{ "id": "160270", "key": "TIMOB-23382", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-06-10T08:07:56.000+0000", "created": "2016-05-16T17:13:43.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "notable", "parity" ], "versions": [ { "id": "17707", "name": "Release 5.3.0", "archived": false, "released": true, "releaseDate": "2016-06-04" } ], "issuelinks": [ { "id": "51699", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "160269", "key": "TIMOB-23381", "fields": { "summary": "Parity: Titanium CommonJS modules require'd differently than NodeJS require spec", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "57018", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172628", "key": "TIMOB-26570", "fields": { "summary": "Node compatibility and developer experience", "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": "High", "id": "2" }, "issuetype": { "id": "6", "description": "gh.issue.epic.desc", "name": "Epic", "subtask": false } } } }, { "id": "51721", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "160272", "key": "TIMOB-23383", "fields": { "summary": "Parity: Titanium CommonJS modules cannot require relative files", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51720", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "124137", "key": "TIMOB-16078", "fields": { "summary": "Implement full NodeJS require specs so we can use NPM for modules", "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": "Critical", "id": "1" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "51719", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "155148", "key": "TIMOB-20472", "fields": { "summary": "Allow require to find modules in node_modules, etc", "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": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "53010", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "163704", "key": "TIMOB-23983", "fields": { "summary": "iOS Debugger: Breakpoint not hit for Alloy applications", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "51723", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "159265", "key": "TIMOB-23138", "fields": { "summary": "Parity: On Android require() tries current folder first", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2018-11-16T15:40:54.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": "10202", "name": "Android", "description": "Android Platform" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "If you attempt to require a directory, NodeJS has well-defined behavior: https://nodejs.org/api/modules.html#modules_all_together\r\n\r\nNamely:\r\n- try to load {{dir/package.json}} and grab the {{main}} property, load the file pointed to by that.\r\n- try to load {{dir/index.js}} as JS\r\n- try to load {{dir/index.json}} as JSON\r\n\r\nTrying this on Android and iOS, it just throws a runtime error that the requested module was not found.\r\n", "attachment": [], "flagged": false, "summary": "Parity: Cannot require directory as done in NodeJS", "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": 641, "state": "closed", "name": "2016 Sprint 12 SDK", "startDate": "2016-06-04T00:30:28.612Z", "endDate": "2016-06-18T00:30:00.000Z", "completeDate": "2016-06-20T04:25:16.065Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "385797", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "The NodeJS require algorithm _is_ implemented for Windows SDK.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-16T17:31:01.000+0000", "updated": "2016-05-16T17:31:01.000+0000" }, { "id": "385925", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/8004", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2016-05-17T17:54:11.000+0000", "updated": "2016-05-17T17:54:11.000+0000" }, { "id": "388014", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Works great!\r\n\r\nh4. Steps to test\r\n1. *appc new --classic*\r\n2. Obtain this module {{scapegoat}} from https://github.com/brentertz/scapegoat\r\n3. put the module in {{/Resources/scapegoat}}\r\n4. put this in app.js\r\n{code}\r\nTi.UI.createWindow().open();\r\nvar scapegoat = require('scapegoat')\r\n escape = scapegoat.escape,\r\n unescape = scapegoat.unescape;\r\n\r\nvar html = '

Hello World

',\r\n escaped = escape(html),\r\n unescaped = unescape(escaped);\r\n \r\nalert('html: ' + html + '\\nescaped: ' + escaped + '\\nunescaped: ' + unescaped);\r\n{code}\r\n5. *appc run -p ios*\r\n\r\nh4. Expected Result\r\nAn alert will show with this result \r\n{code}\r\nhtml:

Hello World

\r\nescaped: <h1>Hello World</h1>\r\nunescaped:

Hello World

\r\n{code}\r\n\r\nRepeat with *appc -run -p android* you can get the same result\r\n\r\nPR MERGED!!", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T07:44:28.000+0000", "updated": "2016-06-10T08:03:08.000+0000" }, { "id": "388015", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Did the same for android. Same results.\r\n{code}\r\nhtml:

Hello World

\r\nescaped: <h1>Hello World</h1>\r\nunescaped:

Hello World

\r\n{code}\r\nWorks well.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-06-10T08:02:32.000+0000", "updated": "2016-06-10T08:02:32.000+0000" }, { "id": "388017", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~bimmel] probably need to be documented somehow like \"hey, Titanium can require directory like what NodeJS does normally now\"", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T08:06:57.000+0000", "updated": "2016-06-10T08:06:57.000+0000" }, { "id": "388053", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the heads up [~cng]. I'll add this to the docs when we get to 6.0.0 release.\r\n", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T14:11:04.000+0000", "updated": "2016-06-10T14:11:04.000+0000" }, { "id": "388094", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Thanks [~cwilliams]. I'll take a look at it and write up a little something and post it back here for review.", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T20:38:57.000+0000", "updated": "2016-06-10T20:38:57.000+0000" }, { "id": "388102", "author": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~cwilliams] and [~cng], I've written up a first draft of the changes per this ticket:\r\nhttps://wiki.appcelerator.org/display/~bimmel/2016/06/10/Daily+Update+6-10-16#DailyUpdate6-10-16-RequireDirectory\r\n\r\nLet me know what I got right and wrong.\r\nThanks", "updateAuthor": { "name": "bimmel-defective", "key": "bimmel", "displayName": "(deactived) Brian Immel", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-06-10T21:34:11.000+0000", "updated": "2016-06-10T21:34:11.000+0000" }, { "id": "393207", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nUsed the test case above.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.7.0.201607250649\r\nTi SDK : 6.0.0.v20160814220332\r\nTi CLI : 5.0.9\r\nAlloy : 1.9.1\r\nMAC El Capitan : 10.11.6\r\nAppc NPM : 4.2.7\r\nAppc CLI : 6.0.0-24\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.1\r\niOS simulator: Iphone 6s 9.3", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-08-15T20:30:22.000+0000", "updated": "2016-08-15T20:32:44.000+0000" } ], "maxResults": 11, "total": 11, "startAt": 0 } } }