{ "id": "174997", "key": "TIMOB-27888", "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": "21050", "name": "Release 10.0.0", "archived": false, "released": true, "releaseDate": "2021-05-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-01-13T16:11:56.000+0000", "created": "2020-05-07T15:53:01.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "engSchedule" ], "versions": [], "issuelinks": [ { "id": "58356", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171078", "key": "TIMOB-25768", "fields": { "summary": "Use rollup to avoid circular references with ES6 imports in JavascriptCore", "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 } } } }, { "id": "58746", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "175359", "key": "TIMOB-28037", "fields": { "summary": "iOS: Relative path require not working with node_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": "Medium", "id": "3" }, "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": "2021-01-29T17:11:53.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": "While Android's require implementation is able to handle circular references - iOS is not.\r\n\r\nThis is due to the underlying implementations - where Android is written in JS and mimics Node.js, while iOS is native. There's multiple possible solutions here:\r\n- Use rollup under the hood on apps as part of our build process.\r\n- Migrate iOS to use a shared require implementation with Android\r\n\r\nI personally prefer the second, but it'd take some re-architecting of how iOS starts up - and it's unclear to me how we'd tweak Android to use a require implementation under common rather than the one baked into the the runtime (the JS is baked in as bytes and executed early).", "attachment": [], "flagged": false, "summary": "iOS: circular references in require don't work", "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": 1208, "state": "closed", "name": "2020 Sprint 21", "startDate": "2020-10-12T16:34:00.000Z", "endDate": "2020-10-23T16:34:00.000Z", "completeDate": "2020-10-23T02:32:43.674Z", "originBoardId": 114 }, { "id": 1209, "state": "closed", "name": "2020 Sprint 22", "startDate": "2020-10-27T02:33:00.000Z", "endDate": "2020-11-07T02:33:00.000Z", "completeDate": "2020-11-06T17:45:42.610Z", "originBoardId": 114 }, { "id": 1210, "state": "closed", "name": "2020 Sprint 23", "startDate": "2020-11-09T17:49:00.000Z", "endDate": "2020-11-20T17:49:00.000Z", "completeDate": "2020-11-20T17:46:00.641Z", "originBoardId": 114 }, { "id": 1211, "state": "closed", "name": "2020 Sprint 24", "startDate": "2020-11-23T18:12:00.000Z", "endDate": "2020-12-07T18:12:00.000Z", "completeDate": "2020-12-04T22:07:24.313Z", "originBoardId": 114 }, { "id": 1212, "state": "closed", "name": "2020 Sprint 25", "startDate": "2020-12-07T22:11:00.000Z", "endDate": "2020-12-18T22:11:00.000Z", "completeDate": "2020-12-18T16:35:34.544Z", "originBoardId": 114 }, { "id": 1213, "state": "closed", "name": "2020 Sprint 26", "startDate": "2020-12-21T16:40:00.000Z", "endDate": "2021-01-08T16:40:00.000Z", "completeDate": "2021-01-08T17:37:31.799Z", "originBoardId": 114 }, { "id": 1214, "state": "closed", "name": "2021 Sprint 1", "startDate": "2021-01-04T17:38:57.886Z", "endDate": "2021-01-15T17:38:00.000Z", "completeDate": "2021-01-15T20:35:11.006Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "457999", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged to master (along with large refactor to help unify require implementations cross-platform). Unit tests confirm the fix.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2021-01-13T16:11:56.000+0000", "updated": "2021-01-13T16:11:56.000+0000" }, { "id": "458114", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, verified in SDK version {{10.0.0.v20210126123332}}.\r\n\r\n*+Test case:+*\r\napp.js\r\n{code:java}\r\nconst b = require('./b');\r\n\r\nb.log();\r\n\r\nexports.value = 'a thing';\r\n\r\nb.log();\r\n\r\n{code}\r\n\r\nb.js\r\n{code:java}\r\nconst a = require('./app.js');\r\n\r\nexports.log = function () {\r\n console.log(a.value);\r\n}\r\n\r\n{code}\r\n\r\n*+Test Environment+*\r\n\r\n{code:java}\r\nMacOS Big Sur: 11.1 \r\nXcode: 12.3\r\nJava Version: 1.8.0_242\r\nAndroid NDK: 21.3.6528147\r\nNode.js: 12.18.1\r\n\"\"NPM\":\"5.0.0\",\"CLI\":\"8.1.1\"\"\r\niPhone 8 14.4\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-01-29T17:11:39.000+0000", "updated": "2021-01-29T17:11:39.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }