{"action":"created","issue":{"url":"https://api.github.com/repos/canjs/can-migrate/issues/71","repository_url":"https://api.github.com/repos/canjs/can-migrate","labels_url":"https://api.github.com/repos/canjs/can-migrate/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/canjs/can-migrate/issues/71/comments","events_url":"https://api.github.com/repos/canjs/can-migrate/issues/71/events","html_url":"https://github.com/canjs/can-migrate/issues/71","id":298632240,"number":71,"title":"The attr-from codemod has false positives","user":{"login":"matthewp","id":361671,"avatar_url":"https://avatars2.githubusercontent.com/u/361671?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewp","html_url":"https://github.com/matthewp","followers_url":"https://api.github.com/users/matthewp/followers","following_url":"https://api.github.com/users/matthewp/following{/other_user}","gists_url":"https://api.github.com/users/matthewp/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewp/subscriptions","organizations_url":"https://api.github.com/users/matthewp/orgs","repos_url":"https://api.github.com/users/matthewp/repos","events_url":"https://api.github.com/users/matthewp/events{/privacy}","received_events_url":"https://api.github.com/users/matthewp/received_events","type":"User","site_admin":false},"labels":[{"id":561433151,"url":"https://api.github.com/repos/canjs/can-migrate/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"phillipskevin","id":5851984,"avatar_url":"https://avatars2.githubusercontent.com/u/5851984?v=4","gravatar_id":"","url":"https://api.github.com/users/phillipskevin","html_url":"https://github.com/phillipskevin","followers_url":"https://api.github.com/users/phillipskevin/followers","following_url":"https://api.github.com/users/phillipskevin/following{/other_user}","gists_url":"https://api.github.com/users/phillipskevin/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipskevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipskevin/subscriptions","organizations_url":"https://api.github.com/users/phillipskevin/orgs","repos_url":"https://api.github.com/users/phillipskevin/repos","events_url":"https://api.github.com/users/phillipskevin/events{/privacy}","received_events_url":"https://api.github.com/users/phillipskevin/received_events","type":"User","site_admin":false},"assignees":[{"login":"phillipskevin","id":5851984,"avatar_url":"https://avatars2.githubusercontent.com/u/5851984?v=4","gravatar_id":"","url":"https://api.github.com/users/phillipskevin","html_url":"https://github.com/phillipskevin","followers_url":"https://api.github.com/users/phillipskevin/followers","following_url":"https://api.github.com/users/phillipskevin/following{/other_user}","gists_url":"https://api.github.com/users/phillipskevin/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipskevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipskevin/subscriptions","organizations_url":"https://api.github.com/users/phillipskevin/orgs","repos_url":"https://api.github.com/users/phillipskevin/repos","events_url":"https://api.github.com/users/phillipskevin/events{/privacy}","received_events_url":"https://api.github.com/users/phillipskevin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-02-20T15:17:55Z","updated_at":"2018-03-07T23:23:43Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"When running this codemod on donejs-chat I got this diff:\r\n\r\n```diff\r\ndiff --git a/src/index.stache b/src/index.stache\r\nindex d1081d3..7da4817 100644\r\n--- a/src/index.stache\r\n+++ b/src/index.stache\r\n@@ -3,15 +3,15 @@\r\n     <title>{{title}}</title>\r\n   </head>\r\n   <body>\r\n-    <can-import from=\"bootstrap/less/bootstrap.less\" />\r\n-    <can-import from=\"donejs-chat/styles.less\" />\r\n-    <can-import from=\"donejs-chat/app\" export-as=\"viewModel\" />\r\n+    <can-import from:from:from:from:from:from='\"bootstrap/less/bootstrap.less\"' />\r\n+    <can-import from='\"donejs-chat/styles.less\"' />\r\n+    <can-import from='\"donejs-chat/app\"' export-as:from='\"viewModel\"' />\r\n \r\n     <div class=\"container\">\r\n       <div class=\"row\">\r\n         <div class=\"col-sm-8 col-sm-offset-2\">\r\n           {{#eq page 'chat'}}\r\n-            <can-import from=\"donejs-chat/messages/\">\r\n+            <can-import from='\"donejs-chat/messages/\"'>\r\n               {{#if isPending}}\r\n                 Loading...\r\n               {{else}}\r\n@@ -19,7 +19,7 @@\r\n               {{/if}}\r\n             </can-import>\r\n           {{else}}\r\n-            <can-import from=\"donejs-chat/home.component\">\r\n+            <can-import from='\"donejs-chat/home.component\"'>\r\n               {{#if isPending}}\r\n                 Loading...\r\n               {{else}}\r\n@@ -33,10 +33,10 @@\r\n \r\n     {{#switch env.NODE_ENV}}\r\n       {{#case \"production\"}}\r\n-        <script src=\"{{joinBase 'steal.production.js'}}\"></script>\r\n+        <script src:from:from=\"\"{{joinBase 'steal.production.js'}}\"\"></script>\r\n       {{/case}}\r\n       {{#default}}\r\n-        <script src=\"/node_modules/steal/steal.js\"></script>\r\n+        <script src='\"/node_modules/steal/steal.js\"'></script>\r\n       {{/default}}\r\n     {{/switch}}\r\n </html>\r\n```\r\n\r\nI think this codemod is too eager to convert. Currently it uses a [global attribute table](https://github.com/canjs/can-migrate/blob/70f25dd3be052121cf84fba198de47e4de6deffe/lib/transforms/version-4/can-stache/attr-from.js#L8) to know what attributes shouldn't be converted.\r\n\r\nI think instead of doing it this way it should only convert attributes that are part of elements that are valid custom elements (contain a `-` in the name), and then excluding `can-` ones because `can-import`'s attributes are not bindings."},"comment":{"url":"https://api.github.com/repos/canjs/can-migrate/issues/comments/371321731","html_url":"https://github.com/canjs/can-migrate/issues/71#issuecomment-371321731","issue_url":"https://api.github.com/repos/canjs/can-migrate/issues/71","id":371321731,"user":{"login":"phillipskevin","id":5851984,"avatar_url":"https://avatars2.githubusercontent.com/u/5851984?v=4","gravatar_id":"","url":"https://api.github.com/users/phillipskevin","html_url":"https://github.com/phillipskevin","followers_url":"https://api.github.com/users/phillipskevin/followers","following_url":"https://api.github.com/users/phillipskevin/following{/other_user}","gists_url":"https://api.github.com/users/phillipskevin/gists{/gist_id}","starred_url":"https://api.github.com/users/phillipskevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillipskevin/subscriptions","organizations_url":"https://api.github.com/users/phillipskevin/orgs","repos_url":"https://api.github.com/users/phillipskevin/repos","events_url":"https://api.github.com/users/phillipskevin/events{/privacy}","received_events_url":"https://api.github.com/users/phillipskevin/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T23:23:43Z","updated_at":"2018-03-07T23:23:43Z","author_association":"CONTRIBUTOR","body":"This is still breaking in weird ways when you have certain combinations of elements. Going to take another attempt at a fix."}}
{"actor":{"display_login":"phillipskevin"}}