diff options
-rw-r--r-- | doc/api/deprecations.md | 144 | ||||
-rw-r--r-- | tools/doc/html.js | 13 |
2 files changed, 12 insertions, 145 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 5db7fcca24c..f794c5d0cad 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -40,7 +40,6 @@ However, the deprecation identifier will not be modified. ## List of deprecated APIs -<a id="DEP0001"></a> ### DEP0001: `http.OutgoingMessage.prototype.flush` <!-- YAML changes: @@ -62,7 +61,6 @@ Type: End-of-Life `OutgoingMessage.prototype.flush()` has been removed. Use `OutgoingMessage.prototype.flushHeaders()` instead. -<a id="DEP0002"></a> ### DEP0002: `require('_linklist')` <!-- YAML changes: @@ -81,7 +79,6 @@ Type: End-of-Life The `_linklist` module is deprecated. Please use a userland alternative. -<a id="DEP0003"></a> ### DEP0003: `_writableState.buffer` <!-- YAML changes: @@ -103,7 +100,6 @@ Type: End-of-Life The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()` instead. -<a id="DEP0004"></a> ### DEP0004: `CryptoStream.prototype.readyState` <!-- YAML changes: @@ -124,7 +120,6 @@ Type: End-of-Life The `CryptoStream.prototype.readyState` property was removed. -<a id="DEP0005"></a> ### DEP0005: `Buffer()` constructor <!-- YAML changes: @@ -165,7 +160,6 @@ 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> ### DEP0006: `child_process` `options.customFds` <!-- YAML changes: @@ -189,7 +183,6 @@ 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> ### DEP0007: Replace `cluster` `worker.suicide` with `worker.exitedAfterDisconnect` <!-- YAML changes: @@ -216,7 +209,6 @@ 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> ### DEP0008: `require('constants')` <!-- YAML changes: @@ -235,7 +227,6 @@ 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> ### DEP0009: `crypto.pbkdf2` without digest <!-- YAML changes: @@ -270,7 +261,6 @@ is `undefined`. Now, however, passing either `undefined` or `null` will throw a `TypeError`. -<a id="DEP0010"></a> ### DEP0010: `crypto.createCredentials` <!-- YAML changes: @@ -292,7 +282,6 @@ Type: End-of-Life The `crypto.createCredentials()` API was removed. Please use [`tls.createSecureContext()`][] instead. -<a id="DEP0011"></a> ### DEP0011: `crypto.Credentials` <!-- YAML changes: @@ -314,7 +303,6 @@ Type: End-of-Life The `crypto.Credentials` class was removed. Please use [`tls.SecureContext`][] instead. -<a id="DEP0012"></a> ### DEP0012: `Domain.dispose` <!-- YAML changes: @@ -336,7 +324,6 @@ 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> ### DEP0013: `fs` asynchronous function without callback <!-- YAML changes: @@ -353,7 +340,6 @@ 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> ### DEP0014: `fs.read` legacy String interface <!-- YAML changes: @@ -378,7 +364,6 @@ 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> ### DEP0015: `fs.readSync` legacy String interface <!-- YAML changes: @@ -403,7 +388,6 @@ 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> ### DEP0016: `GLOBAL`/`root` <!-- YAML changes: @@ -423,7 +407,6 @@ 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> ### DEP0017: `Intl.v8BreakIterator` <!-- YAML changes: @@ -440,7 +423,6 @@ 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> ### DEP0018: Unhandled promise rejections <!-- YAML changes: @@ -455,7 +437,6 @@ 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> ### DEP0019: `require('.')` resolved outside directory <!-- YAML changes: @@ -477,7 +458,6 @@ Type: End-of-Life In certain cases, `require('.')` could resolve outside the package directory. This behavior has been removed. -<a id="DEP0020"></a> ### DEP0020: `Server.connections` <!-- YAML changes: @@ -499,7 +479,6 @@ Type: End-of-Life The `Server.connections` property was deprecated in Node.js v0.9.7 and has been removed. Please use the [`Server.getConnections()`][] method instead. -<a id="DEP0021"></a> ### DEP0021: `Server.listenFD` <!-- YAML changes: @@ -521,7 +500,6 @@ Type: End-of-Life The `Server.listenFD()` method was deprecated and removed. Please use [`Server.listen({fd: <number>})`][] instead. -<a id="DEP0022"></a> ### DEP0022: `os.tmpDir()` <!-- YAML changes: @@ -538,7 +516,6 @@ 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> ### DEP0023: `os.getNetworkInterfaces()` <!-- YAML changes: @@ -560,7 +537,6 @@ Type: End-of-Life The `os.getNetworkInterfaces()` method is deprecated. Please use the [`os.networkInterfaces()`][] method instead. -<a id="DEP0024"></a> ### DEP0024: `REPLServer.prototype.convertToContext()` <!-- YAML changes: @@ -576,7 +552,6 @@ Type: End-of-Life The `REPLServer.prototype.convertToContext()` API has been removed. -<a id="DEP0025"></a> ### DEP0025: `require('sys')` <!-- YAML changes: @@ -594,7 +569,6 @@ Type: Runtime The `sys` module is deprecated. Please use the [`util`][] module instead. -<a id="DEP0026"></a> ### DEP0026: `util.print()` <!-- YAML changes: @@ -615,7 +589,6 @@ Type: End-of-Life `util.print()` has been removed. Please use [`console.log()`][] instead. -<a id="DEP0027"></a> ### DEP0027: `util.puts()` <!-- YAML changes: @@ -636,7 +609,6 @@ Type: End-of-Life `util.puts()` has been removed. Please use [`console.log()`][] instead. -<a id="DEP0028"></a> ### DEP0028: `util.debug()` <!-- YAML changes: @@ -657,7 +629,6 @@ Type: End-of-Life `util.debug()` has been removed. Please use [`console.error()`][] instead. -<a id="DEP0029"></a> ### DEP0029: `util.error()` <!-- YAML changes: @@ -678,7 +649,6 @@ Type: End-of-Life `util.error()` has been removed. Please use [`console.error()`][] instead. -<a id="DEP0030"></a> ### DEP0030: `SlowBuffer` <!-- YAML changes: @@ -695,7 +665,6 @@ Type: Documentation-only The [`SlowBuffer`][] class is deprecated. Please use [`Buffer.allocUnsafeSlow(size)`][] instead. -<a id="DEP0031"></a> ### DEP0031: `ecdh.setPublicKey()` <!-- YAML changes: @@ -712,7 +681,6 @@ Type: Documentation-only The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the API is not useful. -<a id="DEP0032"></a> ### DEP0032: `domain` module <!-- YAML changes: @@ -730,7 +698,6 @@ Type: Documentation-only The [`domain`][] module is deprecated and should not be used. -<a id="DEP0033"></a> ### DEP0033: `EventEmitter.listenerCount()` <!-- YAML changes: @@ -749,7 +716,6 @@ Type: Documentation-only The [`EventEmitter.listenerCount(emitter, eventName)`][] API is deprecated. Please use [`emitter.listenerCount(eventName)`][] instead. -<a id="DEP0034"></a> ### DEP0034: `fs.exists(path, callback)` <!-- YAML changes: @@ -768,7 +734,6 @@ Type: Documentation-only The [`fs.exists(path, callback)`][] API is deprecated. Please use [`fs.stat()`][] or [`fs.access()`][] instead. -<a id="DEP0035"></a> ### DEP0035: `fs.lchmod(path, mode, callback)` <!-- YAML changes: @@ -785,7 +750,6 @@ Type: Documentation-only The [`fs.lchmod(path, mode, callback)`][] API is deprecated. -<a id="DEP0036"></a> ### DEP0036: `fs.lchmodSync(path, mode)` <!-- YAML changes: @@ -802,7 +766,6 @@ Type: Documentation-only The [`fs.lchmodSync(path, mode)`][] API is deprecated. -<a id="DEP0037"></a> ### DEP0037: `fs.lchown(path, uid, gid, callback)` <!-- YAML changes: @@ -824,7 +787,6 @@ 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> ### DEP0038: `fs.lchownSync(path, uid, gid)` <!-- YAML changes: @@ -845,7 +807,6 @@ 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> ### DEP0039: `require.extensions` <!-- YAML changes: @@ -863,7 +824,6 @@ Type: Documentation-only The [`require.extensions`][] property is deprecated. -<a id="DEP0040"></a> ### DEP0040: `punycode` module <!-- YAML changes: @@ -877,7 +837,6 @@ Type: Documentation-only The [`punycode`][] module is deprecated. Please use a userland alternative instead. -<a id="DEP0041"></a> ### DEP0041: `NODE_REPL_HISTORY_FILE` environment variable <!-- YAML changes: @@ -899,7 +858,6 @@ Type: End-of-Life The `NODE_REPL_HISTORY_FILE` environment variable was removed. Please use `NODE_REPL_HISTORY` instead. -<a id="DEP0042"></a> ### DEP0042: `tls.CryptoStream` <!-- YAML changes: @@ -921,7 +879,6 @@ Type: End-of-Life The [`tls.CryptoStream`][] class was removed. Please use [`tls.TLSSocket`][] instead. -<a id="DEP0043"></a> ### DEP0043: `tls.SecurePair` <!-- YAML changes: @@ -949,7 +906,6 @@ Type: Documentation-only The [`tls.SecurePair`][] class is deprecated. Please use [`tls.TLSSocket`][] instead. -<a id="DEP0044"></a> ### DEP0044: `util.isArray()` <!-- YAML changes: @@ -970,7 +926,6 @@ Type: Documentation-only The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()` instead. -<a id="DEP0045"></a> ### DEP0045: `util.isBoolean()` <!-- YAML changes: @@ -990,7 +945,6 @@ Type: Documentation-only The [`util.isBoolean()`][] API is deprecated. -<a id="DEP0046"></a> ### DEP0046: `util.isBuffer()` <!-- YAML changes: @@ -1011,7 +965,6 @@ Type: Documentation-only The [`util.isBuffer()`][] API is deprecated. Please use [`Buffer.isBuffer()`][] instead. -<a id="DEP0047"></a> ### DEP0047: `util.isDate()` <!-- YAML changes: @@ -1031,7 +984,6 @@ Type: Documentation-only The [`util.isDate()`][] API is deprecated. -<a id="DEP0048"></a> ### DEP0048: `util.isError()` <!-- YAML changes: @@ -1051,7 +1003,6 @@ Type: Documentation-only The [`util.isError()`][] API is deprecated. -<a id="DEP0049"></a> ### DEP0049: `util.isFunction()` <!-- YAML changes: @@ -1071,7 +1022,6 @@ Type: Documentation-only The [`util.isFunction()`][] API is deprecated. -<a id="DEP0050"></a> ### DEP0050: `util.isNull()` <!-- YAML changes: @@ -1091,7 +1041,6 @@ Type: Documentation-only The [`util.isNull()`][] API is deprecated. -<a id="DEP0051"></a> ### DEP0051: `util.isNullOrUndefined()` <!-- YAML changes: @@ -1111,7 +1060,6 @@ Type: Documentation-only The [`util.isNullOrUndefined()`][] API is deprecated. -<a id="DEP0052"></a> ### DEP0052: `util.isNumber()` <!-- YAML changes: @@ -1131,7 +1079,6 @@ Type: Documentation-only The [`util.isNumber()`][] API is deprecated. -<a id="DEP0053"></a> ### DEP0053 `util.isObject()` <!-- YAML changes: @@ -1151,7 +1098,6 @@ Type: Documentation-only The [`util.isObject()`][] API is deprecated. -<a id="DEP0054"></a> ### DEP0054: `util.isPrimitive()` <!-- YAML changes: @@ -1171,7 +1117,6 @@ Type: Documentation-only The [`util.isPrimitive()`][] API is deprecated. -<a id="DEP0055"></a> ### DEP0055: `util.isRegExp()` <!-- YAML changes: @@ -1191,7 +1136,6 @@ Type: Documentation-only The [`util.isRegExp()`][] API is deprecated. -<a id="DEP0056"></a> ### DEP0056: `util.isString()` <!-- YAML changes: @@ -1211,7 +1155,6 @@ Type: Documentation-only The [`util.isString()`][] API is deprecated. -<a id="DEP0057"></a> ### DEP0057: `util.isSymbol()` <!-- YAML changes: @@ -1231,7 +1174,6 @@ Type: Documentation-only The [`util.isSymbol()`][] API is deprecated. -<a id="DEP0058"></a> ### DEP0058: `util.isUndefined()` <!-- YAML changes: @@ -1251,7 +1193,6 @@ Type: Documentation-only The [`util.isUndefined()`][] API is deprecated. -<a id="DEP0059"></a> ### DEP0059: `util.log()` <!-- YAML changes: @@ -1267,7 +1208,6 @@ Type: Documentation-only The [`util.log()`][] API is deprecated. -<a id="DEP0060"></a> ### DEP0060: `util._extend()` <!-- YAML changes: @@ -1283,7 +1223,6 @@ Type: Documentation-only The [`util._extend()`][] API is deprecated. -<a id="DEP0061"></a> ### DEP0061: `fs.SyncWriteStream` <!-- YAML changes: @@ -1304,7 +1243,6 @@ The `fs.SyncWriteStream` class was never intended to be a publicly accessible API and has been removed. No alternative API is available. Please use a userland alternative. -<a id="DEP0062"></a> ### DEP0062: `node --debug` <!-- YAML changes: @@ -1322,7 +1260,6 @@ Type: End-of-Life of V8 5.8. It is replaced by Inspector which is activated with `--inspect` instead. -<a id="DEP0063"></a> ### DEP0063: `ServerResponse.prototype.writeHeader()` <!-- YAML changes: @@ -1339,7 +1276,6 @@ deprecated. Please use `ServerResponse.prototype.writeHead()` instead. The `ServerResponse.prototype.writeHeader()` method was never documented as an officially supported API. -<a id="DEP0064"></a> ### DEP0064: `tls.createSecurePair()` <!-- YAML changes: @@ -1367,7 +1303,6 @@ Type: Runtime The `tls.createSecurePair()` API was deprecated in documentation in Node.js 0.11.3. Users should use `tls.Socket` instead. -<a id="DEP0065"></a> ### DEP0065: `repl.REPL_MODE_MAGIC` and `NODE_REPL_MODE=magic` <!-- YAML changes: @@ -1390,7 +1325,6 @@ The `NODE_REPL_MODE` environment variable is used to set the underlying `replMode` of an interactive `node` session. Its value, `magic`, is also removed. Please use `sloppy` instead. -<a id="DEP0066"></a> ### DEP0066: `OutgoingMessage.prototype._headers, OutgoingMessage.prototype._headerNames` <!-- YAML changes: @@ -1417,7 +1351,6 @@ The `OutgoingMessage.prototype._headers` and `OutgoingMessage.prototype._headerNames` properties were never documented as officially supported properties. -<a id="DEP0067"></a> ### DEP0067: `OutgoingMessage.prototype._renderHeaders` <!-- YAML changes: @@ -1434,7 +1367,6 @@ deprecated. The `OutgoingMessage.prototype._renderHeaders` property was never documented as an officially supported API. -<a id="DEP0068"></a> ### DEP0068: `node debug` <!-- YAML changes: @@ -1451,7 +1383,6 @@ Type: End-of-Life `node debug` corresponds to the legacy CLI debugger which has been replaced with a V8-inspector based CLI debugger available through `node inspect`. -<a id="DEP0069"></a> ### DEP0069: `vm.runInDebugContext(string)` <!-- YAML changes: @@ -1472,7 +1403,6 @@ DebugContext has been removed in V8 and is not available in Node.js 10+. DebugContext was an experimental API. -<a id="DEP0070"></a> ### DEP0070: `async_hooks.currentId()` <!-- YAML changes: @@ -1491,7 +1421,6 @@ clarity. This change was made while `async_hooks` was an experimental API. -<a id="DEP0071"></a> ### DEP0071: `async_hooks.triggerId()` <!-- YAML changes: @@ -1510,7 +1439,6 @@ clarity. This change was made while `async_hooks` was an experimental API. -<a id="DEP0072"></a> ### DEP0072: `async_hooks.AsyncResource.triggerId()` <!-- YAML changes: @@ -1529,7 +1457,6 @@ Type: End-of-Life This change was made while `async_hooks` was an experimental API. -<a id="DEP0073"></a> ### DEP0073: Several internal properties of `net.Server` <!-- YAML changes: @@ -1549,7 +1476,6 @@ with inappropriate names is deprecated. As the original API was undocumented and not generally useful for non-internal code, no replacement API is provided. -<a id="DEP0074"></a> ### DEP0074: `REPLServer.bufferedCommand` <!-- YAML changes: @@ -1566,7 +1492,6 @@ Type: End-of-Life The `REPLServer.bufferedCommand` property was deprecated in favor of [`REPLServer.clearBufferedCommand()`][]. -<a id="DEP0075"></a> ### DEP0075: `REPLServer.parseREPLKeyword()` <!-- YAML changes: @@ -1582,7 +1507,6 @@ Type: End-of-Life `REPLServer.parseREPLKeyword()` was removed from userland visibility. -<a id="DEP0076"></a> ### DEP0076: `tls.parseCertString()` <!-- YAML changes: @@ -1614,7 +1538,6 @@ difference is that `querystring.parse()` does url decoding: { '%E5%A5%BD': '1' } ``` -<a id="DEP0077"></a> ### DEP0077: `Module._debug()` <!-- YAML changes: @@ -1630,7 +1553,6 @@ Type: Runtime The `Module._debug()` function was never documented as an officially supported API. -<a id="DEP0078"></a> ### DEP0078: `REPLServer.turnOffEditorMode()` <!-- YAML changes: @@ -1646,7 +1568,6 @@ Type: End-of-Life `REPLServer.turnOffEditorMode()` was removed from userland visibility. -<a id="DEP0079"></a> ### DEP0079: Custom inspection function on objects via `.inspect()` <!-- YAML changes: @@ -1668,7 +1589,6 @@ function for [`util.inspect()`][] is deprecated. Use [`util.inspect.custom`][] instead. For backward compatibility with Node.js prior to version 6.4.0, both can be specified. -<a id="DEP0080"></a> ### DEP0080: `path._makeLong()` <!-- YAML changes: @@ -1683,7 +1603,6 @@ The internal `path._makeLong()` was not intended for public use. However, userland modules have found it useful. The internal API is deprecated and replaced with an identical, public `path.toNamespacedPath()` method. -<a id="DEP0081"></a> ### DEP0081: `fs.truncate()` using a file descriptor <!-- YAML changes: @@ -1698,7 +1617,6 @@ Type: Runtime deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with file descriptors. -<a id="DEP0082"></a> ### DEP0082: `REPLServer.prototype.memory()` <!-- YAML changes: @@ -1715,7 +1633,6 @@ Type: End-of-Life `REPLServer.prototype.memory()` is only necessary for the internal mechanics of the `REPLServer` itself. Do not use this function. -<a id="DEP0083"></a> ### DEP0083: Disabling ECDH by setting `ecdhCurve` to `false` <!-- YAML changes: @@ -1734,7 +1651,6 @@ be set to `false` to disable ECDH entirely on the server only. This mode was deprecated in preparation for migrating to OpenSSL 1.1.0 and consistency with the client and is now unsupported. Use the `ciphers` parameter instead. -<a id="DEP0084"></a> ### DEP0084: requiring bundled internal dependencies <!-- YAML changes: @@ -1774,7 +1690,6 @@ On the other hand, `node-inspect` can be installed locally through a package manager, as it is published on the npm registry under the same name. No source code modification is necessary if that is done. -<a id="DEP0085"></a> ### DEP0085: AsyncHooks sensitive API <!-- YAML changes: @@ -1794,7 +1709,6 @@ The AsyncHooks sensitive API was never documented and had various minor issues. Use the `AsyncResource` API instead. See <https://github.com/nodejs/node/issues/15572>. -<a id="DEP0086"></a> ### DEP0086: Remove `runInAsyncIdScope` <!-- YAML changes: @@ -1813,7 +1727,6 @@ Type: End-of-Life `runInAsyncIdScope` doesn't emit the `'before'` or `'after'` event and can thus cause a lot of issues. See <https://github.com/nodejs/node/issues/14328>. -<a id="DEP0089"></a> ### DEP0089: `require('assert')` <!-- YAML changes: @@ -1833,7 +1746,6 @@ Importing assert directly was not recommended as the exposed functions use loose equality checks. The deprecation was revoked because use of the `assert` module is not discouraged, and the deprecation caused end user confusion. -<a id="DEP0090"></a> ### DEP0090: Invalid GCM authentication tag lengths <!-- YAML changes: @@ -1853,7 +1765,6 @@ v11.0.0, only authentication tag lengths of 128, 120, 112, 104, 96, 64, and 32 bits are allowed. Authentication tags of other lengths are invalid per [NIST SP 800-38D][]. -<a id="DEP0091"></a> ### DEP0091: `crypto.DEFAULT_ENCODING` <!-- YAML changes: @@ -1866,7 +1777,6 @@ Type: Runtime The [`crypto.DEFAULT_ENCODING`][] property is deprecated. -<a id="DEP0092"></a> ### DEP0092: Top-level `this` bound to `module.exports` <!-- YAML changes: @@ -1881,7 +1791,6 @@ Assigning properties to the top-level `this` as an alternative to `module.exports` is deprecated. Developers should use `exports` or `module.exports` instead. -<a id="DEP0093"></a> ### DEP0093: `crypto.fips` is deprecated and replaced. <!-- YAML changes: @@ -1895,7 +1804,6 @@ Type: Documentation-only The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()` and `crypto.getFips()` instead. -<a id="DEP0094"></a> ### DEP0094: Using `assert.fail()` with more than one argument. <!-- YAML changes: @@ -1910,7 +1818,6 @@ Using `assert.fail()` with more than one argument is deprecated. Use `assert.fail()` with only one argument or use a different `assert` module method. -<a id="DEP0095"></a> ### DEP0095: `timers.enroll()` <!-- YAML changes: @@ -1924,7 +1831,6 @@ Type: Runtime `timers.enroll()` is deprecated. Please use the publicly documented [`setTimeout()`][] or [`setInterval()`][] instead. -<a id="DEP0096"></a> ### DEP0096: `timers.unenroll()` <!-- YAML changes: @@ -1938,7 +1844,6 @@ Type: Runtime `timers.unenroll()` is deprecated. Please use the publicly documented [`clearTimeout()`][] or [`clearInterval()`][] instead. -<a id="DEP0097"></a> ### DEP0097: `MakeCallback` with `domain` property <!-- YAML changes: @@ -1953,7 +1858,6 @@ Users of `MakeCallback` that add the `domain` property to carry context, should start using the `async_context` variant of `MakeCallback` or `CallbackScope`, or the high-level `AsyncResource` class. -<a id="DEP0098"></a> ### DEP0098: AsyncHooks embedder `AsyncResource.emitBefore` and `AsyncResource.emitAfter` APIs <!-- YAML changes: @@ -1978,7 +1882,6 @@ Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much safer, and more convenient, alternative. See <https://github.com/nodejs/node/pull/18513>. -<a id="DEP0099"></a> ### DEP0099: Async context-unaware `node::MakeCallback` C++ APIs <!-- YAML changes: @@ -1993,7 +1896,6 @@ Certain versions of `node::MakeCallback` APIs available to native modules are deprecated. Please use the versions of the API that accept an `async_context` parameter. -<a id="DEP0100"></a> ### DEP0100: `process.assert()` <!-- YAML changes: @@ -2010,7 +1912,6 @@ Type: Runtime This was never a documented feature. -<a id="DEP0101"></a> ### DEP0101: `--with-lttng` <!-- YAML changes: @@ -2023,7 +1924,6 @@ Type: End-of-Life The `--with-lttng` compile-time option has been removed. -<a id="DEP0102"></a> ### DEP0102: Using `noAssert` in `Buffer#(read|write)` operations. <!-- YAML changes: @@ -2038,7 +1938,6 @@ Using the `noAssert` argument has no functionality anymore. All input is going to be verified, no matter if it is set to true or not. Skipping the verification could lead to hard to find errors and crashes. -<a id="DEP0103"></a> ### DEP0103: `process.binding('util').is[...]` typechecks <!-- YAML changes: @@ -2058,7 +1957,6 @@ methods in particular can be replaced by using [`util.types`][]. This deprecation has been superseded by the deprecation of the `process.binding()` API ([DEP0111](#DEP0111)). -<a id="DEP0104"></a> ### DEP0104: `process.env` string coercion <!-- YAML changes: @@ -2075,7 +1973,6 @@ value is not a string, boolean, or number. In the future, such assignment might result in a thrown error. Please convert the property to a string before assigning it to `process.env`. -<a id="DEP0105"></a> ### DEP0105: `decipher.finaltol` <!-- YAML changes: @@ -2093,7 +1990,6 @@ Type: End-of-Life [`decipher.final()`][]. This API has been removed, and it is recommended to use [`decipher.final()`][] instead. -<a id="DEP0106"></a> ### DEP0106: `crypto.createCipher` and `crypto.createDecipher` <!-- YAML changes: @@ -2114,7 +2010,6 @@ initialization vectors. It is recommended to derive a key using [`crypto.createCipheriv()`][] and [`crypto.createDecipheriv()`][] to obtain the [`Cipher`][] and [`Decipher`][] objects respectively. -<a id="DEP0107"></a> ### DEP0107: `tls.convertNPNProtocols()` <!-- YAML changes: @@ -2131,7 +2026,6 @@ Type: End-of-Life This was an undocumented helper function not intended for use outside Node.js core and obsoleted by the removal of NPN (Next Protocol Negotiation) support. -<a id="DEP0108"></a> ### DEP0108: `zlib.bytesRead` <!-- YAML changes: @@ -2150,7 +2044,6 @@ because it also made sense to interpret the value as the number of bytes read by the engine, but is inconsistent with other streams in Node.js that expose values under these names. -<a id="DEP0109"></a> ### DEP0109: `http`, `https`, and `tls` support for invalid URLs <!-- YAML changes: @@ -2168,7 +2061,6 @@ accepted by the legacy `url.parse()` API. The mentioned APIs now use the WHATWG URL parser that requires strictly valid URLs. Passing an invalid URL is deprecated and support will be removed in the future. -<a id="DEP0110"></a> ### DEP0110: `vm.Script` cached data <!-- YAML changes: @@ -2182,7 +2074,6 @@ Type: Documentation-only The `produceCachedData` option is deprecated. Use [`script.createCachedData()`][] instead. -<a id="DEP0111"></a> ### DEP0111: `process.binding()` <!-- YAML changes: @@ -2198,7 +2089,6 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) `process.binding()` is for use by Node.js internal code only. -<a id="DEP0112"></a> ### DEP0112: `dgram` private APIs <!-- YAML changes: @@ -2216,7 +2106,6 @@ accessed outside of Node.js core: `Socket.prototype._handle`, `Socket.prototype._healthCheck()`, `Socket.prototype._stopReceiving()`, and `dgram._createSocketHandle()`. -<a id="DEP0113"></a> ### DEP0113: `Cipher.setAuthTag()`, `Decipher.getAuthTag()` <!-- YAML changes: @@ -2233,7 +2122,6 @@ Type: End-of-Life `Cipher.setAuthTag()` and `Decipher.getAuthTag()` are no longer available. They were never documented and would throw when called. -<a id="DEP0114"></a> ### DEP0114: `crypto._toBuf()` <!-- YAML changes: @@ -2250,7 +2138,6 @@ Type: End-of-Life The `crypto._toBuf()` function was not designed to be used by modules outside of Node.js core and was removed. -<a id="DEP0115"></a> ### DEP0115: `crypto.prng()`, `crypto.pseudoRandomBytes()`, `crypto.rng()` <!-- YAML changes: @@ -2270,7 +2157,6 @@ deprecated along with the undocumented aliases `crypto.prng()` and `crypto.rng()` in favor of [`crypto.randomBytes()`][] and might be removed in a future release. -<a id="DEP0116"></a> ### DEP0116: Legacy URL API <!-- YAML changes: @@ -2285,7 +2171,6 @@ The [Legacy URL API][] is deprecated. This includes [`url.format()`][], [`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please use the [WHATWG URL API][] instead. -<a id="DEP0117"></a> ### DEP0117: Native crypto handles <!-- YAML changes: @@ -2305,7 +2190,6 @@ the `_handle` property of the `Cipher`, `Decipher`, `DiffieHellman`, The `_handle` property has been removed because improper use of the native object can lead to crashing the application. -<a id="DEP0118"></a> ### DEP0118: `dns.lookup()` support for a falsy host name <!-- YAML changes: @@ -2321,7 +2205,6 @@ like `dns.lookup(false)` due to backward compatibility. This behavior is undocumented and is thought to be unused in real world apps. It will become an error in future versions of Node.js. -<a id="DEP0119"></a> ### DEP0119: `process.binding('uv').errname()` private API <!-- YAML changes: @@ -2335,7 +2218,6 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) `process.binding('uv').errname()` is deprecated. Please use [`util.getSystemErrorName()`][] instead. -<a id="DEP0120"></a> ### DEP0120: Windows Performance Counter support <!-- YAML changes: @@ -2355,7 +2237,6 @@ undocumented `COUNTER_NET_SERVER_CONNECTION()`, `COUNTER_HTTP_SERVER_RESPONSE()`, `COUNTER_HTTP_CLIENT_REQUEST()`, and `COUNTER_HTTP_CLIENT_RESPONSE()` functions have been deprecated. -<a id="DEP0121"></a> ### DEP0121: `net._setSimultaneousAccepts()` <!-- YAML changes: @@ -2372,7 +2253,6 @@ and `cluster` modules on Windows. The function is not generally useful and is being removed. See discussion here: <https://github.com/nodejs/node/issues/18391> -<a id="DEP0122"></a> ### DEP0122: `tls` `Server.prototype.setOptions()` <!-- YAML changes: @@ -2385,7 +2265,6 @@ Type: Runtime Please use `Server.prototype.setSecureContext()` instead. -<a id="DEP0123"></a> ### DEP0123: setting the TLS ServerName to an IP address <!-- YAML changes: @@ -2399,7 +2278,6 @@ Type: Runtime Setting the TLS ServerName to an IP address is not permitted by [RFC 6066][]. This will be ignored in a future version. -<a id="DEP0124"></a> ### DEP0124: using `REPLServer.rli` <!-- YAML changes: @@ -2415,7 +2293,6 @@ Type: End-of-Life This property is a reference to the instance itself. -<a id="DEP0125"></a> ### DEP0125: `require('_stream_wrap')` <!-- YAML changes: @@ -2428,7 +2305,6 @@ Type: Runtime The `_stream_wrap` module is deprecated. -<a id="DEP0126"></a> ### DEP0126: `timers.active()` <!-- YAML changes: @@ -2444,7 +2320,6 @@ Please use the publicly documented [`timeout.refresh()`][] instead. If re-referencing the timeout is necessary, [`timeout.ref()`][] can be used with no performance impact since Node.js 10. -<a id="DEP0127"></a> ### DEP0127: `timers._unrefActive()` <!-- YAML changes: @@ -2460,7 +2335,6 @@ Please use the publicly documented [`timeout.refresh()`][] instead. If unreferencing the timeout is necessary, [`timeout.unref()`][] can be used with no performance impact since Node.js 10. -<a id="DEP0128"></a> ### DEP0128: modules with an invalid `main` entry and an `index.js` file <!-- YAML changes: @@ -2476,7 +2350,6 @@ also have an `index.js` file in the top level directory will resolve the `index.js` file. That is deprecated and is going to throw an error in future Node.js versions. -<a id="DEP0129"></a> ### DEP0129: `ChildProcess._channel` <!-- YAML changes: @@ -2494,7 +2367,6 @@ The `_channel` property of child process objects returned by `spawn()` and similar functions is not intended for public use. Use `ChildProcess.channel` instead. -<a id="DEP0130"></a> ### DEP0130: `Module.createRequireFromPath()` <!-- YAML changes: @@ -2511,7 +2383,6 @@ Type: Runtime Module.createRequireFromPath() is deprecated. Please use [`module.createRequire()`][] instead. -<a id="DEP0131"></a> ### DEP0131: Legacy HTTP parser <!-- YAML changes: @@ -2530,7 +2401,6 @@ is deprecated and has been removed in v13.0.0. Prior to v13.0.0, the `--http-parser=legacy` command-line flag could be used to revert to using the legacy parser. -<a id="DEP0132"></a> ### DEP0132: `worker.terminate()` with callback <!-- YAML changes: @@ -2544,7 +2414,6 @@ Type: Runtime Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned `Promise` instead, or a listener to the worker’s `'exit'` event. -<a id="DEP0133"></a> ### DEP0133: `http` `connection` <!-- YAML changes: @@ -2558,7 +2427,6 @@ Type: Documentation-only Prefer [`response.socket`][] over [`response.connection`][] and [`request.socket`][] over [`request.connection`][]. -<a id="DEP0134"></a> ### DEP0134: `process._tickCallback` <!-- YAML changes: @@ -2571,7 +2439,6 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) The `process._tickCallback` property was never documented as an officially supported API. -<a id="DEP0135"></a> ### DEP0135: `WriteStream.open()` and `ReadStream.open()` are internal <!-- YAML changes: @@ -2586,7 +2453,6 @@ APIs that do not make sense to use in userland. File streams should always be opened through their corresponding factory methods [`fs.createWriteStream()`][] and [`fs.createReadStream()`][]) or by passing a file descriptor in options. -<a id="DEP0136"></a> ### DEP0136: `http` `finished` <!-- YAML changes: @@ -2609,7 +2475,6 @@ accordingly instead to avoid the ambigiuty. To maintain existing behaviour `response.finished` should be replaced with `response.writableEnded`. -<a id="DEP0137"></a> ### DEP0137: Closing fs.FileHandle on garbage collection <!-- YAML changes: @@ -2640,7 +2505,6 @@ async function openAndClose() { } ``` -<a id="DEP0138"></a> ### DEP0138: `process.mainModule` <!-- YAML changes: @@ -2658,7 +2522,6 @@ modules is unsupported. It is deprecated in favor of [`require.main`][], because it serves the same purpose and is only available on CommonJS environment. -<a id="DEP0139"></a> ### DEP0139: `process.umask()` with no arguments <!-- YAML changes: @@ -2674,7 +2537,6 @@ written twice. This introduces a race condition between threads, and is a potential security vulnerability. There is no safe, cross-platform alternative API. -<a id="DEP0140"></a> ### DEP0140: Use `request.destroy()` instead of `request.abort()` <!-- YAML changes: @@ -2689,7 +2551,6 @@ Type: Documentation-only Use [`request.destroy()`][] instead of [`request.abort()`][]. -<a id="DEP0141"></a> ### DEP0141: `repl.inputStream` and `repl.outputStream` <!-- YAML changes: @@ -2703,7 +2564,6 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) The `repl` module exported the input and output stream twice. Use `.input` instead of `.inputStream` and `.output` instead of `.outputStream`. -<a id="DEP0142"></a> ### DEP0142: `repl._builtinLibs` <!-- YAML changes: @@ -2718,7 +2578,6 @@ The `repl` module exports a `_builtinLibs` property that contains an array with native modules. It was incomplete so far and instead it's better to rely upon `require('module').builtinModules`. -<a id="DEP0143"></a> ### DEP0143: `Transform._transformState` <!-- YAML changes: @@ -2730,7 +2589,6 @@ Type: Runtime `Transform._transformState` will be removed in future versions where it is no longer required due to simplification of the implementation. -<a id="DEP0144"></a> ### DEP0144: `module.parent` <!-- YAML changes: @@ -2763,7 +2621,6 @@ const moduleParents = Object.values(require.cache) .filter((m) => m.children.includes(module)); ``` -<a id="DEP0145"></a> ### DEP0145: `socket.bufferSize` <!-- YAML changes: @@ -2776,7 +2633,6 @@ Type: Documentation-only [`socket.bufferSize`][] is just an alias for [`writable.writableLength`][]. -<a id="DEP0146"></a> ### DEP0146: `new crypto.Certificate()` <!-- YAML changes: diff --git a/tools/doc/html.js b/tools/doc/html.js index 90c8287a1fc..ae8c1b10dda 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -327,6 +327,7 @@ function versionSort(a, b) { return +b.match(numberRe)[0] - +a.match(numberRe)[0]; } +const DEPRECATION_HEADING_PATTERN = /^DEP\d+:/; function buildToc({ filename, apilinks }) { return (tree, file) => { const idCounters = Object.create(null); @@ -349,10 +350,20 @@ function buildToc({ filename, apilinks }) { node.position.end.offset).trim(); const id = getId(`${realFilename}_${headingText}`, idCounters); + const isDeprecationHeading = + DEPRECATION_HEADING_PATTERN.test(headingText); + if (isDeprecationHeading) { + if (!node.data) node.data = {}; + if (!node.data.hProperties) node.data.hProperties = {}; + node.data.hProperties.id = + headingText.substring(0, headingText.indexOf(':')); + } + const hasStability = node.stability !== undefined; toc += ' '.repeat((depth - 1) * 2) + (hasStability ? `* <span class="stability_${node.stability}">` : '* ') + - `<a href="#${id}">${headingText}</a>${hasStability ? '</span>' : ''}\n`; + `<a href="#${isDeprecationHeading ? node.data.hProperties.id : id}">` + + `${headingText}</a>${hasStability ? '</span>' : ''}\n`; let anchor = `<span><a class="mark" href="#${id}" id="${id}">#</a></span>`; |