{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/675","repository_url":"https://api.github.com/repos/sindresorhus/ava","labels_url":"https://api.github.com/repos/sindresorhus/ava/issues/675/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/675/comments","events_url":"https://api.github.com/repos/sindresorhus/ava/issues/675/events","html_url":"https://github.com/sindresorhus/ava/pull/675","id":142788967,"number":675,"title":"Ensure overridden babel config plugins array is immutable ","user":{"login":"dcousineau","id":30331,"avatar_url":"https://avatars.githubusercontent.com/u/30331?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousineau","html_url":"https://github.com/dcousineau","followers_url":"https://api.github.com/users/dcousineau/followers","following_url":"https://api.github.com/users/dcousineau/following{/other_user}","gists_url":"https://api.github.com/users/dcousineau/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousineau/subscriptions","organizations_url":"https://api.github.com/users/dcousineau/orgs","repos_url":"https://api.github.com/users/dcousineau/repos","events_url":"https://api.github.com/users/dcousineau/events{/privacy}","received_events_url":"https://api.github.com/users/dcousineau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-22T21:41:44Z","updated_at":"2016-03-23T04:50:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/ava/pulls/675","html_url":"https://github.com/sindresorhus/ava/pull/675","diff_url":"https://github.com/sindresorhus/ava/pull/675.diff","patch_url":"https://github.com/sindresorhus/ava/pull/675.patch"},"body":"Since `babelConfig` in the CachingPrecompiler.prototype._factory method was a JavaScript object coming from an external source, the .push was altering the array in place. objectAssign is shallow so the plugins were being mutated, ensuring that AVA's required plugins were continually appending for each file loaded and parsed.\r\n\r\nUsing .concat ensures the original plugins array is not mutated and thus doesn't collect plugins like a hoarder.\r\n\r\nDoes not solve #674 however it was noticed during an attempt to address that issue."},"comment":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/comments/200175628","html_url":"https://github.com/sindresorhus/ava/pull/675#issuecomment-200175628","issue_url":"https://api.github.com/repos/sindresorhus/ava/issues/675","id":200175628,"user":{"login":"dcousineau","id":30331,"avatar_url":"https://avatars.githubusercontent.com/u/30331?v=3","gravatar_id":"","url":"https://api.github.com/users/dcousineau","html_url":"https://github.com/dcousineau","followers_url":"https://api.github.com/users/dcousineau/followers","following_url":"https://api.github.com/users/dcousineau/following{/other_user}","gists_url":"https://api.github.com/users/dcousineau/gists{/gist_id}","starred_url":"https://api.github.com/users/dcousineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcousineau/subscriptions","organizations_url":"https://api.github.com/users/dcousineau/orgs","repos_url":"https://api.github.com/users/dcousineau/repos","events_url":"https://api.github.com/users/dcousineau/events{/privacy}","received_events_url":"https://api.github.com/users/dcousineau/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T04:50:55Z","updated_at":"2016-03-23T04:50:55Z","body":"@novemberborn FYI my timing was impeccable: \r\n\r\n> No compatible version found: left-pad@0.0.3\r\n\r\nhttps://medium.com/@azerbike/i-ve-just-liberated-my-modules-9045c06be67c#.bmwp4a3le\r\nhttps://twitter.com/seldo/status/712414400808755200"}}