Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 4.0.0: upgrade from
opn@6
to open@7
, require Node 16
Upgrade grunt-contrib-internal from 6 to 8, which updates CI from Node 10,12,14 to Node 14,16,18,20. Fix default connect() hostname to work on Node 18+, where otherwise CI fails as follows: > Running "nodeunit:tests" (nodeunit) task > Testing connect_test.jsFatal error: connect ECONNREFUSED ::1:8000 > Error: connect ECONNREFUSED ::1:8000 > at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) Previously, grunt-contrib-connect was passing empty string or null down to `connect(,hostname)` to leave the default implicitly handled by `connect` and Node's built-in `http.Server` class. Then, later, it was doing a fallback to `0.0.0.0` but this only affected the CLI output text, not the value passed to `connect()`. Node 17+ changed per nodejs/node#40702 to prefer IPv6 loopback when available (`::`) instead of IPv4 loopback (`0.0.0.0`), unless `0.0.0.0` is explicitly passed. This was fixed in Node 20, with `http.get` underlying `net` TCP module implementing "Happy Eyeballs" (same as browsers and curl) which basically means trying both IPv6 and IPv4. nodejs/node#44731 The workaround is to call `dns.setDefaultResultOrder('ipv4first')` which ensures that the first try is over IPv4 instead of IPv6.
- Loading branch information