Skip to content
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

v7.7.4 Release Proposal #11941

Merged
merged 48 commits into from
Mar 21, 2017
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
14e3ad0
inspector: proper WS URLs when bound to 0.0.0.0
Mar 1, 2017
5b1d61c
child_process: fix deoptimizing use of arguments
vsemozhetbyt Feb 19, 2017
9a59913
util: avoid using forEach
jasnell Feb 27, 2017
5408301
tls: keep track of stream that is closed
jBarz Mar 9, 2017
646ee55
tls: avoid using forEach
jasnell Feb 26, 2017
5f6025b
test: fail when child dies in fork-net
joyeecheung Mar 4, 2017
c9cf922
test: add regex to assert.throws
matejkrajcovic Mar 12, 2017
d2c9111
test: fix repl-function-redefinition-edge-case
aqrln Mar 8, 2017
2df662c
test: test resolveObject with an empty path
watilde Mar 14, 2017
2649dab
test: added test for indexed properties
AnnaMag Mar 9, 2017
f9c831f
test: fix flaky test-domain-abort-on-uncaught
Trott Mar 12, 2017
560d8ee
test: delay child exit in AIX for pseudo-tty tests
gireeshpunathil Mar 6, 2017
3ae58ac
test: failing behaviour on sandboxed Proxy
AnnaMag Mar 2, 2017
8bda7b8
test: add coverage for child_process bounds check
Trott Mar 11, 2017
2cab00a
test: fix assertion in vm test
AnnaMag Mar 14, 2017
90be5a1
stream: avoid using forEach
jasnell Feb 26, 2017
62e7261
repl: avoid using forEach
jasnell Feb 27, 2017
e19ca8b
readline: remove unneeded eslint-disable comment
Trott Mar 14, 2017
a0b1aa1
readline: avoid using forEach
jasnell Feb 27, 2017
c0a2e02
net: avoid using forEach
jasnell Feb 27, 2017
7e23072
module: avoid using forEach
jasnell Feb 27, 2017
77c69f7
lib, test: add duplicate symbol checking in E()
DavidCai1111 Mar 13, 2017
9cc712c
lib: remove unused msg parameter in debug_agent
mr-spd Mar 13, 2017
fbbcd1a
lib: Fix swallowed events in inspect integration
Mar 15, 2017
cde5d71
doc: var -> let / const in events.md
vsemozhetbyt Mar 12, 2017
e6f113d
doc: console.log() -> console.error() in events.md
vsemozhetbyt Mar 12, 2017
ae52b63
doc: correct comment error in stream.md
Alex-Sokolov Mar 11, 2017
75fcf53
doc: missing argument types for events methods
ameliavoncat Mar 11, 2017
e84e33c
doc: fix a typo in api/process.md
sabakugaara Mar 10, 2017
78ca15d
doc: argument types for dns methods
ameliavoncat Mar 9, 2017
54879ab
doc: fix mistakes in stream doc (object mode)
chdh Mar 12, 2017
9861ec9
doc: increase Buffer.concat() documentation
cjihrig Mar 14, 2017
7c7228e
doc: gcc version is at least 4.8.5 in BUILDING.md
detailyang Mar 14, 2017
6d6a65e
doc: linkable commit message guidelines
sam-github Mar 10, 2017
0c09126
doc: add note that vm module is not a security mechanism
krydos Feb 25, 2017
a5f7393
doc: add vsemozhetbyt to collaborators
vsemozhetbyt Mar 20, 2017
a7e4b02
deps: Add node-inspect 1.10.6
Mar 15, 2017
5244ee3
build: mac OBJ_DIR should point to obj.target
danbev Mar 15, 2017
80949f3
build: add cpp linting to windows build
Mar 15, 2017
d0fb578
fs: avoid using forEach
jasnell Feb 26, 2017
dcac2d8
benchmark: benchmark comparing forEach with for
jasnell Feb 26, 2017
ca31986
deps: cherry-pick ca0f9573 from V8 upstream
ofrobots Mar 20, 2017
f48763c
benchmark: remove benchmarks forced optimizations
bzoz Feb 28, 2017
60ad7af
doc: deprecate debug protocol
Dec 17, 2016
0c00b65
Fix #7065: cli help documentation for --inspect
Mar 16, 2017
c626734
tls: fix segfault on destroy after partial read
bnoordhuis Mar 17, 2017
44b4c0b
2017-03-21, Version 7.7.4 (Current)
cjihrig Mar 21, 2017
bc664cb
Working on v7.7.5
cjihrig Mar 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: argument types for dns methods
Refs: #9399
PR-URL: #11764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
ameliavoncat authored and italoacasas committed Mar 20, 2017

Verified

This commit was signed with the committer’s verified signature.
itegulov Daniyar Itegulov
commit 78ca15dd785abb588e86e50f119afe88a0352372
139 changes: 89 additions & 50 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
@@ -70,33 +70,25 @@ changes:
pr-url: https://github.com/nodejs/node/pull/744
description: The `all` option is supported now.
-->
- `hostname` {string}
- `options` {integer | Object}
- `family` {integer} The record family. Must be `4` or `6`. IPv4
and IPv6 addresses are both returned by default.
- `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple
flags may be passed by bitwise `OR`ing their values.
- `all` {boolean} When `true`, the callback returns all resolved addresses in
an array. Otherwise, returns a single address. Defaults to `false`.
- `callback` {Function}
- `err` {Error}
- `address` {string} A string representation of an IPv4 or IPv6 address.
- `family` {integer} `4` or `6`, denoting the family of `address`.

Resolves a hostname (e.g. `'nodejs.org'`) into the first found A (IPv4) or
AAAA (IPv6) record. `options` can be an object or integer. If `options` is
not provided, then IPv4 and IPv6 addresses are both valid. If `options` is
an integer, then it must be `4` or `6`.

Alternatively, `options` can be an object containing these properties:

* `family` {number} - The record family. If present, must be the integer
`4` or `6`. If not provided, both IP v4 and v6 addresses are accepted.
* `hints`: {number} - If present, it should be one or more of the supported
`getaddrinfo` flags. If `hints` is not provided, then no flags are passed to
`getaddrinfo`. Multiple flags can be passed through `hints` by bitwise
`OR`ing their values.
See [supported `getaddrinfo` flags][] for more information on supported
flags.
* `all`: {boolean} - When `true`, the callback returns all resolved addresses
in an array, otherwise returns a single address. Defaults to `false`.

All properties are optional.

The `callback` function has arguments `(err, address, family)`. `address` is a
string representation of an IPv4 or IPv6 address. `family` is either the
integer `4` or `6` and denotes the family of `address` (not necessarily the
value initially passed to `lookup`).

With the `all` option set to `true`, the arguments change to
AAAA (IPv6) record. All `option` properties are optional. If `options` is an
integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
and IPv6 addresses are both returned if found.

With the `all` option set to `true`, the arguments for `callback` change to
`(err, addresses)`, with `addresses` being an array of objects with the
properties `address` and `family`.

@@ -147,6 +139,12 @@ on some operating systems (e.g FreeBSD 10.1).
<!-- YAML
added: v0.11.14
-->
- `address` {string}
- `port` {number}
- `callback` {Function}
- `err` {Error}
- `hostname` {string} e.g. `example.com`
- `service` {string} e.g. `http`

Resolves the given `address` and `port` into a hostname and service using
the operating system's underlying `getnameinfo` implementation.
@@ -155,10 +153,7 @@ If `address` is not a valid IP address, a `TypeError` will be thrown.
The `port` will be coerced to a number. If it is not a legal port, a `TypeError`
will be thrown.

The callback has arguments `(err, hostname, service)`. The `hostname` and
`service` arguments are strings (e.g. `'localhost'` and `'http'` respectively).

On error, `err` is an [`Error`][] object, where `err.code` is the error code.
On an error, `err` is an [`Error`][] object, where `err.code` is the error code.

```js
const dns = require('dns');
@@ -172,6 +167,11 @@ dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `rrtype` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {string[] | Object[] | string[][] | Object}

Uses the DNS protocol to resolve a hostname (e.g. `'nodejs.org'`) into an
array of the record types specified by `rrtype`.
@@ -208,18 +208,21 @@ changes:
description: This method now supports passing `options`,
specifically `options.ttl`.
-->
- `hostname` {string} Hostname to resolve.
- `options` {Object}
- `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
When `true`, the callback receives an array of
`{ address: '1.2.3.4', ttl: 60 }` objects rather than an array of strings,
with the TTL expressed in seconds.
- `callback` {Function}
- `err` {Error}
- `addresses` {string[] | Object[]}

Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the
`hostname`. The `addresses` argument passed to the `callback` function
will contain an array of IPv4 addresses (e.g.
`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).

* `hostname` {string} Hostname to resolve.
* `options` {Object}
* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
The callback receives an array of `{ address: '1.2.3.4', ttl: 60 }` objects
rather than an array of strings. The TTL is expressed in seconds.
* `callback` {Function} An `(err, result)` callback function.

## dns.resolve6(hostname[, options], callback)
<!-- YAML
@@ -230,22 +233,29 @@ changes:
description: This method now supports passing `options`,
specifically `options.ttl`.
-->
- `hostname` {string} Hostname to resolve.
- `options` {Object}
- `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
When `true`, the callback receives an array of
`{ address: '0:1:2:3:4:5:6:7', ttl: 60 }` objects rather than an array of
strings, with the TTL expressed in seconds.
- `callback` {Function}
- `err` {Error}
- `addresses` {string[] | Object[]}

Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
`hostname`. The `addresses` argument passed to the `callback` function
will contain an array of IPv6 addresses.

* `hostname` {string} Hostname to resolve.
* `options` {Object}
* `ttl` {boolean} Retrieve the Time-To-Live value (TTL) of each record.
The callback receives an array of `{ address: '0:1:2:3:4:5:6:7', ttl: 60 }`
objects rather than an array of strings. The TTL is expressed in seconds.
* `callback` {Function} An `(err, result)` callback function.

## dns.resolveCname(hostname, callback)
<!-- YAML
added: v0.3.2
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {string[]}

Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The
`addresses` argument passed to the `callback` function
@@ -256,6 +266,10 @@ will contain an array of canonical name records available for the `hostname`
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {Object[]}

Uses the DNS protocol to resolve mail exchange records (`MX` records) for the
`hostname`. The `addresses` argument passed to the `callback` function will
@@ -266,11 +280,14 @@ property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
<!-- YAML
added: v0.9.12
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {Object[]}

Uses the DNS protocol to resolve regular expression based records (`NAPTR`
records) for the `hostname`. The `callback` function has arguments
`(err, addresses)`. The `addresses` argument passed to the `callback` function
will contain an array of objects with the following properties:
records) for the `hostname`. The `addresses` argument passed to the `callback`
function will contain an array of objects with the following properties:

* `flags`
* `service`
@@ -296,16 +313,24 @@ For example:
<!-- YAML
added: v0.1.90
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {string[]}

Uses the DNS protocol to resolve name server records (`NS` records) for the
`hostname`. The `addresses` argument passed to the `callback` function will
contain an array of name server records available for `hostname`
(e.g. `['ns1.example.com', 'ns2.example.com']`).

## dns.resolvePtr(hostname, callback)
## dns.resolvePtr(hostname)
<!-- YAML
added: v6.0.0
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {string[]}

Uses the DNS protocol to resolve pointer records (`PTR` records) for the
`hostname`. The `addresses` argument passed to the `callback` function will
@@ -315,9 +340,13 @@ be an array of strings containing the reply records.
<!-- YAML
added: v0.11.10
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `address` {Object}

Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
the `hostname`. The `addresses` argument passed to the `callback` function will
the `hostname`. The `address` argument passed to the `callback` function will
be an object with the following properties:

* `nsname`
@@ -344,6 +373,10 @@ be an object with the following properties:
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {Object[]}

Uses the DNS protocol to resolve service records (`SRV` records) for the
`hostname`. The `addresses` argument passed to the `callback` function will
@@ -367,6 +400,10 @@ be an array of objects with the following properties:
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `addresses` {string[][]}

Uses the DNS protocol to resolve text queries (`TXT` records) for the
`hostname`. The `addresses` argument passed to the `callback` function is
@@ -379,25 +416,27 @@ treated separately.
<!-- YAML
added: v0.1.16
-->
- `ip` {string}
- `callback` {Function}
- `err` {Error}
- `hostnames` {string[]}

Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
array of hostnames.

The `callback` function has arguments `(err, hostnames)`, where `hostnames`
is an array of resolved hostnames for the given `ip`.

On error, `err` is an [`Error`][] object, where `err.code` is
one of the [DNS error codes][].

## dns.setServers(servers)
<!-- YAML
added: v0.11.3
-->
- `servers` {string[]}

Sets the IP addresses of the servers to be used when resolving. The `servers`
argument is an array of IPv4 or IPv6 addresses.

If a port specified on the address it will be removed.
If a port is specified on the address, it will be removed.

An error will be thrown if an invalid address is provided.