-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
dns: add resolveAny support #13137
dns: add resolveAny support #13137
Conversation
85adf13
to
c4cb648
Compare
Thanks for tackling this. It also needs a doc update in the table here and a new section for |
@silverwind thanks for mentioning it. I'm still working on implementing this feature. |
c4cb648
to
a161474
Compare
1c4fddb
to
acc9637
Compare
@silverwind I've already added the document now. |
acc9637
to
3643ebe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments on the test. Haven't reviewed the whole thing yet.
test/internet/test-dns-any.js
Outdated
const assert = require('assert'); | ||
const dns = require('dns'); | ||
|
||
const common = require('../common'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should come right after the 'use strict';
directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
test/internet/test-dns-any.js
Outdated
|
||
const checkers = { | ||
checkA(r) { | ||
assert.ok(r.address && typeof r.ttl === 'number' && r.type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you split these complex assertions into smaller individual assertions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
test/internet/test-dns-any.js
Outdated
}, | ||
checkTXT(r) { | ||
assert.ok(r.length > 0); | ||
Array.prototype.forEach.call(r, (txt) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't you call r.forEach()
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because r
is an array-liked object, not a real array instance.
{ '0': 'foo', '1': 'bar', 'length': 2, 'type': 'TXT' }
test/internet/test-dns-any.js
Outdated
const f = queue.shift(); | ||
if (f) { | ||
running = true; | ||
console.log(f.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop the console.log()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I forgot to delete it. sorry.
doc/api/dns.md
Outdated
with uncertain type of records. Each object has a property `type` that indicates | ||
the type of current record. And for each type of record, the object structure | ||
will be like: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the table to illustrate the structure is a bit unclear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using list? or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure... the table may be ok if the sentence leading into it is changed up a bit. Not having any specific ideas on how to improve it tho. It just reads a bit awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... So I gave an example following.
doc/api/dns.md
Outdated
| `"SRV"` | Refer to [`dns.resolveSrv()`][] | | ||
| `"TXT"` | This is an array-liked object with `length` and `indexes`, eg. `{'0':'sth','length':1}` | | ||
|
||
Here's an example of `ret`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following is a example of the `ret` object passed to the callback:
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Refs: nodejs#2848
3643ebe
to
e44d750
Compare
Based on |
src/cares_wrap.cc
Outdated
(((unsigned int)((unsigned char)(p)[0]) << 24U) | \ | ||
((unsigned int)((unsigned char)(p)[1]) << 16U) | \ | ||
((unsigned int)((unsigned char)(p)[2]) << 8U) | \ | ||
((unsigned int)((unsigned char)(p)[3])))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use inline functions rather than macros, and static casts rather than C-style casts?
src/cares_wrap.cc
Outdated
@@ -525,6 +544,573 @@ class QueryWrap : public AsyncWrap { | |||
} | |||
}; | |||
|
|||
Local<Array> AddrTTLToArray(Environment* env, | |||
ares_addrttl* addrttls, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const ares_addrttl*
?
src/cares_wrap.cc
Outdated
@@ -525,6 +544,573 @@ class QueryWrap : public AsyncWrap { | |||
} | |||
}; | |||
|
|||
Local<Array> AddrTTLToArray(Environment* env, | |||
ares_addrttl* addrttls, | |||
int naddrttls) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size_t
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naddrttls
should be int
because ares_parse_a_reply
needs naddrttls
be an integer but not an unsigned integer.
src/cares_wrap.cc
Outdated
|
||
Local<Array> ttls = Array::New(isolate, naddrttls); | ||
auto context = env->context(); | ||
for (int i = 0; i < naddrttls; i += 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size_t
(and btw, we tend to use i++
here)
src/cares_wrap.cc
Outdated
|
||
Local<Array> AddrTTL6ToArray(Environment* env, | ||
ares_addr6ttl* addrttls, | ||
int naddrttls) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto – I think it’s safe to merge these two methods into a template, by the way.
src/cares_wrap.cc
Outdated
status = ares_parse_a_reply(buf, | ||
len, | ||
&host, | ||
reinterpret_cast<ares_addrttl*>(addrttls), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s no need to reinterpret_cast
here, static_cast
should be enough
src/cares_wrap.cc
Outdated
|
||
|
||
int ParseGeneralReply(Environment* env, | ||
unsigned char* buf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buf
can be const unsigned char*
, right?
src/cares_wrap.cc
Outdated
|
||
/* If it's `CNAME`, return the CNAME value */ | ||
/* And if it's `CNAME_OR_A` and it has value in `h_name` and `h_aliases[0]` */ | ||
/* We consider it's a CNAME record, otherwise we consider it's an A record */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This continues the sentence from the line before, right? Could you start it with a lowercase w
then? And maybe consider folding the comments into a single multi-line comment, i.e.
/* foo
* bar
* baz */
src/cares_wrap.cc
Outdated
|
||
|
||
int ParseMxReply(Environment* env, | ||
unsigned char* buf, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
src/cares_wrap.cc
Outdated
mx_record->Set(exchange_symbol, | ||
OneByteString(env->isolate(), current->host)); | ||
mx_record->Set(priority_symbol, | ||
Integer::New(env->isolate(), current->priority)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding all uses of Set()
: Can you use the overload that returns a Maybe<bool>
and check the result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By using FromJust()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some docs comments
doc/api/dns.md
Outdated
- `err` {Error} | ||
- `ret` {Object[][]} | ||
|
||
Uses the DNS protocol to resolve any queries (`ANY` records) for the `hostname`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"to resolve all records (also known as ANY
or *
query)"
(This is taken out of the rfc - 255 A request for all records
)
doc/api/dns.md
Outdated
Uses the DNS protocol to resolve any queries (`ANY` records) for the `hostname`. | ||
The `ret` argument passed to the `callback` function will be an array of objects | ||
with uncertain type of records. Each object has a property `type` that indicates | ||
the type of current record. And for each type of record, the object structure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe replace the last sentence with: "Depending on the type
, additional properties will be present on the object:
doc/api/dns.md
Outdated
| `"PTR"` | `value` | | ||
| `"SOA"` | Refer to [`dns.resolveSoa()`][] | | ||
| `"SRV"` | Refer to [`dns.resolveSrv()`][] | | ||
| `"TXT"` | This is an array-liked object with `length` and `indexes`, eg. `{'0':'sth','length':1}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not return a regular array (e.g. where Array.isArray(array)
returns true
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need the extra column type
.
You mean create an array with extra type
directly?
eg.
const arr = [ 'foo', 'bar' ];
arr.type = 'TXT';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, seems reasonable to keep it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: array-like
I think this should be an array; if necessary, you can make it an entries: […]
property on the object itself.
doc/api/dns.md
Outdated
| `"SRV"` | Refer to [`dns.resolveSrv()`][] | | ||
| `"TXT"` | This is an array-liked object with `length` and `indexes`, eg. `{'0':'sth','length':1}` | | ||
|
||
Following is a example of the `ret` object passed to the callback: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Here is ..." might be better
doc/api/dns.md
Outdated
<!-- eslint-disable --> | ||
```js | ||
[ { address: '127.0.0.1', ttl: 299, type: 'A' }, | ||
{ value: 'example.com', type: 'CNAME' }, // in fact, CNAME can't stay with A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this comment, while correct, it seems unrelated here.
doc/api/dns.md
Outdated
retry: 900, | ||
expire: 1800, | ||
minttl: 60, | ||
type: 'SOA' } ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you structure this example to type
is sorted first in each object?
f95255d
to
f11a55f
Compare
Should this PR backport to 6.x and 4.x? |
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Fixes: #2848 PR-URL: #13137 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Fixes: #2848 PR-URL: #13137 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Fixes: #2848 PR-URL: #13137 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`23d41f3118`](2abaa86ba8)] [#13466](#13466) * **DNS** * The server used for DNS queries can now use a custom port. [[`2bb6614904`](8506acc1b5)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`30bc9dc20f`](30bc9dc20f)] [#13137](#13137) * **V8** * The V8 engine has been upgraded to version 5.9, which has a significantly changed performance profile. [#13515](#13515) PR-URL: #13744
This is a bit of a check to see how people feel about having this kind of test. Ref: nodejs#13137 PR-URL: nodejs#13883 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
`dns.resolveAny` and `dns.resolve` with `"ANY"` has the similar behavior like `$ dig <domain> any` and returns an array with several types of records. `dns.resolveAny` parses the result packet by several rules in turn. Supported types: * A * AAAA * CNAME * MX * NAPTR * NS * PTR * SOA * SRV * TXT Fixes: #2848 PR-URL: #13137 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`820b011ed6`](820b011ed6)] [#13466](#13466) * **Cluster** * Users now have more fine-grained control over the inspector port used by individual cluster workers. Previously, cluster workers would simply increment from the master's debug port. [[`dfc46e262a`](dfc46e262a)] [#14140](#14140) * **DNS** * The server used for DNS queries can now use a custom port. [[`ebe7bb29aa`](ebe7bb29aa)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`6e30e2558e`](6e30e2558e)] [#13137](#13137) * **npm** * The `npm` CLI has been updated to version 5.3.0. In particular, it now comes with the `npx` binary, which is also shipped with Node. [[`dc3f6b9ac1`](dc3f6b9ac1)] [#14235](#14235) * `npm` Changelogs: - [v5.0.4](https://github.com/npm/npm/releases/tag/v5.0.4) - [v5.1.0](https://github.com/npm/npm/releases/tag/v5.1.0) - [v5.2.0](https://github.com/npm/npm/releases/tag/v5.2.0) - [v5.3.0](https://github.com/npm/npm/releases/tag/v5.3.0) PR-URL: #13744
Big thanks to @addaleax who prepared the vast majority of this release. Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`820b011ed6`](nodejs@820b011ed6)] [nodejs#13466](nodejs#13466) * **Cluster** * Users now have more fine-grained control over the inspector port used by individual cluster workers. Previously, cluster workers would simply increment from the master's debug port. [[`dfc46e262a`](nodejs@dfc46e262a)] [nodejs#14140](nodejs#14140) * **DNS** * The server used for DNS queries can now use a custom port. [[`ebe7bb29aa`](nodejs@ebe7bb29aa)] [nodejs#13723](nodejs#13723) * Support for `dns.resolveAny()` has been added. [[`6e30e2558e`](nodejs@6e30e2558e)] [nodejs#13137](nodejs#13137) * **npm** * The `npm` CLI has been updated to version 5.3.0. In particular, it now comes with the `npx` binary, which is also shipped with Node. [[`dc3f6b9ac1`](nodejs@dc3f6b9ac1)] [nodejs#14235](nodejs#14235) * `npm` Changelogs: - [v5.0.4](https://github.com/npm/npm/releases/tag/v5.0.4) - [v5.1.0](https://github.com/npm/npm/releases/tag/v5.1.0) - [v5.2.0](https://github.com/npm/npm/releases/tag/v5.2.0) - [v5.3.0](https://github.com/npm/npm/releases/tag/v5.3.0) PR-URL: nodejs#13744
Big thanks to @addaleax who prepared the vast majority of this release. Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`820b011ed6`](820b011ed6)] [#13466](#13466) * **Cluster** * Users now have more fine-grained control over the inspector port used by individual cluster workers. Previously, cluster workers would simply increment from the master's debug port. [[`dfc46e262a`](dfc46e262a)] [#14140](#14140) * **DNS** * The server used for DNS queries can now use a custom port. [[`ebe7bb29aa`](ebe7bb29aa)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`6e30e2558e`](6e30e2558e)] [#13137](#13137) * **npm** * The `npm` CLI has been updated to version 5.3.0. In particular, it now comes with the `npx` binary, which is also shipped with Node. [[`dc3f6b9ac1`](dc3f6b9ac1)] [#14235](#14235) * `npm` Changelogs: - [v5.0.4](https://github.com/npm/npm/releases/tag/v5.0.4) - [v5.1.0](https://github.com/npm/npm/releases/tag/v5.1.0) - [v5.2.0](https://github.com/npm/npm/releases/tag/v5.2.0) - [v5.3.0](https://github.com/npm/npm/releases/tag/v5.3.0) PR-URL: #13744
Big thanks to @addaleax who prepared the vast majority of this release. Notable changes: * **Async Hooks** * Multiple improvements to Promise support in `async_hooks` have been made. * **Build** * The compiler version requirement to build Node with GCC has been raised to GCC 4.9.4. [[`820b011ed6`](820b011ed6)] [#13466](#13466) * **Cluster** * Users now have more fine-grained control over the inspector port used by individual cluster workers. Previously, cluster workers would simply increment from the master's debug port. [[`dfc46e262a`](dfc46e262a)] [#14140](#14140) * **DNS** * The server used for DNS queries can now use a custom port. [[`ebe7bb29aa`](ebe7bb29aa)] [#13723](#13723) * Support for `dns.resolveAny()` has been added. [[`6e30e2558e`](6e30e2558e)] [#13137](#13137) * **npm** * The `npm` CLI has been updated to version 5.3.0. In particular, it now comes with the `npx` binary, which is also shipped with Node. [[`dc3f6b9ac1`](dc3f6b9ac1)] [#14235](#14235) * `npm` Changelogs: - [v5.0.4](https://github.com/npm/npm/releases/tag/v5.0.4) - [v5.1.0](https://github.com/npm/npm/releases/tag/v5.1.0) - [v5.2.0](https://github.com/npm/npm/releases/tag/v5.2.0) - [v5.3.0](https://github.com/npm/npm/releases/tag/v5.3.0) PR-URL: #13744
Release team were -1 on landing this in 6.x |
dns.resolveAny
anddns.resolve
with"ANY"
has the similar behavior like$ dig <domain> any
and returns an array with several types of records.dns.resolveAny
parses the result packet by several rules in turn.Refs: #2848
Supported Types
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
dns