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

Commit

Permalink
Merge nodejs/master
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kunalspathak committed Aug 2, 2017
2 parents 02f5635 + cee8d6d commit fe2de51
Show file tree
Hide file tree
Showing 50 changed files with 1,032 additions and 439 deletions.
19 changes: 7 additions & 12 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,13 @@ rules:
func-call-spacing: error
func-name-matching: error
func-style: [error, declaration, {allowArrowFunctions: true}]
# indent: [error, 2, {ArrayExpression: first,
# CallExpression: {arguments: first},
# FunctionDeclaration: {parameters: first},
# FunctionExpression: {parameters: first},
# MemberExpression: off,
# ObjectExpression: first,
# SwitchCase: 1}]
indent-legacy: [error, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
MemberExpression: 1,
ObjectExpression: first,
SwitchCase: 1}]
indent: [error, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
FunctionDeclaration: {parameters: first},
FunctionExpression: {parameters: first},
MemberExpression: off,
ObjectExpression: first,
SwitchCase: 1}]
key-spacing: [error, {mode: minimum}]
keyword-spacing: error
linebreak-style: [error, unix]
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V7.md#7.0.0">7.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.11.1">6.11.1</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V6.md#6.11.2">6.11.2</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.11.1">6.11.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.11.0">6.11.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.10.3">6.10.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V6.md#6.10.2">6.10.2</a><br/>
Expand Down
13 changes: 0 additions & 13 deletions benchmark/.eslintrc.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions benchmark/_benchmark_progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ class BenchmarkProgress {
this.updateProgress();
}

completeConfig(data) {
completeConfig() {
this.completedConfig++;
this.updateProgress();
}

completeRun(job) {
completeRun() {
this.completedRuns++;
this.updateProgress();
}
Expand Down Expand Up @@ -108,7 +108,7 @@ class BenchmarkProgress {
`${caption} `;
}

updateProgress(finished) {
updateProgress() {
if (!process.stderr.isTTY || process.stdout.isTTY) {
return;
}
Expand Down
10 changes: 0 additions & 10 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ rules:
no-var: error
prefer-const: error
prefer-rest-params: error

# use stricter indent over indent-legacy
indent-legacy: off
indent: [error, 2, {ArrayExpression: first,
CallExpression: {arguments: first},
FunctionDeclaration: {parameters: first},
FunctionExpression: {parameters: first},
MemberExpression: off,
ObjectExpression: first,
SwitchCase: 1}]
22 changes: 22 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ Used when `Console` is instantiated without `stdout` stream or when `stdout` or
Used when the native call from `process.cpuUsage` cannot be processed properly.

<a id="ERR_DNS_SET_SERVERS_FAILED"></a>
### ERR_DNS_SET_SERVERS_FAILED

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

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

<a id="ERR_INVALID_DOMAIN_NAME"></a>
### ERR_INVALID_DOMAIN_NAME

Used when `hostname` can not be parsed from a provided URL.

<a id="ERR_INVALID_FD"></a>
### ERR_INVALID_FD

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

<a id="ERR_INVALID_HTTP_TOKEN"></a>
### ERR_INVALID_HTTP_TOKEN

Used when `options.method` received an invalid HTTP token.

<a id="ERR_INVALID_IP_ADDRESS"></a>
### ERR_INVALID_IP_ADDRESS

Used when an IP address is not valid.

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

Used when an invalid or unknown file encoding is passed.

<a id="ERR_INVALID_PROTOCOL"></a>
### ERR_INVALID_PROTOCOL

Used when an invalid `options.protocol` is passed.

<a id="ERR_INVALID_REPL_EVAL_CONFIG"></a>
### ERR_INVALID_REPL_EVAL_CONFIG

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

<a id="ERR_UNESCAPED_CHARACTERS"></a>
### ERR_UNESCAPED_CHARACTERS

Used when a string that contains unescaped characters was received.

<a id="ERR_UNKNOWN_ENCODING"></a>
### ERR_UNKNOWN_ENCODING

Expand Down
6 changes: 6 additions & 0 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ must provide a function satisfying the following signature which would get
called upon the object's collection. Currently, `napi_finalize` can be used for
finding out when objects that have external data are collected.
```C
typedef void (*napi_finalize)(napi_env env,
void* finalize_data,
void* finalize_hint);
```


#### napi_async_execute_callback
Function pointer used with functions that support asynchronous
Expand Down
10 changes: 5 additions & 5 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ The number of concurrent connections on the server.

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

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

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

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

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

Expand Down
4 changes: 3 additions & 1 deletion doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ changes:
* `crlfDelay` {number} If the delay between `\r` and `\n` exceeds
`crlfDelay` milliseconds, both `\r` and `\n` will be treated as separate
end-of-line input. Default to `100` milliseconds.
`crlfDelay` will be coerced to `[100, 2000]` range.
`crlfDelay` will be coerced to a number no less than `100`. It can be set to
`Infinity`, in which case `\r` followed by `\n` will always be considered a
single newline.
* `removeHistoryDuplicates` {boolean} If `true`, when a new input line added
to the history list duplicates an older one, this removes the older line
from the list. Defaults to `false`.
Expand Down
33 changes: 24 additions & 9 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@ const myURL =
added: v7.0.0
-->

*Note*: Using the `delete` keyword on `URL` objects (e.g.
`delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will
still return `true`.

### Class: URL

Browser-compatible `URL` class, implemented by following the WHATWG URL
Standard. [Examples of parsed URLs][] may be found in the Standard itself.

*Note*: In accordance with browser conventions, all properties of `URL` objects
are implemented as getters and setters on the class prototype, rather than as
data properties on the object itself. Thus, unlike [legacy urlObject][]s, using
the `delete` keyword on any properties of `URL` objects (e.g. `delete
myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
return `true`.

#### Constructor: new URL(input[, base])

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

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

#### url.hash

Expand Down Expand Up @@ -211,9 +219,7 @@ will be thrown.

* {string}

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

```js
const { URL } = require('url');
Expand All @@ -226,7 +232,7 @@ console.log(myURL.origin);
const { URL } = require('url');
const idnURL = new URL('https://你好你好');
console.log(idnURL.origin);
// Prints https://你好你好
// Prints https://xn--6qqa088eba

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

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

0 comments on commit fe2de51

Please sign in to comment.