Skip to content

Commit

Permalink
feat: 14.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
h7lin committed Sep 9, 2020
1 parent 376dbfa commit 6184905
Show file tree
Hide file tree
Showing 214 changed files with 398 additions and 273 deletions.
4 changes: 4 additions & 0 deletions buffer/buf_readbiguint64be_offset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
added:
- v12.0.0
- v10.20.0
changes:
- version: v14.10.0
pr-url: https://github.com/nodejs/node/pull/34960
description: This function is also available as `buf.readBigUint64BE()`.
-->

* `offset` {integer} 开始读取之前要跳过的字节数。必须满足:`0 <= offset <= buf.length - 8`**默认值:** `0`
Expand Down
4 changes: 4 additions & 0 deletions buffer/buf_readbiguint64le_offset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
added:
- v12.0.0
- v10.20.0
changes:
- version: v14.10.0
pr-url: https://github.com/nodejs/node/pull/34960
description: This function is also available as `buf.readBigUint64LE()`.
-->

* `offset` {integer} 开始读取之前要跳过的字节数。必须满足:`0 <= offset <= buf.length - 8`**默认值:** `0`
Expand Down
4 changes: 4 additions & 0 deletions buffer/buf_writebiguint64be_value_offset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
added:
- v12.0.0
- v10.20.0
changes:
- version: v14.10.0
pr-url: https://github.com/nodejs/node/pull/34960
description: This function is also available as `buf.writeBigUint64BE()`.
-->

* `value` {bigint} 要写入 `buf` 的数值。
Expand Down
4 changes: 4 additions & 0 deletions buffer/buf_writebiguint64le_value_offset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
added:
- v12.0.0
- v10.20.0
changes:
- version: v14.10.0
pr-url: https://github.com/nodejs/node/pull/34960
description: This function is also available as `buf.writeBigUint64LE()`.
-->

* `value` {bigint} 要写入 `buf` 的数值。
Expand Down
4 changes: 2 additions & 2 deletions buffer/buffer_constants_max_length.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ added: v8.2.0

* {integer} 单个 `Buffer` 实例允许的最大内存。

32 位的架构上,该值当前是 `(2^30)-1` (~1GB)
64 位的架构上,该值当前是 `(2^31)-1` (~2GB)
32 位的架构上,该值当前是 2<sup>30</sup> - 1 (~1GB)
64 位的架构上,该值当前是 2<sup>31</sup> - 1 (~2GB)

也可使用 [`buffer.kMaxLength`]

2 changes: 1 addition & 1 deletion buffer/buffers_and_character_encodings.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Node.js 还支持以下两种二进制转文本的编码。

* `'ascii'`: 仅适用于 7 [ASCII] 数据。
当将字符串编码为 `Buffer` 时,这等效于使用 `'latin1'`
当将 `Buffer` 解码为字符串时,则使用编码会在解码为 `'latin1'` 之前额外取消设置每个字节的最高位。
当将 `Buffer` 解码为字符串时,则使用此编码会在解码为 `'latin1'` 之前额外取消设置每个字节的最高位。
通常,当在编码或解码纯 ASCII 文本时,应该没有理由使用这种编码,因为 `'utf8'`(或者,如果已知的数据始终为纯 ASCII,则为 `'latin1'`)会是更好的选择。
这仅为传统的兼容性而提供。

Expand Down
16 changes: 8 additions & 8 deletions cli/trace_atomics_wait.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Print short summaries of calls to [`Atomics.wait()`][] to stderr.
The output could look like this:

```text
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) started
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) did not wait because the values mismatched
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) started
(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) timed out
(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) started
(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) started
(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) was woken up by another thread
(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) was woken up by another thread
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) started
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 1, inf) did not wait because the values mismatched
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) started
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 0, 0, 10) timed out
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) started
(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) started
(node:15701) [Thread 0] Atomics.wait(&lt;address> + 4, 0, inf) was woken up by another thread
(node:15701) [Thread 1] Atomics.wait(&lt;address> + 4, -1, inf) was woken up by another thread
```

The fields here correspond to:
Expand Down
37 changes: 37 additions & 0 deletions crypto/crypto_randomint_min_max_callback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!-- YAML
added: v14.10.0
-->

* `min` {integer} Start of random range (inclusive). **Default**: `0`.
* `max` {integer} End of random range (exclusive).
* `callback` {Function} `function(err, n) {}`.

Return a random integer `n` such that `min <= n < max`. This
implementation avoids [modulo bias][].

The range (`max - min`) must be less than 2<sup>48</sup>. `min` and `max` must
be [safe integers][].

If the `callback` function is not provided, the random integer is
generated synchronously.

```js
// Asynchronous
crypto.randomInt(3, (err, n) => {
if (err) throw err;
console.log(`Random number chosen from (0, 1, 2): ${n}`);
});
```

```js
// Synchronous
const n = crypto.randomInt(3);
console.log(`Random number chosen from (0, 1, 2): ${n}`);
```

```js
// With `min` argument
const n = crypto.randomInt(1, 7);
console.log(`The dice rolled: ${n}`);
```

2 changes: 2 additions & 0 deletions crypto/node_js_crypto_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@








Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
`OutgoingMessage.prototype.flush()` has been removed. Use
`OutgoingMessage.prototype.flushHeaders()` instead.

<a id="DEP0002"></a>
1 change: 0 additions & 1 deletion deprecations/dep0002_require_linklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Type: End-of-Life

The `_linklist` module is deprecated. Please use a userland alternative.

<a id="DEP0003"></a>
1 change: 0 additions & 1 deletion deprecations/dep0003_writablestate_buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()`
instead.

<a id="DEP0004"></a>
1 change: 0 additions & 1 deletion deprecations/dep0004_cryptostream_prototype_readystate.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: End-of-Life

The `CryptoStream.prototype.readyState` property was removed.

<a id="DEP0005"></a>
1 change: 0 additions & 1 deletion deprecations/dep0005_buffer_constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ Without `--pending-deprecation`, runtime warnings occur only for code not in
`Buffer()` usage in dependencies. With `--pending-deprecation`, a runtime
warning results no matter where the `Buffer()` usage occurs.

<a id="DEP0006"></a>
1 change: 0 additions & 1 deletion deprecations/dep0006_child_process_options_customfds.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ Within the [`child_process`][] module's `spawn()`, `fork()`, and `exec()`
methods, the `options.customFds` option is deprecated. The `options.stdio`
option should be used instead.

<a id="DEP0007"></a>
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ provide an indication of how and why the `Worker` instance exited. In Node.js
[`worker.exitedAfterDisconnect`][] property. The old property name did not
precisely describe the actual semantics and was unnecessarily emotion-laden.

<a id="DEP0008"></a>
1 change: 0 additions & 1 deletion deprecations/dep0008_require_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ relevant to specific Node.js builtin modules, developers should instead refer
to the `constants` property exposed by the relevant module. For instance,
`require('fs').constants` and `require('os').constants`.

<a id="DEP0009"></a>
1 change: 0 additions & 1 deletion deprecations/dep0009_crypto_pbkdf2_without_digest.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ is `undefined`.

Now, however, passing either `undefined` or `null` will throw a `TypeError`.

<a id="DEP0010"></a>
1 change: 0 additions & 1 deletion deprecations/dep0010_crypto_createcredentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `crypto.createCredentials()` API was removed. Please use
[`tls.createSecureContext()`][] instead.

<a id="DEP0011"></a>
1 change: 0 additions & 1 deletion deprecations/dep0011_crypto_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `crypto.Credentials` class was removed. Please use [`tls.SecureContext`][]
instead.

<a id="DEP0012"></a>
1 change: 0 additions & 1 deletion deprecations/dep0012_domain_dispose.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
`Domain.dispose()` has been removed. Recover from failed I/O actions
explicitly via error event handlers set on the domain instead.

<a id="DEP0013"></a>
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: End-of-Life
Calling an asynchronous function without a callback throws a `TypeError`
in Node.js 10.0.0 onwards. See <https://github.com/nodejs/node/pull/12562>.

<a id="DEP0014"></a>
1 change: 0 additions & 1 deletion deprecations/dep0014_fs_read_legacy_string_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ Type: End-of-Life
The [`fs.read()`][] legacy `String` interface is deprecated. Use the `Buffer`
API as mentioned in the documentation instead.

<a id="DEP0015"></a>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ Type: End-of-Life
The [`fs.readSync()`][] legacy `String` interface is deprecated. Use the
`Buffer` API as mentioned in the documentation instead.

<a id="DEP0016"></a>
1 change: 0 additions & 1 deletion deprecations/dep0016_global_root.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: End-of-Life
The `GLOBAL` and `root` aliases for the `global` property were deprecated
in Node.js 6.0.0 and have since been removed.

<a id="DEP0017"></a>
1 change: 0 additions & 1 deletion deprecations/dep0017_intl_v8breakiterator.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: End-of-Life
`Intl.v8BreakIterator` was a non-standard extension and has been removed.
See [`Intl.Segmenter`](https://github.com/tc39/proposal-intl-segmenter).

<a id="DEP0018"></a>
1 change: 0 additions & 1 deletion deprecations/dep0018_unhandled_promise_rejections.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ Unhandled promise rejections are deprecated. In the future, promise rejections
that are not handled will terminate the Node.js process with a non-zero exit
code.

<a id="DEP0019"></a>
1 change: 0 additions & 1 deletion deprecations/dep0019_require_resolved_outside_directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
In certain cases, `require('.')` could resolve outside the package directory.
This behavior has been removed.

<a id="DEP0020"></a>
1 change: 0 additions & 1 deletion deprecations/dep0020_server_connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Type: Runtime
The [`Server.connections`][] property is deprecated. Please use the
[`Server.getConnections()`][] method instead.

<a id="DEP0021"></a>
1 change: 0 additions & 1 deletion deprecations/dep0021_server_listenfd.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `Server.listenFD()` method was deprecated and removed. Please use
[`Server.listen({fd: <number>})`][] instead.

<a id="DEP0022"></a>
1 change: 0 additions & 1 deletion deprecations/dep0022_os_tmpdir.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: End-of-Life
The `os.tmpDir()` API was deprecated in Node.js 7.0.0 and has since been
removed. Please use [`os.tmpdir()`][] instead.

<a id="DEP0023"></a>
1 change: 0 additions & 1 deletion deprecations/dep0023_os_getnetworkinterfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `os.getNetworkInterfaces()` method is deprecated. Please use the
[`os.networkInterfaces()`][] method instead.

<a id="DEP0024"></a>
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ Type: End-of-Life

The `REPLServer.prototype.convertToContext()` API has been removed.

<a id="DEP0025"></a>
1 change: 0 additions & 1 deletion deprecations/dep0025_require_sys.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Type: Runtime

The `sys` module is deprecated. Please use the [`util`][] module instead.

<a id="DEP0026"></a>
1 change: 0 additions & 1 deletion deprecations/dep0026_util_print.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: End-of-Life

`util.print()` has been removed. Please use [`console.log()`][] instead.

<a id="DEP0027"></a>
1 change: 0 additions & 1 deletion deprecations/dep0027_util_puts.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: End-of-Life

`util.puts()` has been removed. Please use [`console.log()`][] instead.

<a id="DEP0028"></a>
1 change: 0 additions & 1 deletion deprecations/dep0028_util_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: End-of-Life

`util.debug()` has been removed. Please use [`console.error()`][] instead.

<a id="DEP0029"></a>
1 change: 0 additions & 1 deletion deprecations/dep0029_util_error.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: End-of-Life

`util.error()` has been removed. Please use [`console.error()`][] instead.

<a id="DEP0030"></a>
1 change: 0 additions & 1 deletion deprecations/dep0030_slowbuffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: Documentation-only
The [`SlowBuffer`][] class is deprecated. Please use
[`Buffer.allocUnsafeSlow(size)`][] instead.

<a id="DEP0031"></a>
1 change: 0 additions & 1 deletion deprecations/dep0031_ecdh_setpublickey.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: Documentation-only
The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
API is not useful.

<a id="DEP0032"></a>
1 change: 0 additions & 1 deletion deprecations/dep0032_domain_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Type: Documentation-only

The [`domain`][] module is deprecated and should not be used.

<a id="DEP0033"></a>
1 change: 0 additions & 1 deletion deprecations/dep0033_eventemitter_listenercount.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Type: Documentation-only
The [`EventEmitter.listenerCount(emitter, eventName)`][] API is
deprecated. Please use [`emitter.listenerCount(eventName)`][] instead.

<a id="DEP0034"></a>
1 change: 0 additions & 1 deletion deprecations/dep0034_fs_exists_path_callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ Type: Documentation-only
The [`fs.exists(path, callback)`][] API is deprecated. Please use
[`fs.stat()`][] or [`fs.access()`][] instead.

<a id="DEP0035"></a>
1 change: 0 additions & 1 deletion deprecations/dep0035_fs_lchmod_path_mode_callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: Documentation-only

The [`fs.lchmod(path, mode, callback)`][] API is deprecated.

<a id="DEP0036"></a>
1 change: 0 additions & 1 deletion deprecations/dep0036_fs_lchmodsync_path_mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ Type: Documentation-only

The [`fs.lchmodSync(path, mode)`][] API is deprecated.

<a id="DEP0037"></a>
1 change: 0 additions & 1 deletion deprecations/dep0037_fs_lchown_path_uid_gid_callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ The [`fs.lchown(path, uid, gid, callback)`][] API was deprecated. The
deprecation was revoked because the requisite supporting APIs were added in
libuv.

<a id="DEP0038"></a>
1 change: 0 additions & 1 deletion deprecations/dep0038_fs_lchownsync_path_uid_gid.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: Deprecation revoked
The [`fs.lchownSync(path, uid, gid)`][] API was deprecated. The deprecation was
revoked because the requisite supporting APIs were added in libuv.

<a id="DEP0039"></a>
1 change: 0 additions & 1 deletion deprecations/dep0039_require_extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ Type: Documentation-only

The [`require.extensions`][] property is deprecated.

<a id="DEP0040"></a>
1 change: 0 additions & 1 deletion deprecations/dep0040_punycode_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Type: Documentation-only
The [`punycode`][] module is deprecated. Please use a userland alternative
instead.

<a id="DEP0041"></a>
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The `NODE_REPL_HISTORY_FILE` environment variable was removed. Please use
`NODE_REPL_HISTORY` instead.

<a id="DEP0042"></a>
1 change: 0 additions & 1 deletion deprecations/dep0042_tls_cryptostream.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ Type: End-of-Life
The [`tls.CryptoStream`][] class was removed. Please use
[`tls.TLSSocket`][] instead.

<a id="DEP0043"></a>
1 change: 0 additions & 1 deletion deprecations/dep0043_tls_securepair.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ Type: Documentation-only
The [`tls.SecurePair`][] class is deprecated. Please use
[`tls.TLSSocket`][] instead.

<a id="DEP0044"></a>
1 change: 0 additions & 1 deletion deprecations/dep0044_util_isarray.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: Documentation-only
The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
instead.

<a id="DEP0045"></a>
1 change: 0 additions & 1 deletion deprecations/dep0045_util_isboolean.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isBoolean()`][] API is deprecated.

<a id="DEP0046"></a>
1 change: 0 additions & 1 deletion deprecations/dep0046_util_isbuffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ Type: Documentation-only
The [`util.isBuffer()`][] API is deprecated. Please use
[`Buffer.isBuffer()`][] instead.

<a id="DEP0047"></a>
1 change: 0 additions & 1 deletion deprecations/dep0047_util_isdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isDate()`][] API is deprecated.

<a id="DEP0048"></a>
1 change: 0 additions & 1 deletion deprecations/dep0048_util_iserror.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isError()`][] API is deprecated.

<a id="DEP0049"></a>
1 change: 0 additions & 1 deletion deprecations/dep0049_util_isfunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isFunction()`][] API is deprecated.

<a id="DEP0050"></a>
1 change: 0 additions & 1 deletion deprecations/dep0050_util_isnull.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isNull()`][] API is deprecated.

<a id="DEP0051"></a>
1 change: 0 additions & 1 deletion deprecations/dep0051_util_isnullorundefined.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isNullOrUndefined()`][] API is deprecated.

<a id="DEP0052"></a>
1 change: 0 additions & 1 deletion deprecations/dep0052_util_isnumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isNumber()`][] API is deprecated.

<a id="DEP0053"></a>
1 change: 0 additions & 1 deletion deprecations/dep0053_util_isobject.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Type: Documentation-only

The [`util.isObject()`][] API is deprecated.

<a id="DEP0054"></a>
Loading

0 comments on commit 6184905

Please sign in to comment.