{"action":"created","comment":{"url":"https://api.github.com/repos/babel/babel/pulls/comments/168349643","pull_request_review_id":96702151,"id":168349643,"diff_hunk":"@@ -374,6 +374,26 @@ helpers.extends = defineHelper(`\n   }\n `);\n \n+helpers.spreadByDefine = defineHelper(`","path":"packages/babel-helpers/src/helpers.js","position":4,"original_position":4,"commit_id":"83abcda120afb6d37136ea548ab26f1226410efd","original_commit_id":"83abcda120afb6d37136ea548ab26f1226410efd","user":{"login":"jridgewell","id":112982,"avatar_url":"https://avatars1.githubusercontent.com/u/112982?v=4","gravatar_id":"","url":"https://api.github.com/users/jridgewell","html_url":"https://github.com/jridgewell","followers_url":"https://api.github.com/users/jridgewell/followers","following_url":"https://api.github.com/users/jridgewell/following{/other_user}","gists_url":"https://api.github.com/users/jridgewell/gists{/gist_id}","starred_url":"https://api.github.com/users/jridgewell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jridgewell/subscriptions","organizations_url":"https://api.github.com/users/jridgewell/orgs","repos_url":"https://api.github.com/users/jridgewell/repos","events_url":"https://api.github.com/users/jridgewell/events{/privacy}","received_events_url":"https://api.github.com/users/jridgewell/received_events","type":"User","site_admin":false},"body":"Can we rename this to `objectSpread`?","created_at":"2018-02-15T00:01:47Z","updated_at":"2018-02-15T01:04:07Z","html_url":"https://github.com/babel/babel/pull/7034#discussion_r168349643","pull_request_url":"https://api.github.com/repos/babel/babel/pulls/7034","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/babel/babel/pulls/comments/168349643"},"html":{"href":"https://github.com/babel/babel/pull/7034#discussion_r168349643"},"pull_request":{"href":"https://api.github.com/repos/babel/babel/pulls/7034"}}},"pull_request":{"url":"https://api.github.com/repos/babel/babel/pulls/7034","id":158724521,"html_url":"https://github.com/babel/babel/pull/7034","diff_url":"https://github.com/babel/babel/pull/7034.diff","patch_url":"https://github.com/babel/babel/pull/7034.patch","issue_url":"https://api.github.com/repos/babel/babel/issues/7034","number":7034,"state":"open","locked":false,"title":"Fix object spread according to spec","user":{"login":"nuragic","id":1586378,"avatar_url":"https://avatars0.githubusercontent.com/u/1586378?v=4","gravatar_id":"","url":"https://api.github.com/users/nuragic","html_url":"https://github.com/nuragic","followers_url":"https://api.github.com/users/nuragic/followers","following_url":"https://api.github.com/users/nuragic/following{/other_user}","gists_url":"https://api.github.com/users/nuragic/gists{/gist_id}","starred_url":"https://api.github.com/users/nuragic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuragic/subscriptions","organizations_url":"https://api.github.com/users/nuragic/orgs","repos_url":"https://api.github.com/users/nuragic/repos","events_url":"https://api.github.com/users/nuragic/events{/privacy}","received_events_url":"https://api.github.com/users/nuragic/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI found this bug the last week so this is my attempt to fix it; I apologize in advance if anything is missing (this is my first PR to babel). Any suggestion, feedback, code review, etc. would be welcome! 😄 \r\n\r\nThat said, according to the spec the object spread doesn't work the same way as `Object.assign` or equivalent polyfill, basically because **_\"spread defines new properties, while Object.assign() sets them\"_**. Detailed info [here](http://2ality.com/2016/10/rest-spread-properties.html#spreading-objects-versus-objectassign).\r\n\r\nTo verify that this is actually a bug I added a new test first, then I made the corresponding changes to fix the implementation according to that. Please feel free to run it separately against the current `master` branch in order to check.\r\n\r\nI opted to just add a new helper to replicate this behavior; also removed the `useBuiltIns` reference from the plugin's docs cause that wouldn't apply anymore. Some other tests from `babel-preset-env` are using object spread so I had to fix those tests as well.\r\n\r\nThanks!\r\n\r\nFixes #7382","created_at":"2017-12-16T01:45:03Z","updated_at":"2018-02-15T01:04:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"050bb82260682bdd3259b74cb9b716597ec40aeb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":311566467,"url":"https://api.github.com/repos/babel/babel/labels/PR:%20Bug%20Fix","name":"PR: Bug Fix","color":"fbca04","default":false},{"id":711376739,"url":"https://api.github.com/repos/babel/babel/labels/PR:%20Needs%20Review","name":"PR: Needs Review","color":"fef2c0","default":false},{"id":711597189,"url":"https://api.github.com/repos/babel/babel/labels/Spec:%20Object%20Rest/Spread","name":"Spec: Object Rest/Spread","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/babel/babel/pulls/7034/commits","review_comments_url":"https://api.github.com/repos/babel/babel/pulls/7034/comments","review_comment_url":"https://api.github.com/repos/babel/babel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/babel/babel/issues/7034/comments","statuses_url":"https://api.github.com/repos/babel/babel/statuses/83abcda120afb6d37136ea548ab26f1226410efd","head":{"label":"nuragic:fix-object-rest-spread","ref":"fix-object-rest-spread","sha":"83abcda120afb6d37136ea548ab26f1226410efd","user":{"login":"nuragic","id":1586378,"avatar_url":"https://avatars0.githubusercontent.com/u/1586378?v=4","gravatar_id":"","url":"https://api.github.com/users/nuragic","html_url":"https://github.com/nuragic","followers_url":"https://api.github.com/users/nuragic/followers","following_url":"https://api.github.com/users/nuragic/following{/other_user}","gists_url":"https://api.github.com/users/nuragic/gists{/gist_id}","starred_url":"https://api.github.com/users/nuragic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuragic/subscriptions","organizations_url":"https://api.github.com/users/nuragic/orgs","repos_url":"https://api.github.com/users/nuragic/repos","events_url":"https://api.github.com/users/nuragic/events{/privacy}","received_events_url":"https://api.github.com/users/nuragic/received_events","type":"User","site_admin":false},"repo":{"id":112109861,"name":"babel","full_name":"nuragic/babel","owner":{"login":"nuragic","id":1586378,"avatar_url":"https://avatars0.githubusercontent.com/u/1586378?v=4","gravatar_id":"","url":"https://api.github.com/users/nuragic","html_url":"https://github.com/nuragic","followers_url":"https://api.github.com/users/nuragic/followers","following_url":"https://api.github.com/users/nuragic/following{/other_user}","gists_url":"https://api.github.com/users/nuragic/gists{/gist_id}","starred_url":"https://api.github.com/users/nuragic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuragic/subscriptions","organizations_url":"https://api.github.com/users/nuragic/orgs","repos_url":"https://api.github.com/users/nuragic/repos","events_url":"https://api.github.com/users/nuragic/events{/privacy}","received_events_url":"https://api.github.com/users/nuragic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nuragic/babel","description":":tropical_fish: Babel is a compiler for writing next generation JavaScript.","fork":true,"url":"https://api.github.com/repos/nuragic/babel","forks_url":"https://api.github.com/repos/nuragic/babel/forks","keys_url":"https://api.github.com/repos/nuragic/babel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nuragic/babel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nuragic/babel/teams","hooks_url":"https://api.github.com/repos/nuragic/babel/hooks","issue_events_url":"https://api.github.com/repos/nuragic/babel/issues/events{/number}","events_url":"https://api.github.com/repos/nuragic/babel/events","assignees_url":"https://api.github.com/repos/nuragic/babel/assignees{/user}","branches_url":"https://api.github.com/repos/nuragic/babel/branches{/branch}","tags_url":"https://api.github.com/repos/nuragic/babel/tags","blobs_url":"https://api.github.com/repos/nuragic/babel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nuragic/babel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nuragic/babel/git/refs{/sha}","trees_url":"https://api.github.com/repos/nuragic/babel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nuragic/babel/statuses/{sha}","languages_url":"https://api.github.com/repos/nuragic/babel/languages","stargazers_url":"https://api.github.com/repos/nuragic/babel/stargazers","contributors_url":"https://api.github.com/repos/nuragic/babel/contributors","subscribers_url":"https://api.github.com/repos/nuragic/babel/subscribers","subscription_url":"https://api.github.com/repos/nuragic/babel/subscription","commits_url":"https://api.github.com/repos/nuragic/babel/commits{/sha}","git_commits_url":"https://api.github.com/repos/nuragic/babel/git/commits{/sha}","comments_url":"https://api.github.com/repos/nuragic/babel/comments{/number}","issue_comment_url":"https://api.github.com/repos/nuragic/babel/issues/comments{/number}","contents_url":"https://api.github.com/repos/nuragic/babel/contents/{+path}","compare_url":"https://api.github.com/repos/nuragic/babel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nuragic/babel/merges","archive_url":"https://api.github.com/repos/nuragic/babel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nuragic/babel/downloads","issues_url":"https://api.github.com/repos/nuragic/babel/issues{/number}","pulls_url":"https://api.github.com/repos/nuragic/babel/pulls{/number}","milestones_url":"https://api.github.com/repos/nuragic/babel/milestones{/number}","notifications_url":"https://api.github.com/repos/nuragic/babel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nuragic/babel/labels{/name}","releases_url":"https://api.github.com/repos/nuragic/babel/releases{/id}","deployments_url":"https://api.github.com/repos/nuragic/babel/deployments","created_at":"2017-11-26T19:20:48Z","updated_at":"2017-11-26T19:21:06Z","pushed_at":"2018-01-26T09:47:59Z","git_url":"git://github.com/nuragic/babel.git","ssh_url":"git@github.com:nuragic/babel.git","clone_url":"https://github.com/nuragic/babel.git","svn_url":"https://github.com/nuragic/babel","homepage":"https://babeljs.io/","size":30413,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"babel:master","ref":"master","sha":"ca18ea5e797b6da53854b93cd7b590cfd26a4886","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars1.githubusercontent.com/u/9637642?v=4","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":24560307,"name":"babel","full_name":"babel/babel","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars1.githubusercontent.com/u/9637642?v=4","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/babel","description":":tropical_fish: Babel is a compiler for writing next generation JavaScript.","fork":false,"url":"https://api.github.com/repos/babel/babel","forks_url":"https://api.github.com/repos/babel/babel/forks","keys_url":"https://api.github.com/repos/babel/babel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/babel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/babel/teams","hooks_url":"https://api.github.com/repos/babel/babel/hooks","issue_events_url":"https://api.github.com/repos/babel/babel/issues/events{/number}","events_url":"https://api.github.com/repos/babel/babel/events","assignees_url":"https://api.github.com/repos/babel/babel/assignees{/user}","branches_url":"https://api.github.com/repos/babel/babel/branches{/branch}","tags_url":"https://api.github.com/repos/babel/babel/tags","blobs_url":"https://api.github.com/repos/babel/babel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/babel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/babel/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/babel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/babel/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/babel/languages","stargazers_url":"https://api.github.com/repos/babel/babel/stargazers","contributors_url":"https://api.github.com/repos/babel/babel/contributors","subscribers_url":"https://api.github.com/repos/babel/babel/subscribers","subscription_url":"https://api.github.com/repos/babel/babel/subscription","commits_url":"https://api.github.com/repos/babel/babel/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/babel/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/babel/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/babel/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/babel/contents/{+path}","compare_url":"https://api.github.com/repos/babel/babel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/babel/merges","archive_url":"https://api.github.com/repos/babel/babel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/babel/downloads","issues_url":"https://api.github.com/repos/babel/babel/issues{/number}","pulls_url":"https://api.github.com/repos/babel/babel/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/babel/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/babel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/babel/labels{/name}","releases_url":"https://api.github.com/repos/babel/babel/releases{/id}","deployments_url":"https://api.github.com/repos/babel/babel/deployments","created_at":"2014-09-28T13:38:23Z","updated_at":"2018-02-15T00:19:13Z","pushed_at":"2018-02-14T20:41:14Z","git_url":"git://github.com/babel/babel.git","ssh_url":"git@github.com:babel/babel.git","clone_url":"https://github.com/babel/babel.git","svn_url":"https://github.com/babel/babel","homepage":"https://babeljs.io/","size":30640,"stargazers_count":25874,"watchers_count":25874,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2469,"mirror_url":null,"archived":false,"open_issues_count":588,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2469,"open_issues":588,"watchers":25874,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/babel/babel/pulls/7034"},"html":{"href":"https://github.com/babel/babel/pull/7034"},"issue":{"href":"https://api.github.com/repos/babel/babel/issues/7034"},"comments":{"href":"https://api.github.com/repos/babel/babel/issues/7034/comments"},"review_comments":{"href":"https://api.github.com/repos/babel/babel/pulls/7034/comments"},"review_comment":{"href":"https://api.github.com/repos/babel/babel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/babel/babel/pulls/7034/commits"},"statuses":{"href":"https://api.github.com/repos/babel/babel/statuses/83abcda120afb6d37136ea548ab26f1226410efd"}},"author_association":"NONE"}}
{"actor":{"display_login":"jridgewell"}}