{ "id": "173799", "key": "TIMOB-27181", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-02T14:32:11.000+0000", "created": "2019-06-22T19:00:50.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": "57709", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "172162", "key": "TIMOB-26352", "fields": { "summary": "CLI: node_modules in project root should be handled properly", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "updated": "2019-10-02T14:32:11.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": "13103", "name": "CLI", "description": "Node-based command line interface" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Related to TIMOB-26352 because both would take advantage of npm and node_modules in the root directory of the project. \r\n\r\nSpecifically for native modules, the directories would not get copied to Resources directory like normal commonjs Titanium packages but would instead get \"installed\" by copying to the modules directory and modifying the {{tiapp.xml file}} to add those modules to the app.\r\n\r\nOne way of doing this would be to add a \"titanium\" property to the {{package.json}} of the npm package that contains the native modules. \r\n\r\nPossibly something like this:\r\n\r\n\r\n\r\n{code:java}\r\n\r\n \"titanium\": {\r\n \"nativeModules\": true\r\n }\r\n\r\n{code}\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "CLI: add ability to install native modules via npm", "creator": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "environment": null, "comment": { "comments": [ { "id": "449476", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "As you're now aware, we already have this done: https://github.com/appcelerator/node-appc/pull/148\r\n\r\n\r\nThe larger issues that we don't have tickets for:\r\n- I limited it to only scan top-level modules, not nested to try and avoid native module collisions. native modules are \"singletons\" - you can't make use of multiple versions of the same module. I don't know that our tooling will see that and enforce it especially when looking at an app that may have multiple installs under the node_modules folder\r\n- We do not yet publish any of our native modules to npm. We need to modify our Jenkins builds to support it\r\n- When we do publish them, should we do so under a scoped name like `@titanium`, `@appcelerator`, `@appcelerator-modules`?\r\n- There's duplication of effort on the user's point in that just installing a native module through npm does not modify the tiapp.xml for them - they need to add it there themselves and make sure the versions match up. Maybe we can do some magic in some npm script hook that'd run post install and do it for them?\r\n- Our native modules with multiple platforms often have wildly varying versions between the Ones. What do we publish the npm package as? The higher of the two? Publish separate packages for each platform?\r\n- The npm package name and the module id do not have to match. Do we want to begin moving that way?", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-06-28T18:37:36.000+0000", "updated": "2019-06-28T18:37:36.000+0000" }, { "id": "449477", "author": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "[~cwilliams] - We can go ahead and close this one. I wasn't aware of the changes in node-appc when I created this ticket. We can just create separate tickets for the features in your list that we want to include. ", "updateAuthor": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2019-06-28T18:51:32.000+0000", "updated": "2019-06-28T18:51:32.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }