{"action":"created","comment":{"url":"https://api.github.com/repos/karma-runner/karma/pulls/comments/53446294","id":53446294,"diff_hunk":"@@ -81,36 +172,39 @@ var createPreprocessor = function (config, basePath, injector) {\n           throw err\n         }\n \n-        var preprocessors = []\n-        var nextPreprocessor = createNextProcessor(preprocessors, file, done)\n-\n+        var preprocessorNames = []\n         for (var i = 0; i < patterns.length; i++) {\n           if (mm(file.originalPath, patterns[i], {dot: true})) {\n             if (thisFileIsBinary) {\n               log.warn('Ignoring preprocessing (%s) %s because it is a binary file.',\n                 config[patterns[i]].join(', '), file.originalPath)\n             } else {\n-              config[patterns[i]].forEach(function (name) {\n-                var p = instances[name]\n-                if (p == null) {\n-                  p = instantiatePreprocessor(name)\n-                }\n-\n-                if (p == null) {\n-                  if (!alreadyDisplayedWarnings[name]) {\n-                    alreadyDisplayedWarnings[name] = true\n-                    log.warn('Failed to instantiate preprocessor %s', name)\n-                  }\n-                  return\n-                }\n-\n-                instances[name] = p\n-                preprocessors.push(p)\n-              })\n+              preprocessorNames = mergeLists(preprocessorNames,\n+                  config[patterns[i]])","path":"lib/preprocessor.js","position":148,"original_position":148,"commit_id":"a99e8977e410576bbf7ab96ec1ec6a207f18af1a","original_commit_id":"a99e8977e410576bbf7ab96ec1ec6a207f18af1a","user":{"login":"dignifiedquire","id":790842,"avatar_url":"https://avatars.githubusercontent.com/u/790842?v=3","gravatar_id":"","url":"https://api.github.com/users/dignifiedquire","html_url":"https://github.com/dignifiedquire","followers_url":"https://api.github.com/users/dignifiedquire/followers","following_url":"https://api.github.com/users/dignifiedquire/following{/other_user}","gists_url":"https://api.github.com/users/dignifiedquire/gists{/gist_id}","starred_url":"https://api.github.com/users/dignifiedquire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dignifiedquire/subscriptions","organizations_url":"https://api.github.com/users/dignifiedquire/orgs","repos_url":"https://api.github.com/users/dignifiedquire/repos","events_url":"https://api.github.com/users/dignifiedquire/events{/privacy}","received_events_url":"https://api.github.com/users/dignifiedquire/received_events","type":"User","site_admin":false},"body":"This can be one line","created_at":"2016-02-19T10:46:42Z","updated_at":"2016-02-19T10:46:42Z","html_url":"https://github.com/karma-runner/karma/pull/1899#discussion_r53446294","pull_request_url":"https://api.github.com/repos/karma-runner/karma/pulls/1899","_links":{"self":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/comments/53446294"},"html":{"href":"https://github.com/karma-runner/karma/pull/1899#discussion_r53446294"},"pull_request":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/1899"}}},"pull_request":{"url":"https://api.github.com/repos/karma-runner/karma/pulls/1899","id":59254294,"html_url":"https://github.com/karma-runner/karma/pull/1899","diff_url":"https://github.com/karma-runner/karma/pull/1899.diff","patch_url":"https://github.com/karma-runner/karma/pull/1899.patch","issue_url":"https://api.github.com/repos/karma-runner/karma/issues/1899","number":1899,"state":"open","locked":false,"title":"feat(config): Add `preprocessorOrder` option to config for when prepr…","user":{"login":"sjelin","id":4841675,"avatar_url":"https://avatars.githubusercontent.com/u/4841675?v=3","gravatar_id":"","url":"https://api.github.com/users/sjelin","html_url":"https://github.com/sjelin","followers_url":"https://api.github.com/users/sjelin/followers","following_url":"https://api.github.com/users/sjelin/following{/other_user}","gists_url":"https://api.github.com/users/sjelin/gists{/gist_id}","starred_url":"https://api.github.com/users/sjelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjelin/subscriptions","organizations_url":"https://api.github.com/users/sjelin/orgs","repos_url":"https://api.github.com/users/sjelin/repos","events_url":"https://api.github.com/users/sjelin/events{/privacy}","received_events_url":"https://api.github.com/users/sjelin/received_events","type":"User","site_admin":false},"body":"…ocessors\r\n\r\nmust be run in a specific order.\r\n\r\nSome karma users at Google discovered karma-coverage needs to be run before\r\nkarma-googmodule-preprocessor, hence we need this feature.\r\n\r\n\r\nThis required an update to `karma-browserify`, which can be found here: https://github.com/nikku/karma-browserify/pull/168.\r\n\r\nSince this version is not yet released, this will break travis.","created_at":"2016-02-13T01:43:01Z","updated_at":"2016-02-19T10:46:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1f4c00d30339463009f0a5a2f180f5923c72315","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/karma-runner/karma/pulls/1899/commits","review_comments_url":"https://api.github.com/repos/karma-runner/karma/pulls/1899/comments","review_comment_url":"https://api.github.com/repos/karma-runner/karma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/karma-runner/karma/issues/1899/comments","statuses_url":"https://api.github.com/repos/karma-runner/karma/statuses/a99e8977e410576bbf7ab96ec1ec6a207f18af1a","head":{"label":"sjelin:preprocessorOrder","ref":"preprocessorOrder","sha":"a99e8977e410576bbf7ab96ec1ec6a207f18af1a","user":{"login":"sjelin","id":4841675,"avatar_url":"https://avatars.githubusercontent.com/u/4841675?v=3","gravatar_id":"","url":"https://api.github.com/users/sjelin","html_url":"https://github.com/sjelin","followers_url":"https://api.github.com/users/sjelin/followers","following_url":"https://api.github.com/users/sjelin/following{/other_user}","gists_url":"https://api.github.com/users/sjelin/gists{/gist_id}","starred_url":"https://api.github.com/users/sjelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjelin/subscriptions","organizations_url":"https://api.github.com/users/sjelin/orgs","repos_url":"https://api.github.com/users/sjelin/repos","events_url":"https://api.github.com/users/sjelin/events{/privacy}","received_events_url":"https://api.github.com/users/sjelin/received_events","type":"User","site_admin":false},"repo":{"id":29872690,"name":"karma","full_name":"sjelin/karma","owner":{"login":"sjelin","id":4841675,"avatar_url":"https://avatars.githubusercontent.com/u/4841675?v=3","gravatar_id":"","url":"https://api.github.com/users/sjelin","html_url":"https://github.com/sjelin","followers_url":"https://api.github.com/users/sjelin/followers","following_url":"https://api.github.com/users/sjelin/following{/other_user}","gists_url":"https://api.github.com/users/sjelin/gists{/gist_id}","starred_url":"https://api.github.com/users/sjelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjelin/subscriptions","organizations_url":"https://api.github.com/users/sjelin/orgs","repos_url":"https://api.github.com/users/sjelin/repos","events_url":"https://api.github.com/users/sjelin/events{/privacy}","received_events_url":"https://api.github.com/users/sjelin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sjelin/karma","description":"Spectacular Test Runner for JavaScript","fork":true,"url":"https://api.github.com/repos/sjelin/karma","forks_url":"https://api.github.com/repos/sjelin/karma/forks","keys_url":"https://api.github.com/repos/sjelin/karma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sjelin/karma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sjelin/karma/teams","hooks_url":"https://api.github.com/repos/sjelin/karma/hooks","issue_events_url":"https://api.github.com/repos/sjelin/karma/issues/events{/number}","events_url":"https://api.github.com/repos/sjelin/karma/events","assignees_url":"https://api.github.com/repos/sjelin/karma/assignees{/user}","branches_url":"https://api.github.com/repos/sjelin/karma/branches{/branch}","tags_url":"https://api.github.com/repos/sjelin/karma/tags","blobs_url":"https://api.github.com/repos/sjelin/karma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sjelin/karma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sjelin/karma/git/refs{/sha}","trees_url":"https://api.github.com/repos/sjelin/karma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sjelin/karma/statuses/{sha}","languages_url":"https://api.github.com/repos/sjelin/karma/languages","stargazers_url":"https://api.github.com/repos/sjelin/karma/stargazers","contributors_url":"https://api.github.com/repos/sjelin/karma/contributors","subscribers_url":"https://api.github.com/repos/sjelin/karma/subscribers","subscription_url":"https://api.github.com/repos/sjelin/karma/subscription","commits_url":"https://api.github.com/repos/sjelin/karma/commits{/sha}","git_commits_url":"https://api.github.com/repos/sjelin/karma/git/commits{/sha}","comments_url":"https://api.github.com/repos/sjelin/karma/comments{/number}","issue_comment_url":"https://api.github.com/repos/sjelin/karma/issues/comments{/number}","contents_url":"https://api.github.com/repos/sjelin/karma/contents/{+path}","compare_url":"https://api.github.com/repos/sjelin/karma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sjelin/karma/merges","archive_url":"https://api.github.com/repos/sjelin/karma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sjelin/karma/downloads","issues_url":"https://api.github.com/repos/sjelin/karma/issues{/number}","pulls_url":"https://api.github.com/repos/sjelin/karma/pulls{/number}","milestones_url":"https://api.github.com/repos/sjelin/karma/milestones{/number}","notifications_url":"https://api.github.com/repos/sjelin/karma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sjelin/karma/labels{/name}","releases_url":"https://api.github.com/repos/sjelin/karma/releases{/id}","deployments_url":"https://api.github.com/repos/sjelin/karma/deployments","created_at":"2015-01-26T17:29:20Z","updated_at":"2015-02-24T00:46:24Z","pushed_at":"2016-02-19T01:03:10Z","git_url":"git://github.com/sjelin/karma.git","ssh_url":"git@github.com:sjelin/karma.git","clone_url":"https://github.com/sjelin/karma.git","svn_url":"https://github.com/sjelin/karma","homepage":"http://karma-runner.github.io","size":6955,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"karma-runner:master","ref":"master","sha":"64e301b34be4f3e4f5e8647814e3a4c9db072df3","user":{"login":"karma-runner","id":3284117,"avatar_url":"https://avatars.githubusercontent.com/u/3284117?v=3","gravatar_id":"","url":"https://api.github.com/users/karma-runner","html_url":"https://github.com/karma-runner","followers_url":"https://api.github.com/users/karma-runner/followers","following_url":"https://api.github.com/users/karma-runner/following{/other_user}","gists_url":"https://api.github.com/users/karma-runner/gists{/gist_id}","starred_url":"https://api.github.com/users/karma-runner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karma-runner/subscriptions","organizations_url":"https://api.github.com/users/karma-runner/orgs","repos_url":"https://api.github.com/users/karma-runner/repos","events_url":"https://api.github.com/users/karma-runner/events{/privacy}","received_events_url":"https://api.github.com/users/karma-runner/received_events","type":"Organization","site_admin":false},"repo":{"id":2560988,"name":"karma","full_name":"karma-runner/karma","owner":{"login":"karma-runner","id":3284117,"avatar_url":"https://avatars.githubusercontent.com/u/3284117?v=3","gravatar_id":"","url":"https://api.github.com/users/karma-runner","html_url":"https://github.com/karma-runner","followers_url":"https://api.github.com/users/karma-runner/followers","following_url":"https://api.github.com/users/karma-runner/following{/other_user}","gists_url":"https://api.github.com/users/karma-runner/gists{/gist_id}","starred_url":"https://api.github.com/users/karma-runner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karma-runner/subscriptions","organizations_url":"https://api.github.com/users/karma-runner/orgs","repos_url":"https://api.github.com/users/karma-runner/repos","events_url":"https://api.github.com/users/karma-runner/events{/privacy}","received_events_url":"https://api.github.com/users/karma-runner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/karma-runner/karma","description":"Spectacular Test Runner for JavaScript","fork":false,"url":"https://api.github.com/repos/karma-runner/karma","forks_url":"https://api.github.com/repos/karma-runner/karma/forks","keys_url":"https://api.github.com/repos/karma-runner/karma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karma-runner/karma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karma-runner/karma/teams","hooks_url":"https://api.github.com/repos/karma-runner/karma/hooks","issue_events_url":"https://api.github.com/repos/karma-runner/karma/issues/events{/number}","events_url":"https://api.github.com/repos/karma-runner/karma/events","assignees_url":"https://api.github.com/repos/karma-runner/karma/assignees{/user}","branches_url":"https://api.github.com/repos/karma-runner/karma/branches{/branch}","tags_url":"https://api.github.com/repos/karma-runner/karma/tags","blobs_url":"https://api.github.com/repos/karma-runner/karma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karma-runner/karma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karma-runner/karma/git/refs{/sha}","trees_url":"https://api.github.com/repos/karma-runner/karma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karma-runner/karma/statuses/{sha}","languages_url":"https://api.github.com/repos/karma-runner/karma/languages","stargazers_url":"https://api.github.com/repos/karma-runner/karma/stargazers","contributors_url":"https://api.github.com/repos/karma-runner/karma/contributors","subscribers_url":"https://api.github.com/repos/karma-runner/karma/subscribers","subscription_url":"https://api.github.com/repos/karma-runner/karma/subscription","commits_url":"https://api.github.com/repos/karma-runner/karma/commits{/sha}","git_commits_url":"https://api.github.com/repos/karma-runner/karma/git/commits{/sha}","comments_url":"https://api.github.com/repos/karma-runner/karma/comments{/number}","issue_comment_url":"https://api.github.com/repos/karma-runner/karma/issues/comments{/number}","contents_url":"https://api.github.com/repos/karma-runner/karma/contents/{+path}","compare_url":"https://api.github.com/repos/karma-runner/karma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karma-runner/karma/merges","archive_url":"https://api.github.com/repos/karma-runner/karma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karma-runner/karma/downloads","issues_url":"https://api.github.com/repos/karma-runner/karma/issues{/number}","pulls_url":"https://api.github.com/repos/karma-runner/karma/pulls{/number}","milestones_url":"https://api.github.com/repos/karma-runner/karma/milestones{/number}","notifications_url":"https://api.github.com/repos/karma-runner/karma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karma-runner/karma/labels{/name}","releases_url":"https://api.github.com/repos/karma-runner/karma/releases{/id}","deployments_url":"https://api.github.com/repos/karma-runner/karma/deployments","created_at":"2011-10-12T07:55:46Z","updated_at":"2016-02-19T09:55:25Z","pushed_at":"2016-02-19T01:03:10Z","git_url":"git://github.com/karma-runner/karma.git","ssh_url":"git@github.com:karma-runner/karma.git","clone_url":"https://github.com/karma-runner/karma.git","svn_url":"https://github.com/karma-runner/karma","homepage":"http://karma-runner.github.io","size":9216,"stargazers_count":6526,"watchers_count":6526,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1048,"mirror_url":null,"open_issues_count":219,"forks":1048,"open_issues":219,"watchers":6526,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/1899"},"html":{"href":"https://github.com/karma-runner/karma/pull/1899"},"issue":{"href":"https://api.github.com/repos/karma-runner/karma/issues/1899"},"comments":{"href":"https://api.github.com/repos/karma-runner/karma/issues/1899/comments"},"review_comments":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/1899/comments"},"review_comment":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/karma-runner/karma/pulls/1899/commits"},"statuses":{"href":"https://api.github.com/repos/karma-runner/karma/statuses/a99e8977e410576bbf7ab96ec1ec6a207f18af1a"}}}}