{ "id": "172735", "key": "TIMOB-26648", "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": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-12-13T15:17:08.000+0000", "created": "2018-12-13T11:22:20.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "parity" ], "versions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-01-03T12:26:28.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "Relates to https://github.com/appcelerator/HAL/pull/86 , https://github.com/appcelerator/titanium-mobile-mocha-suite/blob/master/Resources/timers.test.js#L170-L176 and https://github.com/appcelerator/titanium_mobile/blob/master/common/Resources/ti.internal/extensions/binding.js\r\n\r\nWe already modified this behavior on iOS to allow to override global functions like `setTimeout`, which is typical of an environment like Node and is assumed by some of the popular JS testing frameworks.\r\n\r\nI also ran into issues in overriding the standard require function in an effort to introduce cross-platform JS implementations of node-compatible \"core\" modules.\r\n\r\niOS PR: appcelerator/titanium_mobile#10155\r\nunit tests we're skipping on Windows due to this\r\n\r\n{code}\r\nvar originalRequire = global.require;\r\n\r\nglobal.require = function (moduleId) {\r\n Ti.API.info('Overridden require');\r\n return originalRequire(moduleId);\r\n}\r\n\r\nrequire('require_test');\r\n{code}\r\n\r\nExpected: `Overridden require` should be shown before requiring files.\r\n", "attachment": [], "flagged": false, "summary": "Windows: ability to override global functions", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1103, "state": "closed", "name": "2018 Sprint 25", "startDate": "2018-12-02T16:29:21.531Z", "endDate": "2018-12-16T16:29:00.000Z", "completeDate": "2018-12-15T02:33:24.870Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444578", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile_windows/pull/1334", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-12-13T11:23:16.000+0000", "updated": "2018-12-13T11:23:16.000+0000" }, { "id": "444961", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket. Fix verified in SDK version {{8.0.0.v20190102142454}}.\r\n{code:java}\r\n[INFO] Overridden require\r\n{code}\r\nIs shown before the module is required. \r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile_windows/pull/1334\r\n\r\n*Test Environment*\r\n{code:java}\r\nOperating System\r\n Name = Microsoft Windows 10 Pro\r\n Version = 10.0.17134\r\n Architecture = 64bit\r\n # CPUs = 4\r\n Memory = 32.0GB\r\n\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.13\r\n Core Package = 7.0.9-3\r\n\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\n node-appc Version = 0.2.44\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T12:26:16.000+0000", "updated": "2019-01-03T12:26:16.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }