{ "id": "78440", "key": "TIMOB-4826", "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": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-11-10T14:18:40.000+0000", "created": "2011-07-28T19:20:43.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [ { "id": "13814", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "79828", "key": "TIMOB-5355", "fields": { "summary": "Javascript parser crash on device when using commonJS 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": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "13813", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "78439", "key": "TIMOB-4825", "fields": { "summary": "Require / Exports file will crash if comments are at the end", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-12-07T16:01:57.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "module.exports is not supported in our require implementation. `module` is undefined.", "attachment": [], "flagged": false, "summary": "module.exports not supported when requiring a file", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": "iOS 4.3.x", "comment": { "comments": [ { "id": "168031", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "FYI, module.exports is not part of CommonJS. It is supported by Node's implementation of modules, and perhaps by a few other implementations (not Rhino, for example).\r\n\r\nThe CommonJS [module spec|http://wiki.commonjs.org/wiki/Modules/1.1.1] explicitly states \"modules must use the \"exports\" object as the *only* means of exporting.\" They're speaking there of the \"free variable\" {{exports}}, not {{module.exports}}. This suggests that using something called {{module.exports}} to export your API is, in fact, \"illegal\". :) NodeJS does it anyway.\r\n\r\nIn the spec's discussion of the {{module}} variable, no reference to an {{exports}} property is ever made.\r\n\r\n(For more of my long-winded arguments, see TIMOB-5406 :) )\r\n\r\n[This discussion|http://groups.google.com/group/commonjs/browse_thread/thread/f994b609460355e3] on the official commonjs mailing list makes it clear that it's a Node thing and that the CommonJS spec folks are by no means unanimous in wanting to adopt it.\r\n\r\nI'm not opposed to supporting it, btw. Just want to make it clear it's not part of the spec and that it will need to be done with parity in mind, because Android uses Rhino's implementation of require() and it is *not* supported therein.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T10:38:57.000+0000", "updated": "2011-10-05T10:40:00.000+0000" }, { "id": "170666", "author": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "http://wiki.commonjs.org/wiki/Modules/1.1#Related_Discussion", "updateAuthor": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-27T13:11:22.000+0000", "updated": "2011-10-27T13:11:22.000+0000" }, { "id": "171844", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hours recorded on 4825. Pull pending. https://github.com/appcelerator/titanium_mobile/pull/647", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-07T17:27:31.000+0000", "updated": "2011-11-07T17:27:31.000+0000" }, { "id": "175262", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing bug. Verified fix on KS > Platform > Common JS using the following environment:\r\n\r\nOS: Mac OS X Lion\r\nTitanium Studio, build: 1.0.7.201112061404\r\nSDK build: 1.8.0.1.v20111207151125\r\nDevice: iphone 4S Sprint (5.0.1)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-07T16:01:51.000+0000", "updated": "2011-12-07T16:01:51.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }