{"action":"created","comment":{"url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments/60721134","id":60721134,"diff_hunk":"@@ -37,42 +37,55 @@ InetAddress.fromString = function (value) {\n   if (!value) {\n     return new InetAddress(new Buffer([0, 0, 0, 0]));\n   }\n-  var pattern = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$|^[\\da-f:]+$/i;\n-  if (!pattern.test(value)) {\n-    throw new TypeError('Value could not be parsed as InetAddress: ' + value);\n-  }\n-  var parts = value.split('.');\n-  if (parts.length === 4) {\n-    //IPv4\n+  var ipv4Pattern = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\n+  var ipv6Pattern = /^[\\da-f:.]+$/i;","path":"lib/types/inet-address.js","position":12,"original_position":12,"commit_id":"f4340f5b08d38544308a7a9a42bd58ecb84671b8","original_commit_id":"f4340f5b08d38544308a7a9a42bd58ecb84671b8","user":{"login":"jorgebay","id":2931196,"avatar_url":"https://avatars.githubusercontent.com/u/2931196?v=3","gravatar_id":"","url":"https://api.github.com/users/jorgebay","html_url":"https://github.com/jorgebay","followers_url":"https://api.github.com/users/jorgebay/followers","following_url":"https://api.github.com/users/jorgebay/following{/other_user}","gists_url":"https://api.github.com/users/jorgebay/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgebay/subscriptions","organizations_url":"https://api.github.com/users/jorgebay/orgs","repos_url":"https://api.github.com/users/jorgebay/repos","events_url":"https://api.github.com/users/jorgebay/events{/privacy}","received_events_url":"https://api.github.com/users/jorgebay/received_events","type":"User","site_admin":false},"body":"I'm not sure if we should support interface suffix, or at least not in this patch.\r\nAbout the ipv6 regex, it will also match ipv4 to handle embedded IPv4 addresses in IPv6 strings, but IPv4 addressed will be handled by `ipv4Pattern.test()` below.","created_at":"2016-04-22T10:43:09Z","updated_at":"2016-04-22T10:43:09Z","html_url":"https://github.com/datastax/nodejs-driver/pull/141#discussion_r60721134","pull_request_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments/60721134"},"html":{"href":"https://github.com/datastax/nodejs-driver/pull/141#discussion_r60721134"},"pull_request":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141","id":67337897,"html_url":"https://github.com/datastax/nodejs-driver/pull/141","diff_url":"https://github.com/datastax/nodejs-driver/pull/141.diff","patch_url":"https://github.com/datastax/nodejs-driver/pull/141.patch","issue_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/141","number":141,"state":"open","locked":false,"title":"Support IPv6 addresses with embedded IPv4 addresses","user":{"login":"jorgebay","id":2931196,"avatar_url":"https://avatars.githubusercontent.com/u/2931196?v=3","gravatar_id":"","url":"https://api.github.com/users/jorgebay","html_url":"https://github.com/jorgebay","followers_url":"https://api.github.com/users/jorgebay/followers","following_url":"https://api.github.com/users/jorgebay/following{/other_user}","gists_url":"https://api.github.com/users/jorgebay/gists{/gist_id}","starred_url":"https://api.github.com/users/jorgebay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorgebay/subscriptions","organizations_url":"https://api.github.com/users/jorgebay/orgs","repos_url":"https://api.github.com/users/jorgebay/repos","events_url":"https://api.github.com/users/jorgebay/events{/privacy}","received_events_url":"https://api.github.com/users/jorgebay/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-21T11:25:20Z","updated_at":"2016-04-22T10:43:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"969dc1ed9075e39cc67bb635870a1824985e3d31","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141/commits","review_comments_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141/comments","review_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/141/comments","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/f4340f5b08d38544308a7a9a42bd58ecb84671b8","head":{"label":"datastax:NODEJS-246","ref":"NODEJS-246","sha":"f4340f5b08d38544308a7a9a42bd58ecb84671b8","user":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":23706552,"name":"nodejs-driver","full_name":"datastax/nodejs-driver","owner":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datastax/nodejs-driver","description":"DataStax Node.js Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/nodejs-driver","forks_url":"https://api.github.com/repos/datastax/nodejs-driver/forks","keys_url":"https://api.github.com/repos/datastax/nodejs-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/nodejs-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/nodejs-driver/teams","hooks_url":"https://api.github.com/repos/datastax/nodejs-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/nodejs-driver/events","assignees_url":"https://api.github.com/repos/datastax/nodejs-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/nodejs-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/nodejs-driver/tags","blobs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/nodejs-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/nodejs-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/nodejs-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/nodejs-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/nodejs-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/nodejs-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/nodejs-driver/subscription","commits_url":"https://api.github.com/repos/datastax/nodejs-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/nodejs-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/nodejs-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/nodejs-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/nodejs-driver/merges","archive_url":"https://api.github.com/repos/datastax/nodejs-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/nodejs-driver/downloads","issues_url":"https://api.github.com/repos/datastax/nodejs-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/nodejs-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/nodejs-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/nodejs-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/nodejs-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/nodejs-driver/deployments","created_at":"2014-09-05T14:46:37Z","updated_at":"2016-04-21T03:51:07Z","pushed_at":"2016-04-21T18:06:18Z","git_url":"git://github.com/datastax/nodejs-driver.git","ssh_url":"git@github.com:datastax/nodejs-driver.git","clone_url":"https://github.com/datastax/nodejs-driver.git","svn_url":"https://github.com/datastax/nodejs-driver","homepage":null,"size":3212,"stargazers_count":384,"watchers_count":384,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":88,"mirror_url":null,"open_issues_count":6,"forks":88,"open_issues":6,"watchers":384,"default_branch":"master"}},"base":{"label":"datastax:master","ref":"master","sha":"5dad886bc61a74970de3793aa951f5c2c4e3e519","user":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"repo":{"id":23706552,"name":"nodejs-driver","full_name":"datastax/nodejs-driver","owner":{"login":"datastax","id":573369,"avatar_url":"https://avatars.githubusercontent.com/u/573369?v=3","gravatar_id":"","url":"https://api.github.com/users/datastax","html_url":"https://github.com/datastax","followers_url":"https://api.github.com/users/datastax/followers","following_url":"https://api.github.com/users/datastax/following{/other_user}","gists_url":"https://api.github.com/users/datastax/gists{/gist_id}","starred_url":"https://api.github.com/users/datastax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datastax/subscriptions","organizations_url":"https://api.github.com/users/datastax/orgs","repos_url":"https://api.github.com/users/datastax/repos","events_url":"https://api.github.com/users/datastax/events{/privacy}","received_events_url":"https://api.github.com/users/datastax/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datastax/nodejs-driver","description":"DataStax Node.js Driver for Apache Cassandra","fork":false,"url":"https://api.github.com/repos/datastax/nodejs-driver","forks_url":"https://api.github.com/repos/datastax/nodejs-driver/forks","keys_url":"https://api.github.com/repos/datastax/nodejs-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datastax/nodejs-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datastax/nodejs-driver/teams","hooks_url":"https://api.github.com/repos/datastax/nodejs-driver/hooks","issue_events_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/events{/number}","events_url":"https://api.github.com/repos/datastax/nodejs-driver/events","assignees_url":"https://api.github.com/repos/datastax/nodejs-driver/assignees{/user}","branches_url":"https://api.github.com/repos/datastax/nodejs-driver/branches{/branch}","tags_url":"https://api.github.com/repos/datastax/nodejs-driver/tags","blobs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datastax/nodejs-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datastax/nodejs-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/datastax/nodejs-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datastax/nodejs-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/datastax/nodejs-driver/languages","stargazers_url":"https://api.github.com/repos/datastax/nodejs-driver/stargazers","contributors_url":"https://api.github.com/repos/datastax/nodejs-driver/contributors","subscribers_url":"https://api.github.com/repos/datastax/nodejs-driver/subscribers","subscription_url":"https://api.github.com/repos/datastax/nodejs-driver/subscription","commits_url":"https://api.github.com/repos/datastax/nodejs-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/datastax/nodejs-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/datastax/nodejs-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/datastax/nodejs-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/datastax/nodejs-driver/contents/{+path}","compare_url":"https://api.github.com/repos/datastax/nodejs-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datastax/nodejs-driver/merges","archive_url":"https://api.github.com/repos/datastax/nodejs-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datastax/nodejs-driver/downloads","issues_url":"https://api.github.com/repos/datastax/nodejs-driver/issues{/number}","pulls_url":"https://api.github.com/repos/datastax/nodejs-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/datastax/nodejs-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/datastax/nodejs-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datastax/nodejs-driver/labels{/name}","releases_url":"https://api.github.com/repos/datastax/nodejs-driver/releases{/id}","deployments_url":"https://api.github.com/repos/datastax/nodejs-driver/deployments","created_at":"2014-09-05T14:46:37Z","updated_at":"2016-04-21T03:51:07Z","pushed_at":"2016-04-21T18:06:18Z","git_url":"git://github.com/datastax/nodejs-driver.git","ssh_url":"git@github.com:datastax/nodejs-driver.git","clone_url":"https://github.com/datastax/nodejs-driver.git","svn_url":"https://github.com/datastax/nodejs-driver","homepage":null,"size":3212,"stargazers_count":384,"watchers_count":384,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":88,"mirror_url":null,"open_issues_count":6,"forks":88,"open_issues":6,"watchers":384,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141"},"html":{"href":"https://github.com/datastax/nodejs-driver/pull/141"},"issue":{"href":"https://api.github.com/repos/datastax/nodejs-driver/issues/141"},"comments":{"href":"https://api.github.com/repos/datastax/nodejs-driver/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datastax/nodejs-driver/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/datastax/nodejs-driver/statuses/f4340f5b08d38544308a7a9a42bd58ecb84671b8"}}}}