-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Check both IPv4 and IPv6 when dns-name supplied #84
Conversation
Hi @dwmkerr, sorry for the ping, but could you take a look at this? |
Apologies for the delay @danez and thanks for this change! I'm checking now |
Hi @danez would you mind updating from |
BREAKING CHANGE: Returns now an object instead of an boolean. The object contains the property `open: boolean` and if `open` is `true` it will also contain `ipVersion` which will be `4` or `6` dependening on which IP version the open port was found on.
I rebased |
Thanks @danez running the builds now |
Looks like the tests are failing @danez I checked locally on each node version in the build and got the same failures, are you seeing the same? |
Sorry for the confusion, I checked the tests and noticed I forgot to update them. Because this PR changes the return value to an object instead of a boolean. |
No worries @danez ! Testing now and will fingers crossed then release shortly! |
Codecov Report
@@ Coverage Diff @@
## main #84 +/- ##
==========================================
+ Coverage 92.98% 93.06% +0.08%
==========================================
Files 9 9
Lines 171 173 +2
==========================================
+ Hits 159 161 +2
Misses 12 12
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Amazing, thanks for this @danez ! |
This change resolves issues with Node.js 17 and newer and fixes #81.
Node.js 17 and newer do not order ip addresses when resolving them, this means that a server that is listening on
localhost
previously always listened on127.0.0.1
with the Node.js 17+ it might also be listening on::1
. To support this new behavior, wait-port now tries to connect to IPv4 first and then to IPv6 when the supplied hostname is not an IP.I change the return value to include the ipVersion and because of this this is a breaking change.
BREAKING CHANGE: Returns now an object instead of an boolean. The object
contains the property
open: boolean
and ifopen
istrue
it willalso contain
ipVersion
which will be4
or6
dependening on which IPversion the open port was found on.