{"action":"closed","number":131,"pull_request":{"url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131","id":88308620,"html_url":"https://github.com/gcanti/babel-plugin-tcomb/pull/131","diff_url":"https://github.com/gcanti/babel-plugin-tcomb/pull/131.diff","patch_url":"https://github.com/gcanti/babel-plugin-tcomb/pull/131.patch","issue_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/131","number":131,"state":"closed","locked":false,"title":"Support default type import shorthand.","user":{"login":"STRML","id":1197375,"avatar_url":"https://avatars.githubusercontent.com/u/1197375?v=3","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"body":"Without this patch, the following error occurs:\r\n\r\n```\r\n1) emit asserts for:  should import type external default:\r\n   /Users/samuelreed/git/forks/babel-plugin-tcomb/test/fixtures/import-type-external-default/actual.js: Property property of MemberExpression expected node to be of a type [\"Identifier\"] but instead got null\r\nTypeError: test/fixtures/import-type-external-default/actual.js: Property property of MemberExpression expected node to be of a type [\"Identifier\"] but instead got null\r\n    at validate (node_modules/babel-types/lib/definitions/index.js:109:13)\r\n    at Object.validate (node_modules/babel-types/lib/definitions/core.js:412:50)\r\n    at validate (node_modules/babel-types/lib/index.js:505:9)\r\n    at Object.builder (node_modules/babel-types/lib/index.js:466:7)\r\n    at src/index.js:688:15\r\n    at Array.map (native)\r\n    at getExternalImportDeclaration (src/index.js:681:48)\r\n    at PluginPass.ImportDeclaration (src/index.js:769:38)\r\n    at newFn (node_modules/babel-traverse/lib/visitors.js:276:21)\r\n    at NodePath._call (node_modules/babel-traverse/lib/path/context.js:76:18)\r\n    at NodePath.call (node_modules/babel-traverse/lib/path/context.js:48:17)\r\n    at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:105:12)\r\n    at TraversalContext.visitQueue (node_modules/babel-traverse/lib/context.js:150:16)\r\n    at TraversalContext.visitMultiple (node_modules/babel-traverse/lib/context.js:103:17)\r\n    at TraversalContext.visit (node_modules/babel-traverse/lib/context.js:190:19)\r\n    at Function.traverse.node (node_modules/babel-traverse/lib/index.js:114:17)\r\n    at NodePath.visit (node_modules/babel-traverse/lib/path/context.js:115:19)\r\n    at TraversalContext.visitQueue (node_modules/babel-traverse/lib/context.js:150:16)\r\n    at TraversalContext.visitSingle (node_modules/babel-traverse/lib/context.js:108:19)\r\n    at TraversalContext.visit (node_modules/babel-traverse/lib/context.js:192:19)\r\n    at Function.traverse.node (node_modules/babel-traverse/lib/index.js:114:17)\r\n    at traverse (node_modules/babel-traverse/lib/index.js:79:12)\r\n    at File.transform (node_modules/babel-core/lib/transformation/file/index.js:563:35)\r\n    at node_modules/babel-core/lib/transformation/pipeline.js:50:19\r\n    at File.wrap (node_modules/babel-core/lib/transformation/file/index.js:579:16)\r\n    at Pipeline.transform (node_modules/babel-core/lib/transformation/pipeline.js:47:17)\r\n    at Object.transformFileSync (node_modules/babel-core/lib/api/node.js:138:10)\r\n    at Context.<anonymous> (test/index.js:220:28)\r\n```\r\n\r\nWe noticed this in our code where we do a few things like `import type X from 'x'`, internal or external. I noticed the error went away when doing `import type {default as X} from 'x'` so it seemed like a simple fix.","created_at":"2016-10-06T17:45:48Z","updated_at":"2016-10-07T05:26:44Z","closed_at":"2016-10-07T05:26:44Z","merged_at":"2016-10-07T05:26:44Z","merge_commit_sha":"23a7c85267af063c075c095b942b728261ce97c0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131/commits","review_comments_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131/comments","review_comment_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/131/comments","statuses_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/statuses/8bc6065ea7bb874966c8946516afa783c89b3cb8","head":{"label":"STRML:default-type-import","ref":"default-type-import","sha":"8bc6065ea7bb874966c8946516afa783c89b3cb8","user":{"login":"STRML","id":1197375,"avatar_url":"https://avatars.githubusercontent.com/u/1197375?v=3","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"repo":{"id":70177194,"name":"babel-plugin-tcomb","full_name":"STRML/babel-plugin-tcomb","owner":{"login":"STRML","id":1197375,"avatar_url":"https://avatars.githubusercontent.com/u/1197375?v=3","gravatar_id":"","url":"https://api.github.com/users/STRML","html_url":"https://github.com/STRML","followers_url":"https://api.github.com/users/STRML/followers","following_url":"https://api.github.com/users/STRML/following{/other_user}","gists_url":"https://api.github.com/users/STRML/gists{/gist_id}","starred_url":"https://api.github.com/users/STRML/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STRML/subscriptions","organizations_url":"https://api.github.com/users/STRML/orgs","repos_url":"https://api.github.com/users/STRML/repos","events_url":"https://api.github.com/users/STRML/events{/privacy}","received_events_url":"https://api.github.com/users/STRML/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/STRML/babel-plugin-tcomb","description":"Babel plugin for static and runtime type checking using Flow and tcomb","fork":true,"url":"https://api.github.com/repos/STRML/babel-plugin-tcomb","forks_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/forks","keys_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/teams","hooks_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/hooks","issue_events_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/issues/events{/number}","events_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/events","assignees_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/assignees{/user}","branches_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/branches{/branch}","tags_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/tags","blobs_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/git/refs{/sha}","trees_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/statuses/{sha}","languages_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/languages","stargazers_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/stargazers","contributors_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/contributors","subscribers_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/subscribers","subscription_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/subscription","commits_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/commits{/sha}","git_commits_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/git/commits{/sha}","comments_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/comments{/number}","issue_comment_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/issues/comments{/number}","contents_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/contents/{+path}","compare_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/merges","archive_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/downloads","issues_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/issues{/number}","pulls_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/pulls{/number}","milestones_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/milestones{/number}","notifications_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/labels{/name}","releases_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/releases{/id}","deployments_url":"https://api.github.com/repos/STRML/babel-plugin-tcomb/deployments","created_at":"2016-10-06T17:34:27Z","updated_at":"2016-10-06T17:34:28Z","pushed_at":"2016-10-06T18:11:50Z","git_url":"git://github.com/STRML/babel-plugin-tcomb.git","ssh_url":"git@github.com:STRML/babel-plugin-tcomb.git","clone_url":"https://github.com/STRML/babel-plugin-tcomb.git","svn_url":"https://github.com/STRML/babel-plugin-tcomb","homepage":"","size":331,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gcanti:master","ref":"master","sha":"2b1864d562054b83e7b1083cc1b237bb077a2867","user":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"repo":{"id":36524685,"name":"babel-plugin-tcomb","full_name":"gcanti/babel-plugin-tcomb","owner":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gcanti/babel-plugin-tcomb","description":"Babel plugin for static and runtime type checking using Flow and tcomb","fork":false,"url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb","forks_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/forks","keys_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/teams","hooks_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/hooks","issue_events_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/events{/number}","events_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/events","assignees_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/assignees{/user}","branches_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/branches{/branch}","tags_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/tags","blobs_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/git/refs{/sha}","trees_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/statuses/{sha}","languages_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/languages","stargazers_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/stargazers","contributors_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/contributors","subscribers_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/subscribers","subscription_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/subscription","commits_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/commits{/sha}","git_commits_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/git/commits{/sha}","comments_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/comments{/number}","issue_comment_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/comments{/number}","contents_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/contents/{+path}","compare_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/merges","archive_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/downloads","issues_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues{/number}","pulls_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls{/number}","milestones_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/milestones{/number}","notifications_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/labels{/name}","releases_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/releases{/id}","deployments_url":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/deployments","created_at":"2015-05-29T19:28:27Z","updated_at":"2016-10-06T21:07:41Z","pushed_at":"2016-10-07T05:26:44Z","git_url":"git://github.com/gcanti/babel-plugin-tcomb.git","ssh_url":"git@github.com:gcanti/babel-plugin-tcomb.git","clone_url":"https://github.com/gcanti/babel-plugin-tcomb.git","svn_url":"https://github.com/gcanti/babel-plugin-tcomb","homepage":"","size":376,"stargazers_count":244,"watchers_count":244,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":26,"forks":10,"open_issues":26,"watchers":244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131"},"html":{"href":"https://github.com/gcanti/babel-plugin-tcomb/pull/131"},"issue":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/131"},"comments":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/gcanti/babel-plugin-tcomb/statuses/8bc6065ea7bb874966c8946516afa783c89b3cb8"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":1,"changed_files":5}}
{"actor":{"display_login":"gcanti"}}