{"action":"created","comment":{"url":"https://api.github.com/repos/webpack/webpack-cli/pulls/comments/177970459","pull_request_review_id":107945040,"id":177970459,"diff_hunk":"@@ -1,36 +1,37 @@\n \"use strict\";\n \n const fs = require(\"fs\");\n+const path = require(\"path\");\n const chalk = require(\"chalk\");\n const diff = require(\"diff\");\n const inquirer = require(\"inquirer\");\n const PLazy = require(\"p-lazy\");\n const Listr = require(\"listr\");\n \n-const validate = require(\"webpack\").validate;\n-const WebpackOptionsValidationError = require(\"webpack\")\n-\t.WebpackOptionsValidationError;\n+const { validate } = require(\"webpack\");\n+const { WebpackOptionsValidationError } = require(\"webpack\");\n \n const runPrettier = require(\"../utils/run-prettier\");\n \n /**\n-*\n-* Runs migration on a given configuration using AST's and promises\n-* to sequentially transform a configuration file.\n-*\n-* @param {String} currentConfigPath - Location of the configuration to be migrated\n-* @param {String} outputConfigPath - Location to where the configuration should be written\n-* @param {Object} options - Any additional options regarding code style of the written configuration\n+ *\n+ * Runs migration on a given configuration using AST's and promises\n+ * to sequentially transform a configuration file.\n+ *\n+ * @param {Array} args - Migrate options and arguments such as input and\n+ * output path\n+ * @returns {Promise} Runs the migration using a promise that will throw any errors during each transform\n+ * or output if the user decides to abort the migration\n+ */\n \n-* @returns {Promise} Runs the migration using a promise that will throw any errors during each transform\n-* or output if the user decides to abort the migration\n-*/\n-\n-module.exports = function migrate(\n-\tcurrentConfigPath,\n-\toutputConfigPath,\n-\toptions\n-) {\n+module.exports = function migrate(...args) {\n+\tconst filePaths = args ? args.slice(2).pop() : null;\n+\tconst currentConfigPath = args.slice(2).length === 1 ? [] : [filePaths];\n+\tif (!filePaths.length) {","path":"lib/commands/migrate.js","position":49,"original_position":49,"commit_id":"ed679cf74556c434156502c709ce59970f39c47b","original_commit_id":"8e786fe5c2c8081a8199f51d574946e401347f00","user":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars0.githubusercontent.com/u/16735925?v=4","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"body":"its a string now, naming is a bit weird","created_at":"2018-03-29T07:17:34Z","updated_at":"2018-03-29T07:17:34Z","html_url":"https://github.com/webpack/webpack-cli/pull/371#discussion_r177970459","pull_request_url":"https://api.github.com/repos/webpack/webpack-cli/pulls/371","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/comments/177970459"},"html":{"href":"https://github.com/webpack/webpack-cli/pull/371#discussion_r177970459"},"pull_request":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/371"}},"in_reply_to_id":177967679},"pull_request":{"url":"https://api.github.com/repos/webpack/webpack-cli/pulls/371","id":178217892,"html_url":"https://github.com/webpack/webpack-cli/pull/371","diff_url":"https://github.com/webpack/webpack-cli/pull/371.diff","patch_url":"https://github.com/webpack/webpack-cli/pull/371.patch","issue_url":"https://api.github.com/repos/webpack/webpack-cli/issues/371","number":371,"state":"open","locked":false,"title":"cli(refactor): improve folder structure","user":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars0.githubusercontent.com/u/16735925?v=4","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"body":"<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->\r\n\r\n**What kind of change does this PR introduce?**\r\nRefactoring\r\n<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->\r\n\r\n**Did you add tests for your changes?**\r\nYes\r\n**If relevant, did you update the documentation?**\r\nN/A\r\n**Summary**\r\nImproves folder structure and removes boilerplate code.\r\n<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->\r\n<!-- Try to link to an open issue for more information. -->\r\n\r\n**Does this PR introduce a breaking change?**\r\nNo\r\n<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->\r\n\r\n**Other information**\r\n<3 ","created_at":"2018-03-29T03:22:43Z","updated_at":"2018-03-29T07:17:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9225979b0e7c23ca3a1b24ebb23a3d79f96311a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ematipico","id":602478,"avatar_url":"https://avatars3.githubusercontent.com/u/602478?v=4","gravatar_id":"","url":"https://api.github.com/users/ematipico","html_url":"https://github.com/ematipico","followers_url":"https://api.github.com/users/ematipico/followers","following_url":"https://api.github.com/users/ematipico/following{/other_user}","gists_url":"https://api.github.com/users/ematipico/gists{/gist_id}","starred_url":"https://api.github.com/users/ematipico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ematipico/subscriptions","organizations_url":"https://api.github.com/users/ematipico/orgs","repos_url":"https://api.github.com/users/ematipico/repos","events_url":"https://api.github.com/users/ematipico/events{/privacy}","received_events_url":"https://api.github.com/users/ematipico/received_events","type":"User","site_admin":false},{"login":"sendilkumarn","id":12471122,"avatar_url":"https://avatars0.githubusercontent.com/u/12471122?v=4","gravatar_id":"","url":"https://api.github.com/users/sendilkumarn","html_url":"https://github.com/sendilkumarn","followers_url":"https://api.github.com/users/sendilkumarn/followers","following_url":"https://api.github.com/users/sendilkumarn/following{/other_user}","gists_url":"https://api.github.com/users/sendilkumarn/gists{/gist_id}","starred_url":"https://api.github.com/users/sendilkumarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendilkumarn/subscriptions","organizations_url":"https://api.github.com/users/sendilkumarn/orgs","repos_url":"https://api.github.com/users/sendilkumarn/repos","events_url":"https://api.github.com/users/sendilkumarn/events{/privacy}","received_events_url":"https://api.github.com/users/sendilkumarn/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":512474036,"url":"https://api.github.com/repos/webpack/webpack-cli/labels/CLI","name":"CLI","color":"006b75","default":false},{"id":796821127,"url":"https://api.github.com/repos/webpack/webpack-cli/labels/PR:%20CI-not-ok","name":"PR: CI-not-ok","color":"d93f0b","default":false},{"id":796805034,"url":"https://api.github.com/repos/webpack/webpack-cli/labels/PR:%20unreviewed","name":"PR: unreviewed","color":"afd8f7","default":false},{"id":501677913,"url":"https://api.github.com/repos/webpack/webpack-cli/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"milestone":{"url":"https://api.github.com/repos/webpack/webpack-cli/milestones/5","html_url":"https://github.com/webpack/webpack-cli/milestone/5","labels_url":"https://api.github.com/repos/webpack/webpack-cli/milestones/5/labels","id":3102585,"number":5,"title":"Vatican (v3)","description":"V3 milestone","creator":{"login":"ev1stensberg","id":16735925,"avatar_url":"https://avatars0.githubusercontent.com/u/16735925?v=4","gravatar_id":"","url":"https://api.github.com/users/ev1stensberg","html_url":"https://github.com/ev1stensberg","followers_url":"https://api.github.com/users/ev1stensberg/followers","following_url":"https://api.github.com/users/ev1stensberg/following{/other_user}","gists_url":"https://api.github.com/users/ev1stensberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ev1stensberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev1stensberg/subscriptions","organizations_url":"https://api.github.com/users/ev1stensberg/orgs","repos_url":"https://api.github.com/users/ev1stensberg/repos","events_url":"https://api.github.com/users/ev1stensberg/events{/privacy}","received_events_url":"https://api.github.com/users/ev1stensberg/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2018-02-09T12:33:45Z","updated_at":"2018-03-29T03:22:43Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/webpack/webpack-cli/pulls/371/commits","review_comments_url":"https://api.github.com/repos/webpack/webpack-cli/pulls/371/comments","review_comment_url":"https://api.github.com/repos/webpack/webpack-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webpack/webpack-cli/issues/371/comments","statuses_url":"https://api.github.com/repos/webpack/webpack-cli/statuses/ed679cf74556c434156502c709ce59970f39c47b","head":{"label":"webpack:feat/improve-structure","ref":"feat/improve-structure","sha":"ed679cf74556c434156502c709ce59970f39c47b","user":{"login":"webpack","id":2105791,"avatar_url":"https://avatars2.githubusercontent.com/u/2105791?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"repo":{"id":76603199,"name":"webpack-cli","full_name":"webpack/webpack-cli","owner":{"login":"webpack","id":2105791,"avatar_url":"https://avatars2.githubusercontent.com/u/2105791?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webpack/webpack-cli","description":"Webpack's Command Line Interface","fork":false,"url":"https://api.github.com/repos/webpack/webpack-cli","forks_url":"https://api.github.com/repos/webpack/webpack-cli/forks","keys_url":"https://api.github.com/repos/webpack/webpack-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack/webpack-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack/webpack-cli/teams","hooks_url":"https://api.github.com/repos/webpack/webpack-cli/hooks","issue_events_url":"https://api.github.com/repos/webpack/webpack-cli/issues/events{/number}","events_url":"https://api.github.com/repos/webpack/webpack-cli/events","assignees_url":"https://api.github.com/repos/webpack/webpack-cli/assignees{/user}","branches_url":"https://api.github.com/repos/webpack/webpack-cli/branches{/branch}","tags_url":"https://api.github.com/repos/webpack/webpack-cli/tags","blobs_url":"https://api.github.com/repos/webpack/webpack-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack/webpack-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack/webpack-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack/webpack-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack/webpack-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack/webpack-cli/languages","stargazers_url":"https://api.github.com/repos/webpack/webpack-cli/stargazers","contributors_url":"https://api.github.com/repos/webpack/webpack-cli/contributors","subscribers_url":"https://api.github.com/repos/webpack/webpack-cli/subscribers","subscription_url":"https://api.github.com/repos/webpack/webpack-cli/subscription","commits_url":"https://api.github.com/repos/webpack/webpack-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack/webpack-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack/webpack-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack/webpack-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack/webpack-cli/contents/{+path}","compare_url":"https://api.github.com/repos/webpack/webpack-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack/webpack-cli/merges","archive_url":"https://api.github.com/repos/webpack/webpack-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack/webpack-cli/downloads","issues_url":"https://api.github.com/repos/webpack/webpack-cli/issues{/number}","pulls_url":"https://api.github.com/repos/webpack/webpack-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack/webpack-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack/webpack-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack/webpack-cli/labels{/name}","releases_url":"https://api.github.com/repos/webpack/webpack-cli/releases{/id}","deployments_url":"https://api.github.com/repos/webpack/webpack-cli/deployments","created_at":"2016-12-15T23:05:08Z","updated_at":"2018-03-28T02:51:53Z","pushed_at":"2018-03-29T07:14:46Z","git_url":"git://github.com/webpack/webpack-cli.git","ssh_url":"git@github.com:webpack/webpack-cli.git","clone_url":"https://github.com/webpack/webpack-cli.git","svn_url":"https://github.com/webpack/webpack-cli","homepage":"https://webpack.js.org/api/cli/","size":2384,"stargazers_count":753,"watchers_count":753,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":107,"open_issues":41,"watchers":753,"default_branch":"master"}},"base":{"label":"webpack:master","ref":"master","sha":"0de8a4e9402fe01414407485abf82a1f9eb5c3a9","user":{"login":"webpack","id":2105791,"avatar_url":"https://avatars2.githubusercontent.com/u/2105791?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"repo":{"id":76603199,"name":"webpack-cli","full_name":"webpack/webpack-cli","owner":{"login":"webpack","id":2105791,"avatar_url":"https://avatars2.githubusercontent.com/u/2105791?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webpack/webpack-cli","description":"Webpack's Command Line Interface","fork":false,"url":"https://api.github.com/repos/webpack/webpack-cli","forks_url":"https://api.github.com/repos/webpack/webpack-cli/forks","keys_url":"https://api.github.com/repos/webpack/webpack-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack/webpack-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack/webpack-cli/teams","hooks_url":"https://api.github.com/repos/webpack/webpack-cli/hooks","issue_events_url":"https://api.github.com/repos/webpack/webpack-cli/issues/events{/number}","events_url":"https://api.github.com/repos/webpack/webpack-cli/events","assignees_url":"https://api.github.com/repos/webpack/webpack-cli/assignees{/user}","branches_url":"https://api.github.com/repos/webpack/webpack-cli/branches{/branch}","tags_url":"https://api.github.com/repos/webpack/webpack-cli/tags","blobs_url":"https://api.github.com/repos/webpack/webpack-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack/webpack-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack/webpack-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack/webpack-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack/webpack-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack/webpack-cli/languages","stargazers_url":"https://api.github.com/repos/webpack/webpack-cli/stargazers","contributors_url":"https://api.github.com/repos/webpack/webpack-cli/contributors","subscribers_url":"https://api.github.com/repos/webpack/webpack-cli/subscribers","subscription_url":"https://api.github.com/repos/webpack/webpack-cli/subscription","commits_url":"https://api.github.com/repos/webpack/webpack-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack/webpack-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack/webpack-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack/webpack-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack/webpack-cli/contents/{+path}","compare_url":"https://api.github.com/repos/webpack/webpack-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack/webpack-cli/merges","archive_url":"https://api.github.com/repos/webpack/webpack-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack/webpack-cli/downloads","issues_url":"https://api.github.com/repos/webpack/webpack-cli/issues{/number}","pulls_url":"https://api.github.com/repos/webpack/webpack-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack/webpack-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack/webpack-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack/webpack-cli/labels{/name}","releases_url":"https://api.github.com/repos/webpack/webpack-cli/releases{/id}","deployments_url":"https://api.github.com/repos/webpack/webpack-cli/deployments","created_at":"2016-12-15T23:05:08Z","updated_at":"2018-03-28T02:51:53Z","pushed_at":"2018-03-29T07:14:46Z","git_url":"git://github.com/webpack/webpack-cli.git","ssh_url":"git@github.com:webpack/webpack-cli.git","clone_url":"https://github.com/webpack/webpack-cli.git","svn_url":"https://github.com/webpack/webpack-cli","homepage":"https://webpack.js.org/api/cli/","size":2384,"stargazers_count":753,"watchers_count":753,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":107,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":107,"open_issues":41,"watchers":753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/371"},"html":{"href":"https://github.com/webpack/webpack-cli/pull/371"},"issue":{"href":"https://api.github.com/repos/webpack/webpack-cli/issues/371"},"comments":{"href":"https://api.github.com/repos/webpack/webpack-cli/issues/371/comments"},"review_comments":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/371/comments"},"review_comment":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webpack/webpack-cli/pulls/371/commits"},"statuses":{"href":"https://api.github.com/repos/webpack/webpack-cli/statuses/ed679cf74556c434156502c709ce59970f39c47b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ev1stensberg"}}