{"action":"closed","issue":{"url":"https://api.github.com/repos/msrose/babel-plugin-transform-amd-to-commonjs/issues/39","repository_url":"https://api.github.com/repos/msrose/babel-plugin-transform-amd-to-commonjs","labels_url":"https://api.github.com/repos/msrose/babel-plugin-transform-amd-to-commonjs/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/msrose/babel-plugin-transform-amd-to-commonjs/issues/39/comments","events_url":"https://api.github.com/repos/msrose/babel-plugin-transform-amd-to-commonjs/issues/39/events","html_url":"https://github.com/msrose/babel-plugin-transform-amd-to-commonjs/issues/39","id":295934673,"node_id":"MDU6SXNzdWUyOTU5MzQ2NzM=","number":39,"title":"Support arbitrary AST nodes passed as a factory","user":{"login":"msrose","id":3495264,"node_id":"MDQ6VXNlcjM0OTUyNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3495264?v=4","gravatar_id":"","url":"https://api.github.com/users/msrose","html_url":"https://github.com/msrose","followers_url":"https://api.github.com/users/msrose/followers","following_url":"https://api.github.com/users/msrose/following{/other_user}","gists_url":"https://api.github.com/users/msrose/gists{/gist_id}","starred_url":"https://api.github.com/users/msrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msrose/subscriptions","organizations_url":"https://api.github.com/users/msrose/orgs","repos_url":"https://api.github.com/users/msrose/repos","events_url":"https://api.github.com/users/msrose/events{/privacy}","received_events_url":"https://api.github.com/users/msrose/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-09T16:43:53Z","updated_at":"2018-10-20T01:31:54Z","closed_at":"2018-10-20T01:31:54Z","author_association":"OWNER","body":"In order to support modules like the exmple in #38:\r\n```js\r\n( function( factory ) {\r\n\tif ( typeof define === \"function\" && define.amd ) {\r\n\r\n\t\t// AMD. Register as an anonymous module.\r\n\t\tdefine( [ \"jquery\", \"./version\" ], factory );\r\n\t} else {\r\n\r\n\t\t// Browser globals\r\n\t\tfactory( jQuery );\r\n\t}\r\n}( function( $ ) {\r\n```\r\nSince factory is not a function literal, the plugin currently assumes it is a non-function factory, when it could in fact still be a function. See discussion in #38 for how webpack handles this. Likely approach will have to involve a runtime typeof check on the node passed as factory."}}
{"actor":{"display_login":"msrose"}}