{"action":"closed","number":685,"pull_request":{"url":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685","id":92106686,"html_url":"https://github.com/webpack/webpack-dev-server/pull/685","diff_url":"https://github.com/webpack/webpack-dev-server/pull/685.diff","patch_url":"https://github.com/webpack/webpack-dev-server/pull/685.patch","issue_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/685","number":685,"state":"closed","locked":false,"title":"CLI finds and uses 1st available port when none specified.","user":{"login":"benwiley4000","id":13558253,"avatar_url":"https://avatars.githubusercontent.com/u/13558253?v=3","gravatar_id":"","url":"https://api.github.com/users/benwiley4000","html_url":"https://github.com/benwiley4000","followers_url":"https://api.github.com/users/benwiley4000/followers","following_url":"https://api.github.com/users/benwiley4000/following{/other_user}","gists_url":"https://api.github.com/users/benwiley4000/gists{/gist_id}","starred_url":"https://api.github.com/users/benwiley4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwiley4000/subscriptions","organizations_url":"https://api.github.com/users/benwiley4000/orgs","repos_url":"https://api.github.com/users/benwiley4000/repos","events_url":"https://api.github.com/users/benwiley4000/events{/privacy}","received_events_url":"https://api.github.com/users/benwiley4000/received_events","type":"User","site_admin":false},"body":"Addresses #683.\r\n\r\n**Please check if the PR fulfills these requirements**\r\n- [ ] An example has been added or updated in `examples/` (for features)\r\n\r\nI'm not sure about a new example - is there an easy way to verify that two webpack dev servers are running simultaneously at expected ports? *ETA: I imagine this could be tested via a SharedWorker or the localStorage polyfill that does the same thing - allowing two browser tabs to talk to one another. But a system-level test maybe would be better?*\r\n\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\nAs for docs, if it's important to document the use of `portfinder` on the wiki I can do so as soon as the PR is merged.\r\n\r\n**What kind of change does this PR introduce?**\r\n- [ ] Bugfix\r\n- [X] Feature\r\n- [ ] Code style update (formatting, local variables)\r\n- [X] Refactoring (no functional changes, no api changes)\r\n\r\nBecause `portfinder` is async, `startDevServer` had to be spun out into a new function.\r\n\r\n- [ ] Build related changes\r\n- [ ] CI related changes\r\n- [ ] Other... Please describe:\r\n\r\n### For details see #683\r\n\r\n**Does this PR introduce a breaking change?**\r\n- [X] Yes\r\n- [X] No\r\n\r\nOnly in the sense that if two dev servers are run with no port config, one of them will now use a different port (and work). If someone *wanted* their server not to work before, now they might be out of luck! Probably not serious enough for a major version number, you know?\r\n\r\n**Note:** There was one situation where a real breaking change could take place but it was [mitigated](https://github.com/webpack/webpack-dev-server/pull/685/commits/33dad8f8ecfd3655c96e76e004030284e2232e60#diff-83c4482ab4d62154c877147880243858R299).\r\n","created_at":"2016-11-03T07:38:21Z","updated_at":"2016-11-03T10:15:49Z","closed_at":"2016-11-03T10:15:49Z","merged_at":"2016-11-03T10:15:49Z","merge_commit_sha":"5bee6bb4231221699c4cd5c13980664764e31fad","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685/commits","review_comments_url":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685/comments","review_comment_url":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/685/comments","statuses_url":"https://api.github.com/repos/webpack/webpack-dev-server/statuses/335aa9e1b6cc9b0d81d06c8851024706300ab1ef","head":{"label":"benwiley4000:find-available-path","ref":"find-available-path","sha":"335aa9e1b6cc9b0d81d06c8851024706300ab1ef","user":{"login":"benwiley4000","id":13558253,"avatar_url":"https://avatars.githubusercontent.com/u/13558253?v=3","gravatar_id":"","url":"https://api.github.com/users/benwiley4000","html_url":"https://github.com/benwiley4000","followers_url":"https://api.github.com/users/benwiley4000/followers","following_url":"https://api.github.com/users/benwiley4000/following{/other_user}","gists_url":"https://api.github.com/users/benwiley4000/gists{/gist_id}","starred_url":"https://api.github.com/users/benwiley4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwiley4000/subscriptions","organizations_url":"https://api.github.com/users/benwiley4000/orgs","repos_url":"https://api.github.com/users/benwiley4000/repos","events_url":"https://api.github.com/users/benwiley4000/events{/privacy}","received_events_url":"https://api.github.com/users/benwiley4000/received_events","type":"User","site_admin":false},"repo":{"id":72490200,"name":"webpack-dev-server","full_name":"benwiley4000/webpack-dev-server","owner":{"login":"benwiley4000","id":13558253,"avatar_url":"https://avatars.githubusercontent.com/u/13558253?v=3","gravatar_id":"","url":"https://api.github.com/users/benwiley4000","html_url":"https://github.com/benwiley4000","followers_url":"https://api.github.com/users/benwiley4000/followers","following_url":"https://api.github.com/users/benwiley4000/following{/other_user}","gists_url":"https://api.github.com/users/benwiley4000/gists{/gist_id}","starred_url":"https://api.github.com/users/benwiley4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwiley4000/subscriptions","organizations_url":"https://api.github.com/users/benwiley4000/orgs","repos_url":"https://api.github.com/users/benwiley4000/repos","events_url":"https://api.github.com/users/benwiley4000/events{/privacy}","received_events_url":"https://api.github.com/users/benwiley4000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benwiley4000/webpack-dev-server","description":"Serves a webpack app. Updates the browser on changes.","fork":true,"url":"https://api.github.com/repos/benwiley4000/webpack-dev-server","forks_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/forks","keys_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/teams","hooks_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/hooks","issue_events_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/issues/events{/number}","events_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/events","assignees_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/assignees{/user}","branches_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/branches{/branch}","tags_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/tags","blobs_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/statuses/{sha}","languages_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/languages","stargazers_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/stargazers","contributors_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/contributors","subscribers_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/subscribers","subscription_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/subscription","commits_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/contents/{+path}","compare_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/merges","archive_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/downloads","issues_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/issues{/number}","pulls_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/pulls{/number}","milestones_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/milestones{/number}","notifications_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/labels{/name}","releases_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/releases{/id}","deployments_url":"https://api.github.com/repos/benwiley4000/webpack-dev-server/deployments","created_at":"2016-11-01T00:43:23Z","updated_at":"2016-11-01T00:43:24Z","pushed_at":"2016-11-03T10:12:10Z","git_url":"git://github.com/benwiley4000/webpack-dev-server.git","ssh_url":"git@github.com:benwiley4000/webpack-dev-server.git","clone_url":"https://github.com/benwiley4000/webpack-dev-server.git","svn_url":"https://github.com/benwiley4000/webpack-dev-server","homepage":null,"size":611,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"webpack:master","ref":"master","sha":"46f19f9aea8bbecf0f301d032470d3c0fd5f964a","user":{"login":"webpack","id":2105791,"avatar_url":"https://avatars.githubusercontent.com/u/2105791?v=3","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":5839692,"name":"webpack-dev-server","full_name":"webpack/webpack-dev-server","owner":{"login":"webpack","id":2105791,"avatar_url":"https://avatars.githubusercontent.com/u/2105791?v=3","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-dev-server","description":"Serves a webpack app. Updates the browser on changes.","fork":false,"url":"https://api.github.com/repos/webpack/webpack-dev-server","forks_url":"https://api.github.com/repos/webpack/webpack-dev-server/forks","keys_url":"https://api.github.com/repos/webpack/webpack-dev-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack/webpack-dev-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack/webpack-dev-server/teams","hooks_url":"https://api.github.com/repos/webpack/webpack-dev-server/hooks","issue_events_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/events{/number}","events_url":"https://api.github.com/repos/webpack/webpack-dev-server/events","assignees_url":"https://api.github.com/repos/webpack/webpack-dev-server/assignees{/user}","branches_url":"https://api.github.com/repos/webpack/webpack-dev-server/branches{/branch}","tags_url":"https://api.github.com/repos/webpack/webpack-dev-server/tags","blobs_url":"https://api.github.com/repos/webpack/webpack-dev-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack/webpack-dev-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack/webpack-dev-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack/webpack-dev-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack/webpack-dev-server/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack/webpack-dev-server/languages","stargazers_url":"https://api.github.com/repos/webpack/webpack-dev-server/stargazers","contributors_url":"https://api.github.com/repos/webpack/webpack-dev-server/contributors","subscribers_url":"https://api.github.com/repos/webpack/webpack-dev-server/subscribers","subscription_url":"https://api.github.com/repos/webpack/webpack-dev-server/subscription","commits_url":"https://api.github.com/repos/webpack/webpack-dev-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack/webpack-dev-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack/webpack-dev-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack/webpack-dev-server/contents/{+path}","compare_url":"https://api.github.com/repos/webpack/webpack-dev-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack/webpack-dev-server/merges","archive_url":"https://api.github.com/repos/webpack/webpack-dev-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack/webpack-dev-server/downloads","issues_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues{/number}","pulls_url":"https://api.github.com/repos/webpack/webpack-dev-server/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack/webpack-dev-server/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack/webpack-dev-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack/webpack-dev-server/labels{/name}","releases_url":"https://api.github.com/repos/webpack/webpack-dev-server/releases{/id}","deployments_url":"https://api.github.com/repos/webpack/webpack-dev-server/deployments","created_at":"2012-09-17T10:52:18Z","updated_at":"2016-11-03T03:36:01Z","pushed_at":"2016-11-03T10:15:49Z","git_url":"git://github.com/webpack/webpack-dev-server.git","ssh_url":"git@github.com:webpack/webpack-dev-server.git","clone_url":"https://github.com/webpack/webpack-dev-server.git","svn_url":"https://github.com/webpack/webpack-dev-server","homepage":null,"size":995,"stargazers_count":1042,"watchers_count":1042,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":342,"mirror_url":null,"open_issues_count":17,"forks":342,"open_issues":17,"watchers":1042,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685"},"html":{"href":"https://github.com/webpack/webpack-dev-server/pull/685"},"issue":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/issues/685"},"comments":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/issues/685/comments"},"review_comments":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685/comments"},"review_comment":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/pulls/685/commits"},"statuses":{"href":"https://api.github.com/repos/webpack/webpack-dev-server/statuses/335aa9e1b6cc9b0d81d06c8851024706300ab1ef"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"SpaceK33z","id":533616,"avatar_url":"https://avatars.githubusercontent.com/u/533616?v=3","gravatar_id":"","url":"https://api.github.com/users/SpaceK33z","html_url":"https://github.com/SpaceK33z","followers_url":"https://api.github.com/users/SpaceK33z/followers","following_url":"https://api.github.com/users/SpaceK33z/following{/other_user}","gists_url":"https://api.github.com/users/SpaceK33z/gists{/gist_id}","starred_url":"https://api.github.com/users/SpaceK33z/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpaceK33z/subscriptions","organizations_url":"https://api.github.com/users/SpaceK33z/orgs","repos_url":"https://api.github.com/users/SpaceK33z/repos","events_url":"https://api.github.com/users/SpaceK33z/events{/privacy}","received_events_url":"https://api.github.com/users/SpaceK33z/received_events","type":"User","site_admin":false},"comments":2,"review_comments":5,"commits":2,"additions":26,"deletions":4,"changed_files":2}}
{"actor":{"display_login":"SpaceK33z"}}