Skip to content

Commit

Permalink
升级到v.8.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
h7lin committed Dec 24, 2017
1 parent 5f84b51 commit 8332689
Show file tree
Hide file tree
Showing 34 changed files with 246 additions and 25 deletions.
12 changes: 12 additions & 0 deletions buffer/buf_fill_value_offset_end_encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@ console.log(b.toString());
console.log(Buffer.allocUnsafe(3).fill('\u0222'));
```

If `value` contains invalid characters, it is truncated; if no valid
fill data remains, no filling is performed:

```js
const buf = Buffer.allocUnsafe(5);
// Prints: <Buffer 61 61 61 61 61>
console.log(buf.fill('a'));
// Prints: <Buffer aa aa aa aa aa>
console.log(buf.fill('aazz', 'hex'));
// Prints: <Buffer aa aa aa aa aa>
console.log(buf.fill('zz', 'hex'));
```
5 changes: 5 additions & 0 deletions buffer/class_method_buffer_alloc_size_fill_encoding.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<!-- YAML
added: v5.10.0
changes:
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/17428
description: Specifying an invalid string for `fill` now results in a
zero-filled buffer.
-->

* `size` {integer} 新建的 `Buffer` 期望的长度
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ changes:
* `gid` {number} 设置该进程的组标识。(详见 setgid(2)
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. **Default:** `false`.
* `callback` {Function} 当进程终止时调用,并带上输出。
* `error` {Error}
* `stdout` {string|Buffer}
Expand Down
2 changes: 2 additions & 0 deletions child_process/child_process_fork_modulepath_args_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ changes:
当提供了该选项,则它会覆盖 `silent`
如果使用了数组变量,则该数组必须包含一个值为 `'ipc'` 的子项,否则会抛出错误。
例如 `[0, 1, 2, 'ipc']`
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. **Default:** `false`.
* `uid` {number} 设置该进程的用户标识。(详见 setuid(2)
* `gid` {number} 设置该进程的组标识。(详见 setgid(2)
* 返回: {ChildProcess}
Expand Down
3 changes: 3 additions & 0 deletions child_process/child_process_spawn_command_args_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ changes:
一个不同的 shell 可以被指定为字符串。
See [Shell Requirements][] and [Default Windows Shell][].
默认为 `false`(没有 shell)。
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
when `shell` is specified. **Default:** `false`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* 返回: {ChildProcess}
Expand Down
3 changes: 3 additions & 0 deletions child_process/child_process_spawnsync_command_args_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ changes:
一个不同的 shell 可以被指定为字符串。
See [Shell Requirements][] and [Default Windows Shell][].
默认为 `false`(没有 shell)。
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
done on Windows. Ignored on Unix. This is set to `true` automatically
when `shell` is specified. **Default:** `false`.
* `windowsHide` {boolean} Hide the subprocess console window that would
normally be created on Windows systems. **Default:** `false`.
* 返回: {Object}
Expand Down
5 changes: 3 additions & 2 deletions child_process/subprocess_killed.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
added: v0.5.10
-->

* {boolean} `subprocess.kill()` 成功终止子进程时被设置为 `true`
* {boolean} `subprocess.kill()` 已成功发送信号给子进程后会被设置为 `true`

`subprocess.killed` 属性表明该子进程已经成功地被 `subprocess.kill()` 终止。
`subprocess.killed` 属性表明该子进程是否已成功接收到 `subprocess.kill()` 的信号。
该属性不代表子进程是否已被终止。

<a name="child_process_child_pid"></a>
2 changes: 1 addition & 1 deletion console/console_group_label.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
added: v8.5.0
-->

* `label` {any}
* `...label` {any}

将后续行的缩进增加两个空格。

Expand Down
1 change: 1 addition & 0 deletions crypto/crypto_timingsafeequal_a_b.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ added: v6.6.0
- `a` {Buffer | TypedArray | DataView}
- `b` {Buffer | TypedArray | DataView}

This function is based on a constant-time algorithm.
Returns true if `a` is equal to `b`, without leaking timing information that
would allow an attacker to guess one of the values. This is suitable for
comparing HMAC digests or secret values like authentication cookies or
Expand Down
2 changes: 1 addition & 1 deletion deprecations/dep0009_crypto_pbkdf2_without_digest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Type: End-of-life

Use of the [`crypto.pbkdf2()`][] API without specifying a digest was deprecated
in Node.js 6.0 because the method defaulted to using the non-recommendend
in Node.js 6.0 because the method defaulted to using the non-recommended
`'SHA1'` digest. Previously, a deprecation warning was printed. Starting in
Node.js 8.0.0, calling `crypto.pbkdf2()` or `crypto.pbkdf2Sync()` with an
undefined `digest` will throw a `TypeError`.
Expand Down
2 changes: 1 addition & 1 deletion dgram/__link.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[`socket.address().address`]: #dgram_socket_address
[`socket.address().port`]: #dgram_socket_address
[`socket.bind()`]: #dgram_socket_bind_port_address_callback
[`System Error`]: errors.html#errors_class_system_error
[`System Error`]: errors.html#errors_class_systemerror
[byte length]: buffer.html#buffer_class_method_buffer_bytelength_string_encoding
[IPv6 Zone Indices]: https://en.wikipedia.org/wiki/IPv6_address#Link-local_addresses_and_zone_indices
[RFC 4007]: https://tools.ietf.org/html/rfc4007
2 changes: 1 addition & 1 deletion dgram/call_results.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ On IPv4, if `multicastInterface` is a valid address but does not match any
interface, or if the address does not match the family then
a [`System Error`][] such as `EADDRNOTAVAIL` or `EPROTONOSUP` is thrown.

On IPv6, most errors with specifying or omiting scope will result in the socket
On IPv6, most errors with specifying or omitting scope will result in the socket
continuing to use (or returning to) the system's default interface selection.

A socket's address family's ANY address (IPv4 `'0.0.0.0'` or IPv6 `'::'`) can be
Expand Down
2 changes: 1 addition & 1 deletion errors/err_http2_invalid_header_value.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

Used to indicate that an invalid HTTP/2 header value has been specified.
Used to indicate that an invalid HTTP2 header value has been specified.

<a id="ERR_HTTP2_INVALID_INFO_STATUS"></a>
2 changes: 1 addition & 1 deletion errors/err_http2_payload_forbidden.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Used when a message payload is specified for an HTTP response code for which
a payload is forbidden.

<a id="ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED"></a>
<a id="ERR_HTTP2_PING_CANCEL"></a>
4 changes: 4 additions & 0 deletions errors/err_http2_ping_cancel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

An HTTP/2 ping was cancelled.

<a id="ERR_HTTP2_PING_LENGTH"></a>
4 changes: 4 additions & 0 deletions errors/err_http2_ping_length.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

HTTP/2 ping payloads must be exactly 8 bytes in length.

<a id="ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED"></a>
5 changes: 2 additions & 3 deletions http2/destruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
All [`Http2Stream`][] instances are destroyed either when:

* An `RST_STREAM` frame for the stream is received by the connected peer.
* The `http2stream.rstStream()` or `http2session.rstStream()` methods are
called.
* The `http2stream.rstStream()` methods is called.
* The `http2stream.destroy()` or `http2session.destroy()` methods are called.

When an `Http2Stream` instance is destroyed, an attempt will be made to send an
`RST_STREAM` frame will be sent to the connected peer.

Once the `Http2Stream` instance is destroyed, the `'streamClosed'` event will
When the `Http2Stream` instance is destroyed, the `'close'` event will
be emitted. Because `Http2Stream` is an instance of `stream.Duplex`, the
`'end'` event will also be emitted if the stream data is currently flowing.
The `'error'` event may also be emitted if `http2stream.destroy()` was called
Expand Down
8 changes: 6 additions & 2 deletions http2/event_close_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
added: v8.4.0
-->

Indicates that the underlying [`Http2Stream`][] was closed.
Just like `'end'`, this event occurs only once per response.
The `'close'` event is emitted when the `Http2Stream` is destroyed. Once
this event is emitted, the `Http2Stream` instance is no longer usable.

The listener callback is passed a single argument specifying the HTTP/2 error
code specified when closing the stream. If the code is any value other than
`NGHTTP2_NO_ERROR` (`0`), an `'error'` event will also be emitted.

4 changes: 2 additions & 2 deletions http2/event_close_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
added: v8.4.0
-->

Indicates that the underlying [`Http2Stream`]() was terminated before
[`response.end()`][] was called or able to flush.
Indicates that the underlying [`Http2Stream`][] was closed.
Just like `'end'`, this event occurs only once per response.

7 changes: 7 additions & 0 deletions http2/event_close_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- YAML
added: v8.4.0
-->

Indicates that the underlying [`Http2Stream`]() was terminated before
[`response.end()`][] was called or able to flush.

13 changes: 13 additions & 0 deletions http2/http2_connect_authority_options_listener.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
<!-- YAML
added: v8.4.0
changes:
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/17105
description: Added the `maxOutstandingPings` option with a default limit of
10.
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/16676
description: Added the `maxHeaderListPairs` option with a default limit of
128 header pairs.
-->

* `authority` {string|URL}
* `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
for deflating header fields. **Default:** `4Kib`
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
**Default:** `128`. The minimum value is `1`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
unacknowledged pings. The default is `10`.
* `maxReservedRemoteStreams` {number} Sets the maximum number of reserved push
streams the client will accept at any given time. Once the current number of
currently reserved push streams exceeds reaches this limit, new push streams
Expand Down
13 changes: 13 additions & 0 deletions http2/http2_createsecureserver_options_onrequesthandler.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<!-- YAML
added: v8.4.0
changes:
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/17105
description: Added the `maxOutstandingPings` option with a default limit of
10.
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/16676
description: Added the `maxHeaderListPairs` option with a default limit of
128 header pairs.
-->

* `options` {Object}
Expand All @@ -8,6 +17,10 @@ added: v8.4.0
`false`. See the [`'unknownProtocol'`][] event. See [ALPN negotiation][].
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
for deflating header fields. **Default:** `4Kib`
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
**Default:** `128`. The minimum value is `4`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
unacknowledged pings. The default is `10`.
* `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
serialized, compressed block of headers. Attempts to send headers that
exceed this limit will result in a `'frameError'` event being emitted
Expand Down
13 changes: 13 additions & 0 deletions http2/http2_createserver_options_onrequesthandler.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<!-- YAML
added: v8.4.0
changes:
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/17105
description: Added the `maxOutstandingPings` option with a default limit of
10.
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/16676
description: Added the `maxHeaderListPairs` option with a default limit of
128 header pairs.
-->

* `options` {Object}
* `maxDeflateDynamicTableSize` {number} Sets the maximum dynamic table size
for deflating header fields. **Default:** `4Kib`
* `maxHeaderListPairs` {number} Sets the maximum number of header entries.
**Default:** `128`. The minimum value is `4`.
* `maxOutstandingPings` {number} Sets the maximum number of outstanding,
unacknowledged pings. The default is `10`.
* `maxSendHeaderBlockLength` {number} Sets the maximum allowed size for a
serialized, compressed block of headers. Attempts to send headers that
exceed this limit will result in a `'frameError'` event being emitted
Expand Down
37 changes: 37 additions & 0 deletions http2/http2session_ping_payload_callback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- YAML
added: v8.9.3
-->

* `payload` {Buffer|TypedArray|DataView} Optional ping payload.
* `callback` {Function}
* Returns: {boolean}

Sends a `PING` frame to the connected HTTP/2 peer. A `callback` function must
be provided. The method will return `true` if the `PING` was sent, `false`
otherwise.

The maximum number of outstanding (unacknowledged) pings is determined by the
`maxOutstandingPings` configuration option. The default maximum is 10.

If provided, the `payload` must be a `Buffer`, `TypedArray`, or `DataView`
containing 8 bytes of data that will be transmitted with the `PING` and
returned with the ping acknowledgement.

The callback will be invoked with three arguments: an error argument that will
be `null` if the `PING` was successfully acknowledged, a `duration` argument
that reports the number of milliseconds elapsed since the ping was sent and the
acknowledgement was received, and a `Buffer` containing the 8-byte `PING`
payload.

```js
session.ping(Buffer.from('abcdefgh'), (err, duration, payload) => {
if (!err) {
console.log(`Ping acknowledged in ${duration} milliseconds`);
console.log(`With payload '${payload.toString()}`);
}
});
```
If the `payload` argument is not specified, the default payload will be the
64-bit timestamp (little endian) marking the start of the `PING` duration.

2 changes: 1 addition & 1 deletion http2/http2stream_session.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
added: v8.4.0
-->

* Value: {Http2Sesssion}
* Value: {Http2Session}

A reference to the `Http2Session` instance that owns this `Http2Stream`. The
value will be `undefined` after the `Http2Stream` instance is destroyed.
Expand Down
12 changes: 9 additions & 3 deletions http2/settings_object.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

<!-- YAML
added: v8.4.0
changes:
- version: v8.9.3
pr-url: https://github.com/nodejs/node/pull/16676
description: The `maxHeaderListSize` setting is now strictly enforced.
-->
The `http2.getDefaultSettings()`, `http2.getPackedSettings()`,
`http2.createServer()`, `http2.createSecureServer()`,
`http2session.settings()`, `http2session.localSettings`, and
Expand All @@ -24,8 +30,8 @@ properties.
concurrently at any given time in an `Http2Session`. The minimum value is
0. The maximum allowed value is 2<sup>31</sup>-1.
* `maxHeaderListSize` {number} Specifies the maximum size (uncompressed octets)
of header list that will be accepted. There is no default value. The minimum
allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
of header list that will be accepted. The minimum allowed value is 0. The
maximum allowed value is 2<sup>32</sup>-1. **Default:** 65535.

All additional properties on the settings object are ignored.

2 changes: 1 addition & 1 deletion http2/using_options_selectpadding.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

When `options.paddingStrategy` is equal to
`http2.constants.PADDING_STRATEGY_CALLBACK`, the the HTTP/2 implementation will
`http2.constants.PADDING_STRATEGY_CALLBACK`, the HTTP/2 implementation will
consult the `options.selectPadding` callback function, if provided, to determine
the specific amount of padding to use per HEADERS and DATA frame.

Expand Down
8 changes: 7 additions & 1 deletion process/process_memoryusage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ console.log(process.memoryUsage());
```

`heapTotal` `heapUsed` 代表V8的内存使用情况。

`external`代表V8管理的,绑定到Javascript的C++对象的内存使用情况。
`rss`, Resident Set Size, is the amount of space
occupied in the main memory device (that is a subset of the total allocated
memory) for the process, which includes the _heap_, _code segment_ and _stack_.

The _heap_ is where objects, strings and closures are stored. Variables are
stored in the _stack_ and the actual JavaScript code resides in the
_code segment_.


7 changes: 6 additions & 1 deletion process/process_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ changes:
* `libUrl` {string} 指向一个_`node.lib`_文件的绝对URL,匹配当前发布的结构和版本信息。此文件用于编译Node.js本地插件。
_这个属性只在Windows版本中存在,在其他平台中无效。
* `lts` {string} 标识当前发布的[LTS][]标签的字符串。 如果Node.js发布不是一个LTS发布,此值为`undefined`。
* `lts` {string} 标识当前发布的[LTS][]标签的字符串。
This property only exists for LTS releases and is `undefined` for all other
release types, including _Current_ releases. Currently the valid values are:
- `'Argon'` for the v4.x LTS line beginning with v4.2.0.
- `'Boron'` for the v6.x LTS line beginning with v6.9.0.
- `'Carbon'` for the v8.x LTS line beginning with v8.9.1.
例如:
Expand Down
Loading

0 comments on commit 8332689

Please sign in to comment.