{"action":"opened","number":954,"pull_request":{"url":"https://api.github.com/repos/riot/riot/pulls/954","id":39738262,"html_url":"https://github.com/riot/riot/pull/954","diff_url":"https://github.com/riot/riot/pull/954.diff","patch_url":"https://github.com/riot/riot/pull/954.patch","issue_url":"https://api.github.com/repos/riot/riot/issues/954","number":954,"state":"open","locked":false,"title":"tmpl.js - complete rewrite (2)","user":{"login":"aMarCruz","id":6636980,"avatar_url":"https://avatars.githubusercontent.com/u/6636980?v=3","gravatar_id":"","url":"https://api.github.com/users/aMarCruz","html_url":"https://github.com/aMarCruz","followers_url":"https://api.github.com/users/aMarCruz/followers","following_url":"https://api.github.com/users/aMarCruz/following{/other_user}","gists_url":"https://api.github.com/users/aMarCruz/gists{/gist_id}","starred_url":"https://api.github.com/users/aMarCruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aMarCruz/subscriptions","organizations_url":"https://api.github.com/users/aMarCruz/orgs","repos_url":"https://api.github.com/users/aMarCruz/repos","events_url":"https://api.github.com/users/aMarCruz/events{/privacy}","received_events_url":"https://api.github.com/users/aMarCruz/received_events","type":"User","site_admin":false},"body":"This version is passing the riot tests in the dev branch, and all tests in the new-tmpl-1 branch, except the one listed here, for class shorthand with a property over an undefined value (`!this.nonExistingVar.length`).\r\nThey have kept all the new characteristics of the version in this branch.\r\n\r\n### Changed:\r\n\r\nClass shorthands are using the same wrapper as the rest of the expressions.\r\ni.e. there's no protection at property level, but at expression level.\r\nIn this example, the new behavior causes different results from the current:\r\n\r\nThe test fail (as expressions do) on undefined with nested properties, so\r\n```javascript\r\n{ loading: !nonExistingVar.length }       // returns \"\", instead \"ok\"\r\n```\r\nthis is equivalent to:\r\n```javascript\r\n{ loading: !this.nonExistingVar.length }  // returns \"\", or\r\n{ !this.nonExistingVar.length }           // returns undefined, or \"\" in templates\r\n```\r\n#### Restrictions:\r\nIn the expression of shorthands, you can use commas for object literals and arrays but, outside these, usage of the comma operator requires parentheses.\r\n\r\n### Removed:\r\n_\"Instantiation with the constructor's name in parentheses use the default context\"_\r\n\r\nNOTE: `this`, `global`, and `window` are not prefixed with context detection, so you can force the context code like: `{ new global.Date() }`\r\n\r\nFor those interested:\r\nI updated [my Google Drive files](https://drive.google.com/open?id=0B-b6qZXAKYLNflFEWmpxQ01yMDNTT3RKT3lqVnpISEJUT1p1bDhoWDhnWlZtWlljVVJZVlE) to include examples of the output of this version of tmpl.js (See: tmpl_output_20150710.txt)\r\n\r\n#### Size info:\r\n\r\nBranch | Full | Minified | saving | Minified with -c | saving\r\n----------|-----|-----------|----------|----------|-----\r\nnew-tmpl-1  | 43,056 | 4,388    | 89.8%  | 4,261    | 90.1%\r\nnew-tmpl-2  | 31,472 | 3,528    | 88.8%  | 3,422    | 89.1%\r\ndev         |  6,759 | 1,887    | 72.1%  | 1,869    | 72.3%\r\n\r\nPlease, checkout and test.","created_at":"2015-07-11T02:23:07Z","updated_at":"2015-07-11T02:23:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/riot/riot/pulls/954/commits","review_comments_url":"https://api.github.com/repos/riot/riot/pulls/954/comments","review_comment_url":"https://api.github.com/repos/riot/riot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riot/riot/issues/954/comments","statuses_url":"https://api.github.com/repos/riot/riot/statuses/89cabd2e918c3e46e158c5c90734d233098d162e","head":{"label":"riot:new-tmpl-2","ref":"new-tmpl-2","sha":"89cabd2e918c3e46e158c5c90734d233098d162e","user":{"login":"riot","id":12729373,"avatar_url":"https://avatars.githubusercontent.com/u/12729373?v=3","gravatar_id":"","url":"https://api.github.com/users/riot","html_url":"https://github.com/riot","followers_url":"https://api.github.com/users/riot/followers","following_url":"https://api.github.com/users/riot/following{/other_user}","gists_url":"https://api.github.com/users/riot/gists{/gist_id}","starred_url":"https://api.github.com/users/riot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riot/subscriptions","organizations_url":"https://api.github.com/users/riot/orgs","repos_url":"https://api.github.com/users/riot/repos","events_url":"https://api.github.com/users/riot/events{/privacy}","received_events_url":"https://api.github.com/users/riot/received_events","type":"Organization","site_admin":false},"repo":{"id":13142126,"name":"riot","full_name":"riot/riot","owner":{"login":"riot","id":12729373,"avatar_url":"https://avatars.githubusercontent.com/u/12729373?v=3","gravatar_id":"","url":"https://api.github.com/users/riot","html_url":"https://github.com/riot","followers_url":"https://api.github.com/users/riot/followers","following_url":"https://api.github.com/users/riot/following{/other_user}","gists_url":"https://api.github.com/users/riot/gists{/gist_id}","starred_url":"https://api.github.com/users/riot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riot/subscriptions","organizations_url":"https://api.github.com/users/riot/orgs","repos_url":"https://api.github.com/users/riot/repos","events_url":"https://api.github.com/users/riot/events{/privacy}","received_events_url":"https://api.github.com/users/riot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riot/riot","description":"A React- like, user interface library","fork":false,"url":"https://api.github.com/repos/riot/riot","forks_url":"https://api.github.com/repos/riot/riot/forks","keys_url":"https://api.github.com/repos/riot/riot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riot/riot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riot/riot/teams","hooks_url":"https://api.github.com/repos/riot/riot/hooks","issue_events_url":"https://api.github.com/repos/riot/riot/issues/events{/number}","events_url":"https://api.github.com/repos/riot/riot/events","assignees_url":"https://api.github.com/repos/riot/riot/assignees{/user}","branches_url":"https://api.github.com/repos/riot/riot/branches{/branch}","tags_url":"https://api.github.com/repos/riot/riot/tags","blobs_url":"https://api.github.com/repos/riot/riot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riot/riot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riot/riot/git/refs{/sha}","trees_url":"https://api.github.com/repos/riot/riot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riot/riot/statuses/{sha}","languages_url":"https://api.github.com/repos/riot/riot/languages","stargazers_url":"https://api.github.com/repos/riot/riot/stargazers","contributors_url":"https://api.github.com/repos/riot/riot/contributors","subscribers_url":"https://api.github.com/repos/riot/riot/subscribers","subscription_url":"https://api.github.com/repos/riot/riot/subscription","commits_url":"https://api.github.com/repos/riot/riot/commits{/sha}","git_commits_url":"https://api.github.com/repos/riot/riot/git/commits{/sha}","comments_url":"https://api.github.com/repos/riot/riot/comments{/number}","issue_comment_url":"https://api.github.com/repos/riot/riot/issues/comments{/number}","contents_url":"https://api.github.com/repos/riot/riot/contents/{+path}","compare_url":"https://api.github.com/repos/riot/riot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riot/riot/merges","archive_url":"https://api.github.com/repos/riot/riot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riot/riot/downloads","issues_url":"https://api.github.com/repos/riot/riot/issues{/number}","pulls_url":"https://api.github.com/repos/riot/riot/pulls{/number}","milestones_url":"https://api.github.com/repos/riot/riot/milestones{/number}","notifications_url":"https://api.github.com/repos/riot/riot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riot/riot/labels{/name}","releases_url":"https://api.github.com/repos/riot/riot/releases{/id}","created_at":"2013-09-27T05:21:01Z","updated_at":"2015-07-10T13:45:19Z","pushed_at":"2015-07-11T02:23:08Z","git_url":"git://github.com/riot/riot.git","ssh_url":"git@github.com:riot/riot.git","clone_url":"https://github.com/riot/riot.git","svn_url":"https://github.com/riot/riot","homepage":"https://muut.com/riotjs/","size":6086,"stargazers_count":6775,"watchers_count":6775,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":560,"mirror_url":null,"open_issues_count":114,"forks":560,"open_issues":114,"watchers":6775,"default_branch":"master"}},"base":{"label":"riot:dev","ref":"dev","sha":"103a3acf6c2f0b500fa3ce993b843095b83a819d","user":{"login":"riot","id":12729373,"avatar_url":"https://avatars.githubusercontent.com/u/12729373?v=3","gravatar_id":"","url":"https://api.github.com/users/riot","html_url":"https://github.com/riot","followers_url":"https://api.github.com/users/riot/followers","following_url":"https://api.github.com/users/riot/following{/other_user}","gists_url":"https://api.github.com/users/riot/gists{/gist_id}","starred_url":"https://api.github.com/users/riot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riot/subscriptions","organizations_url":"https://api.github.com/users/riot/orgs","repos_url":"https://api.github.com/users/riot/repos","events_url":"https://api.github.com/users/riot/events{/privacy}","received_events_url":"https://api.github.com/users/riot/received_events","type":"Organization","site_admin":false},"repo":{"id":13142126,"name":"riot","full_name":"riot/riot","owner":{"login":"riot","id":12729373,"avatar_url":"https://avatars.githubusercontent.com/u/12729373?v=3","gravatar_id":"","url":"https://api.github.com/users/riot","html_url":"https://github.com/riot","followers_url":"https://api.github.com/users/riot/followers","following_url":"https://api.github.com/users/riot/following{/other_user}","gists_url":"https://api.github.com/users/riot/gists{/gist_id}","starred_url":"https://api.github.com/users/riot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riot/subscriptions","organizations_url":"https://api.github.com/users/riot/orgs","repos_url":"https://api.github.com/users/riot/repos","events_url":"https://api.github.com/users/riot/events{/privacy}","received_events_url":"https://api.github.com/users/riot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riot/riot","description":"A React- like, user interface library","fork":false,"url":"https://api.github.com/repos/riot/riot","forks_url":"https://api.github.com/repos/riot/riot/forks","keys_url":"https://api.github.com/repos/riot/riot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riot/riot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riot/riot/teams","hooks_url":"https://api.github.com/repos/riot/riot/hooks","issue_events_url":"https://api.github.com/repos/riot/riot/issues/events{/number}","events_url":"https://api.github.com/repos/riot/riot/events","assignees_url":"https://api.github.com/repos/riot/riot/assignees{/user}","branches_url":"https://api.github.com/repos/riot/riot/branches{/branch}","tags_url":"https://api.github.com/repos/riot/riot/tags","blobs_url":"https://api.github.com/repos/riot/riot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riot/riot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riot/riot/git/refs{/sha}","trees_url":"https://api.github.com/repos/riot/riot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riot/riot/statuses/{sha}","languages_url":"https://api.github.com/repos/riot/riot/languages","stargazers_url":"https://api.github.com/repos/riot/riot/stargazers","contributors_url":"https://api.github.com/repos/riot/riot/contributors","subscribers_url":"https://api.github.com/repos/riot/riot/subscribers","subscription_url":"https://api.github.com/repos/riot/riot/subscription","commits_url":"https://api.github.com/repos/riot/riot/commits{/sha}","git_commits_url":"https://api.github.com/repos/riot/riot/git/commits{/sha}","comments_url":"https://api.github.com/repos/riot/riot/comments{/number}","issue_comment_url":"https://api.github.com/repos/riot/riot/issues/comments{/number}","contents_url":"https://api.github.com/repos/riot/riot/contents/{+path}","compare_url":"https://api.github.com/repos/riot/riot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riot/riot/merges","archive_url":"https://api.github.com/repos/riot/riot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riot/riot/downloads","issues_url":"https://api.github.com/repos/riot/riot/issues{/number}","pulls_url":"https://api.github.com/repos/riot/riot/pulls{/number}","milestones_url":"https://api.github.com/repos/riot/riot/milestones{/number}","notifications_url":"https://api.github.com/repos/riot/riot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riot/riot/labels{/name}","releases_url":"https://api.github.com/repos/riot/riot/releases{/id}","created_at":"2013-09-27T05:21:01Z","updated_at":"2015-07-10T13:45:19Z","pushed_at":"2015-07-11T02:23:08Z","git_url":"git://github.com/riot/riot.git","ssh_url":"git@github.com:riot/riot.git","clone_url":"https://github.com/riot/riot.git","svn_url":"https://github.com/riot/riot","homepage":"https://muut.com/riotjs/","size":6086,"stargazers_count":6775,"watchers_count":6775,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":560,"mirror_url":null,"open_issues_count":114,"forks":560,"open_issues":114,"watchers":6775,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riot/riot/pulls/954"},"html":{"href":"https://github.com/riot/riot/pull/954"},"issue":{"href":"https://api.github.com/repos/riot/riot/issues/954"},"comments":{"href":"https://api.github.com/repos/riot/riot/issues/954/comments"},"review_comments":{"href":"https://api.github.com/repos/riot/riot/pulls/954/comments"},"review_comment":{"href":"https://api.github.com/repos/riot/riot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riot/riot/pulls/954/commits"},"statuses":{"href":"https://api.github.com/repos/riot/riot/statuses/89cabd2e918c3e46e158c5c90734d233098d162e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":898,"deletions":134,"changed_files":2}}