dns: coerce port to number in lookupService#4883
dns: coerce port to number in lookupService#4883evanlucas wants to merge 1 commit intonodejs:masterfrom
Conversation
|
LGTM |
|
/cc @mscdex since this was your suggestion |
|
LGTM |
2 similar comments
|
LGTM |
|
LGTM |
|
LGTM. Why is this semver-major? |
|
It changes behavior. Before one could pass 10000000 as the port. Now a TypeError will be thrown. It also accepts a string that can be coerced into a number that is a valid port. Before it did not |
65e92db to
16d8e62
Compare
|
Rebased and running CI one more time: https://ci.nodejs.org/job/node-test-pull-request/1470/ |
|
This probably warrants a doc update and some additional tests. I will add those and then run CI again. Sorry for omitting them in the first place. |
16d8e62 to
8c2cb44
Compare
|
Ok, docs updated and additional tests added. PTAL |
There was a problem hiding this comment.
Can you add backticks around TypeError here and below.
|
Still LGTM with one small comment. |
Previously, port could be any number in dns.lookupService. This change throws a TypeError if port is outside the range of 0-65535. It also coerces the port to a number.
8c2cb44 to
2e87682
Compare
|
Fixed |
|
LGTM |
Previously, port could be any number in dns.lookupService. This change throws a TypeError if port is outside the range of 0-65535. It also coerces the port to a number. PR-URL: #4883 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: James M Snell <[email protected]>
|
Landed in f3be421 |
Previously, port could be any number in dns.lookupService. This change throws a TypeError if port is outside the range of 0-65535. It also coerces the port to a number. PR-URL: nodejs#4883 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: James M Snell <[email protected]>
Previously, port could be any number in dns.lookupService. This change
throws a TypeError if port is outside the range of 0-65535. It also
coerces the port to a number.
This includes the commit from #4882 as it depends on it.
I have separated them into two PRs for the sake of cherry-picking to release branches though as this is semver-major.