1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width"> 6 <meta name="nodejs.org:node-version" content="v14.20.1"> 7 <title>Deprecated APIs | Node.js v14.20.1 Documentation</title> 8 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=fallback"> 9 <link rel="stylesheet" href="assets/style.css"> 10 <link rel="stylesheet" href="assets/hljs.css"> 11 <link rel="canonical" href="https://nodejs.org/api/deprecations.html"> 12</head> 13<body class="alt apidoc" id="api-section-deprecations"> 14 <div id="content" class="clearfix"> 15 <div id="column2" class="interior"> 16 <div id="intro" class="interior"> 17 <a href="/" title="Go back to the home page"> 18 Node.js 19 </a> 20 </div> 21 <ul> 22<li><a href="documentation.html" class="nav-documentation">About this documentation</a></li> 23<li><a href="synopsis.html" class="nav-synopsis">Usage and example</a></li> 24</ul> 25<hr class="line"> 26<ul> 27<li><a href="assert.html" class="nav-assert">Assertion testing</a></li> 28<li><a href="async_hooks.html" class="nav-async_hooks">Async hooks</a></li> 29<li><a href="buffer.html" class="nav-buffer">Buffer</a></li> 30<li><a href="addons.html" class="nav-addons">C++ addons</a></li> 31<li><a href="n-api.html" class="nav-n-api">C/C++ addons with Node-API</a></li> 32<li><a href="embedding.html" class="nav-embedding">C++ embedder API</a></li> 33<li><a href="child_process.html" class="nav-child_process">Child processes</a></li> 34<li><a href="cluster.html" class="nav-cluster">Cluster</a></li> 35<li><a href="cli.html" class="nav-cli">Command-line options</a></li> 36<li><a href="console.html" class="nav-console">Console</a></li> 37<li><a href="corepack.html" class="nav-corepack">Corepack</a></li> 38<li><a href="crypto.html" class="nav-crypto">Crypto</a></li> 39<li><a href="debugger.html" class="nav-debugger">Debugger</a></li> 40<li><a href="deprecations.html" class="nav-deprecations active">Deprecated APIs</a></li> 41<li><a href="diagnostics_channel.html" class="nav-diagnostics_channel">Diagnostics Channel</a></li> 42<li><a href="dns.html" class="nav-dns">DNS</a></li> 43<li><a href="domain.html" class="nav-domain">Domain</a></li> 44<li><a href="errors.html" class="nav-errors">Errors</a></li> 45<li><a href="events.html" class="nav-events">Events</a></li> 46<li><a href="fs.html" class="nav-fs">File system</a></li> 47<li><a href="globals.html" class="nav-globals">Globals</a></li> 48<li><a href="http.html" class="nav-http">HTTP</a></li> 49<li><a href="http2.html" class="nav-http2">HTTP/2</a></li> 50<li><a href="https.html" class="nav-https">HTTPS</a></li> 51<li><a href="inspector.html" class="nav-inspector">Inspector</a></li> 52<li><a href="intl.html" class="nav-intl">Internationalization</a></li> 53<li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li> 54<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li> 55<li><a href="module.html" class="nav-module">Modules: <code>module</code> API</a></li> 56<li><a href="packages.html" class="nav-packages">Modules: Packages</a></li> 57<li><a href="net.html" class="nav-net">Net</a></li> 58<li><a href="os.html" class="nav-os">OS</a></li> 59<li><a href="path.html" class="nav-path">Path</a></li> 60<li><a href="perf_hooks.html" class="nav-perf_hooks">Performance hooks</a></li> 61<li><a href="policy.html" class="nav-policy">Policies</a></li> 62<li><a href="process.html" class="nav-process">Process</a></li> 63<li><a href="punycode.html" class="nav-punycode">Punycode</a></li> 64<li><a href="querystring.html" class="nav-querystring">Query strings</a></li> 65<li><a href="readline.html" class="nav-readline">Readline</a></li> 66<li><a href="repl.html" class="nav-repl">REPL</a></li> 67<li><a href="report.html" class="nav-report">Report</a></li> 68<li><a href="stream.html" class="nav-stream">Stream</a></li> 69<li><a href="string_decoder.html" class="nav-string_decoder">String decoder</a></li> 70<li><a href="timers.html" class="nav-timers">Timers</a></li> 71<li><a href="tls.html" class="nav-tls">TLS/SSL</a></li> 72<li><a href="tracing.html" class="nav-tracing">Trace events</a></li> 73<li><a href="tty.html" class="nav-tty">TTY</a></li> 74<li><a href="dgram.html" class="nav-dgram">UDP/datagram</a></li> 75<li><a href="url.html" class="nav-url">URL</a></li> 76<li><a href="util.html" class="nav-util">Utilities</a></li> 77<li><a href="v8.html" class="nav-v8">V8</a></li> 78<li><a href="vm.html" class="nav-vm">VM</a></li> 79<li><a href="wasi.html" class="nav-wasi">WASI</a></li> 80<li><a href="worker_threads.html" class="nav-worker_threads">Worker threads</a></li> 81<li><a href="zlib.html" class="nav-zlib">Zlib</a></li> 82</ul> 83<hr class="line"> 84<ul> 85<li><a href="https://github.com/nodejs/node" class="nav-https-github-com-nodejs-node">Code repository and issue tracker</a></li> 86</ul> 87 </div> 88 89 <div id="column1" data-id="deprecations" class="interior"> 90 <header> 91 <div class="header-container"> 92 <h1>Node.js v14.20.1 documentation</h1> 93 <button class="theme-toggle-btn" id="theme-toggle-btn" title="Toggle dark mode/light mode" aria-label="Toggle dark mode/light mode" hidden> 94 <svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24"> 95 <path fill="none" d="M0 0h24v24H0z" /> 96 <path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/> 97 <path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"/> 98 </svg> 99 <svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" height="24" width="24"> 100 <path d="M0 0h24v24H0z" fill="none" /> 101 <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/> 102 </svg> 103 </button> 104 </div> 105 <div id="gtoc"> 106 <ul> 107 <li> 108 <a href="index.html">Index</a> 109 </li> 110 <li> 111 <a href="all.html">View on single page</a> 112 </li> 113 <li> 114 <a href="deprecations.json">View as JSON</a> 115 </li> 116 117 <li class="version-picker"> 118 <a href="#">View another version <span>▼</span></a> 119 <ol class="version-picker"><li><a href="https://nodejs.org/docs/latest-v18.x/api/deprecations.html">18.x</a></li> 120<li><a href="https://nodejs.org/docs/latest-v17.x/api/deprecations.html">17.x</a></li> 121<li><a href="https://nodejs.org/docs/latest-v16.x/api/deprecations.html">16.x <b>LTS</b></a></li> 122<li><a href="https://nodejs.org/docs/latest-v15.x/api/deprecations.html">15.x</a></li> 123<li><a href="https://nodejs.org/docs/latest-v14.x/api/deprecations.html">14.x <b>LTS</b></a></li> 124<li><a href="https://nodejs.org/docs/latest-v13.x/api/deprecations.html">13.x</a></li> 125<li><a href="https://nodejs.org/docs/latest-v12.x/api/deprecations.html">12.x <b>LTS</b></a></li> 126<li><a href="https://nodejs.org/docs/latest-v11.x/api/deprecations.html">11.x</a></li> 127<li><a href="https://nodejs.org/docs/latest-v10.x/api/deprecations.html">10.x</a></li> 128<li><a href="https://nodejs.org/docs/latest-v9.x/api/deprecations.html">9.x</a></li> 129<li><a href="https://nodejs.org/docs/latest-v8.x/api/deprecations.html">8.x</a></li> 130<li><a href="https://nodejs.org/docs/latest-v7.x/api/deprecations.html">7.x</a></li></ol> 131 </li> 132 133 <li class="edit_on_github"><a href="https://github.com/nodejs/node/edit/master/doc/api/deprecations.md">Edit on GitHub</a></li> 134 </ul> 135 </div> 136 <hr> 137 </header> 138 139 <details id="toc" open><summary>Table of contents</summary><ul> 140<li><a href="#deprecations_deprecated_apis">Deprecated APIs</a> 141<ul> 142<li><a href="#deprecations_revoking_deprecations">Revoking deprecations</a></li> 143<li><a href="#deprecations_list_of_deprecated_apis">List of deprecated APIs</a> 144<ul> 145<li><a href="#DEP0001">DEP0001: <code>http.OutgoingMessage.prototype.flush</code></a></li> 146<li><a href="#DEP0002">DEP0002: <code>require('_linklist')</code></a></li> 147<li><a href="#DEP0003">DEP0003: <code>_writableState.buffer</code></a></li> 148<li><a href="#DEP0004">DEP0004: <code>CryptoStream.prototype.readyState</code></a></li> 149<li><a href="#DEP0005">DEP0005: <code>Buffer()</code> constructor</a></li> 150<li><a href="#DEP0006">DEP0006: <code>child_process</code> <code>options.customFds</code></a></li> 151<li><a href="#DEP0007">DEP0007: Replace <code>cluster</code> <code>worker.suicide</code> with <code>worker.exitedAfterDisconnect</code></a></li> 152<li><a href="#DEP0008">DEP0008: <code>require('constants')</code></a></li> 153<li><a href="#DEP0009">DEP0009: <code>crypto.pbkdf2</code> without digest</a></li> 154<li><a href="#DEP0010">DEP0010: <code>crypto.createCredentials</code></a></li> 155<li><a href="#DEP0011">DEP0011: <code>crypto.Credentials</code></a></li> 156<li><a href="#DEP0012">DEP0012: <code>Domain.dispose</code></a></li> 157<li><a href="#DEP0013">DEP0013: <code>fs</code> asynchronous function without callback</a></li> 158<li><a href="#DEP0014">DEP0014: <code>fs.read</code> legacy String interface</a></li> 159<li><a href="#DEP0015">DEP0015: <code>fs.readSync</code> legacy String interface</a></li> 160<li><a href="#DEP0016">DEP0016: <code>GLOBAL</code>/<code>root</code></a></li> 161<li><a href="#DEP0017">DEP0017: <code>Intl.v8BreakIterator</code></a></li> 162<li><a href="#DEP0018">DEP0018: Unhandled promise rejections</a></li> 163<li><a href="#DEP0019">DEP0019: <code>require('.')</code> resolved outside directory</a></li> 164<li><a href="#DEP0020">DEP0020: <code>Server.connections</code></a></li> 165<li><a href="#DEP0021">DEP0021: <code>Server.listenFD</code></a></li> 166<li><a href="#DEP0022">DEP0022: <code>os.tmpDir()</code></a></li> 167<li><a href="#DEP0023">DEP0023: <code>os.getNetworkInterfaces()</code></a></li> 168<li><a href="#DEP0024">DEP0024: <code>REPLServer.prototype.convertToContext()</code></a></li> 169<li><a href="#DEP0025">DEP0025: <code>require('sys')</code></a></li> 170<li><a href="#DEP0026">DEP0026: <code>util.print()</code></a></li> 171<li><a href="#DEP0027">DEP0027: <code>util.puts()</code></a></li> 172<li><a href="#DEP0028">DEP0028: <code>util.debug()</code></a></li> 173<li><a href="#DEP0029">DEP0029: <code>util.error()</code></a></li> 174<li><a href="#DEP0030">DEP0030: <code>SlowBuffer</code></a></li> 175<li><a href="#DEP0031">DEP0031: <code>ecdh.setPublicKey()</code></a></li> 176<li><a href="#DEP0032">DEP0032: <code>domain</code> module</a></li> 177<li><a href="#DEP0033">DEP0033: <code>EventEmitter.listenerCount()</code></a></li> 178<li><a href="#DEP0034">DEP0034: <code>fs.exists(path, callback)</code></a></li> 179<li><a href="#DEP0035">DEP0035: <code>fs.lchmod(path, mode, callback)</code></a></li> 180<li><a href="#DEP0036">DEP0036: <code>fs.lchmodSync(path, mode)</code></a></li> 181<li><a href="#DEP0037">DEP0037: <code>fs.lchown(path, uid, gid, callback)</code></a></li> 182<li><a href="#DEP0038">DEP0038: <code>fs.lchownSync(path, uid, gid)</code></a></li> 183<li><a href="#DEP0039">DEP0039: <code>require.extensions</code></a></li> 184<li><a href="#DEP0040">DEP0040: <code>punycode</code> module</a></li> 185<li><a href="#DEP0041">DEP0041: <code>NODE_REPL_HISTORY_FILE</code> environment variable</a></li> 186<li><a href="#DEP0042">DEP0042: <code>tls.CryptoStream</code></a></li> 187<li><a href="#DEP0043">DEP0043: <code>tls.SecurePair</code></a></li> 188<li><a href="#DEP0044">DEP0044: <code>util.isArray()</code></a></li> 189<li><a href="#DEP0045">DEP0045: <code>util.isBoolean()</code></a></li> 190<li><a href="#DEP0046">DEP0046: <code>util.isBuffer()</code></a></li> 191<li><a href="#DEP0047">DEP0047: <code>util.isDate()</code></a></li> 192<li><a href="#DEP0048">DEP0048: <code>util.isError()</code></a></li> 193<li><a href="#DEP0049">DEP0049: <code>util.isFunction()</code></a></li> 194<li><a href="#DEP0050">DEP0050: <code>util.isNull()</code></a></li> 195<li><a href="#DEP0051">DEP0051: <code>util.isNullOrUndefined()</code></a></li> 196<li><a href="#DEP0052">DEP0052: <code>util.isNumber()</code></a></li> 197<li><a href="#DEP0053">DEP0053: <code>util.isObject()</code></a></li> 198<li><a href="#DEP0054">DEP0054: <code>util.isPrimitive()</code></a></li> 199<li><a href="#DEP0055">DEP0055: <code>util.isRegExp()</code></a></li> 200<li><a href="#DEP0056">DEP0056: <code>util.isString()</code></a></li> 201<li><a href="#DEP0057">DEP0057: <code>util.isSymbol()</code></a></li> 202<li><a href="#DEP0058">DEP0058: <code>util.isUndefined()</code></a></li> 203<li><a href="#DEP0059">DEP0059: <code>util.log()</code></a></li> 204<li><a href="#DEP0060">DEP0060: <code>util._extend()</code></a></li> 205<li><a href="#DEP0061">DEP0061: <code>fs.SyncWriteStream</code></a></li> 206<li><a href="#DEP0062">DEP0062: <code>node --debug</code></a></li> 207<li><a href="#DEP0063">DEP0063: <code>ServerResponse.prototype.writeHeader()</code></a></li> 208<li><a href="#DEP0064">DEP0064: <code>tls.createSecurePair()</code></a></li> 209<li><a href="#DEP0065">DEP0065: <code>repl.REPL_MODE_MAGIC</code> and <code>NODE_REPL_MODE=magic</code></a></li> 210<li><a href="#DEP0066">DEP0066: <code>OutgoingMessage.prototype._headers, OutgoingMessage.prototype._headerNames</code></a></li> 211<li><a href="#DEP0067">DEP0067: <code>OutgoingMessage.prototype._renderHeaders</code></a></li> 212<li><a href="#DEP0068">DEP0068: <code>node debug</code></a></li> 213<li><a href="#DEP0069">DEP0069: <code>vm.runInDebugContext(string)</code></a></li> 214<li><a href="#DEP0070">DEP0070: <code>async_hooks.currentId()</code></a></li> 215<li><a href="#DEP0071">DEP0071: <code>async_hooks.triggerId()</code></a></li> 216<li><a href="#DEP0072">DEP0072: <code>async_hooks.AsyncResource.triggerId()</code></a></li> 217<li><a href="#DEP0073">DEP0073: Several internal properties of <code>net.Server</code></a></li> 218<li><a href="#DEP0074">DEP0074: <code>REPLServer.bufferedCommand</code></a></li> 219<li><a href="#DEP0075">DEP0075: <code>REPLServer.parseREPLKeyword()</code></a></li> 220<li><a href="#DEP0076">DEP0076: <code>tls.parseCertString()</code></a></li> 221<li><a href="#DEP0077">DEP0077: <code>Module._debug()</code></a></li> 222<li><a href="#DEP0078">DEP0078: <code>REPLServer.turnOffEditorMode()</code></a></li> 223<li><a href="#DEP0079">DEP0079: Custom inspection function on objects via <code>.inspect()</code></a></li> 224<li><a href="#DEP0080">DEP0080: <code>path._makeLong()</code></a></li> 225<li><a href="#DEP0081">DEP0081: <code>fs.truncate()</code> using a file descriptor</a></li> 226<li><a href="#DEP0082">DEP0082: <code>REPLServer.prototype.memory()</code></a></li> 227<li><a href="#DEP0083">DEP0083: Disabling ECDH by setting <code>ecdhCurve</code> to <code>false</code></a></li> 228<li><a href="#DEP0084">DEP0084: requiring bundled internal dependencies</a></li> 229<li><a href="#DEP0085">DEP0085: AsyncHooks sensitive API</a></li> 230<li><a href="#DEP0086">DEP0086: Remove <code>runInAsyncIdScope</code></a></li> 231<li><a href="#DEP0089">DEP0089: <code>require('assert')</code></a></li> 232<li><a href="#DEP0090">DEP0090: Invalid GCM authentication tag lengths</a></li> 233<li><a href="#DEP0091">DEP0091: <code>crypto.DEFAULT_ENCODING</code></a></li> 234<li><a href="#DEP0092">DEP0092: Top-level <code>this</code> bound to <code>module.exports</code></a></li> 235<li><a href="#DEP0093">DEP0093: <code>crypto.fips</code> is deprecated and replaced</a></li> 236<li><a href="#DEP0094">DEP0094: Using <code>assert.fail()</code> with more than one argument</a></li> 237<li><a href="#DEP0095">DEP0095: <code>timers.enroll()</code></a></li> 238<li><a href="#DEP0096">DEP0096: <code>timers.unenroll()</code></a></li> 239<li><a href="#DEP0097">DEP0097: <code>MakeCallback</code> with <code>domain</code> property</a></li> 240<li><a href="#DEP0098">DEP0098: AsyncHooks embedder <code>AsyncResource.emitBefore</code> and <code>AsyncResource.emitAfter</code> APIs</a></li> 241<li><a href="#DEP0099">DEP0099: Async context-unaware <code>node::MakeCallback</code> C++ APIs</a></li> 242<li><a href="#DEP0100">DEP0100: <code>process.assert()</code></a></li> 243<li><a href="#DEP0101">DEP0101: <code>--with-lttng</code></a></li> 244<li><a href="#DEP0102">DEP0102: Using <code>noAssert</code> in <code>Buffer#(read|write)</code> operations</a></li> 245<li><a href="#DEP0103">DEP0103: <code>process.binding('util').is[...]</code> typechecks</a></li> 246<li><a href="#DEP0104">DEP0104: <code>process.env</code> string coercion</a></li> 247<li><a href="#DEP0105">DEP0105: <code>decipher.finaltol</code></a></li> 248<li><a href="#DEP0106">DEP0106: <code>crypto.createCipher</code> and <code>crypto.createDecipher</code></a></li> 249<li><a href="#DEP0107">DEP0107: <code>tls.convertNPNProtocols()</code></a></li> 250<li><a href="#DEP0108">DEP0108: <code>zlib.bytesRead</code></a></li> 251<li><a href="#DEP0109">DEP0109: <code>http</code>, <code>https</code>, and <code>tls</code> support for invalid URLs</a></li> 252<li><a href="#DEP0110">DEP0110: <code>vm.Script</code> cached data</a></li> 253<li><a href="#DEP0111">DEP0111: <code>process.binding()</code></a></li> 254<li><a href="#DEP0112">DEP0112: <code>dgram</code> private APIs</a></li> 255<li><a href="#DEP0113">DEP0113: <code>Cipher.setAuthTag()</code>, <code>Decipher.getAuthTag()</code></a></li> 256<li><a href="#DEP0114">DEP0114: <code>crypto._toBuf()</code></a></li> 257<li><a href="#DEP0115">DEP0115: <code>crypto.prng()</code>, <code>crypto.pseudoRandomBytes()</code>, <code>crypto.rng()</code></a></li> 258<li><a href="#DEP0116">DEP0116: Legacy URL API</a></li> 259<li><a href="#DEP0117">DEP0117: Native crypto handles</a></li> 260<li><a href="#DEP0118">DEP0118: <code>dns.lookup()</code> support for a falsy host name</a></li> 261<li><a href="#DEP0119">DEP0119: <code>process.binding('uv').errname()</code> private API</a></li> 262<li><a href="#DEP0120">DEP0120: Windows Performance Counter support</a></li> 263<li><a href="#DEP0121">DEP0121: <code>net._setSimultaneousAccepts()</code></a></li> 264<li><a href="#DEP0122">DEP0122: <code>tls</code> <code>Server.prototype.setOptions()</code></a></li> 265<li><a href="#DEP0123">DEP0123: setting the TLS ServerName to an IP address</a></li> 266<li><a href="#DEP0124">DEP0124: using <code>REPLServer.rli</code></a></li> 267<li><a href="#DEP0125">DEP0125: <code>require('_stream_wrap')</code></a></li> 268<li><a href="#DEP0126">DEP0126: <code>timers.active()</code></a></li> 269<li><a href="#DEP0127">DEP0127: <code>timers._unrefActive()</code></a></li> 270<li><a href="#DEP0128">DEP0128: modules with an invalid <code>main</code> entry and an <code>index.js</code> file</a></li> 271<li><a href="#DEP0129">DEP0129: <code>ChildProcess._channel</code></a></li> 272<li><a href="#DEP0130">DEP0130: <code>Module.createRequireFromPath()</code></a></li> 273<li><a href="#DEP0131">DEP0131: Legacy HTTP parser</a></li> 274<li><a href="#DEP0132">DEP0132: <code>worker.terminate()</code> with callback</a></li> 275<li><a href="#DEP0133">DEP0133: <code>http</code> <code>connection</code></a></li> 276<li><a href="#DEP0134">DEP0134: <code>process._tickCallback</code></a></li> 277<li><a href="#DEP0135">DEP0135: <code>WriteStream.open()</code> and <code>ReadStream.open()</code> are internal</a></li> 278<li><a href="#DEP0136">DEP0136: <code>http</code> <code>finished</code></a></li> 279<li><a href="#DEP0137">DEP0137: Closing fs.FileHandle on garbage collection</a></li> 280<li><a href="#DEP0138">DEP0138: <code>process.mainModule</code></a></li> 281<li><a href="#DEP0139">DEP0139: <code>process.umask()</code> with no arguments</a></li> 282<li><a href="#DEP0140">DEP0140: Use <code>request.destroy()</code> instead of <code>request.abort()</code></a></li> 283<li><a href="#DEP0141">DEP0141: <code>repl.inputStream</code> and <code>repl.outputStream</code></a></li> 284<li><a href="#DEP0142">DEP0142: <code>repl._builtinLibs</code></a></li> 285<li><a href="#DEP0143">DEP0143: <code>Transform._transformState</code></a></li> 286<li><a href="#DEP0144">DEP0144: <code>module.parent</code></a></li> 287<li><a href="#DEP0145">DEP0145: <code>socket.bufferSize</code></a></li> 288<li><a href="#DEP0146">DEP0146: <code>new crypto.Certificate()</code></a></li> 289<li><a href="#DEP0147">DEP0147: <code>fs.rmdir(path, { recursive: true })</code></a></li> 290<li><a href="#DEP0151">DEP0151: Main index lookup and extension searching</a></li> 291</ul> 292</li> 293</ul> 294</li> 295</ul></details> 296 297 <div id="apicontent"> 298 <h2>Deprecated APIs<span><a class="mark" href="#deprecations_deprecated_apis" id="deprecations_deprecated_apis">#</a></span></h2> 299 300 301<p>Node.js APIs might be deprecated for any of the following reasons:</p> 302<ul> 303<li>Use of the API is unsafe.</li> 304<li>An improved alternative API is available.</li> 305<li>Breaking changes to the API are expected in a future major release.</li> 306</ul> 307<p>Node.js uses three kinds of Deprecations:</p> 308<ul> 309<li>Documentation-only</li> 310<li>Runtime</li> 311<li>End-of-Life</li> 312</ul> 313<p>A Documentation-only deprecation is one that is expressed only within the 314Node.js API docs. These generate no side-effects while running Node.js. 315Some Documentation-only deprecations trigger a runtime warning when launched 316with <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a> flag (or its alternative, 317<code>NODE_PENDING_DEPRECATION=1</code> environment variable), similarly to Runtime 318deprecations below. Documentation-only deprecations that support that flag 319are explicitly labeled as such in the 320<a href="#deprecations_list_of_deprecated_apis">list of Deprecated APIs</a>.</p> 321<p>A Runtime deprecation will, by default, generate a process warning that will 322be printed to <code>stderr</code> the first time the deprecated API is used. When the 323<a href="cli.html#cli_throw_deprecation"><code>--throw-deprecation</code></a> command-line flag is used, a Runtime deprecation will 324cause an error to be thrown.</p> 325<p>An End-of-Life deprecation is used when functionality is or will soon be removed 326from Node.js.</p> 327<section><h3>Revoking deprecations<span><a class="mark" href="#deprecations_revoking_deprecations" id="deprecations_revoking_deprecations">#</a></span></h3> 328<p>Occasionally, the deprecation of an API might be reversed. In such situations, 329this document will be updated with information relevant to the decision. 330However, the deprecation identifier will not be modified.</p> 331</section><section><h3>List of deprecated APIs<span><a class="mark" href="#deprecations_list_of_deprecated_apis" id="deprecations_list_of_deprecated_apis">#</a></span></h3> 332<h4 id="DEP0001">DEP0001: <code>http.OutgoingMessage.prototype.flush</code><span><a class="mark" href="#deprecations_dep0001_http_outgoingmessage_prototype_flush" id="deprecations_dep0001_http_outgoingmessage_prototype_flush">#</a></span></h4> 333<div class="api_metadata"> 334<details class="changelog"><summary>History</summary> 335<table> 336<tbody><tr><th>Version</th><th>Changes</th></tr> 337<tr><td>v14.0.0</td> 338<td><p>End-of-Life.</p></td></tr> 339<tr><td>v6.12.0, v4.8.6</td> 340<td><p>A deprecation code has been assigned.</p></td></tr> 341<tr><td>v1.6.0</td> 342<td><p>Runtime deprecation.</p></td></tr> 343</tbody></table> 344</details> 345</div> 346<p>Type: End-of-Life</p> 347<p><code>OutgoingMessage.prototype.flush()</code> has been removed. Use 348<code>OutgoingMessage.prototype.flushHeaders()</code> instead.</p> 349<h4 id="DEP0002">DEP0002: <code>require('_linklist')</code><span><a class="mark" href="#deprecations_dep0002_require_linklist" id="deprecations_dep0002_require_linklist">#</a></span></h4> 350<div class="api_metadata"> 351<details class="changelog"><summary>History</summary> 352<table> 353<tbody><tr><th>Version</th><th>Changes</th></tr> 354<tr><td>v8.0.0</td> 355<td><p>End-of-Life.</p></td></tr> 356<tr><td>v6.12.0</td> 357<td><p>A deprecation code has been assigned.</p></td></tr> 358<tr><td>v5.0.0</td> 359<td><p>Runtime deprecation.</p></td></tr> 360</tbody></table> 361</details> 362</div> 363<p>Type: End-of-Life</p> 364<p>The <code>_linklist</code> module is deprecated. Please use a userland alternative.</p> 365<h4 id="DEP0003">DEP0003: <code>_writableState.buffer</code><span><a class="mark" href="#deprecations_dep0003_writablestate_buffer" id="deprecations_dep0003_writablestate_buffer">#</a></span></h4> 366<div class="api_metadata"> 367<details class="changelog"><summary>History</summary> 368<table> 369<tbody><tr><th>Version</th><th>Changes</th></tr> 370<tr><td>v14.0.0</td> 371<td><p>End-of-Life.</p></td></tr> 372<tr><td>v6.12.0, v4.8.6</td> 373<td><p>A deprecation code has been assigned.</p></td></tr> 374<tr><td>v0.11.15</td> 375<td><p>Runtime deprecation.</p></td></tr> 376</tbody></table> 377</details> 378</div> 379<p>Type: End-of-Life</p> 380<p>The <code>_writableState.buffer</code> has been removed. Use <code>_writableState.getBuffer()</code> 381instead.</p> 382<h4 id="DEP0004">DEP0004: <code>CryptoStream.prototype.readyState</code><span><a class="mark" href="#deprecations_dep0004_cryptostream_prototype_readystate" id="deprecations_dep0004_cryptostream_prototype_readystate">#</a></span></h4> 383<div class="api_metadata"> 384<details class="changelog"><summary>History</summary> 385<table> 386<tbody><tr><th>Version</th><th>Changes</th></tr> 387<tr><td>v10.0.0</td> 388<td><p>End-of-Life.</p></td></tr> 389<tr><td>v6.12.0, v4.8.6</td> 390<td><p>A deprecation code has been assigned.</p></td></tr> 391<tr><td>v0.4.0</td> 392<td><p>Documentation-only deprecation.</p></td></tr> 393</tbody></table> 394</details> 395</div> 396<p>Type: End-of-Life</p> 397<p>The <code>CryptoStream.prototype.readyState</code> property was removed.</p> 398<h4 id="DEP0005">DEP0005: <code>Buffer()</code> constructor<span><a class="mark" href="#deprecations_dep0005_buffer_constructor" id="deprecations_dep0005_buffer_constructor">#</a></span></h4> 399<div class="api_metadata"> 400<details class="changelog"><summary>History</summary> 401<table> 402<tbody><tr><th>Version</th><th>Changes</th></tr> 403<tr><td>v10.0.0</td> 404<td><p>Runtime deprecation.</p></td></tr> 405<tr><td>v6.12.0</td> 406<td><p>A deprecation code has been assigned.</p></td></tr> 407<tr><td>v6.0.0</td> 408<td><p>Documentation-only deprecation.</p></td></tr> 409</tbody></table> 410</details> 411</div> 412<p>Type: Runtime (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 413<p>The <code>Buffer()</code> function and <code>new Buffer()</code> constructor are deprecated due to 414API usability issues that can lead to accidental security issues.</p> 415<p>As an alternative, use one of the following methods of constructing <code>Buffer</code> 416objects:</p> 417<ul> 418<li><a href="buffer.html#buffer_static_method_buffer_alloc_size_fill_encoding"><code>Buffer.alloc(size[, fill[, encoding]])</code></a>: Create a <code>Buffer</code> with 419<em>initialized</em> memory.</li> 420<li><a href="buffer.html#buffer_static_method_buffer_allocunsafe_size"><code>Buffer.allocUnsafe(size)</code></a>: Create a <code>Buffer</code> with 421<em>uninitialized</em> memory.</li> 422<li><a href="buffer.html#buffer_static_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a>: Create a <code>Buffer</code> with <em>uninitialized</em> 423memory.</li> 424<li><a href="buffer.html#buffer_static_method_buffer_from_array"><code>Buffer.from(array)</code></a>: Create a <code>Buffer</code> with a copy of <code>array</code></li> 425<li><a href="buffer.html#buffer_static_method_buffer_from_arraybuffer_byteoffset_length"><code>Buffer.from(arrayBuffer[, byteOffset[, length]])</code></a> - 426Create a <code>Buffer</code> that wraps the given <code>arrayBuffer</code>.</li> 427<li><a href="buffer.html#buffer_static_method_buffer_from_buffer"><code>Buffer.from(buffer)</code></a>: Create a <code>Buffer</code> that copies <code>buffer</code>.</li> 428<li><a href="buffer.html#buffer_static_method_buffer_from_string_encoding"><code>Buffer.from(string[, encoding])</code></a>: Create a <code>Buffer</code> 429that copies <code>string</code>.</li> 430</ul> 431<p>Without <code>--pending-deprecation</code>, runtime warnings occur only for code not in 432<code>node_modules</code>. This means there will not be deprecation warnings for 433<code>Buffer()</code> usage in dependencies. With <code>--pending-deprecation</code>, a runtime 434warning results no matter where the <code>Buffer()</code> usage occurs.</p> 435<h4 id="DEP0006">DEP0006: <code>child_process</code> <code>options.customFds</code><span><a class="mark" href="#deprecations_dep0006_child_process_options_customfds" id="deprecations_dep0006_child_process_options_customfds">#</a></span></h4> 436<div class="api_metadata"> 437<details class="changelog"><summary>History</summary> 438<table> 439<tbody><tr><th>Version</th><th>Changes</th></tr> 440<tr><td>v12.0.0</td> 441<td><p>End-of-Life.</p></td></tr> 442<tr><td>v6.12.0, v4.8.6</td> 443<td><p>A deprecation code has been assigned.</p></td></tr> 444<tr><td>v0.11.14</td> 445<td><p>Runtime deprecation.</p></td></tr> 446<tr><td>v0.5.10</td> 447<td><p>Documentation-only deprecation.</p></td></tr> 448</tbody></table> 449</details> 450</div> 451<p>Type: End-of-Life</p> 452<p>Within the <a href="child_process.html"><code>child_process</code></a> module's <code>spawn()</code>, <code>fork()</code>, and <code>exec()</code> 453methods, the <code>options.customFds</code> option is deprecated. The <code>options.stdio</code> 454option should be used instead.</p> 455<h4 id="DEP0007">DEP0007: Replace <code>cluster</code> <code>worker.suicide</code> with <code>worker.exitedAfterDisconnect</code><span><a class="mark" href="#deprecations_dep0007_replace_cluster_worker_suicide_with_worker_exitedafterdisconnect" id="deprecations_dep0007_replace_cluster_worker_suicide_with_worker_exitedafterdisconnect">#</a></span></h4> 456<div class="api_metadata"> 457<details class="changelog"><summary>History</summary> 458<table> 459<tbody><tr><th>Version</th><th>Changes</th></tr> 460<tr><td>v9.0.0</td> 461<td><p>End-of-Life.</p></td></tr> 462<tr><td>v7.0.0</td> 463<td><p>Runtime deprecation.</p></td></tr> 464<tr><td>v6.12.0</td> 465<td><p>A deprecation code has been assigned.</p></td></tr> 466<tr><td>v6.0.0</td> 467<td><p>Documentation-only deprecation.</p></td></tr> 468</tbody></table> 469</details> 470</div> 471<p>Type: End-of-Life</p> 472<p>In an earlier version of the Node.js <code>cluster</code>, a boolean property with the name 473<code>suicide</code> was added to the <code>Worker</code> object. The intent of this property was to 474provide an indication of how and why the <code>Worker</code> instance exited. In Node.js 4756.0.0, the old property was deprecated and replaced with a new 476<a href="cluster.html#cluster_worker_exitedafterdisconnect"><code>worker.exitedAfterDisconnect</code></a> property. The old property name did not 477precisely describe the actual semantics and was unnecessarily emotion-laden.</p> 478<h4 id="DEP0008">DEP0008: <code>require('constants')</code><span><a class="mark" href="#deprecations_dep0008_require_constants" id="deprecations_dep0008_require_constants">#</a></span></h4> 479<div class="api_metadata"> 480<details class="changelog"><summary>History</summary> 481<table> 482<tbody><tr><th>Version</th><th>Changes</th></tr> 483<tr><td>v6.12.0</td> 484<td><p>A deprecation code has been assigned.</p></td></tr> 485<tr><td>v6.3.0</td> 486<td><p>Documentation-only deprecation.</p></td></tr> 487</tbody></table> 488</details> 489</div> 490<p>Type: Documentation-only</p> 491<p>The <code>constants</code> module is deprecated. When requiring access to constants 492relevant to specific Node.js builtin modules, developers should instead refer 493to the <code>constants</code> property exposed by the relevant module. For instance, 494<code>require('fs').constants</code> and <code>require('os').constants</code>.</p> 495<h4 id="DEP0009">DEP0009: <code>crypto.pbkdf2</code> without digest<span><a class="mark" href="#deprecations_dep0009_crypto_pbkdf2_without_digest" id="deprecations_dep0009_crypto_pbkdf2_without_digest">#</a></span></h4> 496<div class="api_metadata"> 497<details class="changelog"><summary>History</summary> 498<table> 499<tbody><tr><th>Version</th><th>Changes</th></tr> 500<tr><td>v14.0.0</td> 501<td><p>End-of-Life (for <code>digest === null</code>).</p></td></tr> 502<tr><td>v11.0.0</td> 503<td><p>Runtime deprecation (for <code>digest === null</code>).</p></td></tr> 504<tr><td>v8.0.0</td> 505<td><p>End-of-Life (for <code>digest === undefined</code>).</p></td></tr> 506<tr><td>v6.12.0</td> 507<td><p>A deprecation code has been assigned.</p></td></tr> 508<tr><td>v6.0.0</td> 509<td><p>Runtime deprecation (for <code>digest === undefined</code>).</p></td></tr> 510</tbody></table> 511</details> 512</div> 513<p>Type: End-of-Life</p> 514<p>Use of the <a href="crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> API without specifying a digest was deprecated 515in Node.js 6.0 because the method defaulted to using the non-recommended 516<code>'SHA1'</code> digest. Previously, a deprecation warning was printed. Starting in 517Node.js 8.0.0, calling <code>crypto.pbkdf2()</code> or <code>crypto.pbkdf2Sync()</code> with 518<code>digest</code> set to <code>undefined</code> will throw a <code>TypeError</code>.</p> 519<p>Beginning in Node.js v11.0.0, calling these functions with <code>digest</code> set to 520<code>null</code> would print a deprecation warning to align with the behavior when <code>digest</code> 521is <code>undefined</code>.</p> 522<p>Now, however, passing either <code>undefined</code> or <code>null</code> will throw a <code>TypeError</code>.</p> 523<h4 id="DEP0010">DEP0010: <code>crypto.createCredentials</code><span><a class="mark" href="#deprecations_dep0010_crypto_createcredentials" id="deprecations_dep0010_crypto_createcredentials">#</a></span></h4> 524<div class="api_metadata"> 525<details class="changelog"><summary>History</summary> 526<table> 527<tbody><tr><th>Version</th><th>Changes</th></tr> 528<tr><td>v11.0.0</td> 529<td><p>End-of-Life.</p></td></tr> 530<tr><td>v6.12.0, v4.8.6</td> 531<td><p>A deprecation code has been assigned.</p></td></tr> 532<tr><td>v0.11.13</td> 533<td><p>Runtime deprecation.</p></td></tr> 534</tbody></table> 535</details> 536</div> 537<p>Type: End-of-Life</p> 538<p>The <code>crypto.createCredentials()</code> API was removed. Please use 539<a href="tls.html#tls_tls_createsecurecontext_options"><code>tls.createSecureContext()</code></a> instead.</p> 540<h4 id="DEP0011">DEP0011: <code>crypto.Credentials</code><span><a class="mark" href="#deprecations_dep0011_crypto_credentials" id="deprecations_dep0011_crypto_credentials">#</a></span></h4> 541<div class="api_metadata"> 542<details class="changelog"><summary>History</summary> 543<table> 544<tbody><tr><th>Version</th><th>Changes</th></tr> 545<tr><td>v11.0.0</td> 546<td><p>End-of-Life.</p></td></tr> 547<tr><td>v6.12.0, v4.8.6</td> 548<td><p>A deprecation code has been assigned.</p></td></tr> 549<tr><td>v0.11.13</td> 550<td><p>Runtime deprecation.</p></td></tr> 551</tbody></table> 552</details> 553</div> 554<p>Type: End-of-Life</p> 555<p>The <code>crypto.Credentials</code> class was removed. Please use <a href="tls.html#tls_tls_createsecurecontext_options"><code>tls.SecureContext</code></a> 556instead.</p> 557<h4 id="DEP0012">DEP0012: <code>Domain.dispose</code><span><a class="mark" href="#deprecations_dep0012_domain_dispose" id="deprecations_dep0012_domain_dispose">#</a></span></h4> 558<div class="api_metadata"> 559<details class="changelog"><summary>History</summary> 560<table> 561<tbody><tr><th>Version</th><th>Changes</th></tr> 562<tr><td>v9.0.0</td> 563<td><p>End-of-Life.</p></td></tr> 564<tr><td>v6.12.0, v4.8.6</td> 565<td><p>A deprecation code has been assigned.</p></td></tr> 566<tr><td>v0.11.7</td> 567<td><p>Runtime deprecation.</p></td></tr> 568</tbody></table> 569</details> 570</div> 571<p>Type: End-of-Life</p> 572<p><code>Domain.dispose()</code> has been removed. Recover from failed I/O actions 573explicitly via error event handlers set on the domain instead.</p> 574<h4 id="DEP0013">DEP0013: <code>fs</code> asynchronous function without callback<span><a class="mark" href="#deprecations_dep0013_fs_asynchronous_function_without_callback" id="deprecations_dep0013_fs_asynchronous_function_without_callback">#</a></span></h4> 575<div class="api_metadata"> 576<details class="changelog"><summary>History</summary> 577<table> 578<tbody><tr><th>Version</th><th>Changes</th></tr> 579<tr><td>v10.0.0</td> 580<td><p>End-of-Life.</p></td></tr> 581<tr><td>v7.0.0</td> 582<td><p>Runtime deprecation.</p></td></tr> 583</tbody></table> 584</details> 585</div> 586<p>Type: End-of-Life</p> 587<p>Calling an asynchronous function without a callback throws a <code>TypeError</code> 588in Node.js 10.0.0 onwards. See <a href="https://github.com/nodejs/node/pull/12562">https://github.com/nodejs/node/pull/12562</a>.</p> 589<h4 id="DEP0014">DEP0014: <code>fs.read</code> legacy String interface<span><a class="mark" href="#deprecations_dep0014_fs_read_legacy_string_interface" id="deprecations_dep0014_fs_read_legacy_string_interface">#</a></span></h4> 590<div class="api_metadata"> 591<details class="changelog"><summary>History</summary> 592<table> 593<tbody><tr><th>Version</th><th>Changes</th></tr> 594<tr><td>v8.0.0</td> 595<td><p>End-of-Life.</p></td></tr> 596<tr><td>v6.0.0</td> 597<td><p>Runtime deprecation.</p></td></tr> 598<tr><td>v6.12.0, v4.8.6</td> 599<td><p>A deprecation code has been assigned.</p></td></tr> 600<tr><td>v0.1.96</td> 601<td><p>Documentation-only deprecation.</p></td></tr> 602</tbody></table> 603</details> 604</div> 605<p>Type: End-of-Life</p> 606<p>The <a href="fs.html#fs_fs_read_fd_buffer_offset_length_position_callback"><code>fs.read()</code></a> legacy <code>String</code> interface is deprecated. Use the <code>Buffer</code> 607API as mentioned in the documentation instead.</p> 608<h4 id="DEP0015">DEP0015: <code>fs.readSync</code> legacy String interface<span><a class="mark" href="#deprecations_dep0015_fs_readsync_legacy_string_interface" id="deprecations_dep0015_fs_readsync_legacy_string_interface">#</a></span></h4> 609<div class="api_metadata"> 610<details class="changelog"><summary>History</summary> 611<table> 612<tbody><tr><th>Version</th><th>Changes</th></tr> 613<tr><td>v8.0.0</td> 614<td><p>End-of-Life.</p></td></tr> 615<tr><td>v6.0.0</td> 616<td><p>Runtime deprecation.</p></td></tr> 617<tr><td>v6.12.0, v4.8.6</td> 618<td><p>A deprecation code has been assigned.</p></td></tr> 619<tr><td>v0.1.96</td> 620<td><p>Documentation-only deprecation.</p></td></tr> 621</tbody></table> 622</details> 623</div> 624<p>Type: End-of-Life</p> 625<p>The <a href="fs.html#fs_fs_readsync_fd_buffer_offset_length_position"><code>fs.readSync()</code></a> legacy <code>String</code> interface is deprecated. Use the 626<code>Buffer</code> API as mentioned in the documentation instead.</p> 627<h4 id="DEP0016">DEP0016: <code>GLOBAL</code>/<code>root</code><span><a class="mark" href="#deprecations_dep0016_global_root" id="deprecations_dep0016_global_root">#</a></span></h4> 628<div class="api_metadata"> 629<details class="changelog"><summary>History</summary> 630<table> 631<tbody><tr><th>Version</th><th>Changes</th></tr> 632<tr><td>v14.0.0</td> 633<td><p>End-of-Life.</p></td></tr> 634<tr><td>v6.12.0</td> 635<td><p>A deprecation code has been assigned.</p></td></tr> 636<tr><td>v6.0.0</td> 637<td><p>Runtime deprecation.</p></td></tr> 638</tbody></table> 639</details> 640</div> 641<p>Type: End-of-Life</p> 642<p>The <code>GLOBAL</code> and <code>root</code> aliases for the <code>global</code> property were deprecated 643in Node.js 6.0.0 and have since been removed.</p> 644<h4 id="DEP0017">DEP0017: <code>Intl.v8BreakIterator</code><span><a class="mark" href="#deprecations_dep0017_intl_v8breakiterator" id="deprecations_dep0017_intl_v8breakiterator">#</a></span></h4> 645<div class="api_metadata"> 646<details class="changelog"><summary>History</summary> 647<table> 648<tbody><tr><th>Version</th><th>Changes</th></tr> 649<tr><td>v9.0.0</td> 650<td><p>End-of-Life.</p></td></tr> 651<tr><td>v7.0.0</td> 652<td><p>Runtime deprecation.</p></td></tr> 653</tbody></table> 654</details> 655</div> 656<p>Type: End-of-Life</p> 657<p><code>Intl.v8BreakIterator</code> was a non-standard extension and has been removed. 658See <a href="https://github.com/tc39/proposal-intl-segmenter"><code>Intl.Segmenter</code></a>.</p> 659<h4 id="DEP0018">DEP0018: Unhandled promise rejections<span><a class="mark" href="#deprecations_dep0018_unhandled_promise_rejections" id="deprecations_dep0018_unhandled_promise_rejections">#</a></span></h4> 660<div class="api_metadata"> 661<details class="changelog"><summary>History</summary> 662<table> 663<tbody><tr><th>Version</th><th>Changes</th></tr> 664<tr><td>v7.0.0</td> 665<td><p>Runtime deprecation.</p></td></tr> 666</tbody></table> 667</details> 668</div> 669<p>Type: Runtime</p> 670<p>Unhandled promise rejections are deprecated. In the future, promise rejections 671that are not handled will terminate the Node.js process with a non-zero exit 672code.</p> 673<h4 id="DEP0019">DEP0019: <code>require('.')</code> resolved outside directory<span><a class="mark" href="#deprecations_dep0019_require_resolved_outside_directory" id="deprecations_dep0019_require_resolved_outside_directory">#</a></span></h4> 674<div class="api_metadata"> 675<details class="changelog"><summary>History</summary> 676<table> 677<tbody><tr><th>Version</th><th>Changes</th></tr> 678<tr><td>v12.0.0</td> 679<td><p>Removed functionality.</p></td></tr> 680<tr><td>v6.12.0, v4.8.6</td> 681<td><p>A deprecation code has been assigned.</p></td></tr> 682<tr><td>v1.8.1</td> 683<td><p>Runtime deprecation.</p></td></tr> 684</tbody></table> 685</details> 686</div> 687<p>Type: End-of-Life</p> 688<p>In certain cases, <code>require('.')</code> could resolve outside the package directory. 689This behavior has been removed.</p> 690<h4 id="DEP0020">DEP0020: <code>Server.connections</code><span><a class="mark" href="#deprecations_dep0020_server_connections" id="deprecations_dep0020_server_connections">#</a></span></h4> 691<div class="api_metadata"> 692<details class="changelog"><summary>History</summary> 693<table> 694<tbody><tr><th>Version</th><th>Changes</th></tr> 695<tr><td>v6.12.0, v4.8.6</td> 696<td><p>A deprecation code has been assigned.</p></td></tr> 697<tr><td>v0.9.7</td> 698<td><p>Runtime deprecation.</p></td></tr> 699</tbody></table> 700</details> 701</div> 702<p>Type: Runtime</p> 703<p>The <a href="net.html#net_server_connections"><code>Server.connections</code></a> property is deprecated. Please use the 704<a href="net.html#net_server_getconnections_callback"><code>Server.getConnections()</code></a> method instead.</p> 705<h4 id="DEP0021">DEP0021: <code>Server.listenFD</code><span><a class="mark" href="#deprecations_dep0021_server_listenfd" id="deprecations_dep0021_server_listenfd">#</a></span></h4> 706<div class="api_metadata"> 707<details class="changelog"><summary>History</summary> 708<table> 709<tbody><tr><th>Version</th><th>Changes</th></tr> 710<tr><td>v12.0.0</td> 711<td><p>End-of-Life.</p></td></tr> 712<tr><td>v6.12.0, v4.8.6</td> 713<td><p>A deprecation code has been assigned.</p></td></tr> 714<tr><td>v0.7.12</td> 715<td><p>Runtime deprecation.</p></td></tr> 716</tbody></table> 717</details> 718</div> 719<p>Type: End-of-Life</p> 720<p>The <code>Server.listenFD()</code> method was deprecated and removed. Please use 721<a href="net.html#net_server_listen_handle_backlog_callback"><code>Server.listen({fd: <number>})</code></a> instead.</p> 722<h4 id="DEP0022">DEP0022: <code>os.tmpDir()</code><span><a class="mark" href="#deprecations_dep0022_os_tmpdir" id="deprecations_dep0022_os_tmpdir">#</a></span></h4> 723<div class="api_metadata"> 724<details class="changelog"><summary>History</summary> 725<table> 726<tbody><tr><th>Version</th><th>Changes</th></tr> 727<tr><td>v14.0.0</td> 728<td><p>End-of-Life.</p></td></tr> 729<tr><td>v7.0.0</td> 730<td><p>Runtime deprecation.</p></td></tr> 731</tbody></table> 732</details> 733</div> 734<p>Type: End-of-Life</p> 735<p>The <code>os.tmpDir()</code> API was deprecated in Node.js 7.0.0 and has since been 736removed. Please use <a href="os.html#os_os_tmpdir"><code>os.tmpdir()</code></a> instead.</p> 737<h4 id="DEP0023">DEP0023: <code>os.getNetworkInterfaces()</code><span><a class="mark" href="#deprecations_dep0023_os_getnetworkinterfaces" id="deprecations_dep0023_os_getnetworkinterfaces">#</a></span></h4> 738<div class="api_metadata"> 739<details class="changelog"><summary>History</summary> 740<table> 741<tbody><tr><th>Version</th><th>Changes</th></tr> 742<tr><td>v12.0.0</td> 743<td><p>End-of-Life.</p></td></tr> 744<tr><td>v6.12.0, v4.8.6</td> 745<td><p>A deprecation code has been assigned.</p></td></tr> 746<tr><td>v0.6.0</td> 747<td><p>Runtime deprecation.</p></td></tr> 748</tbody></table> 749</details> 750</div> 751<p>Type: End-of-Life</p> 752<p>The <code>os.getNetworkInterfaces()</code> method is deprecated. Please use the 753<a href="os.html#os_os_networkinterfaces"><code>os.networkInterfaces()</code></a> method instead.</p> 754<h4 id="DEP0024">DEP0024: <code>REPLServer.prototype.convertToContext()</code><span><a class="mark" href="#deprecations_dep0024_replserver_prototype_converttocontext" id="deprecations_dep0024_replserver_prototype_converttocontext">#</a></span></h4> 755<div class="api_metadata"> 756<details class="changelog"><summary>History</summary> 757<table> 758<tbody><tr><th>Version</th><th>Changes</th></tr> 759<tr><td>v9.0.0</td> 760<td><p>End-of-Life.</p></td></tr> 761<tr><td>v7.0.0</td> 762<td><p>Runtime deprecation.</p></td></tr> 763</tbody></table> 764</details> 765</div> 766<p>Type: End-of-Life</p> 767<p>The <code>REPLServer.prototype.convertToContext()</code> API has been removed.</p> 768<h4 id="DEP0025">DEP0025: <code>require('sys')</code><span><a class="mark" href="#deprecations_dep0025_require_sys" id="deprecations_dep0025_require_sys">#</a></span></h4> 769<div class="api_metadata"> 770<details class="changelog"><summary>History</summary> 771<table> 772<tbody><tr><th>Version</th><th>Changes</th></tr> 773<tr><td>v6.12.0, v4.8.6</td> 774<td><p>A deprecation code has been assigned.</p></td></tr> 775<tr><td>v1.0.0</td> 776<td><p>Runtime deprecation.</p></td></tr> 777</tbody></table> 778</details> 779</div> 780<p>Type: Runtime</p> 781<p>The <code>sys</code> module is deprecated. Please use the <a href="util.html"><code>util</code></a> module instead.</p> 782<h4 id="DEP0026">DEP0026: <code>util.print()</code><span><a class="mark" href="#deprecations_dep0026_util_print" id="deprecations_dep0026_util_print">#</a></span></h4> 783<div class="api_metadata"> 784<details class="changelog"><summary>History</summary> 785<table> 786<tbody><tr><th>Version</th><th>Changes</th></tr> 787<tr><td>v12.0.0</td> 788<td><p>End-of-Life.</p></td></tr> 789<tr><td>v6.12.0, v4.8.6</td> 790<td><p>A deprecation code has been assigned.</p></td></tr> 791<tr><td>v0.11.3</td> 792<td><p>Runtime deprecation.</p></td></tr> 793</tbody></table> 794</details> 795</div> 796<p>Type: End-of-Life</p> 797<p><code>util.print()</code> has been removed. Please use <a href="console.html#console_console_log_data_args"><code>console.log()</code></a> instead.</p> 798<h4 id="DEP0027">DEP0027: <code>util.puts()</code><span><a class="mark" href="#deprecations_dep0027_util_puts" id="deprecations_dep0027_util_puts">#</a></span></h4> 799<div class="api_metadata"> 800<details class="changelog"><summary>History</summary> 801<table> 802<tbody><tr><th>Version</th><th>Changes</th></tr> 803<tr><td>v12.0.0</td> 804<td><p>End-of-Life.</p></td></tr> 805<tr><td>v6.12.0, v4.8.6</td> 806<td><p>A deprecation code has been assigned.</p></td></tr> 807<tr><td>v0.11.3</td> 808<td><p>Runtime deprecation.</p></td></tr> 809</tbody></table> 810</details> 811</div> 812<p>Type: End-of-Life</p> 813<p><code>util.puts()</code> has been removed. Please use <a href="console.html#console_console_log_data_args"><code>console.log()</code></a> instead.</p> 814<h4 id="DEP0028">DEP0028: <code>util.debug()</code><span><a class="mark" href="#deprecations_dep0028_util_debug" id="deprecations_dep0028_util_debug">#</a></span></h4> 815<div class="api_metadata"> 816<details class="changelog"><summary>History</summary> 817<table> 818<tbody><tr><th>Version</th><th>Changes</th></tr> 819<tr><td>v12.0.0</td> 820<td><p>End-of-Life.</p></td></tr> 821<tr><td>v6.12.0, v4.8.6</td> 822<td><p>A deprecation code has been assigned.</p></td></tr> 823<tr><td>v0.11.3</td> 824<td><p>Runtime deprecation.</p></td></tr> 825</tbody></table> 826</details> 827</div> 828<p>Type: End-of-Life</p> 829<p><code>util.debug()</code> has been removed. Please use <a href="console.html#console_console_error_data_args"><code>console.error()</code></a> instead.</p> 830<h4 id="DEP0029">DEP0029: <code>util.error()</code><span><a class="mark" href="#deprecations_dep0029_util_error" id="deprecations_dep0029_util_error">#</a></span></h4> 831<div class="api_metadata"> 832<details class="changelog"><summary>History</summary> 833<table> 834<tbody><tr><th>Version</th><th>Changes</th></tr> 835<tr><td>v12.0.0</td> 836<td><p>End-of-Life.</p></td></tr> 837<tr><td>v6.12.0, v4.8.6</td> 838<td><p>A deprecation code has been assigned.</p></td></tr> 839<tr><td>v0.11.3</td> 840<td><p>Runtime deprecation.</p></td></tr> 841</tbody></table> 842</details> 843</div> 844<p>Type: End-of-Life</p> 845<p><code>util.error()</code> has been removed. Please use <a href="console.html#console_console_error_data_args"><code>console.error()</code></a> instead.</p> 846<h4 id="DEP0030">DEP0030: <code>SlowBuffer</code><span><a class="mark" href="#deprecations_dep0030_slowbuffer" id="deprecations_dep0030_slowbuffer">#</a></span></h4> 847<div class="api_metadata"> 848<details class="changelog"><summary>History</summary> 849<table> 850<tbody><tr><th>Version</th><th>Changes</th></tr> 851<tr><td>v6.12.0</td> 852<td><p>A deprecation code has been assigned.</p></td></tr> 853<tr><td>v6.0.0</td> 854<td><p>Documentation-only deprecation.</p></td></tr> 855</tbody></table> 856</details> 857</div> 858<p>Type: Documentation-only</p> 859<p>The <a href="buffer.html#buffer_class_slowbuffer"><code>SlowBuffer</code></a> class is deprecated. Please use 860<a href="buffer.html#buffer_static_method_buffer_allocunsafeslow_size"><code>Buffer.allocUnsafeSlow(size)</code></a> instead.</p> 861<h4 id="DEP0031">DEP0031: <code>ecdh.setPublicKey()</code><span><a class="mark" href="#deprecations_dep0031_ecdh_setpublickey" id="deprecations_dep0031_ecdh_setpublickey">#</a></span></h4> 862<div class="api_metadata"> 863<details class="changelog"><summary>History</summary> 864<table> 865<tbody><tr><th>Version</th><th>Changes</th></tr> 866<tr><td>v6.12.0</td> 867<td><p>A deprecation code has been assigned.</p></td></tr> 868<tr><td>v5.2.0</td> 869<td><p>Documentation-only deprecation.</p></td></tr> 870</tbody></table> 871</details> 872</div> 873<p>Type: Documentation-only</p> 874<p>The <a href="crypto.html#crypto_ecdh_setpublickey_publickey_encoding"><code>ecdh.setPublicKey()</code></a> method is now deprecated as its inclusion in the 875API is not useful.</p> 876<h4 id="DEP0032">DEP0032: <code>domain</code> module<span><a class="mark" href="#deprecations_dep0032_domain_module" id="deprecations_dep0032_domain_module">#</a></span></h4> 877<div class="api_metadata"> 878<details class="changelog"><summary>History</summary> 879<table> 880<tbody><tr><th>Version</th><th>Changes</th></tr> 881<tr><td>v6.12.0, v4.8.6</td> 882<td><p>A deprecation code has been assigned.</p></td></tr> 883<tr><td>v1.4.2</td> 884<td><p>Documentation-only deprecation.</p></td></tr> 885</tbody></table> 886</details> 887</div> 888<p>Type: Documentation-only</p> 889<p>The <a href="domain.html"><code>domain</code></a> module is deprecated and should not be used.</p> 890<h4 id="DEP0033">DEP0033: <code>EventEmitter.listenerCount()</code><span><a class="mark" href="#deprecations_dep0033_eventemitter_listenercount" id="deprecations_dep0033_eventemitter_listenercount">#</a></span></h4> 891<div class="api_metadata"> 892<details class="changelog"><summary>History</summary> 893<table> 894<tbody><tr><th>Version</th><th>Changes</th></tr> 895<tr><td>v6.12.0, v4.8.6</td> 896<td><p>A deprecation code has been assigned.</p></td></tr> 897<tr><td>v3.2.0</td> 898<td><p>Documentation-only deprecation.</p></td></tr> 899</tbody></table> 900</details> 901</div> 902<p>Type: Documentation-only</p> 903<p>The <a href="events.html#events_events_listenercount_emitter_eventname"><code>events.listenerCount(emitter, eventName)</code></a> API is 904deprecated. Please use <a href="events.html#events_emitter_listenercount_eventname"><code>emitter.listenerCount(eventName)</code></a> instead.</p> 905<h4 id="DEP0034">DEP0034: <code>fs.exists(path, callback)</code><span><a class="mark" href="#deprecations_dep0034_fs_exists_path_callback" id="deprecations_dep0034_fs_exists_path_callback">#</a></span></h4> 906<div class="api_metadata"> 907<details class="changelog"><summary>History</summary> 908<table> 909<tbody><tr><th>Version</th><th>Changes</th></tr> 910<tr><td>v6.12.0, v4.8.6</td> 911<td><p>A deprecation code has been assigned.</p></td></tr> 912<tr><td>v1.0.0</td> 913<td><p>Documentation-only deprecation.</p></td></tr> 914</tbody></table> 915</details> 916</div> 917<p>Type: Documentation-only</p> 918<p>The <a href="fs.html#fs_fs_exists_path_callback"><code>fs.exists(path, callback)</code></a> API is deprecated. Please use 919<a href="fs.html#fs_fs_stat_path_options_callback"><code>fs.stat()</code></a> or <a href="fs.html#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</p> 920<h4 id="DEP0035">DEP0035: <code>fs.lchmod(path, mode, callback)</code><span><a class="mark" href="#deprecations_dep0035_fs_lchmod_path_mode_callback" id="deprecations_dep0035_fs_lchmod_path_mode_callback">#</a></span></h4> 921<div class="api_metadata"> 922<details class="changelog"><summary>History</summary> 923<table> 924<tbody><tr><th>Version</th><th>Changes</th></tr> 925<tr><td>v6.12.0, v4.8.6</td> 926<td><p>A deprecation code has been assigned.</p></td></tr> 927<tr><td>v0.4.7</td> 928<td><p>Documentation-only deprecation.</p></td></tr> 929</tbody></table> 930</details> 931</div> 932<p>Type: Documentation-only</p> 933<p>The <a href="fs.html#fs_fs_lchmod_path_mode_callback"><code>fs.lchmod(path, mode, callback)</code></a> API is deprecated.</p> 934<h4 id="DEP0036">DEP0036: <code>fs.lchmodSync(path, mode)</code><span><a class="mark" href="#deprecations_dep0036_fs_lchmodsync_path_mode" id="deprecations_dep0036_fs_lchmodsync_path_mode">#</a></span></h4> 935<div class="api_metadata"> 936<details class="changelog"><summary>History</summary> 937<table> 938<tbody><tr><th>Version</th><th>Changes</th></tr> 939<tr><td>v6.12.0, v4.8.6</td> 940<td><p>A deprecation code has been assigned.</p></td></tr> 941<tr><td>v0.4.7</td> 942<td><p>Documentation-only deprecation.</p></td></tr> 943</tbody></table> 944</details> 945</div> 946<p>Type: Documentation-only</p> 947<p>The <a href="fs.html#fs_fs_lchmodsync_path_mode"><code>fs.lchmodSync(path, mode)</code></a> API is deprecated.</p> 948<h4 id="DEP0037">DEP0037: <code>fs.lchown(path, uid, gid, callback)</code><span><a class="mark" href="#deprecations_dep0037_fs_lchown_path_uid_gid_callback" id="deprecations_dep0037_fs_lchown_path_uid_gid_callback">#</a></span></h4> 949<div class="api_metadata"> 950<details class="changelog"><summary>History</summary> 951<table> 952<tbody><tr><th>Version</th><th>Changes</th></tr> 953<tr><td>v10.6.0</td> 954<td><p>Deprecation revoked.</p></td></tr> 955<tr><td>v6.12.0, v4.8.6</td> 956<td><p>A deprecation code has been assigned.</p></td></tr> 957<tr><td>v0.4.7</td> 958<td><p>Documentation-only deprecation.</p></td></tr> 959</tbody></table> 960</details> 961</div> 962<p>Type: Deprecation revoked</p> 963<p>The <a href="fs.html#fs_fs_lchown_path_uid_gid_callback"><code>fs.lchown(path, uid, gid, callback)</code></a> API was deprecated. The 964deprecation was revoked because the requisite supporting APIs were added in 965libuv.</p> 966<h4 id="DEP0038">DEP0038: <code>fs.lchownSync(path, uid, gid)</code><span><a class="mark" href="#deprecations_dep0038_fs_lchownsync_path_uid_gid" id="deprecations_dep0038_fs_lchownsync_path_uid_gid">#</a></span></h4> 967<div class="api_metadata"> 968<details class="changelog"><summary>History</summary> 969<table> 970<tbody><tr><th>Version</th><th>Changes</th></tr> 971<tr><td>v10.6.0</td> 972<td><p>Deprecation revoked.</p></td></tr> 973<tr><td>v6.12.0, v4.8.6</td> 974<td><p>A deprecation code has been assigned.</p></td></tr> 975<tr><td>v0.4.7</td> 976<td><p>Documentation-only deprecation.</p></td></tr> 977</tbody></table> 978</details> 979</div> 980<p>Type: Deprecation revoked</p> 981<p>The <a href="fs.html#fs_fs_lchownsync_path_uid_gid"><code>fs.lchownSync(path, uid, gid)</code></a> API was deprecated. The deprecation was 982revoked because the requisite supporting APIs were added in libuv.</p> 983<h4 id="DEP0039">DEP0039: <code>require.extensions</code><span><a class="mark" href="#deprecations_dep0039_require_extensions" id="deprecations_dep0039_require_extensions">#</a></span></h4> 984<div class="api_metadata"> 985<details class="changelog"><summary>History</summary> 986<table> 987<tbody><tr><th>Version</th><th>Changes</th></tr> 988<tr><td>v6.12.0, v4.8.6</td> 989<td><p>A deprecation code has been assigned.</p></td></tr> 990<tr><td>v0.10.6</td> 991<td><p>Documentation-only deprecation.</p></td></tr> 992</tbody></table> 993</details> 994</div> 995<p>Type: Documentation-only</p> 996<p>The <a href="modules.html#modules_require_extensions"><code>require.extensions</code></a> property is deprecated.</p> 997<h4 id="DEP0040">DEP0040: <code>punycode</code> module<span><a class="mark" href="#deprecations_dep0040_punycode_module" id="deprecations_dep0040_punycode_module">#</a></span></h4> 998<div class="api_metadata"> 999<details class="changelog"><summary>History</summary> 1000<table> 1001<tbody><tr><th>Version</th><th>Changes</th></tr> 1002<tr><td>v7.0.0</td> 1003<td><p>Documentation-only deprecation.</p></td></tr> 1004</tbody></table> 1005</details> 1006</div> 1007<p>Type: Documentation-only</p> 1008<p>The <a href="punycode.html"><code>punycode</code></a> module is deprecated. Please use a userland alternative 1009instead.</p> 1010<h4 id="DEP0041">DEP0041: <code>NODE_REPL_HISTORY_FILE</code> environment variable<span><a class="mark" href="#deprecations_dep0041_node_repl_history_file_environment_variable" id="deprecations_dep0041_node_repl_history_file_environment_variable">#</a></span></h4> 1011<div class="api_metadata"> 1012<details class="changelog"><summary>History</summary> 1013<table> 1014<tbody><tr><th>Version</th><th>Changes</th></tr> 1015<tr><td>v10.0.0</td> 1016<td><p>End-of-Life.</p></td></tr> 1017<tr><td>v6.12.0, v4.8.6</td> 1018<td><p>A deprecation code has been assigned.</p></td></tr> 1019<tr><td>v3.0.0</td> 1020<td><p>Documentation-only deprecation.</p></td></tr> 1021</tbody></table> 1022</details> 1023</div> 1024<p>Type: End-of-Life</p> 1025<p>The <code>NODE_REPL_HISTORY_FILE</code> environment variable was removed. Please use 1026<code>NODE_REPL_HISTORY</code> instead.</p> 1027<h4 id="DEP0042">DEP0042: <code>tls.CryptoStream</code><span><a class="mark" href="#deprecations_dep0042_tls_cryptostream" id="deprecations_dep0042_tls_cryptostream">#</a></span></h4> 1028<div class="api_metadata"> 1029<details class="changelog"><summary>History</summary> 1030<table> 1031<tbody><tr><th>Version</th><th>Changes</th></tr> 1032<tr><td>v10.0.0</td> 1033<td><p>End-of-Life.</p></td></tr> 1034<tr><td>v6.12.0, v4.8.6</td> 1035<td><p>A deprecation code has been assigned.</p></td></tr> 1036<tr><td>v0.11.3</td> 1037<td><p>Documentation-only deprecation.</p></td></tr> 1038</tbody></table> 1039</details> 1040</div> 1041<p>Type: End-of-Life</p> 1042<p>The <a href="tls.html#tls_class_tls_cryptostream"><code>tls.CryptoStream</code></a> class was removed. Please use 1043<a href="tls.html#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</p> 1044<h4 id="DEP0043">DEP0043: <code>tls.SecurePair</code><span><a class="mark" href="#deprecations_dep0043_tls_securepair" id="deprecations_dep0043_tls_securepair">#</a></span></h4> 1045<div class="api_metadata"> 1046<details class="changelog"><summary>History</summary> 1047<table> 1048<tbody><tr><th>Version</th><th>Changes</th></tr> 1049<tr><td>v8.0.0</td> 1050<td><p>Runtime deprecation.</p></td></tr> 1051<tr><td>v6.12.0</td> 1052<td><p>A deprecation code has been assigned.</p></td></tr> 1053<tr><td>v6.0.0</td> 1054<td><p>Documentation-only deprecation.</p></td></tr> 1055<tr><td>v0.11.15</td> 1056<td><p>Deprecation revoked.</p></td></tr> 1057<tr><td>v0.11.3</td> 1058<td><p>Runtime deprecation.</p></td></tr> 1059</tbody></table> 1060</details> 1061</div> 1062<p>Type: Documentation-only</p> 1063<p>The <a href="tls.html#tls_class_tls_securepair"><code>tls.SecurePair</code></a> class is deprecated. Please use 1064<a href="tls.html#tls_class_tls_tlssocket"><code>tls.TLSSocket</code></a> instead.</p> 1065<h4 id="DEP0044">DEP0044: <code>util.isArray()</code><span><a class="mark" href="#deprecations_dep0044_util_isarray" id="deprecations_dep0044_util_isarray">#</a></span></h4> 1066<div class="api_metadata"> 1067<details class="changelog"><summary>History</summary> 1068<table> 1069<tbody><tr><th>Version</th><th>Changes</th></tr> 1070<tr><td>v6.12.0, v4.8.6</td> 1071<td><p>A deprecation code has been assigned.</p></td></tr> 1072<tr><td>v4.0.0, v3.3.1</td> 1073<td><p>Documentation-only deprecation.</p></td></tr> 1074</tbody></table> 1075</details> 1076</div> 1077<p>Type: Documentation-only</p> 1078<p>The <a href="util.html#util_util_isarray_object"><code>util.isArray()</code></a> API is deprecated. Please use <code>Array.isArray()</code> 1079instead.</p> 1080<h4 id="DEP0045">DEP0045: <code>util.isBoolean()</code><span><a class="mark" href="#deprecations_dep0045_util_isboolean" id="deprecations_dep0045_util_isboolean">#</a></span></h4> 1081<div class="api_metadata"> 1082<details class="changelog"><summary>History</summary> 1083<table> 1084<tbody><tr><th>Version</th><th>Changes</th></tr> 1085<tr><td>v6.12.0, v4.8.6</td> 1086<td><p>A deprecation code has been assigned.</p></td></tr> 1087<tr><td>v4.0.0, v3.3.1</td> 1088<td><p>Documentation-only deprecation.</p></td></tr> 1089</tbody></table> 1090</details> 1091</div> 1092<p>Type: Documentation-only</p> 1093<p>The <a href="util.html#util_util_isboolean_object"><code>util.isBoolean()</code></a> API is deprecated.</p> 1094<h4 id="DEP0046">DEP0046: <code>util.isBuffer()</code><span><a class="mark" href="#deprecations_dep0046_util_isbuffer" id="deprecations_dep0046_util_isbuffer">#</a></span></h4> 1095<div class="api_metadata"> 1096<details class="changelog"><summary>History</summary> 1097<table> 1098<tbody><tr><th>Version</th><th>Changes</th></tr> 1099<tr><td>v6.12.0, v4.8.6</td> 1100<td><p>A deprecation code has been assigned.</p></td></tr> 1101<tr><td>v4.0.0, v3.3.1</td> 1102<td><p>Documentation-only deprecation.</p></td></tr> 1103</tbody></table> 1104</details> 1105</div> 1106<p>Type: Documentation-only</p> 1107<p>The <a href="util.html#util_util_isbuffer_object"><code>util.isBuffer()</code></a> API is deprecated. Please use 1108<a href="buffer.html#buffer_static_method_buffer_isbuffer_obj"><code>Buffer.isBuffer()</code></a> instead.</p> 1109<h4 id="DEP0047">DEP0047: <code>util.isDate()</code><span><a class="mark" href="#deprecations_dep0047_util_isdate" id="deprecations_dep0047_util_isdate">#</a></span></h4> 1110<div class="api_metadata"> 1111<details class="changelog"><summary>History</summary> 1112<table> 1113<tbody><tr><th>Version</th><th>Changes</th></tr> 1114<tr><td>v6.12.0, v4.8.6</td> 1115<td><p>A deprecation code has been assigned.</p></td></tr> 1116<tr><td>v4.0.0, v3.3.1</td> 1117<td><p>Documentation-only deprecation.</p></td></tr> 1118</tbody></table> 1119</details> 1120</div> 1121<p>Type: Documentation-only</p> 1122<p>The <a href="util.html#util_util_isdate_object"><code>util.isDate()</code></a> API is deprecated.</p> 1123<h4 id="DEP0048">DEP0048: <code>util.isError()</code><span><a class="mark" href="#deprecations_dep0048_util_iserror" id="deprecations_dep0048_util_iserror">#</a></span></h4> 1124<div class="api_metadata"> 1125<details class="changelog"><summary>History</summary> 1126<table> 1127<tbody><tr><th>Version</th><th>Changes</th></tr> 1128<tr><td>v6.12.0, v4.8.6</td> 1129<td><p>A deprecation code has been assigned.</p></td></tr> 1130<tr><td>v4.0.0, v3.3.1</td> 1131<td><p>Documentation-only deprecation.</p></td></tr> 1132</tbody></table> 1133</details> 1134</div> 1135<p>Type: Documentation-only</p> 1136<p>The <a href="util.html#util_util_iserror_object"><code>util.isError()</code></a> API is deprecated.</p> 1137<h4 id="DEP0049">DEP0049: <code>util.isFunction()</code><span><a class="mark" href="#deprecations_dep0049_util_isfunction" id="deprecations_dep0049_util_isfunction">#</a></span></h4> 1138<div class="api_metadata"> 1139<details class="changelog"><summary>History</summary> 1140<table> 1141<tbody><tr><th>Version</th><th>Changes</th></tr> 1142<tr><td>v6.12.0, v4.8.6</td> 1143<td><p>A deprecation code has been assigned.</p></td></tr> 1144<tr><td>v4.0.0, v3.3.1</td> 1145<td><p>Documentation-only deprecation.</p></td></tr> 1146</tbody></table> 1147</details> 1148</div> 1149<p>Type: Documentation-only</p> 1150<p>The <a href="util.html#util_util_isfunction_object"><code>util.isFunction()</code></a> API is deprecated.</p> 1151<h4 id="DEP0050">DEP0050: <code>util.isNull()</code><span><a class="mark" href="#deprecations_dep0050_util_isnull" id="deprecations_dep0050_util_isnull">#</a></span></h4> 1152<div class="api_metadata"> 1153<details class="changelog"><summary>History</summary> 1154<table> 1155<tbody><tr><th>Version</th><th>Changes</th></tr> 1156<tr><td>v6.12.0, v4.8.6</td> 1157<td><p>A deprecation code has been assigned.</p></td></tr> 1158<tr><td>v4.0.0, v3.3.1</td> 1159<td><p>Documentation-only deprecation.</p></td></tr> 1160</tbody></table> 1161</details> 1162</div> 1163<p>Type: Documentation-only</p> 1164<p>The <a href="util.html#util_util_isnull_object"><code>util.isNull()</code></a> API is deprecated.</p> 1165<h4 id="DEP0051">DEP0051: <code>util.isNullOrUndefined()</code><span><a class="mark" href="#deprecations_dep0051_util_isnullorundefined" id="deprecations_dep0051_util_isnullorundefined">#</a></span></h4> 1166<div class="api_metadata"> 1167<details class="changelog"><summary>History</summary> 1168<table> 1169<tbody><tr><th>Version</th><th>Changes</th></tr> 1170<tr><td>v6.12.0, v4.8.6</td> 1171<td><p>A deprecation code has been assigned.</p></td></tr> 1172<tr><td>v4.0.0, v3.3.1</td> 1173<td><p>Documentation-only deprecation.</p></td></tr> 1174</tbody></table> 1175</details> 1176</div> 1177<p>Type: Documentation-only</p> 1178<p>The <a href="util.html#util_util_isnullorundefined_object"><code>util.isNullOrUndefined()</code></a> API is deprecated.</p> 1179<h4 id="DEP0052">DEP0052: <code>util.isNumber()</code><span><a class="mark" href="#deprecations_dep0052_util_isnumber" id="deprecations_dep0052_util_isnumber">#</a></span></h4> 1180<div class="api_metadata"> 1181<details class="changelog"><summary>History</summary> 1182<table> 1183<tbody><tr><th>Version</th><th>Changes</th></tr> 1184<tr><td>v6.12.0, v4.8.6</td> 1185<td><p>A deprecation code has been assigned.</p></td></tr> 1186<tr><td>v4.0.0, v3.3.1</td> 1187<td><p>Documentation-only deprecation.</p></td></tr> 1188</tbody></table> 1189</details> 1190</div> 1191<p>Type: Documentation-only</p> 1192<p>The <a href="util.html#util_util_isnumber_object"><code>util.isNumber()</code></a> API is deprecated.</p> 1193<h4 id="DEP0053">DEP0053: <code>util.isObject()</code><span><a class="mark" href="#deprecations_dep0053_util_isobject" id="deprecations_dep0053_util_isobject">#</a></span></h4> 1194<div class="api_metadata"> 1195<details class="changelog"><summary>History</summary> 1196<table> 1197<tbody><tr><th>Version</th><th>Changes</th></tr> 1198<tr><td>v6.12.0, v4.8.6</td> 1199<td><p>A deprecation code has been assigned.</p></td></tr> 1200<tr><td>v4.0.0, v3.3.1</td> 1201<td><p>Documentation-only deprecation.</p></td></tr> 1202</tbody></table> 1203</details> 1204</div> 1205<p>Type: Documentation-only</p> 1206<p>The <a href="util.html#util_util_isobject_object"><code>util.isObject()</code></a> API is deprecated.</p> 1207<h4 id="DEP0054">DEP0054: <code>util.isPrimitive()</code><span><a class="mark" href="#deprecations_dep0054_util_isprimitive" id="deprecations_dep0054_util_isprimitive">#</a></span></h4> 1208<div class="api_metadata"> 1209<details class="changelog"><summary>History</summary> 1210<table> 1211<tbody><tr><th>Version</th><th>Changes</th></tr> 1212<tr><td>v6.12.0, v4.8.6</td> 1213<td><p>A deprecation code has been assigned.</p></td></tr> 1214<tr><td>v4.0.0, v3.3.1</td> 1215<td><p>Documentation-only deprecation.</p></td></tr> 1216</tbody></table> 1217</details> 1218</div> 1219<p>Type: Documentation-only</p> 1220<p>The <a href="util.html#util_util_isprimitive_object"><code>util.isPrimitive()</code></a> API is deprecated.</p> 1221<h4 id="DEP0055">DEP0055: <code>util.isRegExp()</code><span><a class="mark" href="#deprecations_dep0055_util_isregexp" id="deprecations_dep0055_util_isregexp">#</a></span></h4> 1222<div class="api_metadata"> 1223<details class="changelog"><summary>History</summary> 1224<table> 1225<tbody><tr><th>Version</th><th>Changes</th></tr> 1226<tr><td>v6.12.0, v4.8.6</td> 1227<td><p>A deprecation code has been assigned.</p></td></tr> 1228<tr><td>v4.0.0, v3.3.1</td> 1229<td><p>Documentation-only deprecation.</p></td></tr> 1230</tbody></table> 1231</details> 1232</div> 1233<p>Type: Documentation-only</p> 1234<p>The <a href="util.html#util_util_isregexp_object"><code>util.isRegExp()</code></a> API is deprecated.</p> 1235<h4 id="DEP0056">DEP0056: <code>util.isString()</code><span><a class="mark" href="#deprecations_dep0056_util_isstring" id="deprecations_dep0056_util_isstring">#</a></span></h4> 1236<div class="api_metadata"> 1237<details class="changelog"><summary>History</summary> 1238<table> 1239<tbody><tr><th>Version</th><th>Changes</th></tr> 1240<tr><td>v6.12.0, v4.8.6</td> 1241<td><p>A deprecation code has been assigned.</p></td></tr> 1242<tr><td>v4.0.0, v3.3.1</td> 1243<td><p>Documentation-only deprecation.</p></td></tr> 1244</tbody></table> 1245</details> 1246</div> 1247<p>Type: Documentation-only</p> 1248<p>The <a href="util.html#util_util_isstring_object"><code>util.isString()</code></a> API is deprecated.</p> 1249<h4 id="DEP0057">DEP0057: <code>util.isSymbol()</code><span><a class="mark" href="#deprecations_dep0057_util_issymbol" id="deprecations_dep0057_util_issymbol">#</a></span></h4> 1250<div class="api_metadata"> 1251<details class="changelog"><summary>History</summary> 1252<table> 1253<tbody><tr><th>Version</th><th>Changes</th></tr> 1254<tr><td>v6.12.0, v4.8.6</td> 1255<td><p>A deprecation code has been assigned.</p></td></tr> 1256<tr><td>v4.0.0, v3.3.1</td> 1257<td><p>Documentation-only deprecation.</p></td></tr> 1258</tbody></table> 1259</details> 1260</div> 1261<p>Type: Documentation-only</p> 1262<p>The <a href="util.html#util_util_issymbol_object"><code>util.isSymbol()</code></a> API is deprecated.</p> 1263<h4 id="DEP0058">DEP0058: <code>util.isUndefined()</code><span><a class="mark" href="#deprecations_dep0058_util_isundefined" id="deprecations_dep0058_util_isundefined">#</a></span></h4> 1264<div class="api_metadata"> 1265<details class="changelog"><summary>History</summary> 1266<table> 1267<tbody><tr><th>Version</th><th>Changes</th></tr> 1268<tr><td>v6.12.0, v4.8.6</td> 1269<td><p>A deprecation code has been assigned.</p></td></tr> 1270<tr><td>v4.0.0, v3.3.1</td> 1271<td><p>Documentation-only deprecation.</p></td></tr> 1272</tbody></table> 1273</details> 1274</div> 1275<p>Type: Documentation-only</p> 1276<p>The <a href="util.html#util_util_isundefined_object"><code>util.isUndefined()</code></a> API is deprecated.</p> 1277<h4 id="DEP0059">DEP0059: <code>util.log()</code><span><a class="mark" href="#deprecations_dep0059_util_log" id="deprecations_dep0059_util_log">#</a></span></h4> 1278<div class="api_metadata"> 1279<details class="changelog"><summary>History</summary> 1280<table> 1281<tbody><tr><th>Version</th><th>Changes</th></tr> 1282<tr><td>v6.12.0</td> 1283<td><p>A deprecation code has been assigned.</p></td></tr> 1284<tr><td>v6.0.0</td> 1285<td><p>Documentation-only deprecation.</p></td></tr> 1286</tbody></table> 1287</details> 1288</div> 1289<p>Type: Documentation-only</p> 1290<p>The <a href="util.html#util_util_log_string"><code>util.log()</code></a> API is deprecated.</p> 1291<h4 id="DEP0060">DEP0060: <code>util._extend()</code><span><a class="mark" href="#deprecations_dep0060_util_extend" id="deprecations_dep0060_util_extend">#</a></span></h4> 1292<div class="api_metadata"> 1293<details class="changelog"><summary>History</summary> 1294<table> 1295<tbody><tr><th>Version</th><th>Changes</th></tr> 1296<tr><td>v6.12.0</td> 1297<td><p>A deprecation code has been assigned.</p></td></tr> 1298<tr><td>v6.0.0</td> 1299<td><p>Documentation-only deprecation.</p></td></tr> 1300</tbody></table> 1301</details> 1302</div> 1303<p>Type: Documentation-only</p> 1304<p>The <a href="util.html#util_util_extend_target_source"><code>util._extend()</code></a> API is deprecated.</p> 1305<h4 id="DEP0061">DEP0061: <code>fs.SyncWriteStream</code><span><a class="mark" href="#deprecations_dep0061_fs_syncwritestream" id="deprecations_dep0061_fs_syncwritestream">#</a></span></h4> 1306<div class="api_metadata"> 1307<details class="changelog"><summary>History</summary> 1308<table> 1309<tbody><tr><th>Version</th><th>Changes</th></tr> 1310<tr><td>v11.0.0</td> 1311<td><p>End-of-Life.</p></td></tr> 1312<tr><td>v8.0.0</td> 1313<td><p>Runtime deprecation.</p></td></tr> 1314<tr><td>v7.0.0</td> 1315<td><p>Documentation-only deprecation.</p></td></tr> 1316</tbody></table> 1317</details> 1318</div> 1319<p>Type: End-of-Life</p> 1320<p>The <code>fs.SyncWriteStream</code> class was never intended to be a publicly accessible 1321API and has been removed. No alternative API is available. Please use a userland 1322alternative.</p> 1323<h4 id="DEP0062">DEP0062: <code>node --debug</code><span><a class="mark" href="#deprecations_dep0062_node_debug" id="deprecations_dep0062_node_debug">#</a></span></h4> 1324<div class="api_metadata"> 1325<details class="changelog"><summary>History</summary> 1326<table> 1327<tbody><tr><th>Version</th><th>Changes</th></tr> 1328<tr><td>v12.0.0</td> 1329<td><p>End-of-Life.</p></td></tr> 1330<tr><td>v8.0.0</td> 1331<td><p>Runtime deprecation.</p></td></tr> 1332</tbody></table> 1333</details> 1334</div> 1335<p>Type: End-of-Life</p> 1336<p><code>--debug</code> activates the legacy V8 debugger interface, which was removed as 1337of V8 5.8. It is replaced by Inspector which is activated with <code>--inspect</code> 1338instead.</p> 1339<h4 id="DEP0063">DEP0063: <code>ServerResponse.prototype.writeHeader()</code><span><a class="mark" href="#deprecations_dep0063_serverresponse_prototype_writeheader" id="deprecations_dep0063_serverresponse_prototype_writeheader">#</a></span></h4> 1340<div class="api_metadata"> 1341<details class="changelog"><summary>History</summary> 1342<table> 1343<tbody><tr><th>Version</th><th>Changes</th></tr> 1344<tr><td>v8.0.0</td> 1345<td><p>Documentation-only deprecation.</p></td></tr> 1346</tbody></table> 1347</details> 1348</div> 1349<p>Type: Documentation-only</p> 1350<p>The <code>http</code> module <code>ServerResponse.prototype.writeHeader()</code> API is 1351deprecated. Please use <code>ServerResponse.prototype.writeHead()</code> instead.</p> 1352<p>The <code>ServerResponse.prototype.writeHeader()</code> method was never documented as an 1353officially supported API.</p> 1354<h4 id="DEP0064">DEP0064: <code>tls.createSecurePair()</code><span><a class="mark" href="#deprecations_dep0064_tls_createsecurepair" id="deprecations_dep0064_tls_createsecurepair">#</a></span></h4> 1355<div class="api_metadata"> 1356<details class="changelog"><summary>History</summary> 1357<table> 1358<tbody><tr><th>Version</th><th>Changes</th></tr> 1359<tr><td>v8.0.0</td> 1360<td><p>Runtime deprecation.</p></td></tr> 1361<tr><td>v6.12.0</td> 1362<td><p>A deprecation code has been assigned.</p></td></tr> 1363<tr><td>v6.0.0</td> 1364<td><p>Documentation-only deprecation.</p></td></tr> 1365<tr><td>v0.11.15</td> 1366<td><p>Deprecation revoked.</p></td></tr> 1367<tr><td>v0.11.3</td> 1368<td><p>Runtime deprecation.</p></td></tr> 1369</tbody></table> 1370</details> 1371</div> 1372<p>Type: Runtime</p> 1373<p>The <code>tls.createSecurePair()</code> API was deprecated in documentation in Node.js 13740.11.3. Users should use <code>tls.Socket</code> instead.</p> 1375<h4 id="DEP0065">DEP0065: <code>repl.REPL_MODE_MAGIC</code> and <code>NODE_REPL_MODE=magic</code><span><a class="mark" href="#deprecations_dep0065_repl_repl_mode_magic_and_node_repl_mode_magic" id="deprecations_dep0065_repl_repl_mode_magic_and_node_repl_mode_magic">#</a></span></h4> 1376<div class="api_metadata"> 1377<details class="changelog"><summary>History</summary> 1378<table> 1379<tbody><tr><th>Version</th><th>Changes</th></tr> 1380<tr><td>v10.0.0</td> 1381<td><p>End-of-Life.</p></td></tr> 1382<tr><td>v8.0.0</td> 1383<td><p>Documentation-only deprecation.</p></td></tr> 1384</tbody></table> 1385</details> 1386</div> 1387<p>Type: End-of-Life</p> 1388<p>The <code>repl</code> module's <code>REPL_MODE_MAGIC</code> constant, used for <code>replMode</code> option, has 1389been removed. Its behavior has been functionally identical to that of 1390<code>REPL_MODE_SLOPPY</code> since Node.js 6.0.0, when V8 5.0 was imported. Please use 1391<code>REPL_MODE_SLOPPY</code> instead.</p> 1392<p>The <code>NODE_REPL_MODE</code> environment variable is used to set the underlying 1393<code>replMode</code> of an interactive <code>node</code> session. Its value, <code>magic</code>, is also 1394removed. Please use <code>sloppy</code> instead.</p> 1395<h4 id="DEP0066">DEP0066: <code>OutgoingMessage.prototype._headers, OutgoingMessage.prototype._headerNames</code><span><a class="mark" href="#deprecations_dep0066_outgoingmessage_prototype_headers_outgoingmessage_prototype_headernames" id="deprecations_dep0066_outgoingmessage_prototype_headers_outgoingmessage_prototype_headernames">#</a></span></h4> 1396<div class="api_metadata"> 1397<details class="changelog"><summary>History</summary> 1398<table> 1399<tbody><tr><th>Version</th><th>Changes</th></tr> 1400<tr><td>v12.0.0</td> 1401<td><p>Runtime deprecation.</p></td></tr> 1402<tr><td>v8.0.0</td> 1403<td><p>Documentation-only deprecation.</p></td></tr> 1404</tbody></table> 1405</details> 1406</div> 1407<p>Type: Runtime</p> 1408<p>The <code>http</code> module <code>OutgoingMessage.prototype._headers</code> and 1409<code>OutgoingMessage.prototype._headerNames</code> properties are deprecated. Use one of 1410the public methods (e.g. <code>OutgoingMessage.prototype.getHeader()</code>, 1411<code>OutgoingMessage.prototype.getHeaders()</code>, 1412<code>OutgoingMessage.prototype.getHeaderNames()</code>, 1413<code>OutgoingMessage.prototype.getRawHeaderNames()</code>, 1414<code>OutgoingMessage.prototype.hasHeader()</code>, 1415<code>OutgoingMessage.prototype.removeHeader()</code>, 1416<code>OutgoingMessage.prototype.setHeader()</code>) for working with outgoing headers.</p> 1417<p>The <code>OutgoingMessage.prototype._headers</code> and 1418<code>OutgoingMessage.prototype._headerNames</code> properties were never documented as 1419officially supported properties.</p> 1420<h4 id="DEP0067">DEP0067: <code>OutgoingMessage.prototype._renderHeaders</code><span><a class="mark" href="#deprecations_dep0067_outgoingmessage_prototype_renderheaders" id="deprecations_dep0067_outgoingmessage_prototype_renderheaders">#</a></span></h4> 1421<div class="api_metadata"> 1422<details class="changelog"><summary>History</summary> 1423<table> 1424<tbody><tr><th>Version</th><th>Changes</th></tr> 1425<tr><td>v8.0.0</td> 1426<td><p>Documentation-only deprecation.</p></td></tr> 1427</tbody></table> 1428</details> 1429</div> 1430<p>Type: Documentation-only</p> 1431<p>The <code>http</code> module <code>OutgoingMessage.prototype._renderHeaders()</code> API is 1432deprecated.</p> 1433<p>The <code>OutgoingMessage.prototype._renderHeaders</code> property was never documented as 1434an officially supported API.</p> 1435<h4 id="DEP0068">DEP0068: <code>node debug</code><span><a class="mark" href="#deprecations_dep0068_node_debug" id="deprecations_dep0068_node_debug">#</a></span></h4> 1436<div class="api_metadata"> 1437<details class="changelog"><summary>History</summary> 1438<table> 1439<tbody><tr><th>Version</th><th>Changes</th></tr> 1440<tr><td>v8.0.0</td> 1441<td><p>Runtime deprecation.</p></td></tr> 1442</tbody></table> 1443</details> 1444</div> 1445<p>Type: Runtime</p> 1446<p><code>node debug</code> corresponds to the legacy CLI debugger which has been replaced with 1447a V8-inspector based CLI debugger available through <code>node inspect</code>.</p> 1448<h4 id="DEP0069">DEP0069: <code>vm.runInDebugContext(string)</code><span><a class="mark" href="#deprecations_dep0069_vm_runindebugcontext_string" id="deprecations_dep0069_vm_runindebugcontext_string">#</a></span></h4> 1449<div class="api_metadata"> 1450<details class="changelog"><summary>History</summary> 1451<table> 1452<tbody><tr><th>Version</th><th>Changes</th></tr> 1453<tr><td>v10.0.0</td> 1454<td><p>End-of-Life.</p></td></tr> 1455<tr><td>v9.0.0</td> 1456<td><p>Runtime deprecation.</p></td></tr> 1457<tr><td>v8.0.0</td> 1458<td><p>Documentation-only deprecation.</p></td></tr> 1459</tbody></table> 1460</details> 1461</div> 1462<p>Type: End-of-Life</p> 1463<p>DebugContext has been removed in V8 and is not available in Node.js 10+.</p> 1464<p>DebugContext was an experimental API.</p> 1465<h4 id="DEP0070">DEP0070: <code>async_hooks.currentId()</code><span><a class="mark" href="#deprecations_dep0070_async_hooks_currentid" id="deprecations_dep0070_async_hooks_currentid">#</a></span></h4> 1466<div class="api_metadata"> 1467<details class="changelog"><summary>History</summary> 1468<table> 1469<tbody><tr><th>Version</th><th>Changes</th></tr> 1470<tr><td>v9.0.0</td> 1471<td><p>End-of-Life.</p></td></tr> 1472<tr><td>v8.2.0</td> 1473<td><p>Runtime deprecation.</p></td></tr> 1474</tbody></table> 1475</details> 1476</div> 1477<p>Type: End-of-Life</p> 1478<p><code>async_hooks.currentId()</code> was renamed to <code>async_hooks.executionAsyncId()</code> for 1479clarity.</p> 1480<p>This change was made while <code>async_hooks</code> was an experimental API.</p> 1481<h4 id="DEP0071">DEP0071: <code>async_hooks.triggerId()</code><span><a class="mark" href="#deprecations_dep0071_async_hooks_triggerid" id="deprecations_dep0071_async_hooks_triggerid">#</a></span></h4> 1482<div class="api_metadata"> 1483<details class="changelog"><summary>History</summary> 1484<table> 1485<tbody><tr><th>Version</th><th>Changes</th></tr> 1486<tr><td>v9.0.0</td> 1487<td><p>End-of-Life.</p></td></tr> 1488<tr><td>v8.2.0</td> 1489<td><p>Runtime deprecation.</p></td></tr> 1490</tbody></table> 1491</details> 1492</div> 1493<p>Type: End-of-Life</p> 1494<p><code>async_hooks.triggerId()</code> was renamed to <code>async_hooks.triggerAsyncId()</code> for 1495clarity.</p> 1496<p>This change was made while <code>async_hooks</code> was an experimental API.</p> 1497<h4 id="DEP0072">DEP0072: <code>async_hooks.AsyncResource.triggerId()</code><span><a class="mark" href="#deprecations_dep0072_async_hooks_asyncresource_triggerid" id="deprecations_dep0072_async_hooks_asyncresource_triggerid">#</a></span></h4> 1498<div class="api_metadata"> 1499<details class="changelog"><summary>History</summary> 1500<table> 1501<tbody><tr><th>Version</th><th>Changes</th></tr> 1502<tr><td>v9.0.0</td> 1503<td><p>End-of-Life.</p></td></tr> 1504<tr><td>v8.2.0</td> 1505<td><p>Runtime deprecation.</p></td></tr> 1506</tbody></table> 1507</details> 1508</div> 1509<p>Type: End-of-Life</p> 1510<p><code>async_hooks.AsyncResource.triggerId()</code> was renamed to 1511<code>async_hooks.AsyncResource.triggerAsyncId()</code> for clarity.</p> 1512<p>This change was made while <code>async_hooks</code> was an experimental API.</p> 1513<h4 id="DEP0073">DEP0073: Several internal properties of <code>net.Server</code><span><a class="mark" href="#deprecations_dep0073_several_internal_properties_of_net_server" id="deprecations_dep0073_several_internal_properties_of_net_server">#</a></span></h4> 1514<div class="api_metadata"> 1515<details class="changelog"><summary>History</summary> 1516<table> 1517<tbody><tr><th>Version</th><th>Changes</th></tr> 1518<tr><td>v10.0.0</td> 1519<td><p>End-of-Life.</p></td></tr> 1520<tr><td>v9.0.0</td> 1521<td><p>Runtime deprecation.</p></td></tr> 1522</tbody></table> 1523</details> 1524</div> 1525<p>Type: End-of-Life</p> 1526<p>Accessing several internal, undocumented properties of <code>net.Server</code> instances 1527with inappropriate names is deprecated.</p> 1528<p>As the original API was undocumented and not generally useful for non-internal 1529code, no replacement API is provided.</p> 1530<h4 id="DEP0074">DEP0074: <code>REPLServer.bufferedCommand</code><span><a class="mark" href="#deprecations_dep0074_replserver_bufferedcommand" id="deprecations_dep0074_replserver_bufferedcommand">#</a></span></h4> 1531<div class="api_metadata"> 1532<details class="changelog"><summary>History</summary> 1533<table> 1534<tbody><tr><th>Version</th><th>Changes</th></tr> 1535<tr><td>v9.0.0</td> 1536<td><p>Runtime deprecation.</p></td></tr> 1537</tbody></table> 1538</details> 1539</div> 1540<p>Type: Runtime</p> 1541<p>The <code>REPLServer.bufferedCommand</code> property was deprecated in favor of 1542<a href="repl.html#repl_replserver_clearbufferedcommand"><code>REPLServer.clearBufferedCommand()</code></a>.</p> 1543<h4 id="DEP0075">DEP0075: <code>REPLServer.parseREPLKeyword()</code><span><a class="mark" href="#deprecations_dep0075_replserver_parsereplkeyword" id="deprecations_dep0075_replserver_parsereplkeyword">#</a></span></h4> 1544<div class="api_metadata"> 1545<details class="changelog"><summary>History</summary> 1546<table> 1547<tbody><tr><th>Version</th><th>Changes</th></tr> 1548<tr><td>v9.0.0</td> 1549<td><p>Runtime deprecation.</p></td></tr> 1550</tbody></table> 1551</details> 1552</div> 1553<p>Type: Runtime</p> 1554<p><code>REPLServer.parseREPLKeyword()</code> was removed from userland visibility.</p> 1555<h4 id="DEP0076">DEP0076: <code>tls.parseCertString()</code><span><a class="mark" href="#deprecations_dep0076_tls_parsecertstring" id="deprecations_dep0076_tls_parsecertstring">#</a></span></h4> 1556<div class="api_metadata"> 1557<details class="changelog"><summary>History</summary> 1558<table> 1559<tbody><tr><th>Version</th><th>Changes</th></tr> 1560<tr><td>v9.0.0</td> 1561<td><p>Runtime deprecation.</p></td></tr> 1562<tr><td>v8.6.0</td> 1563<td><p>Documentation-only deprecation.</p></td></tr> 1564</tbody></table> 1565</details> 1566</div> 1567<p>Type: Runtime</p> 1568<p><code>tls.parseCertString()</code> is a trivial parsing helper that was made public by 1569mistake. This function can usually be replaced with:</p> 1570<pre><code class="language-js"><span class="hljs-keyword">const</span> querystring = <span class="hljs-built_in">require</span>(<span class="hljs-string">'querystring'</span>); 1571querystring.<span class="hljs-title function_">parse</span>(str, <span class="hljs-string">'\n'</span>, <span class="hljs-string">'='</span>);</code></pre> 1572<p>This function is not completely equivalent to <code>querystring.parse()</code>. One 1573difference is that <code>querystring.parse()</code> does url decoding:</p> 1574<pre><code class="language-console"><span class="hljs-meta">> </span><span class="language-bash">querystring.parse(<span class="hljs-string">'%E5%A5%BD=1'</span>, <span class="hljs-string">'\n'</span>, <span class="hljs-string">'='</span>);</span> 1575{ '好': '1' } 1576<span class="hljs-meta">> </span><span class="language-bash">tls.parseCertString(<span class="hljs-string">'%E5%A5%BD=1'</span>);</span> 1577{ '%E5%A5%BD': '1' }</code></pre> 1578<h4 id="DEP0077">DEP0077: <code>Module._debug()</code><span><a class="mark" href="#deprecations_dep0077_module_debug" id="deprecations_dep0077_module_debug">#</a></span></h4> 1579<div class="api_metadata"> 1580<details class="changelog"><summary>History</summary> 1581<table> 1582<tbody><tr><th>Version</th><th>Changes</th></tr> 1583<tr><td>v9.0.0</td> 1584<td><p>Runtime deprecation.</p></td></tr> 1585</tbody></table> 1586</details> 1587</div> 1588<p>Type: Runtime</p> 1589<p><code>Module._debug()</code> is deprecated.</p> 1590<p>The <code>Module._debug()</code> function was never documented as an officially 1591supported API.</p> 1592<h4 id="DEP0078">DEP0078: <code>REPLServer.turnOffEditorMode()</code><span><a class="mark" href="#deprecations_dep0078_replserver_turnoffeditormode" id="deprecations_dep0078_replserver_turnoffeditormode">#</a></span></h4> 1593<div class="api_metadata"> 1594<details class="changelog"><summary>History</summary> 1595<table> 1596<tbody><tr><th>Version</th><th>Changes</th></tr> 1597<tr><td>v9.0.0</td> 1598<td><p>Runtime deprecation.</p></td></tr> 1599</tbody></table> 1600</details> 1601</div> 1602<p>Type: Runtime</p> 1603<p><code>REPLServer.turnOffEditorMode()</code> was removed from userland visibility.</p> 1604<h4 id="DEP0079">DEP0079: Custom inspection function on objects via <code>.inspect()</code><span><a class="mark" href="#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect" id="deprecations_dep0079_custom_inspection_function_on_objects_via_inspect">#</a></span></h4> 1605<div class="api_metadata"> 1606<details class="changelog"><summary>History</summary> 1607<table> 1608<tbody><tr><th>Version</th><th>Changes</th></tr> 1609<tr><td>v11.0.0</td> 1610<td><p>End-of-Life.</p></td></tr> 1611<tr><td>v10.0.0</td> 1612<td><p>Runtime deprecation.</p></td></tr> 1613<tr><td>v8.7.0</td> 1614<td><p>Documentation-only deprecation.</p></td></tr> 1615</tbody></table> 1616</details> 1617</div> 1618<p>Type: End-of-Life</p> 1619<p>Using a property named <code>inspect</code> on an object to specify a custom inspection 1620function for <a href="util.html#util_util_inspect_object_options"><code>util.inspect()</code></a> is deprecated. Use <a href="util.html#util_util_inspect_custom"><code>util.inspect.custom</code></a> 1621instead. For backward compatibility with Node.js prior to version 6.4.0, both 1622can be specified.</p> 1623<h4 id="DEP0080">DEP0080: <code>path._makeLong()</code><span><a class="mark" href="#deprecations_dep0080_path_makelong" id="deprecations_dep0080_path_makelong">#</a></span></h4> 1624<div class="api_metadata"> 1625<details class="changelog"><summary>History</summary> 1626<table> 1627<tbody><tr><th>Version</th><th>Changes</th></tr> 1628<tr><td>v9.0.0</td> 1629<td><p>Documentation-only deprecation.</p></td></tr> 1630</tbody></table> 1631</details> 1632</div> 1633<p>Type: Documentation-only</p> 1634<p>The internal <code>path._makeLong()</code> was not intended for public use. However, 1635userland modules have found it useful. The internal API is deprecated 1636and replaced with an identical, public <code>path.toNamespacedPath()</code> method.</p> 1637<h4 id="DEP0081">DEP0081: <code>fs.truncate()</code> using a file descriptor<span><a class="mark" href="#deprecations_dep0081_fs_truncate_using_a_file_descriptor" id="deprecations_dep0081_fs_truncate_using_a_file_descriptor">#</a></span></h4> 1638<div class="api_metadata"> 1639<details class="changelog"><summary>History</summary> 1640<table> 1641<tbody><tr><th>Version</th><th>Changes</th></tr> 1642<tr><td>v9.0.0</td> 1643<td><p>Runtime deprecation.</p></td></tr> 1644</tbody></table> 1645</details> 1646</div> 1647<p>Type: Runtime</p> 1648<p><code>fs.truncate()</code> <code>fs.truncateSync()</code> usage with a file descriptor is 1649deprecated. Please use <code>fs.ftruncate()</code> or <code>fs.ftruncateSync()</code> to work with 1650file descriptors.</p> 1651<h4 id="DEP0082">DEP0082: <code>REPLServer.prototype.memory()</code><span><a class="mark" href="#deprecations_dep0082_replserver_prototype_memory" id="deprecations_dep0082_replserver_prototype_memory">#</a></span></h4> 1652<div class="api_metadata"> 1653<details class="changelog"><summary>History</summary> 1654<table> 1655<tbody><tr><th>Version</th><th>Changes</th></tr> 1656<tr><td>v9.0.0</td> 1657<td><p>Runtime deprecation.</p></td></tr> 1658</tbody></table> 1659</details> 1660</div> 1661<p>Type: Runtime</p> 1662<p><code>REPLServer.prototype.memory()</code> is only necessary for the internal mechanics of 1663the <code>REPLServer</code> itself. Do not use this function.</p> 1664<h4 id="DEP0083">DEP0083: Disabling ECDH by setting <code>ecdhCurve</code> to <code>false</code><span><a class="mark" href="#deprecations_dep0083_disabling_ecdh_by_setting_ecdhcurve_to_false" id="deprecations_dep0083_disabling_ecdh_by_setting_ecdhcurve_to_false">#</a></span></h4> 1665<div class="api_metadata"> 1666<details class="changelog"><summary>History</summary> 1667<table> 1668<tbody><tr><th>Version</th><th>Changes</th></tr> 1669<tr><td>v10.0.0</td> 1670<td><p>End-of-Life.</p></td></tr> 1671<tr><td>v9.2.0</td> 1672<td><p>Runtime deprecation.</p></td></tr> 1673</tbody></table> 1674</details> 1675</div> 1676<p>Type: End-of-Life.</p> 1677<p>The <code>ecdhCurve</code> option to <code>tls.createSecureContext()</code> and <code>tls.TLSSocket</code> could 1678be set to <code>false</code> to disable ECDH entirely on the server only. This mode was 1679deprecated in preparation for migrating to OpenSSL 1.1.0 and consistency with 1680the client and is now unsupported. Use the <code>ciphers</code> parameter instead.</p> 1681<h4 id="DEP0084">DEP0084: requiring bundled internal dependencies<span><a class="mark" href="#deprecations_dep0084_requiring_bundled_internal_dependencies" id="deprecations_dep0084_requiring_bundled_internal_dependencies">#</a></span></h4> 1682<div class="api_metadata"> 1683<details class="changelog"><summary>History</summary> 1684<table> 1685<tbody><tr><th>Version</th><th>Changes</th></tr> 1686<tr><td>v12.0.0</td> 1687<td><p>This functionality has been removed.</p></td></tr> 1688<tr><td>v10.0.0</td> 1689<td><p>Runtime deprecation.</p></td></tr> 1690</tbody></table> 1691</details> 1692</div> 1693<p>Type: End-of-Life</p> 1694<p>Since Node.js versions 4.4.0 and 5.2.0, several modules only intended for 1695internal usage were mistakenly exposed to user code through <code>require()</code>. These 1696modules were:</p> 1697<ul> 1698<li><code>v8/tools/codemap</code></li> 1699<li><code>v8/tools/consarray</code></li> 1700<li><code>v8/tools/csvparser</code></li> 1701<li><code>v8/tools/logreader</code></li> 1702<li><code>v8/tools/profile_view</code></li> 1703<li><code>v8/tools/profile</code></li> 1704<li><code>v8/tools/SourceMap</code></li> 1705<li><code>v8/tools/splaytree</code></li> 1706<li><code>v8/tools/tickprocessor-driver</code></li> 1707<li><code>v8/tools/tickprocessor</code></li> 1708<li><code>node-inspect/lib/_inspect</code> (from 7.6.0)</li> 1709<li><code>node-inspect/lib/internal/inspect_client</code> (from 7.6.0)</li> 1710<li><code>node-inspect/lib/internal/inspect_repl</code> (from 7.6.0)</li> 1711</ul> 1712<p>The <code>v8/*</code> modules do not have any exports, and if not imported in a specific 1713order would in fact throw errors. As such there are virtually no legitimate use 1714cases for importing them through <code>require()</code>.</p> 1715<p>On the other hand, <code>node-inspect</code> can be installed locally through a package 1716manager, as it is published on the npm registry under the same name. No source 1717code modification is necessary if that is done.</p> 1718<h4 id="DEP0085">DEP0085: AsyncHooks sensitive API<span><a class="mark" href="#deprecations_dep0085_asynchooks_sensitive_api" id="deprecations_dep0085_asynchooks_sensitive_api">#</a></span></h4> 1719<div class="api_metadata"> 1720<details class="changelog"><summary>History</summary> 1721<table> 1722<tbody><tr><th>Version</th><th>Changes</th></tr> 1723<tr><td>v10.0.0</td> 1724<td><p>End-of-Life.</p></td></tr> 1725<tr><td>v9.4.0, v8.10.0</td> 1726<td><p>Runtime deprecation.</p></td></tr> 1727</tbody></table> 1728</details> 1729</div> 1730<p>Type: End-of-Life</p> 1731<p>The AsyncHooks sensitive API was never documented and had various minor issues. 1732Use the <code>AsyncResource</code> API instead. See 1733<a href="https://github.com/nodejs/node/issues/15572">https://github.com/nodejs/node/issues/15572</a>.</p> 1734<h4 id="DEP0086">DEP0086: Remove <code>runInAsyncIdScope</code><span><a class="mark" href="#deprecations_dep0086_remove_runinasyncidscope" id="deprecations_dep0086_remove_runinasyncidscope">#</a></span></h4> 1735<div class="api_metadata"> 1736<details class="changelog"><summary>History</summary> 1737<table> 1738<tbody><tr><th>Version</th><th>Changes</th></tr> 1739<tr><td>v10.0.0</td> 1740<td><p>End-of-Life.</p></td></tr> 1741<tr><td>v9.4.0, v8.10.0</td> 1742<td><p>Runtime deprecation.</p></td></tr> 1743</tbody></table> 1744</details> 1745</div> 1746<p>Type: End-of-Life</p> 1747<p><code>runInAsyncIdScope</code> doesn't emit the <code>'before'</code> or <code>'after'</code> event and can thus 1748cause a lot of issues. See <a href="https://github.com/nodejs/node/issues/14328">https://github.com/nodejs/node/issues/14328</a>.</p> 1749<h4 id="DEP0089">DEP0089: <code>require('assert')</code><span><a class="mark" href="#deprecations_dep0089_require_assert" id="deprecations_dep0089_require_assert">#</a></span></h4> 1750<div class="api_metadata"> 1751<details class="changelog"><summary>History</summary> 1752<table> 1753<tbody><tr><th>Version</th><th>Changes</th></tr> 1754<tr><td>v12.8.0</td> 1755<td><p>Deprecation revoked.</p></td></tr> 1756<tr><td>v9.9.0, v8.13.0</td> 1757<td><p>Documentation-only deprecation.</p></td></tr> 1758</tbody></table> 1759</details> 1760</div> 1761<p>Type: Deprecation revoked</p> 1762<p>Importing assert directly was not recommended as the exposed functions use 1763loose equality checks. The deprecation was revoked because use of the <code>assert</code> 1764module is not discouraged, and the deprecation caused developer confusion.</p> 1765<h4 id="DEP0090">DEP0090: Invalid GCM authentication tag lengths<span><a class="mark" href="#deprecations_dep0090_invalid_gcm_authentication_tag_lengths" id="deprecations_dep0090_invalid_gcm_authentication_tag_lengths">#</a></span></h4> 1766<div class="api_metadata"> 1767<details class="changelog"><summary>History</summary> 1768<table> 1769<tbody><tr><th>Version</th><th>Changes</th></tr> 1770<tr><td>v11.0.0</td> 1771<td><p>End-of-Life.</p></td></tr> 1772<tr><td>v10.0.0</td> 1773<td><p>Runtime deprecation.</p></td></tr> 1774</tbody></table> 1775</details> 1776</div> 1777<p>Type: End-of-Life</p> 1778<p>Node.js used to support all GCM authentication tag lengths which are accepted by 1779OpenSSL when calling <a href="crypto.html#crypto_decipher_setauthtag_buffer"><code>decipher.setAuthTag()</code></a>. Beginning with Node.js 1780v11.0.0, only authentication tag lengths of 128, 120, 112, 104, 96, 64, and 32 1781bits are allowed. Authentication tags of other lengths are invalid per 1782<a href="https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf">NIST SP 800-38D</a>.</p> 1783<h4 id="DEP0091">DEP0091: <code>crypto.DEFAULT_ENCODING</code><span><a class="mark" href="#deprecations_dep0091_crypto_default_encoding" id="deprecations_dep0091_crypto_default_encoding">#</a></span></h4> 1784<div class="api_metadata"> 1785<details class="changelog"><summary>History</summary> 1786<table> 1787<tbody><tr><th>Version</th><th>Changes</th></tr> 1788<tr><td>v10.0.0</td> 1789<td><p>Runtime deprecation.</p></td></tr> 1790</tbody></table> 1791</details> 1792</div> 1793<p>Type: Runtime</p> 1794<p>The <a href="crypto.html#crypto_crypto_default_encoding"><code>crypto.DEFAULT_ENCODING</code></a> property is deprecated.</p> 1795<h4 id="DEP0092">DEP0092: Top-level <code>this</code> bound to <code>module.exports</code><span><a class="mark" href="#deprecations_dep0092_top_level_this_bound_to_module_exports" id="deprecations_dep0092_top_level_this_bound_to_module_exports">#</a></span></h4> 1796<div class="api_metadata"> 1797<details class="changelog"><summary>History</summary> 1798<table> 1799<tbody><tr><th>Version</th><th>Changes</th></tr> 1800<tr><td>v10.0.0</td> 1801<td><p>Documentation-only deprecation.</p></td></tr> 1802</tbody></table> 1803</details> 1804</div> 1805<p>Type: Documentation-only</p> 1806<p>Assigning properties to the top-level <code>this</code> as an alternative 1807to <code>module.exports</code> is deprecated. Developers should use <code>exports</code> 1808or <code>module.exports</code> instead.</p> 1809<h4 id="DEP0093">DEP0093: <code>crypto.fips</code> is deprecated and replaced<span><a class="mark" href="#deprecations_dep0093_crypto_fips_is_deprecated_and_replaced" id="deprecations_dep0093_crypto_fips_is_deprecated_and_replaced">#</a></span></h4> 1810<div class="api_metadata"> 1811<details class="changelog"><summary>History</summary> 1812<table> 1813<tbody><tr><th>Version</th><th>Changes</th></tr> 1814<tr><td>v10.0.0</td> 1815<td><p>Documentation-only deprecation.</p></td></tr> 1816</tbody></table> 1817</details> 1818</div> 1819<p>Type: Documentation-only</p> 1820<p>The <a href="crypto.html#crypto_crypto_fips"><code>crypto.fips</code></a> property is deprecated. Please use <code>crypto.setFips()</code> 1821and <code>crypto.getFips()</code> instead.</p> 1822<h4 id="DEP0094">DEP0094: Using <code>assert.fail()</code> with more than one argument<span><a class="mark" href="#deprecations_dep0094_using_assert_fail_with_more_than_one_argument" id="deprecations_dep0094_using_assert_fail_with_more_than_one_argument">#</a></span></h4> 1823<div class="api_metadata"> 1824<details class="changelog"><summary>History</summary> 1825<table> 1826<tbody><tr><th>Version</th><th>Changes</th></tr> 1827<tr><td>v10.0.0</td> 1828<td><p>Runtime deprecation.</p></td></tr> 1829</tbody></table> 1830</details> 1831</div> 1832<p>Type: Runtime</p> 1833<p>Using <code>assert.fail()</code> with more than one argument is deprecated. Use 1834<code>assert.fail()</code> with only one argument or use a different <code>assert</code> module 1835method.</p> 1836<h4 id="DEP0095">DEP0095: <code>timers.enroll()</code><span><a class="mark" href="#deprecations_dep0095_timers_enroll" id="deprecations_dep0095_timers_enroll">#</a></span></h4> 1837<div class="api_metadata"> 1838<details class="changelog"><summary>History</summary> 1839<table> 1840<tbody><tr><th>Version</th><th>Changes</th></tr> 1841<tr><td>v10.0.0</td> 1842<td><p>Runtime deprecation.</p></td></tr> 1843</tbody></table> 1844</details> 1845</div> 1846<p>Type: Runtime</p> 1847<p><code>timers.enroll()</code> is deprecated. Please use the publicly documented 1848<a href="timers.html#timers_settimeout_callback_delay_args"><code>setTimeout()</code></a> or <a href="timers.html#timers_setinterval_callback_delay_args"><code>setInterval()</code></a> instead.</p> 1849<h4 id="DEP0096">DEP0096: <code>timers.unenroll()</code><span><a class="mark" href="#deprecations_dep0096_timers_unenroll" id="deprecations_dep0096_timers_unenroll">#</a></span></h4> 1850<div class="api_metadata"> 1851<details class="changelog"><summary>History</summary> 1852<table> 1853<tbody><tr><th>Version</th><th>Changes</th></tr> 1854<tr><td>v10.0.0</td> 1855<td><p>Runtime deprecation.</p></td></tr> 1856</tbody></table> 1857</details> 1858</div> 1859<p>Type: Runtime</p> 1860<p><code>timers.unenroll()</code> is deprecated. Please use the publicly documented 1861<a href="timers.html#timers_cleartimeout_timeout"><code>clearTimeout()</code></a> or <a href="timers.html#timers_clearinterval_timeout"><code>clearInterval()</code></a> instead.</p> 1862<h4 id="DEP0097">DEP0097: <code>MakeCallback</code> with <code>domain</code> property<span><a class="mark" href="#deprecations_dep0097_makecallback_with_domain_property" id="deprecations_dep0097_makecallback_with_domain_property">#</a></span></h4> 1863<div class="api_metadata"> 1864<details class="changelog"><summary>History</summary> 1865<table> 1866<tbody><tr><th>Version</th><th>Changes</th></tr> 1867<tr><td>v10.0.0</td> 1868<td><p>Runtime deprecation.</p></td></tr> 1869</tbody></table> 1870</details> 1871</div> 1872<p>Type: Runtime</p> 1873<p>Users of <code>MakeCallback</code> that add the <code>domain</code> property to carry context, 1874should start using the <code>async_context</code> variant of <code>MakeCallback</code> or 1875<code>CallbackScope</code>, or the high-level <code>AsyncResource</code> class.</p> 1876<h4 id="DEP0098">DEP0098: AsyncHooks embedder <code>AsyncResource.emitBefore</code> and <code>AsyncResource.emitAfter</code> APIs<span><a class="mark" href="#deprecations_dep0098_asynchooks_embedder_asyncresource_emitbefore_and_asyncresource_emitafter_apis" id="deprecations_dep0098_asynchooks_embedder_asyncresource_emitbefore_and_asyncresource_emitafter_apis">#</a></span></h4> 1877<div class="api_metadata"> 1878<details class="changelog"><summary>History</summary> 1879<table> 1880<tbody><tr><th>Version</th><th>Changes</th></tr> 1881<tr><td>v12.0.0</td> 1882<td><p>End-of-Life.</p></td></tr> 1883<tr><td>v10.0.0, v9.6.0, v8.12.0</td> 1884<td><p>Runtime deprecation.</p></td></tr> 1885</tbody></table> 1886</details> 1887</div> 1888<p>Type: End-of-Life</p> 1889<p>The embedded API provided by AsyncHooks exposes <code>.emitBefore()</code> and 1890<code>.emitAfter()</code> methods which are very easy to use incorrectly which can lead 1891to unrecoverable errors.</p> 1892<p>Use <a href="async_hooks.html#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args"><code>asyncResource.runInAsyncScope()</code></a> API instead which provides a much 1893safer, and more convenient, alternative. See 1894<a href="https://github.com/nodejs/node/pull/18513">https://github.com/nodejs/node/pull/18513</a>.</p> 1895<h4 id="DEP0099">DEP0099: Async context-unaware <code>node::MakeCallback</code> C++ APIs<span><a class="mark" href="#deprecations_dep0099_async_context_unaware_node_makecallback_c_apis" id="deprecations_dep0099_async_context_unaware_node_makecallback_c_apis">#</a></span></h4> 1896<div class="api_metadata"> 1897<details class="changelog"><summary>History</summary> 1898<table> 1899<tbody><tr><th>Version</th><th>Changes</th></tr> 1900<tr><td>v10.0.0</td> 1901<td><p>Compile-time deprecation.</p></td></tr> 1902</tbody></table> 1903</details> 1904</div> 1905<p>Type: Compile-time</p> 1906<p>Certain versions of <code>node::MakeCallback</code> APIs available to native modules are 1907deprecated. Please use the versions of the API that accept an <code>async_context</code> 1908parameter.</p> 1909<h4 id="DEP0100">DEP0100: <code>process.assert()</code><span><a class="mark" href="#deprecations_dep0100_process_assert" id="deprecations_dep0100_process_assert">#</a></span></h4> 1910<div class="api_metadata"> 1911<details class="changelog"><summary>History</summary> 1912<table> 1913<tbody><tr><th>Version</th><th>Changes</th></tr> 1914<tr><td>v10.0.0</td> 1915<td><p>Runtime deprecation.</p></td></tr> 1916<tr><td>v0.3.7</td> 1917<td><p>Documentation-only deprecation.</p></td></tr> 1918</tbody></table> 1919</details> 1920</div> 1921<p>Type: Runtime</p> 1922<p><code>process.assert()</code> is deprecated. Please use the <a href="assert.html"><code>assert</code></a> module instead.</p> 1923<p>This was never a documented feature.</p> 1924<h4 id="DEP0101">DEP0101: <code>--with-lttng</code><span><a class="mark" href="#deprecations_dep0101_with_lttng" id="deprecations_dep0101_with_lttng">#</a></span></h4> 1925<div class="api_metadata"> 1926<details class="changelog"><summary>History</summary> 1927<table> 1928<tbody><tr><th>Version</th><th>Changes</th></tr> 1929<tr><td>v10.0.0</td> 1930<td><p>End-of-Life.</p></td></tr> 1931</tbody></table> 1932</details> 1933</div> 1934<p>Type: End-of-Life</p> 1935<p>The <code>--with-lttng</code> compile-time option has been removed.</p> 1936<h4 id="DEP0102">DEP0102: Using <code>noAssert</code> in <code>Buffer#(read|write)</code> operations<span><a class="mark" href="#deprecations_dep0102_using_noassert_in_buffer_read_write_operations" id="deprecations_dep0102_using_noassert_in_buffer_read_write_operations">#</a></span></h4> 1937<div class="api_metadata"> 1938<details class="changelog"><summary>History</summary> 1939<table> 1940<tbody><tr><th>Version</th><th>Changes</th></tr> 1941<tr><td>v10.0.0</td> 1942<td><p>End-of-Life.</p></td></tr> 1943</tbody></table> 1944</details> 1945</div> 1946<p>Type: End-of-Life</p> 1947<p>Using the <code>noAssert</code> argument has no functionality anymore. All input is going 1948to be verified, no matter if it is set to true or not. Skipping the verification 1949could lead to hard to find errors and crashes.</p> 1950<h4 id="DEP0103">DEP0103: <code>process.binding('util').is[...]</code> typechecks<span><a class="mark" href="#deprecations_dep0103_process_binding_util_is_typechecks" id="deprecations_dep0103_process_binding_util_is_typechecks">#</a></span></h4> 1951<div class="api_metadata"> 1952<details class="changelog"><summary>History</summary> 1953<table> 1954<tbody><tr><th>Version</th><th>Changes</th></tr> 1955<tr><td>v10.9.0</td> 1956<td><p>Superseded by <a href="#DEP0111">DEP0111</a>.</p></td></tr> 1957<tr><td>v10.0.0</td> 1958<td><p>Documentation-only deprecation.</p></td></tr> 1959</tbody></table> 1960</details> 1961</div> 1962<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 1963<p>Using <code>process.binding()</code> in general should be avoided. The type checking 1964methods in particular can be replaced by using <a href="util.html#util_util_types"><code>util.types</code></a>.</p> 1965<p>This deprecation has been superseded by the deprecation of the 1966<code>process.binding()</code> API (<a href="#DEP0111">DEP0111</a>).</p> 1967<h4 id="DEP0104">DEP0104: <code>process.env</code> string coercion<span><a class="mark" href="#deprecations_dep0104_process_env_string_coercion" id="deprecations_dep0104_process_env_string_coercion">#</a></span></h4> 1968<div class="api_metadata"> 1969<details class="changelog"><summary>History</summary> 1970<table> 1971<tbody><tr><th>Version</th><th>Changes</th></tr> 1972<tr><td>v10.0.0</td> 1973<td><p>Documentation-only deprecation.</p></td></tr> 1974</tbody></table> 1975</details> 1976</div> 1977<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 1978<p>When assigning a non-string property to <a href="process.html#process_process_env"><code>process.env</code></a>, the assigned value is 1979implicitly converted to a string. This behavior is deprecated if the assigned 1980value is not a string, boolean, or number. In the future, such assignment might 1981result in a thrown error. Please convert the property to a string before 1982assigning it to <code>process.env</code>.</p> 1983<h4 id="DEP0105">DEP0105: <code>decipher.finaltol</code><span><a class="mark" href="#deprecations_dep0105_decipher_finaltol" id="deprecations_dep0105_decipher_finaltol">#</a></span></h4> 1984<div class="api_metadata"> 1985<details class="changelog"><summary>History</summary> 1986<table> 1987<tbody><tr><th>Version</th><th>Changes</th></tr> 1988<tr><td>v11.0.0</td> 1989<td><p>End-of-Life.</p></td></tr> 1990<tr><td>v10.0.0</td> 1991<td><p>Runtime deprecation.</p></td></tr> 1992</tbody></table> 1993</details> 1994</div> 1995<p>Type: End-of-Life</p> 1996<p><code>decipher.finaltol()</code> has never been documented and was an alias for 1997<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a>. This API has been removed, and it is recommended to use 1998<a href="crypto.html#crypto_decipher_final_outputencoding"><code>decipher.final()</code></a> instead.</p> 1999<h4 id="DEP0106">DEP0106: <code>crypto.createCipher</code> and <code>crypto.createDecipher</code><span><a class="mark" href="#deprecations_dep0106_crypto_createcipher_and_crypto_createdecipher" id="deprecations_dep0106_crypto_createcipher_and_crypto_createdecipher">#</a></span></h4> 2000<div class="api_metadata"> 2001<details class="changelog"><summary>History</summary> 2002<table> 2003<tbody><tr><th>Version</th><th>Changes</th></tr> 2004<tr><td>v11.0.0</td> 2005<td><p>Runtime deprecation.</p></td></tr> 2006<tr><td>v10.0.0</td> 2007<td><p>Documentation-only deprecation.</p></td></tr> 2008</tbody></table> 2009</details> 2010</div> 2011<p>Type: Runtime</p> 2012<p>Using <a href="crypto.html#crypto_crypto_createcipher_algorithm_password_options"><code>crypto.createCipher()</code></a> and <a href="crypto.html#crypto_crypto_createdecipher_algorithm_password_options"><code>crypto.createDecipher()</code></a> should be 2013avoided as they use a weak key derivation function (MD5 with no salt) and static 2014initialization vectors. It is recommended to derive a key using 2015<a href="crypto.html#crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback"><code>crypto.pbkdf2()</code></a> or <a href="crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback"><code>crypto.scrypt()</code></a> and to use 2016<a href="crypto.html#crypto_crypto_createcipheriv_algorithm_key_iv_options"><code>crypto.createCipheriv()</code></a> and <a href="crypto.html#crypto_crypto_createdecipheriv_algorithm_key_iv_options"><code>crypto.createDecipheriv()</code></a> to obtain the 2017<a href="crypto.html#crypto_class_cipher"><code>Cipher</code></a> and <a href="crypto.html#crypto_class_decipher"><code>Decipher</code></a> objects respectively.</p> 2018<h4 id="DEP0107">DEP0107: <code>tls.convertNPNProtocols()</code><span><a class="mark" href="#deprecations_dep0107_tls_convertnpnprotocols" id="deprecations_dep0107_tls_convertnpnprotocols">#</a></span></h4> 2019<div class="api_metadata"> 2020<details class="changelog"><summary>History</summary> 2021<table> 2022<tbody><tr><th>Version</th><th>Changes</th></tr> 2023<tr><td>v11.0.0</td> 2024<td><p>End-of-Life.</p></td></tr> 2025<tr><td>v10.0.0</td> 2026<td><p>Runtime deprecation.</p></td></tr> 2027</tbody></table> 2028</details> 2029</div> 2030<p>Type: End-of-Life</p> 2031<p>This was an undocumented helper function not intended for use outside Node.js 2032core and obsoleted by the removal of NPN (Next Protocol Negotiation) support.</p> 2033<h4 id="DEP0108">DEP0108: <code>zlib.bytesRead</code><span><a class="mark" href="#deprecations_dep0108_zlib_bytesread" id="deprecations_dep0108_zlib_bytesread">#</a></span></h4> 2034<div class="api_metadata"> 2035<details class="changelog"><summary>History</summary> 2036<table> 2037<tbody><tr><th>Version</th><th>Changes</th></tr> 2038<tr><td>v11.0.0</td> 2039<td><p>Runtime deprecation.</p></td></tr> 2040<tr><td>v10.0.0</td> 2041<td><p>Documentation-only deprecation.</p></td></tr> 2042</tbody></table> 2043</details> 2044</div> 2045<p>Type: Runtime</p> 2046<p>Deprecated alias for <a href="zlib.html#zlib_zlib_byteswritten"><code>zlib.bytesWritten</code></a>. This original name was chosen 2047because it also made sense to interpret the value as the number of bytes 2048read by the engine, but is inconsistent with other streams in Node.js that 2049expose values under these names.</p> 2050<h4 id="DEP0109">DEP0109: <code>http</code>, <code>https</code>, and <code>tls</code> support for invalid URLs<span><a class="mark" href="#deprecations_dep0109_http_https_and_tls_support_for_invalid_urls" id="deprecations_dep0109_http_https_and_tls_support_for_invalid_urls">#</a></span></h4> 2051<div class="api_metadata"> 2052<details class="changelog"><summary>History</summary> 2053<table> 2054<tbody><tr><th>Version</th><th>Changes</th></tr> 2055<tr><td>v11.0.0</td> 2056<td><p>Runtime deprecation.</p></td></tr> 2057</tbody></table> 2058</details> 2059</div> 2060<p>Type: Runtime</p> 2061<p>Some previously supported (but strictly invalid) URLs were accepted through the 2062<a href="http.html#http_http_request_options_callback"><code>http.request()</code></a>, <a href="http.html#http_http_get_options_callback"><code>http.get()</code></a>, <a href="https.html#https_https_request_options_callback"><code>https.request()</code></a>, 2063<a href="https.html#https_https_get_options_callback"><code>https.get()</code></a>, and <a href="tls.html#tls_tls_checkserveridentity_hostname_cert"><code>tls.checkServerIdentity()</code></a> APIs because those were 2064accepted by the legacy <code>url.parse()</code> API. The mentioned APIs now use the WHATWG 2065URL parser that requires strictly valid URLs. Passing an invalid URL is 2066deprecated and support will be removed in the future.</p> 2067<h4 id="DEP0110">DEP0110: <code>vm.Script</code> cached data<span><a class="mark" href="#deprecations_dep0110_vm_script_cached_data" id="deprecations_dep0110_vm_script_cached_data">#</a></span></h4> 2068<div class="api_metadata"> 2069<details class="changelog"><summary>History</summary> 2070<table> 2071<tbody><tr><th>Version</th><th>Changes</th></tr> 2072<tr><td>v10.6.0</td> 2073<td><p>Documentation-only deprecation.</p></td></tr> 2074</tbody></table> 2075</details> 2076</div> 2077<p>Type: Documentation-only</p> 2078<p>The <code>produceCachedData</code> option is deprecated. Use 2079<a href="vm.html#vm_script_createcacheddata"><code>script.createCachedData()</code></a> instead.</p> 2080<h4 id="DEP0111">DEP0111: <code>process.binding()</code><span><a class="mark" href="#deprecations_dep0111_process_binding" id="deprecations_dep0111_process_binding">#</a></span></h4> 2081<div class="api_metadata"> 2082<details class="changelog"><summary>History</summary> 2083<table> 2084<tbody><tr><th>Version</th><th>Changes</th></tr> 2085<tr><td>v11.12.0</td> 2086<td><p>Added support for <code>--pending-deprecation</code>.</p></td></tr> 2087<tr><td>v10.9.0</td> 2088<td><p>Documentation-only deprecation.</p></td></tr> 2089</tbody></table> 2090</details> 2091</div> 2092<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2093<p><code>process.binding()</code> is for use by Node.js internal code only.</p> 2094<h4 id="DEP0112">DEP0112: <code>dgram</code> private APIs<span><a class="mark" href="#deprecations_dep0112_dgram_private_apis" id="deprecations_dep0112_dgram_private_apis">#</a></span></h4> 2095<div class="api_metadata"> 2096<details class="changelog"><summary>History</summary> 2097<table> 2098<tbody><tr><th>Version</th><th>Changes</th></tr> 2099<tr><td>v11.0.0</td> 2100<td><p>Runtime deprecation.</p></td></tr> 2101</tbody></table> 2102</details> 2103</div> 2104<p>Type: Runtime</p> 2105<p>The <code>dgram</code> module previously contained several APIs that were never meant to 2106accessed outside of Node.js core: <code>Socket.prototype._handle</code>, 2107<code>Socket.prototype._receiving</code>, <code>Socket.prototype._bindState</code>, 2108<code>Socket.prototype._queue</code>, <code>Socket.prototype._reuseAddr</code>, 2109<code>Socket.prototype._healthCheck()</code>, <code>Socket.prototype._stopReceiving()</code>, and 2110<code>dgram._createSocketHandle()</code>.</p> 2111<h4 id="DEP0113">DEP0113: <code>Cipher.setAuthTag()</code>, <code>Decipher.getAuthTag()</code><span><a class="mark" href="#deprecations_dep0113_cipher_setauthtag_decipher_getauthtag" id="deprecations_dep0113_cipher_setauthtag_decipher_getauthtag">#</a></span></h4> 2112<div class="api_metadata"> 2113<details class="changelog"><summary>History</summary> 2114<table> 2115<tbody><tr><th>Version</th><th>Changes</th></tr> 2116<tr><td>v12.0.0</td> 2117<td><p>End-of-Life.</p></td></tr> 2118<tr><td>v11.0.0</td> 2119<td><p>Runtime deprecation.</p></td></tr> 2120</tbody></table> 2121</details> 2122</div> 2123<p>Type: End-of-Life</p> 2124<p><code>Cipher.setAuthTag()</code> and <code>Decipher.getAuthTag()</code> are no longer available. They 2125were never documented and would throw when called.</p> 2126<h4 id="DEP0114">DEP0114: <code>crypto._toBuf()</code><span><a class="mark" href="#deprecations_dep0114_crypto_tobuf" id="deprecations_dep0114_crypto_tobuf">#</a></span></h4> 2127<div class="api_metadata"> 2128<details class="changelog"><summary>History</summary> 2129<table> 2130<tbody><tr><th>Version</th><th>Changes</th></tr> 2131<tr><td>v12.0.0</td> 2132<td><p>End-of-Life.</p></td></tr> 2133<tr><td>v11.0.0</td> 2134<td><p>Runtime deprecation.</p></td></tr> 2135</tbody></table> 2136</details> 2137</div> 2138<p>Type: End-of-Life</p> 2139<p>The <code>crypto._toBuf()</code> function was not designed to be used by modules outside 2140of Node.js core and was removed.</p> 2141<h4 id="DEP0115">DEP0115: <code>crypto.prng()</code>, <code>crypto.pseudoRandomBytes()</code>, <code>crypto.rng()</code><span><a class="mark" href="#deprecations_dep0115_crypto_prng_crypto_pseudorandombytes_crypto_rng" id="deprecations_dep0115_crypto_prng_crypto_pseudorandombytes_crypto_rng">#</a></span></h4> 2142<!--lint disable nodejs-yaml-comments --> 2143<div class="api_metadata"> 2144<details class="changelog"><summary>History</summary> 2145<table> 2146<tbody><tr><th>Version</th><th>Changes</th></tr> 2147<tr><td>v11.0.0</td> 2148<td><p>Added documentation-only deprecation with <code>--pending-deprecation</code> support.</p></td></tr> 2149</tbody></table> 2150</details> 2151</div> 2152<!--lint enable nodejs-yaml-comments --> 2153<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2154<p>In recent versions of Node.js, there is no difference between 2155<a href="crypto.html#crypto_crypto_randombytes_size_callback"><code>crypto.randomBytes()</code></a> and <code>crypto.pseudoRandomBytes()</code>. The latter is 2156deprecated along with the undocumented aliases <code>crypto.prng()</code> and 2157<code>crypto.rng()</code> in favor of <a href="crypto.html#crypto_crypto_randombytes_size_callback"><code>crypto.randomBytes()</code></a> and might be removed in a 2158future release.</p> 2159<h4 id="DEP0116">DEP0116: Legacy URL API<span><a class="mark" href="#deprecations_dep0116_legacy_url_api" id="deprecations_dep0116_legacy_url_api">#</a></span></h4> 2160<div class="api_metadata"> 2161<details class="changelog"><summary>History</summary> 2162<table> 2163<tbody><tr><th>Version</th><th>Changes</th></tr> 2164<tr><td>v14.17.0</td> 2165<td><p>Deprecation revoked. Status changed to "Legacy".</p></td></tr> 2166<tr><td>v11.0.0</td> 2167<td><p>Documentation-only deprecation.</p></td></tr> 2168</tbody></table> 2169</details> 2170</div> 2171<p>Type: Deprecation revoked</p> 2172<p>The <a href="url.html#url_legacy_url_api">Legacy URL API</a> is deprecated. This includes <a href="url.html#url_url_format_urlobject"><code>url.format()</code></a>, 2173<a href="url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost"><code>url.parse()</code></a>, <a href="url.html#url_url_resolve_from_to"><code>url.resolve()</code></a>, and the <a href="url.html#url_legacy_urlobject">legacy <code>urlObject</code></a>. Please 2174use the <a href="url.html#url_the_whatwg_url_api">WHATWG URL API</a> instead.</p> 2175<h4 id="DEP0117">DEP0117: Native crypto handles<span><a class="mark" href="#deprecations_dep0117_native_crypto_handles" id="deprecations_dep0117_native_crypto_handles">#</a></span></h4> 2176<div class="api_metadata"> 2177<details class="changelog"><summary>History</summary> 2178<table> 2179<tbody><tr><th>Version</th><th>Changes</th></tr> 2180<tr><td>v12.0.0</td> 2181<td><p>End-of-Life.</p></td></tr> 2182<tr><td>v11.0.0</td> 2183<td><p>Runtime deprecation.</p></td></tr> 2184</tbody></table> 2185</details> 2186</div> 2187<p>Type: End-of-Life</p> 2188<p>Previous versions of Node.js exposed handles to internal native objects through 2189the <code>_handle</code> property of the <code>Cipher</code>, <code>Decipher</code>, <code>DiffieHellman</code>, 2190<code>DiffieHellmanGroup</code>, <code>ECDH</code>, <code>Hash</code>, <code>Hmac</code>, <code>Sign</code>, and <code>Verify</code> classes. 2191The <code>_handle</code> property has been removed because improper use of the native 2192object can lead to crashing the application.</p> 2193<h4 id="DEP0118">DEP0118: <code>dns.lookup()</code> support for a falsy host name<span><a class="mark" href="#deprecations_dep0118_dns_lookup_support_for_a_falsy_host_name" id="deprecations_dep0118_dns_lookup_support_for_a_falsy_host_name">#</a></span></h4> 2194<div class="api_metadata"> 2195<details class="changelog"><summary>History</summary> 2196<table> 2197<tbody><tr><th>Version</th><th>Changes</th></tr> 2198<tr><td>v11.0.0</td> 2199<td><p>Runtime deprecation.</p></td></tr> 2200</tbody></table> 2201</details> 2202</div> 2203<p>Type: Runtime</p> 2204<p>Previous versions of Node.js supported <code>dns.lookup()</code> with a falsy host name 2205like <code>dns.lookup(false)</code> due to backward compatibility. 2206This behavior is undocumented and is thought to be unused in real world apps. 2207It will become an error in future versions of Node.js.</p> 2208<h4 id="DEP0119">DEP0119: <code>process.binding('uv').errname()</code> private API<span><a class="mark" href="#deprecations_dep0119_process_binding_uv_errname_private_api" id="deprecations_dep0119_process_binding_uv_errname_private_api">#</a></span></h4> 2209<div class="api_metadata"> 2210<details class="changelog"><summary>History</summary> 2211<table> 2212<tbody><tr><th>Version</th><th>Changes</th></tr> 2213<tr><td>v11.0.0</td> 2214<td><p>Documentation-only deprecation.</p></td></tr> 2215</tbody></table> 2216</details> 2217</div> 2218<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2219<p><code>process.binding('uv').errname()</code> is deprecated. Please use 2220<a href="util.html#util_util_getsystemerrorname_err"><code>util.getSystemErrorName()</code></a> instead.</p> 2221<h4 id="DEP0120">DEP0120: Windows Performance Counter support<span><a class="mark" href="#deprecations_dep0120_windows_performance_counter_support" id="deprecations_dep0120_windows_performance_counter_support">#</a></span></h4> 2222<div class="api_metadata"> 2223<details class="changelog"><summary>History</summary> 2224<table> 2225<tbody><tr><th>Version</th><th>Changes</th></tr> 2226<tr><td>v12.0.0</td> 2227<td><p>End-of-Life.</p></td></tr> 2228<tr><td>v11.0.0</td> 2229<td><p>Runtime deprecation.</p></td></tr> 2230</tbody></table> 2231</details> 2232</div> 2233<p>Type: End-of-Life</p> 2234<p>Windows Performance Counter support has been removed from Node.js. The 2235undocumented <code>COUNTER_NET_SERVER_CONNECTION()</code>, 2236<code>COUNTER_NET_SERVER_CONNECTION_CLOSE()</code>, <code>COUNTER_HTTP_SERVER_REQUEST()</code>, 2237<code>COUNTER_HTTP_SERVER_RESPONSE()</code>, <code>COUNTER_HTTP_CLIENT_REQUEST()</code>, and 2238<code>COUNTER_HTTP_CLIENT_RESPONSE()</code> functions have been deprecated.</p> 2239<h4 id="DEP0121">DEP0121: <code>net._setSimultaneousAccepts()</code><span><a class="mark" href="#deprecations_dep0121_net_setsimultaneousaccepts" id="deprecations_dep0121_net_setsimultaneousaccepts">#</a></span></h4> 2240<div class="api_metadata"> 2241<details class="changelog"><summary>History</summary> 2242<table> 2243<tbody><tr><th>Version</th><th>Changes</th></tr> 2244<tr><td>v12.0.0</td> 2245<td><p>Runtime deprecation.</p></td></tr> 2246</tbody></table> 2247</details> 2248</div> 2249<p>Type: Runtime</p> 2250<p>The undocumented <code>net._setSimultaneousAccepts()</code> function was originally 2251intended for debugging and performance tuning when using the <code>child_process</code> 2252and <code>cluster</code> modules on Windows. The function is not generally useful and 2253is being removed. See discussion here: 2254<a href="https://github.com/nodejs/node/issues/18391">https://github.com/nodejs/node/issues/18391</a></p> 2255<h4 id="DEP0122">DEP0122: <code>tls</code> <code>Server.prototype.setOptions()</code><span><a class="mark" href="#deprecations_dep0122_tls_server_prototype_setoptions" id="deprecations_dep0122_tls_server_prototype_setoptions">#</a></span></h4> 2256<div class="api_metadata"> 2257<details class="changelog"><summary>History</summary> 2258<table> 2259<tbody><tr><th>Version</th><th>Changes</th></tr> 2260<tr><td>v12.0.0</td> 2261<td><p>Runtime deprecation.</p></td></tr> 2262</tbody></table> 2263</details> 2264</div> 2265<p>Type: Runtime</p> 2266<p>Please use <code>Server.prototype.setSecureContext()</code> instead.</p> 2267<h4 id="DEP0123">DEP0123: setting the TLS ServerName to an IP address<span><a class="mark" href="#deprecations_dep0123_setting_the_tls_servername_to_an_ip_address" id="deprecations_dep0123_setting_the_tls_servername_to_an_ip_address">#</a></span></h4> 2268<div class="api_metadata"> 2269<details class="changelog"><summary>History</summary> 2270<table> 2271<tbody><tr><th>Version</th><th>Changes</th></tr> 2272<tr><td>v12.0.0</td> 2273<td><p>Runtime deprecation.</p></td></tr> 2274</tbody></table> 2275</details> 2276</div> 2277<p>Type: Runtime</p> 2278<p>Setting the TLS ServerName to an IP address is not permitted by 2279<a href="https://tools.ietf.org/html/rfc6066#section-3">RFC 6066</a>. This will be ignored in a future version.</p> 2280<h4 id="DEP0124">DEP0124: using <code>REPLServer.rli</code><span><a class="mark" href="#deprecations_dep0124_using_replserver_rli" id="deprecations_dep0124_using_replserver_rli">#</a></span></h4> 2281<div class="api_metadata"> 2282<details class="changelog"><summary>History</summary> 2283<table> 2284<tbody><tr><th>Version</th><th>Changes</th></tr> 2285<tr><td>v12.0.0</td> 2286<td><p>Runtime deprecation.</p></td></tr> 2287</tbody></table> 2288</details> 2289</div> 2290<p>Type: Runtime</p> 2291<p>This property is a reference to the instance itself.</p> 2292<h4 id="DEP0125">DEP0125: <code>require('_stream_wrap')</code><span><a class="mark" href="#deprecations_dep0125_require_stream_wrap" id="deprecations_dep0125_require_stream_wrap">#</a></span></h4> 2293<div class="api_metadata"> 2294<details class="changelog"><summary>History</summary> 2295<table> 2296<tbody><tr><th>Version</th><th>Changes</th></tr> 2297<tr><td>v12.0.0</td> 2298<td><p>Runtime deprecation.</p></td></tr> 2299</tbody></table> 2300</details> 2301</div> 2302<p>Type: Runtime</p> 2303<p>The <code>_stream_wrap</code> module is deprecated.</p> 2304<h4 id="DEP0126">DEP0126: <code>timers.active()</code><span><a class="mark" href="#deprecations_dep0126_timers_active" id="deprecations_dep0126_timers_active">#</a></span></h4> 2305<div class="api_metadata"> 2306<details class="changelog"><summary>History</summary> 2307<table> 2308<tbody><tr><th>Version</th><th>Changes</th></tr> 2309<tr><td>v11.14.0</td> 2310<td><p>Runtime deprecation.</p></td></tr> 2311</tbody></table> 2312</details> 2313</div> 2314<p>Type: Runtime</p> 2315<p>The previously undocumented <code>timers.active()</code> is deprecated. 2316Please use the publicly documented <a href="timers.html#timers_timeout_refresh"><code>timeout.refresh()</code></a> instead. 2317If re-referencing the timeout is necessary, <a href="timers.html#timers_timeout_ref"><code>timeout.ref()</code></a> can be used 2318with no performance impact since Node.js 10.</p> 2319<h4 id="DEP0127">DEP0127: <code>timers._unrefActive()</code><span><a class="mark" href="#deprecations_dep0127_timers_unrefactive" id="deprecations_dep0127_timers_unrefactive">#</a></span></h4> 2320<div class="api_metadata"> 2321<details class="changelog"><summary>History</summary> 2322<table> 2323<tbody><tr><th>Version</th><th>Changes</th></tr> 2324<tr><td>v11.14.0</td> 2325<td><p>Runtime deprecation.</p></td></tr> 2326</tbody></table> 2327</details> 2328</div> 2329<p>Type: Runtime</p> 2330<p>The previously undocumented and "private" <code>timers._unrefActive()</code> is deprecated. 2331Please use the publicly documented <a href="timers.html#timers_timeout_refresh"><code>timeout.refresh()</code></a> instead. 2332If unreferencing the timeout is necessary, <a href="timers.html#timers_timeout_unref"><code>timeout.unref()</code></a> can be used 2333with no performance impact since Node.js 10.</p> 2334<h4 id="DEP0128">DEP0128: modules with an invalid <code>main</code> entry and an <code>index.js</code> file<span><a class="mark" href="#deprecations_dep0128_modules_with_an_invalid_main_entry_and_an_index_js_file" id="deprecations_dep0128_modules_with_an_invalid_main_entry_and_an_index_js_file">#</a></span></h4> 2335<div class="api_metadata"> 2336<details class="changelog"><summary>History</summary> 2337<table> 2338<tbody><tr><th>Version</th><th>Changes</th></tr> 2339<tr><td>v12.0.0</td> 2340<td><p>Documentation-only.</p></td></tr> 2341</tbody></table> 2342</details> 2343</div> 2344<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2345<p>Modules that have an invalid <code>main</code> entry (e.g., <code>./does-not-exist.js</code>) and 2346also have an <code>index.js</code> file in the top level directory will resolve the 2347<code>index.js</code> file. That is deprecated and is going to throw an error in future 2348Node.js versions.</p> 2349<h4 id="DEP0129">DEP0129: <code>ChildProcess._channel</code><span><a class="mark" href="#deprecations_dep0129_childprocess_channel" id="deprecations_dep0129_childprocess_channel">#</a></span></h4> 2350<div class="api_metadata"> 2351<details class="changelog"><summary>History</summary> 2352<table> 2353<tbody><tr><th>Version</th><th>Changes</th></tr> 2354<tr><td>v13.0.0</td> 2355<td><p>Runtime deprecation.</p></td></tr> 2356<tr><td>v11.14.0</td> 2357<td><p>Documentation-only.</p></td></tr> 2358</tbody></table> 2359</details> 2360</div> 2361<p>Type: Runtime</p> 2362<p>The <code>_channel</code> property of child process objects returned by <code>spawn()</code> and 2363similar functions is not intended for public use. Use <code>ChildProcess.channel</code> 2364instead.</p> 2365<h4 id="DEP0130">DEP0130: <code>Module.createRequireFromPath()</code><span><a class="mark" href="#deprecations_dep0130_module_createrequirefrompath" id="deprecations_dep0130_module_createrequirefrompath">#</a></span></h4> 2366<div class="api_metadata"> 2367<details class="changelog"><summary>History</summary> 2368<table> 2369<tbody><tr><th>Version</th><th>Changes</th></tr> 2370<tr><td>v13.0.0</td> 2371<td><p>Runtime deprecation.</p></td></tr> 2372<tr><td>v12.2.0</td> 2373<td><p>Documentation-only.</p></td></tr> 2374</tbody></table> 2375</details> 2376</div> 2377<p>Type: Runtime</p> 2378<p>Module.createRequireFromPath() is deprecated. Please use 2379<a href="module.html#module_module_createrequire_filename"><code>module.createRequire()</code></a> instead.</p> 2380<h4 id="DEP0131">DEP0131: Legacy HTTP parser<span><a class="mark" href="#deprecations_dep0131_legacy_http_parser" id="deprecations_dep0131_legacy_http_parser">#</a></span></h4> 2381<div class="api_metadata"> 2382<details class="changelog"><summary>History</summary> 2383<table> 2384<tbody><tr><th>Version</th><th>Changes</th></tr> 2385<tr><td>v13.0.0</td> 2386<td><p>This feature has been removed.</p></td></tr> 2387<tr><td>v12.3.0</td> 2388<td><p>Documentation-only.</p></td></tr> 2389</tbody></table> 2390</details> 2391</div> 2392<p>Type: End-of-Life</p> 2393<p>The legacy HTTP parser, used by default in versions of Node.js prior to 12.0.0, 2394is deprecated and has been removed in v13.0.0. Prior to v13.0.0, the 2395<code>--http-parser=legacy</code> command-line flag could be used to revert to using the 2396legacy parser.</p> 2397<h4 id="DEP0132">DEP0132: <code>worker.terminate()</code> with callback<span><a class="mark" href="#deprecations_dep0132_worker_terminate_with_callback" id="deprecations_dep0132_worker_terminate_with_callback">#</a></span></h4> 2398<div class="api_metadata"> 2399<details class="changelog"><summary>History</summary> 2400<table> 2401<tbody><tr><th>Version</th><th>Changes</th></tr> 2402<tr><td>v12.5.0</td> 2403<td><p>Runtime deprecation.</p></td></tr> 2404</tbody></table> 2405</details> 2406</div> 2407<p>Type: Runtime</p> 2408<p>Passing a callback to <a href="worker_threads.html#worker_threads_worker_terminate"><code>worker.terminate()</code></a> is deprecated. Use the returned 2409<code>Promise</code> instead, or a listener to the worker’s <code>'exit'</code> event.</p> 2410<h4 id="DEP0133">DEP0133: <code>http</code> <code>connection</code><span><a class="mark" href="#deprecations_dep0133_http_connection" id="deprecations_dep0133_http_connection">#</a></span></h4> 2411<div class="api_metadata"> 2412<details class="changelog"><summary>History</summary> 2413<table> 2414<tbody><tr><th>Version</th><th>Changes</th></tr> 2415<tr><td>v12.12.0</td> 2416<td><p>Documentation-only deprecation.</p></td></tr> 2417</tbody></table> 2418</details> 2419</div> 2420<p>Type: Documentation-only</p> 2421<p>Prefer <a href="http.html#http_response_socket"><code>response.socket</code></a> over <a href="http.html#http_response_connection"><code>response.connection</code></a> and 2422<a href="http.html#http_request_socket"><code>request.socket</code></a> over <a href="http.html#http_request_connection"><code>request.connection</code></a>.</p> 2423<h4 id="DEP0134">DEP0134: <code>process._tickCallback</code><span><a class="mark" href="#deprecations_dep0134_process_tickcallback" id="deprecations_dep0134_process_tickcallback">#</a></span></h4> 2424<div class="api_metadata"> 2425<details class="changelog"><summary>History</summary> 2426<table> 2427<tbody><tr><th>Version</th><th>Changes</th></tr> 2428<tr><td>v12.12.0</td> 2429<td><p>Documentation-only deprecation.</p></td></tr> 2430</tbody></table> 2431</details> 2432</div> 2433<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2434<p>The <code>process._tickCallback</code> property was never documented as 2435an officially supported API.</p> 2436<h4 id="DEP0135">DEP0135: <code>WriteStream.open()</code> and <code>ReadStream.open()</code> are internal<span><a class="mark" href="#deprecations_dep0135_writestream_open_and_readstream_open_are_internal" id="deprecations_dep0135_writestream_open_and_readstream_open_are_internal">#</a></span></h4> 2437<div class="api_metadata"> 2438<details class="changelog"><summary>History</summary> 2439<table> 2440<tbody><tr><th>Version</th><th>Changes</th></tr> 2441<tr><td>v13.0.0</td> 2442<td><p>Runtime deprecation.</p></td></tr> 2443</tbody></table> 2444</details> 2445</div> 2446<p>Type: Runtime</p> 2447<p><a href="fs.html#fs_class_fs_writestream"><code>WriteStream.open()</code></a> and <a href="fs.html#fs_class_fs_readstream"><code>ReadStream.open()</code></a> are undocumented internal 2448APIs that do not make sense to use in userland. File streams should always be 2449opened through their corresponding factory methods <a href="fs.html#fs_fs_createwritestream_path_options"><code>fs.createWriteStream()</code></a> 2450and <a href="fs.html#fs_fs_createreadstream_path_options"><code>fs.createReadStream()</code></a>) or by passing a file descriptor in options.</p> 2451<h4 id="DEP0136">DEP0136: <code>http</code> <code>finished</code><span><a class="mark" href="#deprecations_dep0136_http_finished" id="deprecations_dep0136_http_finished">#</a></span></h4> 2452<div class="api_metadata"> 2453<details class="changelog"><summary>History</summary> 2454<table> 2455<tbody><tr><th>Version</th><th>Changes</th></tr> 2456<tr><td>v13.4.0, v12.16.0</td> 2457<td><p>Documentation-only deprecation.</p></td></tr> 2458</tbody></table> 2459</details> 2460</div> 2461<p>Type: Documentation-only</p> 2462<p><a href="http.html#http_response_finished"><code>response.finished</code></a> indicates whether <a href="http.html#http_response_end_data_encoding_callback"><code>response.end()</code></a> has been 2463called, not whether <code>'finish'</code> has been emitted and the underlying data 2464is flushed.</p> 2465<p>Use <a href="http.html#http_response_writablefinished"><code>response.writableFinished</code></a> or <a href="http.html#http_response_writableended"><code>response.writableEnded</code></a> 2466accordingly instead to avoid the ambiguity.</p> 2467<p>To maintain existing behaviour <code>response.finished</code> should be replaced with 2468<code>response.writableEnded</code>.</p> 2469<h4 id="DEP0137">DEP0137: Closing fs.FileHandle on garbage collection<span><a class="mark" href="#deprecations_dep0137_closing_fs_filehandle_on_garbage_collection" id="deprecations_dep0137_closing_fs_filehandle_on_garbage_collection">#</a></span></h4> 2470<div class="api_metadata"> 2471<details class="changelog"><summary>History</summary> 2472<table> 2473<tbody><tr><th>Version</th><th>Changes</th></tr> 2474<tr><td>v14.0.0</td> 2475<td><p>Runtime deprecation.</p></td></tr> 2476</tbody></table> 2477</details> 2478</div> 2479<p>Type: Runtime</p> 2480<p>Allowing a <a href="fs.html#fs_class_filehandle"><code>fs.FileHandle</code></a> object to be closed on garbage collection is 2481deprecated. In the future, doing so might result in a thrown error that will 2482terminate the process.</p> 2483<p>Please ensure that all <code>fs.FileHandle</code> objects are explicitly closed using 2484<code>FileHandle.prototype.close()</code> when the <code>fs.FileHandle</code> is no longer needed:</p> 2485<pre><code class="language-js"><span class="hljs-keyword">const</span> fsPromises = <span class="hljs-built_in">require</span>(<span class="hljs-string">'fs'</span>).<span class="hljs-property">promises</span>; 2486<span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">openAndClose</span>(<span class="hljs-params"></span>) { 2487 <span class="hljs-keyword">let</span> filehandle; 2488 <span class="hljs-keyword">try</span> { 2489 filehandle = <span class="hljs-keyword">await</span> fsPromises.<span class="hljs-title function_">open</span>(<span class="hljs-string">'thefile.txt'</span>, <span class="hljs-string">'r'</span>); 2490 } <span class="hljs-keyword">finally</span> { 2491 <span class="hljs-keyword">if</span> (filehandle !== <span class="hljs-literal">undefined</span>) 2492 <span class="hljs-keyword">await</span> filehandle.<span class="hljs-title function_">close</span>(); 2493 } 2494}</code></pre> 2495<h4 id="DEP0138">DEP0138: <code>process.mainModule</code><span><a class="mark" href="#deprecations_dep0138_process_mainmodule" id="deprecations_dep0138_process_mainmodule">#</a></span></h4> 2496<div class="api_metadata"> 2497<details class="changelog"><summary>History</summary> 2498<table> 2499<tbody><tr><th>Version</th><th>Changes</th></tr> 2500<tr><td>v14.0.0</td> 2501<td><p>Documentation-only deprecation.</p></td></tr> 2502</tbody></table> 2503</details> 2504</div> 2505<p>Type: Documentation-only</p> 2506<p><a href="process.html#process_process_mainmodule"><code>process.mainModule</code></a> is a CommonJS-only feature while <code>process</code> global 2507object is shared with non-CommonJS environment. Its use within ECMAScript 2508modules is unsupported.</p> 2509<p>It is deprecated in favor of <a href="modules.html#modules_accessing_the_main_module"><code>require.main</code></a>, because it serves the same 2510purpose and is only available on CommonJS environment.</p> 2511<h4 id="DEP0139">DEP0139: <code>process.umask()</code> with no arguments<span><a class="mark" href="#deprecations_dep0139_process_umask_with_no_arguments" id="deprecations_dep0139_process_umask_with_no_arguments">#</a></span></h4> 2512<div class="api_metadata"> 2513<details class="changelog"><summary>History</summary> 2514<table> 2515<tbody><tr><th>Version</th><th>Changes</th></tr> 2516<tr><td>v14.0.0, v12.19.0</td> 2517<td><p>Documentation-only deprecation.</p></td></tr> 2518</tbody></table> 2519</details> 2520</div> 2521<p>Type: Documentation-only</p> 2522<p>Calling <code>process.umask()</code> with no argument causes the process-wide umask to be 2523written twice. This introduces a race condition between threads, and is a 2524potential security vulnerability. There is no safe, cross-platform alternative 2525API.</p> 2526<h4 id="DEP0140">DEP0140: Use <code>request.destroy()</code> instead of <code>request.abort()</code><span><a class="mark" href="#deprecations_dep0140_use_request_destroy_instead_of_request_abort" id="deprecations_dep0140_use_request_destroy_instead_of_request_abort">#</a></span></h4> 2527<div class="api_metadata"> 2528<details class="changelog"><summary>History</summary> 2529<table> 2530<tbody><tr><th>Version</th><th>Changes</th></tr> 2531<tr><td>v14.1.0, v13.14.0</td> 2532<td><p>Documentation-only deprecation.</p></td></tr> 2533</tbody></table> 2534</details> 2535</div> 2536<p>Type: Documentation-only</p> 2537<p>Use <a href="http.html#http_request_destroy_error"><code>request.destroy()</code></a> instead of <a href="http.html#http_request_abort"><code>request.abort()</code></a>.</p> 2538<h4 id="DEP0141">DEP0141: <code>repl.inputStream</code> and <code>repl.outputStream</code><span><a class="mark" href="#deprecations_dep0141_repl_inputstream_and_repl_outputstream" id="deprecations_dep0141_repl_inputstream_and_repl_outputstream">#</a></span></h4> 2539<div class="api_metadata"> 2540<details class="changelog"><summary>History</summary> 2541<table> 2542<tbody><tr><th>Version</th><th>Changes</th></tr> 2543<tr><td>v14.3.0</td> 2544<td><p>Documentation-only (supports [<code>--pending-deprecation</code>][]).</p></td></tr> 2545</tbody></table> 2546</details> 2547</div> 2548<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2549<p>The <code>repl</code> module exported the input and output stream twice. Use <code>.input</code> 2550instead of <code>.inputStream</code> and <code>.output</code> instead of <code>.outputStream</code>.</p> 2551<h4 id="DEP0142">DEP0142: <code>repl._builtinLibs</code><span><a class="mark" href="#deprecations_dep0142_repl_builtinlibs" id="deprecations_dep0142_repl_builtinlibs">#</a></span></h4> 2552<div class="api_metadata"> 2553<details class="changelog"><summary>History</summary> 2554<table> 2555<tbody><tr><th>Version</th><th>Changes</th></tr> 2556<tr><td>v14.3.0</td> 2557<td><p>Documentation-only (supports [<code>--pending-deprecation</code>][]).</p></td></tr> 2558</tbody></table> 2559</details> 2560</div> 2561<p>Type: Documentation-only</p> 2562<p>The <code>repl</code> module exports a <code>_builtinLibs</code> property that contains an array with 2563native modules. It was incomplete so far and instead it's better to rely upon 2564<code>require('module').builtinModules</code>.</p> 2565<h4 id="DEP0143">DEP0143: <code>Transform._transformState</code><span><a class="mark" href="#deprecations_dep0143_transform_transformstate" id="deprecations_dep0143_transform_transformstate">#</a></span></h4> 2566<div class="api_metadata"> 2567<details class="changelog"><summary>History</summary> 2568<table> 2569<tbody><tr><th>Version</th><th>Changes</th></tr> 2570<tr><td>v14.5.0</td> 2571<td><p>Runtime deprecation.</p></td></tr> 2572</tbody></table> 2573</details> 2574</div> 2575<p>Type: Runtime 2576<code>Transform._transformState</code> will be removed in future versions where it is 2577no longer required due to simplification of the implementation.</p> 2578<h4 id="DEP0144">DEP0144: <code>module.parent</code><span><a class="mark" href="#deprecations_dep0144_module_parent" id="deprecations_dep0144_module_parent">#</a></span></h4> 2579<div class="api_metadata"> 2580<details class="changelog"><summary>History</summary> 2581<table> 2582<tbody><tr><th>Version</th><th>Changes</th></tr> 2583<tr><td>v14.6.0, v12.19.0</td> 2584<td><p>Documentation-only deprecation.</p></td></tr> 2585</tbody></table> 2586</details> 2587</div> 2588<p>Type: Documentation-only</p> 2589<p>A CommonJS module can access the first module that required it using 2590<code>module.parent</code>. This feature is deprecated because it does not work 2591consistently in the presence of ECMAScript modules and because it gives an 2592inaccurate representation of the CommonJS module graph.</p> 2593<p>Some modules use it to check if they are the entry point of the current process. 2594Instead, it is recommended to compare <code>require.main</code> and <code>module</code>:</p> 2595<pre><code class="language-js"><span class="hljs-keyword">if</span> (<span class="hljs-built_in">require</span>.<span class="hljs-property">main</span> === <span class="hljs-variable language_">module</span>) { 2596 <span class="hljs-comment">// Code section that will run only if current file is the entry point.</span> 2597}</code></pre> 2598<p>When looking for the CommonJS modules that have required the current one, 2599<code>require.cache</code> and <code>module.children</code> can be used:</p> 2600<pre><code class="language-js"><span class="hljs-keyword">const</span> moduleParents = <span class="hljs-title class_">Object</span>.<span class="hljs-title function_">values</span>(<span class="hljs-built_in">require</span>.<span class="hljs-property">cache</span>) 2601 .<span class="hljs-title function_">filter</span>(<span class="hljs-function">(<span class="hljs-params">m</span>) =></span> m.<span class="hljs-property">children</span>.<span class="hljs-title function_">includes</span>(<span class="hljs-variable language_">module</span>));</code></pre> 2602<h4 id="DEP0145">DEP0145: <code>socket.bufferSize</code><span><a class="mark" href="#deprecations_dep0145_socket_buffersize" id="deprecations_dep0145_socket_buffersize">#</a></span></h4> 2603<div class="api_metadata"> 2604<details class="changelog"><summary>History</summary> 2605<table> 2606<tbody><tr><th>Version</th><th>Changes</th></tr> 2607<tr><td>v14.6.0</td> 2608<td><p>Documentation-only deprecation.</p></td></tr> 2609</tbody></table> 2610</details> 2611</div> 2612<p>Type: Documentation-only</p> 2613<p><a href="net.html#net_socket_buffersize"><code>socket.bufferSize</code></a> is just an alias for <a href="stream.html#stream_writable_writablelength"><code>writable.writableLength</code></a>.</p> 2614<h4 id="DEP0146">DEP0146: <code>new crypto.Certificate()</code><span><a class="mark" href="#deprecations_dep0146_new_crypto_certificate" id="deprecations_dep0146_new_crypto_certificate">#</a></span></h4> 2615<div class="api_metadata"> 2616<details class="changelog"><summary>History</summary> 2617<table> 2618<tbody><tr><th>Version</th><th>Changes</th></tr> 2619<tr><td>v14.9.0</td> 2620<td><p>Documentation-only deprecation.</p></td></tr> 2621</tbody></table> 2622</details> 2623</div> 2624<p>Type: Documentation-only</p> 2625<p>The <a href="crypto.html#crypto_legacy_api"><code>crypto.Certificate()</code> constructor</a> is deprecated. Use 2626<a href="crypto.html#crypto_class_certificate">static methods of <code>crypto.Certificate()</code></a> instead.</p> 2627<h4 id="DEP0147">DEP0147: <code>fs.rmdir(path, { recursive: true })</code><span><a class="mark" href="#deprecations_dep0147_fs_rmdir_path_recursive_true" id="deprecations_dep0147_fs_rmdir_path_recursive_true">#</a></span></h4> 2628<div class="api_metadata"> 2629<details class="changelog"><summary>History</summary> 2630<table> 2631<tbody><tr><th>Version</th><th>Changes</th></tr> 2632<tr><td>v14.14.0</td> 2633<td><p>Documentation-only deprecation.</p></td></tr> 2634</tbody></table> 2635</details> 2636</div> 2637<p>Type: Documentation-only</p> 2638<p>In future versions of Node.js, <code>fs.rmdir(path, { recursive: true })</code> will throw 2639on nonexistent paths, or when given a file as a target. 2640Use <code>fs.rm(path, { recursive: true, force: true })</code> instead.</p> 2641<h4 id="DEP0151">DEP0151: Main index lookup and extension searching<span><a class="mark" href="#deprecations_dep0151_main_index_lookup_and_extension_searching" id="deprecations_dep0151_main_index_lookup_and_extension_searching">#</a></span></h4> 2642<div class="api_metadata"> 2643<details class="changelog"><summary>History</summary> 2644<table> 2645<tbody><tr><th>Version</th><th>Changes</th></tr> 2646<tr><td>v14.18.0</td> 2647<td><p>Documentation-only deprecation with <code>--pending-deprecation</code> support.</p></td></tr> 2648</tbody></table> 2649</details> 2650</div> 2651<p>Type: Documentation-only (supports <a href="cli.html#cli_pending_deprecation"><code>--pending-deprecation</code></a>)</p> 2652<p>Previously, <code>index.js</code> and extension searching lookups would apply to 2653<code>import 'pkg'</code> main entry point resolution, even when resolving ES modules.</p> 2654<p>With this deprecation, all ES module main entry point resolutions require 2655an explicit <a href="packages.html#packages_main_entry_point_export"><code>"exports"</code> or <code>"main"</code> entry</a> with the exact file extension.</p></section> 2656 <!-- API END --> 2657 </div> 2658 </div> 2659 </div> 2660 <script> 2661 'use strict'; 2662 { 2663 const kCustomPreference = 'customDarkTheme'; 2664 const userSettings = sessionStorage.getItem(kCustomPreference); 2665 const themeToggleButton = document.getElementById('theme-toggle-btn'); 2666 if (userSettings === null && window.matchMedia) { 2667 const mq = window.matchMedia('(prefers-color-scheme: dark)'); 2668 if ('onchange' in mq) { 2669 function mqChangeListener(e) { 2670 document.body.classList.toggle('dark-mode', e.matches); 2671 } 2672 mq.addEventListener('change', mqChangeListener); 2673 if (themeToggleButton) { 2674 themeToggleButton.addEventListener('click', function() { 2675 mq.removeEventListener('change', mqChangeListener); 2676 }, { once: true }); 2677 } 2678 } 2679 if (mq.matches) { 2680 document.body.classList.add('dark-mode'); 2681 } 2682 } else if (userSettings === 'true') { 2683 document.body.classList.add('dark-mode'); 2684 } 2685 if (themeToggleButton) { 2686 themeToggleButton.hidden = false; 2687 themeToggleButton.addEventListener('click', function() { 2688 sessionStorage.setItem( 2689 kCustomPreference, 2690 document.body.classList.toggle('dark-mode') 2691 ); 2692 }); 2693 } 2694 } 2695 </script> 2696</body> 2697</html> 2698