Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit fe2de51

Browse files
committed
Merge nodejs/master
Merge cee8d6d as of 2017-08-01. This is an automatically created merge. For any problems please contact @kunalspathak. Conflicts: test/parallel/test-vm-new-script-new-context.js
2 parents 02f5635 + cee8d6d commit fe2de51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1032
-439
lines changed

.eslintrc.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,13 @@ rules:
101101
func-call-spacing: error
102102
func-name-matching: error
103103
func-style: [error, declaration, {allowArrowFunctions: true}]
104-
# indent: [error, 2, {ArrayExpression: first,
105-
# CallExpression: {arguments: first},
106-
# FunctionDeclaration: {parameters: first},
107-
# FunctionExpression: {parameters: first},
108-
# MemberExpression: off,
109-
# ObjectExpression: first,
110-
# SwitchCase: 1}]
111-
indent-legacy: [error, 2, {ArrayExpression: first,
112-
CallExpression: {arguments: first},
113-
MemberExpression: 1,
114-
ObjectExpression: first,
115-
SwitchCase: 1}]
104+
indent: [error, 2, {ArrayExpression: first,
105+
CallExpression: {arguments: first},
106+
FunctionDeclaration: {parameters: first},
107+
FunctionExpression: {parameters: first},
108+
MemberExpression: off,
109+
ObjectExpression: first,
110+
SwitchCase: 1}]
116111
key-spacing: [error, {mode: minimum}]
117112
keyword-spacing: error
118113
linebreak-style: [error, unix]

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ release.
5656
<a href="doc/changelogs/CHANGELOG_V7.md#7.0.0">7.0.0</a><br/>
5757
</td>
5858
<td valign="top">
59-
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.11.1">6.11.1</a></b><br/>
59+
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.11.2">6.11.2</a></b><br/>
60+
<a href="doc/changelogs/CHANGELOG_V6.md#6.11.1">6.11.1</a><br/>
6061
<a href="doc/changelogs/CHANGELOG_V6.md#6.11.0">6.11.0</a><br/>
6162
<a href="doc/changelogs/CHANGELOG_V6.md#6.10.3">6.10.3</a><br/>
6263
<a href="doc/changelogs/CHANGELOG_V6.md#6.10.2">6.10.2</a><br/>

benchmark/.eslintrc.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

benchmark/_benchmark_progress.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ class BenchmarkProgress {
6565
this.updateProgress();
6666
}
6767

68-
completeConfig(data) {
68+
completeConfig() {
6969
this.completedConfig++;
7070
this.updateProgress();
7171
}
7272

73-
completeRun(job) {
73+
completeRun() {
7474
this.completedRuns++;
7575
this.updateProgress();
7676
}
@@ -108,7 +108,7 @@ class BenchmarkProgress {
108108
`${caption} `;
109109
}
110110

111-
updateProgress(finished) {
111+
updateProgress() {
112112
if (!process.stderr.isTTY || process.stdout.isTTY) {
113113
return;
114114
}

doc/.eslintrc.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,3 @@ rules:
1111
no-var: error
1212
prefer-const: error
1313
prefer-rest-params: error
14-
15-
# use stricter indent over indent-legacy
16-
indent-legacy: off
17-
indent: [error, 2, {ArrayExpression: first,
18-
CallExpression: {arguments: first},
19-
FunctionDeclaration: {parameters: first},
20-
FunctionExpression: {parameters: first},
21-
MemberExpression: off,
22-
ObjectExpression: first,
23-
SwitchCase: 1}]

doc/api/errors.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ Used when `Console` is instantiated without `stdout` stream or when `stdout` or
597597
Used when the native call from `process.cpuUsage` cannot be processed properly.
598598

599599
<a id="ERR_DNS_SET_SERVERS_FAILED"></a>
600+
### ERR_DNS_SET_SERVERS_FAILED
600601

601602
Used when `c-ares` failed to set the DNS server.
602603

@@ -661,6 +662,11 @@ Used when invalid characters are detected in headers.
661662
The `'ERR_INVALID_CURSOR_POS'` is thrown specifically when a cursor on a given
662663
stream is attempted to move to a specified row without a specified column.
663664

665+
<a id="ERR_INVALID_DOMAIN_NAME"></a>
666+
### ERR_INVALID_DOMAIN_NAME
667+
668+
Used when `hostname` can not be parsed from a provided URL.
669+
664670
<a id="ERR_INVALID_FD"></a>
665671
### ERR_INVALID_FD
666672

@@ -689,7 +695,13 @@ Used when an attempt is made to send an unsupported "handle" over an IPC
689695
communication channel to a child process. See [`child.send()`] and
690696
[`process.send()`] for more information.
691697

698+
<a id="ERR_INVALID_HTTP_TOKEN"></a>
699+
### ERR_INVALID_HTTP_TOKEN
700+
701+
Used when `options.method` received an invalid HTTP token.
702+
692703
<a id="ERR_INVALID_IP_ADDRESS"></a>
704+
### ERR_INVALID_IP_ADDRESS
693705

694706
Used when an IP address is not valid.
695707

@@ -704,6 +716,11 @@ passed in an options object.
704716

705717
Used when an invalid or unknown file encoding is passed.
706718

719+
<a id="ERR_INVALID_PROTOCOL"></a>
720+
### ERR_INVALID_PROTOCOL
721+
722+
Used when an invalid `options.protocol` is passed.
723+
707724
<a id="ERR_INVALID_REPL_EVAL_CONFIG"></a>
708725
### ERR_INVALID_REPL_EVAL_CONFIG
709726

@@ -879,6 +896,11 @@ Used to identify a specific kind of internal Node.js error that should not
879896
typically be triggered by user code. Instances of this error point to an
880897
internal bug within the Node.js binary itself.
881898

899+
<a id="ERR_UNESCAPED_CHARACTERS"></a>
900+
### ERR_UNESCAPED_CHARACTERS
901+
902+
Used when a string that contains unescaped characters was received.
903+
882904
<a id="ERR_UNKNOWN_ENCODING"></a>
883905
### ERR_UNKNOWN_ENCODING
884906

doc/api/n-api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ must provide a function satisfying the following signature which would get
181181
called upon the object's collection. Currently, `napi_finalize` can be used for
182182
finding out when objects that have external data are collected.
183183
184+
```C
185+
typedef void (*napi_finalize)(napi_env env,
186+
void* finalize_data,
187+
void* finalize_hint);
188+
```
189+
184190

185191
#### napi_async_execute_callback
186192
Function pointer used with functions that support asynchronous

doc/api/net.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ The number of concurrent connections on the server.
155155

156156
This becomes `null` when sending a socket to a child with
157157
[`child_process.fork()`][]. To poll forks and get current number of active
158-
connections use asynchronous `server.getConnections` instead.
158+
connections use asynchronous [`server.getConnections()`][] instead.
159159

160160
### server.getConnections(callback)
161161
<!-- YAML
@@ -232,7 +232,7 @@ Start a server listening for connections on a given `handle` that has
232232
already been bound to a port, a UNIX domain socket, or a Windows named pipe.
233233

234234
The `handle` object can be either a server, a socket (anything with an
235-
underlying `_handle` member), or an object with a `fd` member that is a
235+
underlying `_handle` member), or an object with an `fd` member that is a
236236
valid file descriptor.
237237

238238
*Note*: Listening on a file descriptor is not supported on Windows.
@@ -366,7 +366,7 @@ A `net.Socket` can be created by the user and used directly to interact with
366366
a server. For example, it is returned by [`net.createConnection()`][],
367367
so the user can use it to talk to the server.
368368

369-
It can also be be created by Node.js and passed to the user when a connection
369+
It can also be created by Node.js and passed to the user when a connection
370370
is received. For example, it is passed to the listeners of a
371371
[`'connection'`][] event emitted on a [`net.Server`][], so the user can use
372372
it to interact with the client.
@@ -384,9 +384,9 @@ Creates a new socket object.
384384
* `allowHalfOpen` {boolean} Indicates whether half-opened TCP connections
385385
are allowed. See [`net.createServer()`][] and the [`'end'`][] event
386386
for details. Defaults to `false`.
387-
* `readable` {boolean} Allow reads on the socket when a `fd` is passed,
387+
* `readable` {boolean} Allow reads on the socket when an `fd` is passed,
388388
otherwise ignored. Defaults to `false`.
389-
* `writable` {boolean} Allow reads on the socket when a `fd` is passed,
389+
* `writable` {boolean} Allow writes on the socket when an `fd` is passed,
390390
otherwise ignored. Defaults to `false`.
391391
* Returns: {net.Socket}
392392

doc/api/readline.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,9 @@ changes:
369369
* `crlfDelay` {number} If the delay between `\r` and `\n` exceeds
370370
`crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate
371371
end-of-line input. Default to `100` milliseconds.
372-
`crlfDelay` will be coerced to `[100, 2000]` range.
372+
`crlfDelay` will be coerced to a number no less than `100`. It can be set to
373+
`Infinity`, in which case `\r` followed by `\n` will always be considered a
374+
single newline.
373375
* `removeHistoryDuplicates` {boolean} If `true`, when a new input line added
374376
to the history list duplicates an older one, this removes the older line
375377
from the list. Defaults to `false`.

doc/api/url.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,18 @@ const myURL =
7777
added: v7.0.0
7878
-->
7979

80-
*Note*: Using the `delete` keyword on `URL` objects (e.g.
81-
`delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will
82-
still return `true`.
83-
8480
### Class: URL
81+
82+
Browser-compatible `URL` class, implemented by following the WHATWG URL
83+
Standard. [Examples of parsed URLs][] may be found in the Standard itself.
84+
85+
*Note*: In accordance with browser conventions, all properties of `URL` objects
86+
are implemented as getters and setters on the class prototype, rather than as
87+
data properties on the object itself. Thus, unlike [legacy urlObject][]s, using
88+
the `delete` keyword on any properties of `URL` objects (e.g. `delete
89+
myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
90+
return `true`.
91+
8592
#### Constructor: new URL(input[, base])
8693

8794
* `input` {string} The input URL to parse
@@ -116,7 +123,8 @@ const myURL = new URL('https://你好你好');
116123
// https://xn--6qqa088eba/
117124
```
118125

119-
Additional [examples of parsed URLs][] may be found in the WHATWG URL Standard.
126+
*Note*: This feature is only available if the `node` executable was compiled
127+
with [ICU][] enabled. If not, the domain names are passed through unchanged.
120128

121129
#### url.hash
122130

@@ -211,9 +219,7 @@ will be thrown.
211219

212220
* {string}
213221

214-
Gets the read-only serialization of the URL's origin. Unicode characters that
215-
may be contained within the hostname will be encoded as-is without [Punycode][]
216-
encoding.
222+
Gets the read-only serialization of the URL's origin.
217223

218224
```js
219225
const { URL } = require('url');
@@ -226,7 +232,7 @@ console.log(myURL.origin);
226232
const { URL } = require('url');
227233
const idnURL = new URL('https://你好你好');
228234
console.log(idnURL.origin);
229-
// Prints https://你好你好
235+
// Prints https://xn--6qqa088eba
230236

231237
console.log(idnURL.hostname);
232238
// Prints xn--6qqa088eba
@@ -947,6 +953,13 @@ forward-slash characters (`/`) are required following the colon in the
947953
### url.format(urlObject)
948954
<!-- YAML
949955
added: v0.1.25
956+
changes:
957+
- version: v7.0.0
958+
pr-url: https://github.com/nodejs/node/pull/7234
959+
description: URLs with a `file:` scheme will now always use the correct
960+
number of slashes regardless of `slashes` option. A false-y
961+
`slashes` option with no protocol is now also respected at all
962+
times.
950963
-->
951964

952965
* `urlObject` {Object|string} A URL object (as returned by `url.parse()` or
@@ -1144,9 +1157,11 @@ console.log(myURL.origin);
11441157
[`url.toString()`]: #url_url_tostring
11451158
[`urlSearchParams.entries()`]: #url_urlsearchparams_entries
11461159
[`urlSearchParams@@iterator()`]: #url_urlsearchparams_iterator
1160+
[ICU]: intl.html#intl_options_for_building_node_js
11471161
[Punycode]: https://tools.ietf.org/html/rfc5891#section-4.4
11481162
[WHATWG URL Standard]: https://url.spec.whatwg.org/
11491163
[WHATWG URL]: #url_the_whatwg_url_api
11501164
[examples of parsed URLs]: https://url.spec.whatwg.org/#example-url-parsing
1165+
[legacy urlObject]: #url_legacy_urlobject
11511166
[percent-encoded]: #whatwg-percent-encoding
11521167
[stable sorting algorithm]: https://en.wikipedia.org/wiki/Sorting_algorithm#Stability

0 commit comments

Comments
 (0)